use of stevekung.mods.moreplanets.network.PacketSimpleMP in project MorePlanets by SteveKunG.
the class BlockDarkEnergyReceiver method breakBlock.
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityDarkEnergyReceiver) {
TileEntityDarkEnergyReceiver receiver = (TileEntityDarkEnergyReceiver) tile;
receiver.onDestroy(tile);
GalacticraftCore.packetPipeline.sendToDimension(new PacketSimpleMP(EnumSimplePacketMP.C_REMOVE_GUIDE_POS, world.provider.getDimension(), receiver.getPos()), world.provider.getDimension());
}
super.breakBlock(world, pos, state);
}
use of stevekung.mods.moreplanets.network.PacketSimpleMP in project MorePlanets by SteveKunG.
the class BlockNuclearWasteGenerator method breakBlock.
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityNuclearWasteGenerator) {
TileEntityNuclearWasteGenerator generator = (TileEntityNuclearWasteGenerator) tile;
GalacticraftCore.packetPipeline.sendToDimension(new PacketSimpleMP(EnumSimplePacketMP.C_REMOVE_GENERATOR_GUIDE_POS, world.provider.getDimension(), generator.getPos()), world.provider.getDimension());
}
super.breakBlock(world, pos, state);
}
use of stevekung.mods.moreplanets.network.PacketSimpleMP in project MorePlanets by SteveKunG.
the class InfectedCrystallizeEffect method applyAttributesModifiersToEntity.
@Override
public void applyAttributesModifiersToEntity(EntityLivingBase living, AbstractAttributeMap attributeMap, int amplifier) {
int id = GCCoreUtil.getDimensionID(living.world);
PacketSimpleMP.sendToAllAround(new PacketSimpleMP(EnumSimplePacketMP.C_ADD_ENTITY_ID, id, String.valueOf(living.getEntityId())), living.world, id, living.getPosition(), 64);
super.applyAttributesModifiersToEntity(living, attributeMap, amplifier);
}
use of stevekung.mods.moreplanets.network.PacketSimpleMP in project MorePlanets by SteveKunG.
the class GuiGameOverMP method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) throws IOException {
switch(button.id) {
case 0:
GalacticraftCore.packetPipeline.sendToServer(new PacketSimpleMP(EnumSimplePacketMP.S_RESPAWN_PLAYER_NETHER, GCCoreUtil.getDimensionID(this.mc.world)));
this.mc.displayGuiScreen((GuiScreen) null);
break;
case 1:
if (this.mc.world.getWorldInfo().isHardcoreModeEnabled()) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
GuiYesNo guiyesno = new GuiYesNo(this, I18n.format("deathScreen.quit.confirm"), "", I18n.format("deathScreen.titleScreen"), I18n.format("deathScreen.respawn"), 0);
this.mc.displayGuiScreen(guiyesno);
guiyesno.setButtonDelay(20);
}
}
}
use of stevekung.mods.moreplanets.network.PacketSimpleMP in project MorePlanets by SteveKunG.
the class TileEntityDarkEnergyReceiver method setActivated.
public void setActivated(boolean activated) {
this.activated = activated;
this.rendered = true;
GalacticraftCore.packetPipeline.sendToDimension(new PacketSimpleMP(EnumSimplePacketMP.C_REMOVE_GUIDE_POS, this.world.provider.getDimension(), this.getPos()), this.world.provider.getDimension());
}
Aggregations