Skip to content

Commit

Permalink
Merge branch 'sathonay:development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Obydux authored Aug 8, 2024
2 parents 85e293a + 00d6432 commit 3625862
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 3625862

Please sign in to comment.