@@ -41,7 +41,7 @@
|
||||
public final class ItemStack {
|
||||
|
||||
public static final Codec<ItemStack> CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
@@ -139,16 +173,30 @@
|
||||
@@ -140,16 +174,30 @@
|
||||
this.updateEmptyCacheFlag();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
this.getItem().verifyTagAfterLoad(this.tag);
|
||||
}
|
||||
|
||||
@@ -156,6 +204,11 @@
|
||||
@@ -157,6 +205,11 @@
|
||||
this.setDamageValue(this.getDamageValue());
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
this.updateEmptyCacheFlag();
|
||||
}
|
||||
|
||||
@@ -193,7 +246,7 @@
|
||||
@@ -194,7 +247,7 @@
|
||||
return this.getItem() == item;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
EntityHuman entityhuman = itemactioncontext.getPlayer();
|
||||
BlockPosition blockposition = itemactioncontext.getClickedPos();
|
||||
ShapeDetectorBlock shapedetectorblock = new ShapeDetectorBlock(itemactioncontext.getLevel(), blockposition, false);
|
||||
@@ -201,12 +254,157 @@
|
||||
@@ -202,12 +255,157 @@
|
||||
if (entityhuman != null && !entityhuman.getAbilities().mayBuild && !this.hasAdventureModePlaceTagForBlock(itemactioncontext.getLevel().getTagManager(), shapedetectorblock)) {
|
||||
return EnumInteractionResult.PASS;
|
||||
} else {
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
return enuminteractionresult;
|
||||
}
|
||||
@@ -287,6 +485,21 @@
|
||||
@@ -288,6 +486,21 @@
|
||||
}
|
||||
|
||||
i -= k;
|
||||
@@ -276,7 +276,7 @@
|
||||
if (i <= 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -308,6 +521,11 @@
|
||||
@@ -309,6 +522,11 @@
|
||||
if (this.hurt(i, t0.getRandom(), t0 instanceof EntityPlayer ? (EntityPlayer) t0 : null)) {
|
||||
consumer.accept(t0);
|
||||
Item item = this.getItem();
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
this.shrink(1);
|
||||
if (t0 instanceof EntityHuman) {
|
||||
@@ -463,6 +681,17 @@
|
||||
@@ -464,6 +682,17 @@
|
||||
return this.tag;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
public NBTTagCompound getOrCreateTag() {
|
||||
if (this.tag == null) {
|
||||
this.setTag(new NBTTagCompound());
|
||||
@@ -843,6 +1072,12 @@
|
||||
@@ -844,6 +1073,12 @@
|
||||
}
|
||||
|
||||
public void setRepairCost(int i) {
|
||||
@@ -319,7 +319,7 @@
|
||||
this.getOrCreateTag().putInt("RepairCost", i);
|
||||
}
|
||||
|
||||
@@ -892,6 +1127,13 @@
|
||||
@@ -893,6 +1128,13 @@
|
||||
nbttaglist.add(nbttagcompound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user