From 40161bf5697e0790fd96ae64b016ab25ca0a59f6 Mon Sep 17 00:00:00 2001 From: Ned Loynd Date: Sun, 24 Sep 2023 11:20:12 +1000 Subject: [PATCH] Remove unnecessary entity packet code --- .../morebows/entities/ArrowSpawner.java | 14 -------------- .../morebows/entities/CustomArrow.java | 8 -------- 2 files changed, 22 deletions(-) diff --git a/src/main/java/iDiamondhunter/morebows/entities/ArrowSpawner.java b/src/main/java/iDiamondhunter/morebows/entities/ArrowSpawner.java index 2d6d452..f61ac29 100755 --- a/src/main/java/iDiamondhunter/morebows/entities/ArrowSpawner.java +++ b/src/main/java/iDiamondhunter/morebows/entities/ArrowSpawner.java @@ -6,9 +6,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import iDiamondhunter.morebows.MoreBows; import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.protocol.Packet; -import net.minecraft.network.protocol.game.ClientGamePacketListener; -import net.minecraft.network.protocol.game.ClientboundAddEntityPacket; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.entity.Entity; @@ -64,17 +61,6 @@ public ArrowSpawner(Level worldIn, double posX, double posY, double posZ, float this.arrows = arrows; } - /** - * Creates the spawn packet. - * TODO review - * - * @return the packet - */ - @Override - public Packet getAddEntityPacket() { - return new ClientboundAddEntityPacket(this); - } - /** * Initializes the data tracker, not that ArrowSpawner uses it. * TODO review diff --git a/src/main/java/iDiamondhunter/morebows/entities/CustomArrow.java b/src/main/java/iDiamondhunter/morebows/entities/CustomArrow.java index bfcb4bf..3a3c240 100755 --- a/src/main/java/iDiamondhunter/morebows/entities/CustomArrow.java +++ b/src/main/java/iDiamondhunter/morebows/entities/CustomArrow.java @@ -10,8 +10,6 @@ import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.protocol.Packet; -import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -35,7 +33,6 @@ import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.network.NetworkHooks; /** * This entity is a custom arrow. @@ -52,11 +49,6 @@ public final class CustomArrow extends AbstractArrow implements ItemSupplier { /** If this is the first time this arrow has hit a block. */ private boolean firstBlockHit = true; - @Override - public Packet getAddEntityPacket() { - return NetworkHooks.getEntitySpawningPacket(this); - } - /** * Don't use this. * TODO I think I can't remove these constructors, but I'm not sure.