1.21.6 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
committed by
Nassim Jahnke
parent
39203a65e0
commit
a24f9b204c
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -198,12 +_,20 @@
|
||||
@@ -195,12 +_,20 @@
|
||||
|
||||
@Override
|
||||
public void encode(RegistryFriendlyByteBuf buffer, ItemStack value) {
|
||||
@ -23,7 +23,7 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -373,10 +_,166 @@
|
||||
@@ -365,10 +_,166 @@
|
||||
return InteractionResult.PASS;
|
||||
} else {
|
||||
Item item = this.getItem();
|
||||
@ -192,7 +192,7 @@
|
||||
|
||||
return interactionResult;
|
||||
}
|
||||
@@ -473,31 +_,71 @@
|
||||
@@ -449,31 +_,71 @@
|
||||
return this.isDamageableItem() && this.getDamageValue() >= this.getMaxDamage() - 1;
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@
|
||||
this.shrink(1);
|
||||
onBreak.accept(item);
|
||||
}
|
||||
@@ -510,15 +_,39 @@
|
||||
@@ -486,7 +_,26 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -300,6 +300,8 @@
|
||||
this.applyDamage(min, serverPlayer, item -> {});
|
||||
}
|
||||
}
|
||||
@@ -496,9 +_,14 @@
|
||||
}
|
||||
|
||||
public void hurtAndBreak(int amount, LivingEntity entity, EquipmentSlot slot) {
|
||||
+ // Paper start - add param to skip infinite mats check
|
||||
@ -314,7 +316,7 @@
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -732,6 +_,12 @@
|
||||
@@ -712,6 +_,12 @@
|
||||
return this.getItem().useOnRelease(this);
|
||||
}
|
||||
|
||||
@ -327,7 +329,7 @@
|
||||
@Nullable
|
||||
public <T> T set(DataComponentType<T> component, @Nullable T value) {
|
||||
return this.components.set(component, value);
|
||||
@@ -779,6 +_,28 @@
|
||||
@@ -759,6 +_,28 @@
|
||||
this.getItem().verifyComponentsAfterLoad(this);
|
||||
}
|
||||
|
||||
@ -356,7 +358,7 @@
|
||||
public Component getHoverName() {
|
||||
Component customName = this.getCustomName();
|
||||
return customName != null ? customName : this.getItemName();
|
||||
@@ -1054,6 +_,19 @@
|
||||
@@ -986,6 +_,19 @@
|
||||
EnchantmentHelper.forEachModifier(this, equipmentSLot, action);
|
||||
}
|
||||
|
||||
@ -376,7 +378,7 @@
|
||||
public Component getDisplayName() {
|
||||
MutableComponent mutableComponent = Component.empty().append(this.getHoverName());
|
||||
if (this.has(DataComponents.CUSTOM_NAME)) {
|
||||
@@ -1109,7 +_,7 @@
|
||||
@@ -1041,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void consume(int amount, @Nullable LivingEntity entity) {
|
||||
|
||||
Reference in New Issue
Block a user