Update entity status packet to use 1 instead of 2
This commit is contained in:
parent
68d16995e0
commit
22f2ae593b
@ -553,7 +553,7 @@ public class PacketsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (event.getPacketID() == Packets.Server.ENTITY_STATUS) {
|
} else if (event.getPacketID() == Packets.Server.ENTITY_STATUS) {
|
||||||
if ((Byte) mods.read(1) == 2) {
|
if ((Byte) mods.read(1) == 1) {
|
||||||
// It made a damage animation
|
// It made a damage animation
|
||||||
Entity entity = event.getPacket().getEntityModifier(observer.getWorld()).read(0);
|
Entity entity = event.getPacket().getEntityModifier(observer.getWorld()).read(0);
|
||||||
Disguise disguise = DisguiseAPI.getDisguise(entity);
|
Disguise disguise = DisguiseAPI.getDisguise(entity);
|
||||||
@ -617,7 +617,7 @@ public class PacketsManager {
|
|||||||
Packets.Server.REL_ENTITY_MOVE_LOOK, Packets.Server.ENTITY_LOOK, Packets.Server.ENTITY_TELEPORT,
|
Packets.Server.REL_ENTITY_MOVE_LOOK, Packets.Server.ENTITY_LOOK, Packets.Server.ENTITY_TELEPORT,
|
||||||
Packets.Server.ENTITY_HEAD_ROTATION, Packets.Server.ENTITY_METADATA, Packets.Server.ENTITY_EQUIPMENT,
|
Packets.Server.ENTITY_HEAD_ROTATION, Packets.Server.ENTITY_METADATA, Packets.Server.ENTITY_EQUIPMENT,
|
||||||
Packets.Server.ARM_ANIMATION, Packets.Server.ENTITY_LOCATION_ACTION, Packets.Server.MOB_EFFECT,
|
Packets.Server.ARM_ANIMATION, Packets.Server.ENTITY_LOCATION_ACTION, Packets.Server.MOB_EFFECT,
|
||||||
Packets.Server.ENTITY_STATUS, Packets.Server.ENTITY_VELOCITY, Packets.Server.UPDATE_ATTRIBUTES) {
|
/* Packets.Server.ENTITY_STATUS, */Packets.Server.ENTITY_VELOCITY, Packets.Server.UPDATE_ATTRIBUTES) {
|
||||||
@Override
|
@Override
|
||||||
public void onPacketSending(PacketEvent event) {
|
public void onPacketSending(PacketEvent event) {
|
||||||
StructureModifier<Entity> entityModifer = event.getPacket().getEntityModifier(event.getPlayer().getWorld());
|
StructureModifier<Entity> entityModifer = event.getPacket().getEntityModifier(event.getPlayer().getWorld());
|
||||||
@ -682,12 +682,12 @@ public class PacketsManager {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Packets.Server.ENTITY_STATUS:
|
/* case Packets.Server.ENTITY_STATUS:
|
||||||
if (DisguiseAPI.getDisguise(entity).canHearSelfDisguise()
|
if (DisguiseAPI.getDisguise(entity).canHearSelfDisguise()
|
||||||
&& (Byte) event.getPacket().getModifier().read(1) == 2) {
|
&& (Byte) event.getPacket().getModifier().read(1) == 1) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
break;
|
break;*/
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user