diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch new file mode 100644 index 0000000000..d23fef44a0 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch @@ -0,0 +1,87 @@ +--- a/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java ++++ b/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java +@@ -14,33 +14,38 @@ + + private static final EntityDataAccessor<ItemStack> DATA_ITEM_STACK = SynchedEntityData.defineId(ThrowableItemProjectile.class, EntityDataSerializers.ITEM_STACK); + +- public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entitytype, Level level) { +- super(entitytype, level); ++ public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entityType, Level level) { ++ super(entityType, level); + } + +- public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entitytype, double d0, double d1, double d2, Level level) { +- super(entitytype, d0, d1, d2, level); ++ public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entityType, double x, double d1, double y, Level world) { ++ super(entityType, x, d1, y, world); + } + +- public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entitytype, LivingEntity livingentity, Level level) { +- super(entitytype, livingentity, level); ++ public ThrowableItemProjectile(EntityType<? extends ThrowableItemProjectile> entityType, LivingEntity shooter, Level level) { ++ super(entityType, shooter, level); + } + +- public void setItem(ItemStack itemstack) { +- if (!itemstack.is(this.getDefaultItem()) || itemstack.hasTag()) { +- this.getEntityData().set(ThrowableItemProjectile.DATA_ITEM_STACK, itemstack.copyWithCount(1)); ++ public void setItem(ItemStack stack) { ++ if (!stack.is(this.getDefaultItem()) || stack.hasTag()) { ++ this.getEntityData().set(ThrowableItemProjectile.DATA_ITEM_STACK, stack.copyWithCount(1)); + } + + } + + protected abstract Item getDefaultItem(); + +- protected ItemStack getItemRaw() { ++ // CraftBukkit start ++ public Item getDefaultItemPublic() { ++ return getDefaultItem(); ++ } ++ // CraftBukkit end ++ ++ public ItemStack getItemRaw() { + return (ItemStack) this.getEntityData().get(ThrowableItemProjectile.DATA_ITEM_STACK); + } + + @Override +- @Override + public ItemStack getItem() { + ItemStack itemstack = this.getItemRaw(); + +@@ -48,28 +53,25 @@ + } + + @Override +- @Override + protected void defineSynchedData() { + this.getEntityData().define(ThrowableItemProjectile.DATA_ITEM_STACK, ItemStack.EMPTY); + } + + @Override +- @Override +- public void addAdditionalSaveData(CompoundTag compoundtag) { +- super.addAdditionalSaveData(compoundtag); ++ public void addAdditionalSaveData(CompoundTag compound) { ++ super.addAdditionalSaveData(compound); + ItemStack itemstack = this.getItemRaw(); + + if (!itemstack.isEmpty()) { +- compoundtag.put("Item", itemstack.save(new CompoundTag())); ++ compound.put("Item", itemstack.save(new CompoundTag())); + } + + } + + @Override +- @Override +- public void readAdditionalSaveData(CompoundTag compoundtag) { +- super.readAdditionalSaveData(compoundtag); +- ItemStack itemstack = ItemStack.of(compoundtag.getCompound("Item")); ++ public void readAdditionalSaveData(CompoundTag compound) { ++ super.readAdditionalSaveData(compound); ++ ItemStack itemstack = ItemStack.of(compound.getCompound("Item")); + + this.setItem(itemstack); + } |