mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-10 01:28:19 +02:00
Stop with the checks for yaw. Useless.
This commit is contained in:
parent
af51d15d59
commit
95256f8d6f
@ -6,7 +6,6 @@ import java.lang.reflect.Method;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@ -152,13 +151,10 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
else if (Packets.Server.REL_ENTITY_MOVE_LOOK == event.getPacketID()
|
else if (Packets.Server.REL_ENTITY_MOVE_LOOK == event.getPacketID()
|
||||||
|| Packets.Server.ENTITY_LOOK == event.getPacketID()
|
|| Packets.Server.ENTITY_LOOK == event.getPacketID()
|
||||||
|| Packets.Server.ENTITY_TELEPORT == event.getPacketID()) {
|
|| Packets.Server.ENTITY_TELEPORT == event.getPacketID()) {
|
||||||
// If the disguise needs its yaw value modified
|
event.setPacket(event.getPacket().shallowClone());
|
||||||
if (disguise.getType() == DisguiseType.ENDER_DRAGON || disguise.getType().isMisc()) {
|
StructureModifier<Object> mods = event.getPacket().getModifier();
|
||||||
event.setPacket(event.getPacket().shallowClone());
|
byte value = (Byte) mods.read(4);
|
||||||
StructureModifier<Object> mods = event.getPacket().getModifier();
|
mods.write(4, getYaw(DisguiseType.getType(entity.getType()), disguise.getType(), value));
|
||||||
byte value = (Byte) mods.read(4);
|
|
||||||
mods.write(4, getYaw(DisguiseType.getType(entity.getType()), disguise.getType(), value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user