-Codechange: applied LexManos' request
This commit is contained in:
parent
f76827e253
commit
9f6ed73b6c
2 changed files with 6 additions and 11 deletions
|
@ -29,7 +29,6 @@ import net.minecraft.src.Packet250CustomPayload;
|
|||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.mod_MinecraftForge;
|
||||
import net.minecraft.src.forge.packets.PacketEntitySpawn;
|
||||
import net.minecraft.src.forge.packets.PacketEntityTrack;
|
||||
import net.minecraft.src.forge.packets.PacketHandlerBase;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
@ -711,12 +710,6 @@ public class ForgeHooks
|
|||
PacketEntitySpawn pkt = new PacketEntitySpawn(entity, info.Mod, info.ID);
|
||||
return pkt.getPacket();
|
||||
}
|
||||
|
||||
public static Packet getEntityTrackPacket(int entityId, int serverPosX, int serverPosY, int serverPosZ)
|
||||
{
|
||||
PacketEntityTrack pkt = new PacketEntityTrack(entityId, serverPosX, serverPosY, serverPosZ);
|
||||
return pkt.getPacket();
|
||||
}
|
||||
|
||||
public static Hashtable<Integer, NetworkMod> networkMods = new Hashtable<Integer, NetworkMod>();
|
||||
public static Hashtable<BaseMod, IGuiHandler> guiHandlers = new Hashtable<BaseMod, IGuiHandler>();
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/EntityTrackerEntry.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityTrackerEntry.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -5,6 +5,8 @@
|
||||
@@ -5,6 +5,9 @@
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
+import net.minecraft.src.forge.ForgeHooks;
|
||||
+import net.minecraft.src.forge.packets.PacketEntityTrack;
|
||||
+
|
||||
public class EntityTrackerEntry
|
||||
{
|
||||
/** The entity that this EntityTrackerEntry tracks. */
|
||||
@@ -226,6 +228,14 @@
|
||||
@@ -226,6 +229,15 @@
|
||||
this.trackedPlayers.add(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.playerNetServerHandler.sendPacket(this.getSpawnPacket());
|
||||
|
||||
|
@ -18,13 +19,14 @@
|
|||
+ int posZ = MathHelper.floor_double(this.trackedEntity.posZ * 32.0D);
|
||||
+ if (posX != this.encodedPosX || posY != this.encodedPosY || posZ != this.encodedPosZ)
|
||||
+ {
|
||||
+ par1EntityPlayerMP.playerNetServerHandler.sendPacket(ForgeHooks.getEntityTrackPacket(this.trackedEntity.entityId, this.encodedPosX, this.encodedPosY, this.encodedPosZ));
|
||||
+ PacketEntityTrack pkt = new PacketEntityTrack(this.trackedEntity.entityId, this.encodedPosX, this.encodedPosY, this.encodedPosZ);
|
||||
+ par1EntityPlayerMP.playerNetServerHandler.sendPacket(pkt.getPacket());
|
||||
+ }
|
||||
+
|
||||
if (this.shouldSendMotionUpdates)
|
||||
{
|
||||
par1EntityPlayerMP.playerNetServerHandler.sendPacket(new Packet28EntityVelocity(this.trackedEntity.entityId, this.trackedEntity.motionX, this.trackedEntity.motionY, this.trackedEntity.motionZ));
|
||||
@@ -286,6 +296,11 @@
|
||||
@@ -286,6 +298,11 @@
|
||||
{
|
||||
System.out.println("Fetching addPacket for removed entity");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue