use of com.minecolonies.coremod.network.messages.client.CreateColonyMessage in project minecolonies by Minecolonies.
the class WindowTownHallColonyManage method onCreate.
/**
* On create button
*/
public void onCreate() {
final PlayerEntity player = Minecraft.getInstance().player;
final ITextComponent colonyName = new TranslationTextComponent(DEFAULT_COLONY_NAME, player.getName());
new VanillaParticleMessage(pos.getX(), pos.getY(), pos.getZ(), ParticleTypes.DRAGON_BREATH).onExecute(null, false);
player.level.playSound(player, new BlockPos(Minecraft.getInstance().player.position()), SoundEvents.CAMPFIRE_CRACKLE, SoundCategory.AMBIENT, 2.5f, 0.8f);
Network.getNetwork().sendToServer(new CreateColonyMessage(pos, colonyName.getString()));
close();
}
use of com.minecolonies.coremod.network.messages.client.CreateColonyMessage in project minecolonies by ldtteam.
the class WindowTownHallColonyManage method onCreate.
/**
* On create button
*/
public void onCreate() {
new VanillaParticleMessage(pos.getX(), pos.getY(), pos.getZ(), ParticleTypes.DRAGON_BREATH).onExecute(null, false);
Minecraft.getInstance().level.playSound(Minecraft.getInstance().player, new BlockPos(Minecraft.getInstance().player.position()), SoundEvents.CAMPFIRE_CRACKLE, SoundCategory.AMBIENT, 2.5f, 0.8f);
Network.getNetwork().sendToServer(new CreateColonyMessage(pos));
close();
}
Aggregations