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,9 +105,11 @@ 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
|
||||||
|
if (MinecraftClient.getInstance() != null && MinecraftClient.getInstance().player != null) { // Make sure that the game is loaded when reloading the cache
|
||||||
for (Block block : RELOADABLE_BLOCKS) {
|
for (Block block : RELOADABLE_BLOCKS) {
|
||||||
block.getDefaultState().initShapeCache();
|
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
|
||||||
currentChatLimit = 256;
|
currentChatLimit = 256;
|
||||||
|
Loading…
Reference in New Issue
Block a user