Krypton infusion pedestal fix

This commit is contained in:
Necrontyr 2022-10-27 02:38:05 +02:00
parent ac96841372
commit 105f8cd862
3 changed files with 9 additions and 4 deletions

View file

@ -16,6 +16,7 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.chunk.LevelChunk.EntityCreationType;
import net.minecraft.world.phys.Vec3;
import java.awt.*;
@ -56,7 +57,9 @@ public class InfusionRitual implements Container {
for (int i = 0; i < catalysts.length; i++) {
Point point = PEDESTALS_MAP[i];
MutableBlockPos checkPos = worldPos.mutable().move(Direction.EAST, point.x).move(Direction.NORTH, point.y);
BlockEntity catalystEntity = world.getBlockEntity(checkPos);
BlockEntity catalystEntity = world.isClientSide
? world.getChunkAt(checkPos).getBlockEntity(checkPos, EntityCreationType.CHECK)
: world.getBlockEntity(checkPos);
if (catalystEntity instanceof PedestalBlockEntity) {
catalysts[i] = (PedestalBlockEntity) catalystEntity;
} else {