mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-02 08:59:31 +01:00
Don't reload all block shape caches on early init (mod compat)
Fixed https://github.com/ViaVersion/ViaFabricPlus/issues/245
This commit is contained in:
parent
fe5cdf2c8c
commit
93bfa6a5ff
@ -105,8 +105,10 @@ public class ClientsideFixes {
|
|||||||
// Reloads some clientside stuff when the protocol version changes
|
// Reloads some clientside stuff when the protocol version changes
|
||||||
ChangeProtocolVersionCallback.EVENT.register(protocolVersion -> {
|
ChangeProtocolVersionCallback.EVENT.register(protocolVersion -> {
|
||||||
// Reloads all bounding boxes
|
// Reloads all bounding boxes
|
||||||
for (Block block : RELOADABLE_BLOCKS) {
|
if (MinecraftClient.getInstance() != null && MinecraftClient.getInstance().player != null) { // Make sure that the game is loaded when reloading the cache
|
||||||
block.getDefaultState().initShapeCache();
|
for (Block block : RELOADABLE_BLOCKS) {
|
||||||
|
block.getDefaultState().initShapeCache();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculates the current chat limit, since it changes depending on the protocol version
|
// Calculates the current chat limit, since it changes depending on the protocol version
|
||||||
|
Loading…
Reference in New Issue
Block a user