Fix schematic renderers not correctly being invalidated on resource reloads (#6801)

* Fix #6726

* move renderer ticking call to be earlier
This commit is contained in:
IThundxr 2024-08-10 09:03:43 -04:00 committed by GitHub
parent fa4f5243bc
commit b4da24641c
Failed to generate hash of commit

View file

@ -97,6 +97,8 @@ public class SchematicHandler {
if (activeSchematicItem != null && transformation != null)
transformation.tick();
renderers.forEach(SchematicRenderer::tick);
LocalPlayer player = mc.player;
ItemStack stack = findBlueprintInHand(player);
if (stack == null) {
@ -117,7 +119,6 @@ public class SchematicHandler {
if (!active)
return;
renderers.forEach(SchematicRenderer::tick);
if (syncCooldown > 0)
syncCooldown--;
if (syncCooldown == 1)
@ -160,7 +161,7 @@ public class SchematicHandler {
BlockPos pos;
pos = BlockPos.ZERO;
try {
schematic.placeInWorld(w, pos, pos, placementSettings, w.getRandom(), Block.UPDATE_CLIENTS);
for (BlockEntity blockEntity : w.getBlockEntities())