Search in sources :

Example 6 with ChangeFreeToInteractBlockMessage

use of com.minecolonies.coremod.network.messages.server.colony.ChangeFreeToInteractBlockMessage in project minecolonies by ldtteam.

the class ItemScepterPermission method handleAddLocation.

@NotNull
private static ActionResultType handleAddLocation(final PlayerEntity playerIn, final World worldIn, final BlockPos pos, final IColonyView iColonyView) {
    final ChangeFreeToInteractBlockMessage message = new ChangeFreeToInteractBlockMessage(iColonyView, pos, ChangeFreeToInteractBlockMessage.MessageType.ADD_BLOCK);
    Network.getNetwork().sendToServer(message);
    return ActionResultType.SUCCESS;
}
Also used : ChangeFreeToInteractBlockMessage(com.minecolonies.coremod.network.messages.server.colony.ChangeFreeToInteractBlockMessage) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ChangeFreeToInteractBlockMessage (com.minecolonies.coremod.network.messages.server.colony.ChangeFreeToInteractBlockMessage)6 NotNull (org.jetbrains.annotations.NotNull)5 Block (net.minecraft.block.Block)4 BlockState (net.minecraft.block.BlockState)2 BlockPos (net.minecraft.util.math.BlockPos)2 TextField (com.ldtteam.blockout.controls.TextField)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 ResourceLocationException (net.minecraft.util.ResourceLocationException)1