use of micdoodle8.mods.galacticraft.planets.mars.entities.EntityLandingBalloons in project Galacticraft by micdoodle8.
the class MarsUtil method openParachestInventory.
public static void openParachestInventory(EntityPlayerMP player, EntityLandingBalloons landerInv) {
player.getNextWindowId();
player.closeContainer();
int windowId = player.currentWindowId;
GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_OPEN_PARACHEST_GUI, GCCoreUtil.getDimensionID(player.world), new Object[] { windowId, 1, landerInv.getEntityId() }), player);
player.openContainer = new ContainerParaChest(player.inventory, landerInv, player);
player.openContainer.windowId = windowId;
player.openContainer.addListener(player);
}
use of micdoodle8.mods.galacticraft.planets.mars.entities.EntityLandingBalloons in project Galacticraft by micdoodle8.
the class TeleportTypeMars method onSpaceDimensionChanged.
@Override
public void onSpaceDimensionChanged(World newWorld, EntityPlayerMP player, boolean ridingAutoRocket) {
if (!ridingAutoRocket && player != null) {
GCPlayerStats stats = GCPlayerStats.get(player);
if (stats.getTeleportCooldown() <= 0) {
if (player.capabilities.isFlying) {
player.capabilities.isFlying = false;
}
EntityLandingBalloons lander = new EntityLandingBalloons(player);
if (!newWorld.isRemote) {
boolean previous = CompatibilityManager.forceLoadChunks((WorldServer) newWorld);
lander.forceSpawn = true;
newWorld.spawnEntity(lander);
CompatibilityManager.forceLoadChunksEnd((WorldServer) newWorld, previous);
}
stats.setTeleportCooldown(10);
}
}
}
Aggregations