Package micdoodle8.mods.galacticraft.api.prefab.entity

Examples of micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket


    @SuppressWarnings({ "unchecked", "rawtypes" })
    @Override
    @SideOnly(Side.CLIENT)
    public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List par2List, boolean b)
    {
        EnumRocketType type = EnumRocketType.values()[par1ItemStack.getItemDamage()];

        if (!type.getTooltip().isEmpty())
        {
            par2List.add(type.getTooltip());
        }

        if (type.getPreFueled())
        {
            par2List.add(EnumColor.RED + "\u00a7o" + GCCoreUtil.translate("gui.creativeOnly.desc"));
        }

        if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().hasKey("RocketFuel"))
View Full Code Here


    {
        final HashMap<String, Integer> map = new HashMap<String, Integer>();

        for (Integer id : ids)
        {
            CelestialBody celestialBody = getReachableCelestialBodiesForDimensionID(id);

            if (id > 0 && celestialBody == null)
            {
                celestialBody = GalacticraftCore.satelliteSpaceStation;
            }

            WorldProvider provider = WorldUtil.getProviderForDimension(id);
            if (celestialBody != null && provider != null)
            {
                if (provider instanceof IGalacticraftWorldProvider && !(provider instanceof IOrbitDimension) || provider.dimensionId == 0)
                {
                    map.put(celestialBody.getName(), provider.dimensionId);
                }
                else if (playerBase != null && provider instanceof IOrbitDimension)
                {
                    final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, id, playerBase);

                    if (!ConfigManagerCore.spaceStationsRequirePermission || data.getAllowedPlayers().contains(playerBase.getGameProfile().getName()) || VersionUtil.isPlayerOpped(playerBase))
                    {
                        map.put(celestialBody.getName() + "$" + data.getOwner() + "$" + data.getSpaceStationName() + "$" + provider.dimensionId, provider.dimensionId);
                    }
                }
            }
        }
View Full Code Here

        if (!this.worldObj.isRemote)
        {
        ItemStack oxygenItemStack = this.getStackInSlot(2);
        if (oxygenItemStack != null && oxygenItemStack.getItem() instanceof IItemOxygenSupply)
        {
          IItemOxygenSupply oxygenItem = (IItemOxygenSupply) oxygenItemStack.getItem();
          float oxygenDraw = Math.min(this.oxygenPerTick * 2.5F, this.maxOxygen - this.storedOxygen);
          this.storedOxygen += oxygenItem.discharge(oxygenItemStack, oxygenDraw);
          if (this.storedOxygen > this.maxOxygen) this.storedOxygen = this.maxOxygen;
        }
        }
     
        super.updateEntity();
View Full Code Here

            }
            break;
        case S_IGNITE_ROCKET:
            if (!player.worldObj.isRemote && !player.isDead && player.ridingEntity != null && !player.ridingEntity.isDead && player.ridingEntity instanceof EntityTieredRocket)
            {
                final EntityTieredRocket ship = (EntityTieredRocket) player.ridingEntity;

                if (!ship.landing)
                {
                    if (ship.hasValidFuel())
                    {
                        ItemStack stack2 = stats.extendedInventory.getStackInSlot(4);

                        if (stack2 != null && stack2.getItem() instanceof ItemParaChute || stats.launchAttempts > 0)
                        {
                            ship.igniteCheckingCooldown();
                            stats.launchAttempts = 0;
                        }
                        else if (stats.chatCooldown == 0 && stats.launchAttempts == 0)
                        {
                            player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.rocket.warning.noparachute")));
View Full Code Here

        {
            final Entity e = (Entity) l.get(i);

            if (e instanceof EntityTieredRocket)
            {
                final EntityTieredRocket ship = (EntityTieredRocket) e;

                if (ship.riddenByEntity != null && !(ship.riddenByEntity).equals(player) && (ship.getLaunched() || ship.timeUntilLaunch < 390))
                {
                    this.bipedRightArm.rotateAngleZ -= (float) (Math.PI / 8) + MathHelper.sin(par3 * 0.9F) * 0.2F;
                    this.bipedRightArm.rotateAngleX = (float) Math.PI;
                }
            }
View Full Code Here

        final EntityPlayer player = event.entityPlayer;

        if (player.ridingEntity instanceof EntityTieredRocket)
        {
            EntityTieredRocket entity = (EntityTieredRocket) player.ridingEntity;
            GL11.glTranslatef(0, -entity.getRotateOffset(), 0);
            float anglePitch = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * event.partialRenderTick;
            float angleYaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * event.partialRenderTick;
            GL11.glRotatef(-angleYaw, 0.0F, 1.0F, 0.0F);
            GL11.glRotatef(anglePitch, 0.0F, 0.0F, 1.0F);
            GL11.glTranslatef(0, entity.getRotateOffset(), 0);
        }

        //Gravity - freefall - jetpack changes in player model orientation can go here
    }
View Full Code Here

        EntityLivingBase entityLivingBase = ClientProxyCore.mc.renderViewEntity;
       
        if (player.ridingEntity instanceof EntityTieredRocket && ClientProxyCore.mc.gameSettings.thirdPersonView == 0)
        {
            EntityTieredRocket entity = (EntityTieredRocket) player.ridingEntity;         
            float offset = entity.getRotateOffset();
            GL11.glTranslatef(0, -offset, 0);
            float anglePitch = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
            float angleYaw = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks;
            GL11.glRotatef(-anglePitch, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(angleYaw, 0.0F, 1.0F, 0.0F);
View Full Code Here

        for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
        {
            if (approachingDirection.contains(side))
            {
                TileEntity outputConductor = tileVec.getTileEntityOnSide(tileEntity.getWorldObj(), side);
                IElectricityNetwork electricityNetwork = NetworkHelper.getElectricalNetworkFromTileEntity(outputConductor, side);

                if (electricityNetwork != null)
                {
                    connectedNetworks.add(electricityNetwork);
                }
View Full Code Here

        if (this.worldObj != null)
        {
            if (this.worldObj.isRemote)
            {
                final BlockVec3 thisVec = new BlockVec3(this);
                this.worldObj.func_147479_m(thisVec.x, thisVec.y, thisVec.z);
            }
            else
            {
                this.getNetwork().split(this);
View Full Code Here

            {
                this.attachedFuelable = null;

                for (final ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
                {
                    final TileEntity pad = new BlockVec3(this).getTileEntityOnSide(this.worldObj, dir);

                    if (pad instanceof TileEntityMulti)
                    {
                        final TileEntity mainTile = ((TileEntityMulti) pad).mainBlockPosition.getTileEntity(this.worldObj);
View Full Code Here

TOP

Related Classes of micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.