Oreganized Mod(MOD MOVED)(READ DESCRIPTION)

Oreganized Mod(MOD MOVED)(READ DESCRIPTION)

56.6k Downloads

[0.5.1-beta] StoneSign.java should use client side functions on the client only

wchen1990 opened this issue ยท 2 comments

commented

Currently, StoneSign.java imports net.minecraft.client.Minecraft and me.gleep.oreganized.util.EditStoneSignScreen which does not exist on dedicated servers and causes a start up error.

I wasn't too sure how to deal with GuiScreens yet so I don't have a PR up for this issue. But, I currently have it resolved for my own dedicated server by doing:

    @OnlyIn(Dist.CLIENT)
    @Override
    public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
        net.minecraft.client.Minecraft.getInstance().displayGuiScreen(new me.gleep.oreganized.util.EditStoneSignScreen((StoneSignTileEntity) worldIn.getTileEntity(pos)));
    }
commented

Oh yeah this part of code is undone so i need to fix it...

commented

Fixed