mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-14 10:55:20 +01:00
Play Guardian animation when Totem of Undying is used.
This commit is contained in:
parent
2060a698bd
commit
41d1ceb7cd
@ -11,5 +11,4 @@ TODO:
|
||||
|
||||
- Entity names that changed?
|
||||
- llama inventory slots
|
||||
- Rewrite Shulker box name
|
||||
- Play Guardian effect for totems?
|
||||
- Rewrite Shulker box name
|
@ -338,6 +338,30 @@ public class EntityPackets extends EntityRewriter<Protocol1_10To1_11> {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Entity Status
|
||||
protocol.registerOutgoing(State.PLAY, 0x1B, 0x1B, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.INT); // 0 - Entity ID
|
||||
map(Type.BYTE); // 1 - Entity Status
|
||||
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
byte b = wrapper.get(Type.BYTE, 0);
|
||||
|
||||
if (b == 35) {
|
||||
wrapper.clearPacket();
|
||||
wrapper.setId(0x1E); // Change Game State
|
||||
wrapper.write(Type.UNSIGNED_BYTE, (short) 10); // Play Elder Guardian animation
|
||||
wrapper.write(Type.FLOAT, 0F);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user