try to fix server side crashes (again)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.fretux.ascend.block;
|
||||
|
||||
import net.fretux.ascend.client.ClientPacketHandlers;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
@@ -8,6 +9,8 @@ import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
public class ShrineOfRemembranceBlock extends Block {
|
||||
public ShrineOfRemembranceBlock(Properties props) {
|
||||
@@ -24,7 +27,7 @@ public class ShrineOfRemembranceBlock extends Block {
|
||||
Player player, InteractionHand hand,
|
||||
net.minecraft.world.phys.BlockHitResult hit) {
|
||||
if (level.isClientSide) {
|
||||
net.minecraft.client.Minecraft.getInstance().setScreen(new net.fretux.ascend.client.screen.ShrineScreen());
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ClientPacketHandlers.openShrineScreen(false));
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
return InteractionResult.CONSUME;
|
||||
|
||||
Reference in New Issue
Block a user