Search in sources :

Example 1 with PacketSimpleMP

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);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) TileEntityDarkEnergyReceiver(stevekung.mods.moreplanets.tileentity.TileEntityDarkEnergyReceiver) PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP)

Example 2 with PacketSimpleMP

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);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) TileEntityNuclearWasteGenerator(stevekung.mods.moreplanets.module.planets.nibiru.tileentity.TileEntityNuclearWasteGenerator) PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP)

Example 3 with PacketSimpleMP

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);
}
Also used : PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP)

Example 4 with PacketSimpleMP

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);
            }
    }
}
Also used : PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP)

Example 5 with PacketSimpleMP

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());
}
Also used : PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP)

Aggregations

PacketSimpleMP (stevekung.mods.moreplanets.network.PacketSimpleMP)15 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)3 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 TileEntity (net.minecraft.tileentity.TileEntity)2 ArrayList (java.util.ArrayList)1 GuiElementCheckbox (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox)1 EntityJuicer (micdoodle8.mods.galacticraft.planets.venus.entities.EntityJuicer)1 GuiButton (net.minecraft.client.gui.GuiButton)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 PotionEffect (net.minecraft.potion.PotionEffect)1 BlockPos (net.minecraft.util.math.BlockPos)1 World (net.minecraft.world.World)1 WorldProviderNibiru (stevekung.mods.moreplanets.module.planets.nibiru.dimension.WorldProviderNibiru)1 TileEntityNuclearWasteGenerator (stevekung.mods.moreplanets.module.planets.nibiru.tileentity.TileEntityNuclearWasteGenerator)1 TileEntityDarkEnergyReceiver (stevekung.mods.moreplanets.tileentity.TileEntityDarkEnergyReceiver)1 TeleporterMP (stevekung.mods.moreplanets.util.TeleporterMP)1 IFireBlock (stevekung.mods.moreplanets.util.blocks.IFireBlock)1 GuiElementInfoRegionMP (stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP)1 GuiNumberField (stevekung.mods.moreplanets.util.client.gui.GuiNumberField)1