Skip to content

Commit

Permalink
Remove unnecessary entity packet code
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Sep 24, 2023
1 parent f51909f commit 40161bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
14 changes: 0 additions & 14 deletions src/main/java/iDiamondhunter/morebows/entities/ArrowSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ClientGamePacketListener> getAddEntityPacket() {
return new ClientboundAddEntityPacket(this);
}

/**
* Initializes the data tracker, not that ArrowSpawner uses it.
* TODO review
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -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<ClientGamePacketListener> getAddEntityPacket() {
return NetworkHooks.getEntitySpawningPacket(this);
}

/**
* Don't use this.
* TODO I think I can't remove these constructors, but I'm not sure.
Expand Down

0 comments on commit 40161bf

Please sign in to comment.