use of com.minecolonies.coremod.network.messages.server.colony.building.BuildingSetStyleMessage in project minecolonies by Minecolonies.
the class WindowBuildBuilding method confirmClicked.
/**
* On confirm button.
*/
private void confirmClicked() {
final BlockPos builder = buildersDropDownList.getSelectedIndex() == 0 ? BlockPos.ZERO : builders.get(buildersDropDownList.getSelectedIndex()).getB();
Network.getNetwork().sendToServer(new BuildingSetStyleMessage(building, styles.get(stylesDropDownList.getSelectedIndex())));
if (building.getBuildingLevel() == building.getBuildingMaxLevel()) {
Network.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.Mode.REPAIR, builder));
} else {
Network.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.Mode.BUILD, builder));
}
cancelClicked();
}
use of com.minecolonies.coremod.network.messages.server.colony.building.BuildingSetStyleMessage in project minecolonies by ldtteam.
the class WindowBuildBuilding method confirmClicked.
/**
* On confirm button.
*/
private void confirmClicked() {
final BlockPos builder = buildersDropDownList.getSelectedIndex() == 0 ? BlockPos.ZERO : builders.get(buildersDropDownList.getSelectedIndex()).getB();
Network.getNetwork().sendToServer(new BuildingSetStyleMessage(building, styles.get(stylesDropDownList.getSelectedIndex())));
if (building.getBuildingLevel() == building.getBuildingMaxLevel()) {
Network.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.Mode.REPAIR, builder));
} else {
Network.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.Mode.BUILD, builder));
}
cancelClicked();
}
Aggregations