mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Don't send block entities < 0 for 1.16- players
Fixes ViaVersion/ViaVersion#2833
This commit is contained in:
parent
8ea7686b2c
commit
aa35ace816
@ -32,6 +32,7 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper;
|
|||||||
import com.viaversion.viaversion.api.type.Type;
|
import com.viaversion.viaversion.api.type.Type;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.LongArrayTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.LongArrayTag;
|
||||||
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.NumberTag;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.ServerboundPackets1_16_2;
|
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.ServerboundPackets1_16_2;
|
||||||
@ -305,6 +306,11 @@ public final class BlockItemPackets1_17 extends ItemRewriter<Protocol1_16_4To1_1
|
|||||||
section.setPaletteEntry(j, protocol.getMappingData().getNewBlockStateId(old));
|
section.setPaletteEntry(j, protocol.getMappingData().getNewBlockStateId(old));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chunk.getBlockEntities().removeIf(compound -> {
|
||||||
|
NumberTag tag = compound.get("y");
|
||||||
|
return tag != null && tag.asInt() < 0;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user