mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
Merge branch '1.21.1' into 1.20.6
# Conflicts: # gradle.properties # src/main/java/one/oth3r/sit/screen/ConfigScreen.java # src/main/java/one/oth3r/sit/screen/UnderConstructionScreen.java # src/main/java/one/oth3r/sit/utl/Utl.java
This commit is contained in:
commit
f2cba71afa
65 changed files with 960 additions and 526 deletions
|
@ -7,6 +7,7 @@ import net.minecraft.registry.tag.TagKey;
|
|||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CustomItem {
|
||||
@SerializedName("item-ids")
|
||||
|
@ -21,6 +22,11 @@ public class CustomItem {
|
|||
this.itemTags = itemTags;
|
||||
}
|
||||
|
||||
public CustomItem(CustomItem customItem) {
|
||||
this.itemIDs = new ArrayList<>(customItem.itemIDs);
|
||||
this.itemTags = new ArrayList<>(customItem.itemTags);
|
||||
}
|
||||
|
||||
public ArrayList<String> getItemIDs() {
|
||||
return itemIDs;
|
||||
}
|
||||
|
@ -62,4 +68,16 @@ public class CustomItem {
|
|||
// not returning true in the loop because there might be a (!) not tag that the item might fall into, after the item was already in another tag
|
||||
return tagCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
CustomItem that = (CustomItem) o;
|
||||
return Objects.equals(itemIDs, that.itemIDs) && Objects.equals(itemTags, that.itemTags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(itemIDs, itemTags);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue