diff --git a/nPaper-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/nPaper-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java index 07e4a733..728b5263 100644 --- a/nPaper-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/nPaper-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -71,11 +71,11 @@ protected boolean g_() { } protected void c() { - this.datawatcher.a(17, new Integer(0)); - this.datawatcher.a(18, new Integer(1)); - this.datawatcher.a(19, new Float(0.0F)); + this.datawatcher.a(17, 0); + this.datawatcher.a(18, 1); + this.datawatcher.a(19, 0.0F); this.datawatcher.a(20, new org.spigotmc.ProtocolData.DualInt(0, 0)); // Spigot - protocol patch - this.datawatcher.a(21, new Integer(6)); + this.datawatcher.a(21, 6); this.datawatcher.a(22, Byte.valueOf((byte) 0)); } diff --git a/nPaper-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/nPaper-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java index 37b87aa2..9e2bdd0e 100644 --- a/nPaper-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/nPaper-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -476,7 +476,6 @@ public void scanPlayers(List list) { static { packetCreators.put(EntityItem.class, entity -> new PacketPlayOutSpawnEntity(entity, 2, 1)); packetCreators.put(EntityPlayer.class, entity -> new PacketPlayOutNamedEntitySpawn((EntityHuman) entity)); - packetCreators.put(EntityMinecartAbstract.class, entity -> new PacketPlayOutSpawnEntity(entity, 10, ((EntityMinecartAbstract) entity).m())); packetCreators.put(EntityBoat.class, entity -> new PacketPlayOutSpawnEntity(entity, 1)); packetCreators.put(EntityFishingHook.class, entity -> { final EntityHuman owner = ((EntityFishingHook) entity).owner; @@ -533,6 +532,10 @@ private Packet createFireballPacket(EntityFireball entityfireball) { return packet; } + private Packet createMinecartPacket(EntityMinecartAbstract entityminecartabstract) { + return new PacketPlayOutSpawnEntity(this.tracker, 10, entityminecartabstract.m()); + } + private Packet c() { if (this.tracker.dead) { // CraftBukkit start - Remove useless error spam, just return @@ -546,6 +549,10 @@ private Packet c() { return new PacketPlayOutSpawnEntityLiving((EntityLiving) this.tracker); } + if (this.tracker instanceof EntityMinecartAbstract) { + return this.createMinecartPacket((EntityMinecartAbstract) this.tracker); + } + if (this.tracker instanceof EntityFireball) { return this.createFireballPacket((EntityFireball) this.tracker); }