mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-18 16:17:45 +01:00
Only play totem animation for dying player in 1.11->1.10 (#860)
This commit is contained in:
parent
b03be8ecfe
commit
9c3255d5a4
@ -83,7 +83,10 @@ public abstract class LegacyEntityRewriter<C extends ClientboundPacketType, T ex
|
||||
handler(wrapper -> {
|
||||
ClientWorld clientChunks = wrapper.user().get(ClientWorld.class);
|
||||
clientChunks.setEnvironment(wrapper.get(Types.INT, 1));
|
||||
addTrackedEntity(wrapper, wrapper.get(Types.INT, 0), playerType);
|
||||
|
||||
final int entityId = wrapper.get(Types.INT, 0);
|
||||
addTrackedEntity(wrapper, entityId, playerType);
|
||||
tracker(wrapper.user()).setClientEntityId(entityId);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -159,9 +159,15 @@ public class EntityPacketRewriter1_11 extends LegacyEntityRewriter<ClientboundPa
|
||||
map(Types.BYTE); // 1 - Entity Status
|
||||
|
||||
handler(wrapper -> {
|
||||
byte b = wrapper.get(Types.BYTE, 0);
|
||||
final int entityId = wrapper.get(Types.INT, 0);
|
||||
if (entityId != tracker(wrapper.user()).clientEntityId()) {
|
||||
// Entity events are sent for all players, but we only want to apply this for the self player
|
||||
return;
|
||||
}
|
||||
|
||||
if (b == 35) {
|
||||
final byte entityStatus = wrapper.get(Types.BYTE, 0);
|
||||
if (entityStatus == 35) {
|
||||
// TODO spawn particles?
|
||||
wrapper.clearPacket();
|
||||
wrapper.setPacketType(ClientboundPackets1_9_3.GAME_EVENT);
|
||||
wrapper.write(Types.UNSIGNED_BYTE, (short) 10); // Play Elder Guardian animation
|
||||
|
Loading…
Reference in New Issue
Block a user