aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch
new file mode 100644
index 0000000000..750478e696
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/Fireball.java.patch
@@ -0,0 +1,81 @@
+--- a/net/minecraft/world/entity/projectile/Fireball.java
++++ b/net/minecraft/world/entity/projectile/Fireball.java
+@@ -14,31 +14,30 @@
+
+ private static final EntityDataAccessor<ItemStack> DATA_ITEM_STACK = SynchedEntityData.defineId(Fireball.class, EntityDataSerializers.ITEM_STACK);
+
+- public Fireball(EntityType<? extends Fireball> entitytype, Level level) {
+- super(entitytype, level);
++ public Fireball(EntityType<? extends Fireball> entityType, Level level) {
++ super(entityType, level);
+ }
+
+- public Fireball(EntityType<? extends Fireball> entitytype, double d0, double d1, double d2, double d3, double d4, double d5, Level level) {
+- super(entitytype, d0, d1, d2, d3, d4, d5, level);
++ public Fireball(EntityType<? extends Fireball> entityType, double x, double d1, double y, double d3, double z, double d5, Level offsetX) {
++ super(entityType, x, d1, y, d3, z, d5, offsetX);
+ }
+
+- public Fireball(EntityType<? extends Fireball> entitytype, LivingEntity livingentity, double d0, double d1, double d2, Level level) {
+- super(entitytype, livingentity, d0, d1, d2, level);
++ public Fireball(EntityType<? extends Fireball> entityType, LivingEntity shooter, double offsetX, double d1, double offsetY, Level world) {
++ super(entityType, shooter, offsetX, d1, offsetY, world);
+ }
+
+- public void setItem(ItemStack itemstack) {
+- if (!itemstack.is(Items.FIRE_CHARGE) || itemstack.hasTag()) {
+- this.getEntityData().set(Fireball.DATA_ITEM_STACK, itemstack.copyWithCount(1));
++ public void setItem(ItemStack stack) {
++ if (!stack.is(Items.FIRE_CHARGE) || stack.hasTag()) {
++ this.getEntityData().set(Fireball.DATA_ITEM_STACK, stack.copyWithCount(1));
+ }
+
+ }
+
+- protected ItemStack getItemRaw() {
++ public ItemStack getItemRaw() {
+ return (ItemStack) this.getEntityData().get(Fireball.DATA_ITEM_STACK);
+ }
+
+ @Override
+- @Override
+ public ItemStack getItem() {
+ ItemStack itemstack = this.getItemRaw();
+
+@@ -46,29 +45,26 @@
+ }
+
+ @Override
+- @Override
+ protected void defineSynchedData() {
+ this.getEntityData().define(Fireball.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);
++ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-5474 probably came from bugged earlier versions
+ }
+ }