use of com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage in project minecolonies by ldtteam.
the class WindowMinecoloniesShapeTool method place.
@Override
protected void place() {
final StructureName sn = save();
// rotation/mirroring already happened server side
final BuildToolPlaceMessage msg = new BuildToolPlaceMessage(sn.toString(), Settings.instance.getShape().toString(), Settings.instance.getPosition(), 0, false, Mirror.NONE, Blocks.AIR.defaultBlockState());
Minecraft.getInstance().tell(new WindowBuildDecoration(msg, Settings.instance.getPosition(), sn)::open);
}
use of com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage in project minecolonies by Minecolonies.
the class WindowMinecoloniesBuildTool method place.
@Override
public void place(final StructureName structureName) {
final BlockPos offset = Settings.instance.getActiveStructure().getPrimaryBlockOffset();
final BlockState state = Settings.instance.getActiveStructure().getBlockState(offset).getBlockState();
BuildToolPlaceMessage msg = new BuildToolPlaceMessage(structureName.toString(), structureName.getLocalizedName(), Settings.instance.getPosition(), Settings.instance.getRotation(), structureName.isHut(), Settings.instance.getMirror(), state);
if (structureName.isHut()) {
Network.getNetwork().sendToServer(msg);
} else {
Minecraft.getInstance().tell(new WindowBuildDecoration(msg, Settings.instance.getPosition(), structureName)::open);
}
}
use of com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage in project minecolonies by Minecolonies.
the class WindowMinecoloniesShapeTool method place.
@Override
protected void place() {
final StructureName sn = save();
// rotation/mirroring already happened server side
final BuildToolPlaceMessage msg = new BuildToolPlaceMessage(sn.toString(), Settings.instance.getShape().toString(), Settings.instance.getPosition(), 0, false, Mirror.NONE, Blocks.AIR.defaultBlockState());
Minecraft.getInstance().tell(new WindowBuildDecoration(msg, Settings.instance.getPosition(), sn)::open);
}
use of com.minecolonies.coremod.network.messages.server.BuildToolPlaceMessage in project minecolonies by ldtteam.
the class WindowMinecoloniesBuildTool method place.
@Override
public void place(final StructureName structureName) {
final BlockPos offset = Settings.instance.getActiveStructure().getPrimaryBlockOffset();
final BlockState state = Settings.instance.getActiveStructure().getBlockState(offset).getBlockState();
BuildToolPlaceMessage msg = new BuildToolPlaceMessage(structureName.toString(), structureName.getLocalizedName(), Settings.instance.getPosition(), Settings.instance.getRotation(), structureName.isHut(), Settings.instance.getMirror(), state);
if (structureName.isHut()) {
Network.getNetwork().sendToServer(msg);
} else {
Minecraft.getInstance().tell(new WindowBuildDecoration(msg, Settings.instance.getPosition(), structureName)::open);
}
}
Aggregations