Merge branch 'HbmMods:master' into master
12
changelog
@ -66,6 +66,14 @@
|
||||
* Retextured the fallout effect, fallout no longer has large snowflakes and the color now matches the crater better
|
||||
* High-yield mini nukes no longer create chunk radiation, since they use the MK5 which already has AoE radiation, this prevents dead grass from spawning that makes the crater look uglier
|
||||
* Balefire spread is now limited to prevent densely vegetated biomes from lagging to hell
|
||||
* The bricked furnace now makes charcoal twice as fast
|
||||
* Combination ovens no longer need two welded copper plates and instead only cast plates, therefore no longer being post-arc welder. This should make it more affordable and useful in the initial earlygame where things like automatic wood farms are most important.
|
||||
* Any water-like extinguishing fluid shot from the chemical thrower can now wash away fallout layers
|
||||
* Overhauled the Mk.III life extender
|
||||
* The assembler recipe has been replaced with a simpler but more expensive workbench recipe
|
||||
* Instead of taking up the chestplate slot, it's now an armor mod worn in the insert slot
|
||||
* The armor no longer gives absorption, instead it adds 25 points to the shield count
|
||||
* The +25 bypasses the shield limit of 100, meaning that with enough shield infusions, the total maximum is now 125
|
||||
|
||||
## Fixed
|
||||
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
|
||||
@ -81,4 +89,6 @@
|
||||
* Fixed rampant mode random scout spawns being able to appear inside blocks
|
||||
* Fixed turret rotation sometimes desyncing when out of range, this is especially noticeable with slow-moving arty
|
||||
* Fixed research reactor OC integration allowing the control rods to be set out of bounds
|
||||
* Fixed fallout falling faster and overlaying if multiple fallout areas intersect
|
||||
* Fixed fallout falling faster and overlaying if multiple fallout areas intersect
|
||||
* Fixed template folder 3D models rendering with weird shading
|
||||
* HUD elements like jetpack charge and the shield bar should now still render even if Tinker's Construct replaces the health bar renderer
|
||||
@ -2,8 +2,8 @@ package api.hbm.energy;
|
||||
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -112,8 +112,8 @@ public interface IEnergyConnector extends ILoadedTile {
|
||||
|
||||
/** Shortcut for adding energy data to tiles that implement IInfoProviderEC, should NOT be used externally for compat! Use IInfoProviderEC.provideInfo() instead! */
|
||||
public default void provideInfoForEC(NBTTagCompound data) {
|
||||
data.setLong(IInfoProviderEC.L_ENERGY_HE, this.getPower());
|
||||
data.setLong(IInfoProviderEC.L_CAPACITY_HE, this.getMaxPower());
|
||||
data.setLong(CompatEnergyControl.L_ENERGY_HE, this.getPower());
|
||||
data.setLong(CompatEnergyControl.L_CAPACITY_HE, this.getMaxPower());
|
||||
}
|
||||
|
||||
public default ConnectionPriority getPriority() {
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package api.hbm.tile;
|
||||
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
/**
|
||||
* Info providers for ENERGY CONTROL
|
||||
@ -18,84 +15,6 @@ import net.minecraft.util.StatCollector;
|
||||
* */
|
||||
public interface IInfoProviderEC {
|
||||
|
||||
/** The meat of the interface and the only method that should be called from externally, returns
|
||||
* an NBTTagCompound with all relevant data in EC's accepted format, the implementor takes care of
|
||||
* collecting and adding the data. */
|
||||
public NBTTagCompound provideInfo();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* INTERNAL USE ONLY - HELPER METHODS BELOW
|
||||
*/
|
||||
|
||||
/** Instantiates the NBTTagCompound and adds common identifiers needed for NTM machines (e.g. HE as the energy type) */
|
||||
public default NBTTagCompound setup() {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString(KEY_EUTYPE, "HE");
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Adds the tank to the NBTTagCompound using the supplied String as the key. */
|
||||
public default void addTank(String name, NBTTagCompound tag, FluidTank tank) {
|
||||
if(tank.getFill() == 0) {
|
||||
tag.setString(name, "N/A");
|
||||
} else {
|
||||
tag.setString(name, String.format("%s: %s mB", StatCollector.translateToLocal(tank.getTankType().getConditionalName()), tank.getFill()));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* [DATA TYPE] _ [NAME] _ [UNIT]
|
||||
*/
|
||||
|
||||
public static final String KEY_EUTYPE = "euType";
|
||||
|
||||
public static final String L_ENERGY_HE = "energy";
|
||||
public static final String L_ENERGY_TU = "energyTU";
|
||||
public static final String L_ENERGY_ = "energy_"; // Blast Furnace fuel
|
||||
|
||||
public static final String L_CAPACITY_HE = "capacity";
|
||||
public static final String L_CAPACITY_TU = "capacityTU";
|
||||
public static final String L_CAPACITY_ = "capacity_"; // Blast Furnace fuel capacity
|
||||
|
||||
public static final String D_CONSUMPTION_HE = "consumptionHE";
|
||||
public static final String D_CONSUMPTION_MB = "consumption";
|
||||
@Deprecated public static final String S_CONSUMPTION_ = "consumption_"; // FWatz fluid consumption rates
|
||||
|
||||
public static final String D_OUTPUT_HE = "output";
|
||||
public static final String D_OUTPUT_MB = "outputmb";
|
||||
public static final String D_OUTPUT_TU = "outputTU";
|
||||
|
||||
public static final String L_DIFF_HE = "diff"; // Battery diff per tick
|
||||
@Deprecated public static final String I_TEMP_K = "temp"; // Unused?
|
||||
public static final String D_TURBINE_PERCENT = "turbine"; // CCGT slider
|
||||
public static final String I_TURBINE_SPEED = "speed"; // CCGT RPM
|
||||
public static final String L_COREHEAT_C = "core"; // Research Reactor core heat
|
||||
public static final String L_HULLHEAT_C = "hull"; // Research Reactor hull heat
|
||||
public static final String S_LEVEL_PERCENT = "level"; // Research Reactor rods
|
||||
@Deprecated public static final String L_HEATL = "heatL"; // AMS and old Watz heat values
|
||||
public static final String D_HEAT_C = "heat"; // Research Reactor and RBMK column heat
|
||||
public static final String L_PRESSURE_BAR = "bar"; // ZIRNOX pressure
|
||||
public static final String I_FUEL = "fuel"; // RTG Blast Furnace heat
|
||||
@Deprecated public static final String S_FUELTEXT = "fuelText"; // Large Nuclear Reactor only
|
||||
@Deprecated public static final String S_DEPLETED = "depleted"; // Large Nuclear Reactor only
|
||||
public static final String D_DEPLETION_PERCENT = "depletion"; // RBMK Fuel depletion
|
||||
public static final String D_XENON_PERCENT = "xenon"; // RBMK Fuel xenon poisoning
|
||||
public static final String D_SKIN_C = "skin"; // RBMK Fuel skin heat
|
||||
public static final String D_CORE_C = "c_heat"; // RBMK Fuel core heat
|
||||
public static final String D_MELT_C = "melt"; // RBMK Fuel melting point
|
||||
public static final String I_PROGRESS = "progress";
|
||||
public static final String I_FLUX = "flux"; // Research and Breeding Reactor flux
|
||||
public static final String I_WATER = "water"; // Research Reactor water gauge
|
||||
public static final String L_DURABILITY = "durability"; // DFC Stabilizer Lens
|
||||
public static final String S_TANK = "tank";
|
||||
public static final String S_TANK2 = "tank2";
|
||||
public static final String S_TANK3 = "tank3";
|
||||
public static final String S_TANK4 = "tank4";
|
||||
public static final String S_TANK5 = "tank5";
|
||||
@Deprecated public static final String I_PISTONS = "pistons"; // Radial Performance Engine piston count
|
||||
public static final String S_CHUNKRAD = "chunkRad"; // Geiger Counter
|
||||
public static final String B_ACTIVE = "active";
|
||||
/** Adds any custom data that isn't covered by the standard energy and fluid implementations. */
|
||||
public void provideExtraInfo(NBTTagCompound data);
|
||||
}
|
||||
|
||||
@ -2160,7 +2160,7 @@ public class ModBlocks {
|
||||
tesla = new MachineTesla(Material.iron).setBlockName("tesla").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":tesla");
|
||||
|
||||
launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_pad");
|
||||
launch_pad_large = new LaunchPadLarge(Material.iron).setBlockName("launch_pad_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":concrete_smooth");
|
||||
launch_pad_large = new LaunchPadLarge(Material.iron).setBlockName("launch_pad_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_radar = new MachineRadar(Material.iron).setBlockName("machine_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_radar");
|
||||
machine_radar_large = new MachineRadarLarge(Material.iron).setBlockName("machine_radar_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
radar_screen = new MachineRadarScreen(Material.iron).setBlockName("radar_screen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
@ -198,10 +198,6 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
private boolean doesPyroclastic() { return false; }
|
||||
private double getPyroclasticRange() { return 0D; }
|
||||
|
||||
/** Causes two magma explosions, one from bedrock to the core and one from the core to 15 blocks above. */
|
||||
private void blastMagmaChannel() {
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, null, xCoord + 0.5, yCoord + worldObj.rand.nextInt(15) + 1.5, zCoord + 0.5, 7);
|
||||
|
||||
@ -1,131 +1,74 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LaunchPad extends BlockContainer implements IBomb {
|
||||
public class LaunchPad extends BlockDummyable implements IBomb {
|
||||
|
||||
public static boolean keepInventory = false;
|
||||
private final static Random field_149933_a = new Random();
|
||||
|
||||
public LaunchPad(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
public LaunchPad(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityLaunchPad();
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityLaunchPad();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
||||
if(!keepInventory) {
|
||||
TileEntityLaunchPad tileentityfurnace = (TileEntityLaunchPad) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if(tileentityfurnace != null) {
|
||||
for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = LaunchPad.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = LaunchPad.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) LaunchPad.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) LaunchPad.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) LaunchPad.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityLaunchPad entity = (TileEntityLaunchPad) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) {
|
||||
if(p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z) && !p_149695_1_.isRemote) {
|
||||
this.explode(p_149695_1_, x, y, z);
|
||||
}
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 1, 1, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
|
||||
return Item.getItemFromBlock(ModBlocks.launch_pad);
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
TileEntityLaunchPad entity = (TileEntityLaunchPad) world.getTileEntity(x, y, z);
|
||||
return entity.launchFromDesignator();
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
int[] corePos = findCore(world, x, y, z);
|
||||
if(corePos != null){
|
||||
TileEntity core = world.getTileEntity(corePos[0], corePos[1], corePos[2]);
|
||||
if(core instanceof TileEntityLaunchPad){
|
||||
TileEntityLaunchPad entity = (TileEntityLaunchPad)core;
|
||||
return entity.launchFromDesignator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block blockIn){
|
||||
|
||||
if(!world.isRemote){
|
||||
|
||||
int[] corePos = findCore(world, x, y, z);
|
||||
if(corePos != null){
|
||||
TileEntity core = world.getTileEntity(corePos[0], corePos[1], corePos[2]);
|
||||
if(core instanceof TileEntityLaunchPad){
|
||||
TileEntityLaunchPad launchpad = (TileEntityLaunchPad)core;
|
||||
launchpad.updateRedstonePower(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
super.onNeighborBlockChange( world, x, y, z, blockIn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -64,8 +64,8 @@ public class LaunchPadLarge extends BlockDummyable implements IBomb {
|
||||
if(corePos != null){
|
||||
TileEntity core = world.getTileEntity(corePos[0], corePos[1], corePos[2]);
|
||||
if(core instanceof TileEntityLaunchPadLarge){
|
||||
TileEntityLaunchPadLarge door = (TileEntityLaunchPadLarge)core;
|
||||
door.updateRedstonePower(x, y, z);
|
||||
TileEntityLaunchPadLarge launchpad = (TileEntityLaunchPadLarge)core;
|
||||
launchpad.updateRedstonePower(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,7 @@ public class WorldConfig {
|
||||
public static int bedrockChlorocalciteSpawn = 35;
|
||||
public static int bedrockAsbestosSpawn = 50;
|
||||
public static int bedrockNiobiumSpawn = 50;
|
||||
public static int bedrockNeodymiumSpawn = 50;
|
||||
public static int bedrockTitaniumSpawn = 100;
|
||||
public static int bedrockTungstenSpawn = 100;
|
||||
public static int bedrockGoldSpawn = 50;
|
||||
@ -48,6 +49,7 @@ public class WorldConfig {
|
||||
public static int bedrockNiterSpawn = 50;
|
||||
public static int bedrockFluoriteSpawn = 50;
|
||||
public static int bedrockRedstoneSpawn = 50;
|
||||
public static int bedrockRareEarthSpawn = 50;
|
||||
public static int bedrockGlowstoneSpawn = 100;
|
||||
public static int bedrockPhosphorusSpawn = 50;
|
||||
public static int bedrockQuartzSpawn = 100;
|
||||
@ -166,6 +168,8 @@ public class WorldConfig {
|
||||
bedrockFluoriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B12_bedrockFluoriteWeight", "Spawn weight for fluorite bedrock ore", 50);
|
||||
bedrockRedstoneSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B13_bedrockRedstoneWeight", "Spawn weight for redstone bedrock ore", 50);
|
||||
bedrockChlorocalciteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B14_bedrockChlorocalciteWeight", "Spawn weight for chlorocalcite bedrock ore", 35);
|
||||
bedrockNeodymiumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B15_bedrockNeodymiumWeight", "Spawn weight for neodymium bedrock ore", 50);
|
||||
bedrockRareEarthSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B16_bedrockRareEarthWeight", "Spawn weight for rare earth bedrock ore", 50);
|
||||
|
||||
bedrockGlowstoneSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.BN00_bedrockGlowstoneWeight", "Spawn weight for glowstone bedrock ore", 100);
|
||||
bedrockPhosphorusSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.BN01_bedrockPhosphorusWeight", "Spawn weight for phosphorus bedrock ore", 50);
|
||||
|
||||
@ -168,6 +168,7 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_esapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ANY_PLASTIC.ingot(), 'K', ModItems.insert_sapi, 'D', ModItems.ducttape, 'S', BIGMT.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_xsapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ASBESTOS.ingot(), 'K', ModItems.insert_esapi, 'D', ModItems.ducttape, 'S', ModItems.ingot_meteorite_forged });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_yharonite, 1), new Object[] { "YIY", "IYI", "YIY", 'Y', ModItems.billet_yharonite, 'I', ModItems.insert_du });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.australium_iii, 1), new Object[] { "WSW", "PAP", "SPS", 'S', STEEL.plateWelded(), 'P', ANY_PLASTIC.ingot(), 'A', AUSTRALIUM.ingot(), 'W', GOLD.wireDense() });
|
||||
|
||||
//Servos
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.servo_set, 1), new Object[] { "MBM", "PBP", "MBM", 'M', ModItems.motor, 'B', STEEL.bolt(), 'P', IRON.plate() });
|
||||
|
||||
@ -25,6 +25,11 @@ public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getContrailScale() {
|
||||
return 0.5F;
|
||||
}
|
||||
|
||||
public static class EntityMissileGeneric extends EntityMissileTier1 {
|
||||
public EntityMissileGeneric(World world) { super(world); }
|
||||
public EntityMissileGeneric(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@ -453,6 +453,18 @@ public class EntityChemical extends EntityThrowableNT {
|
||||
if(core instanceof IRepairable) {
|
||||
((IRepairable) core).tryExtinguish(worldObj, x, y, z, fext);
|
||||
}
|
||||
|
||||
if(fext == EnumExtinguishType.WATER && style == ChemicalStyle.LIQUID) {
|
||||
for(int i = -2; i <= 2; i++) {
|
||||
for(int j = 0; j <= 1; j++) {
|
||||
for(int k = -2; k <= 2; k++) {
|
||||
if(worldObj.getBlock(x + i, y + j, z + k) == ModBlocks.fallout) {
|
||||
worldObj.setBlock(x + i, y + j, z + k, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
package com.hbm.extprop;
|
||||
|
||||
import com.hbm.entity.train.EntityRailCarBase;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.items.armor.ItemModShield;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
@ -144,8 +147,19 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
}
|
||||
}
|
||||
|
||||
public float getMaxShield() {
|
||||
return this.maxShield;
|
||||
public float getEffectiveMaxShield() {
|
||||
|
||||
float max = this.maxShield;
|
||||
|
||||
if(player.getCurrentArmor(2) != null) {
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(player.getCurrentArmor(2));
|
||||
if(mods[ArmorModHandler.kevlar] != null && mods[ArmorModHandler.kevlar].getItem() instanceof ItemModShield) {
|
||||
ItemModShield mod = (ItemModShield) mods[ArmorModHandler.kevlar].getItem();
|
||||
max += mod.shield;
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -77,13 +77,13 @@ public class EntityEffectHandler {
|
||||
HbmPlayerProps pprps = HbmPlayerProps.getData((EntityPlayerMP) entity);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
if(pprps.shield < pprps.maxShield && entity.ticksExisted > pprps.lastDamage + 60) {
|
||||
if(pprps.shield < pprps.getEffectiveMaxShield() && entity.ticksExisted > pprps.lastDamage + 60) {
|
||||
int tsd = entity.ticksExisted - (pprps.lastDamage + 60);
|
||||
pprps.shield += Math.min(pprps.maxShield - pprps.shield, 0.005F * tsd);
|
||||
pprps.shield += Math.min(pprps.getEffectiveMaxShield() - pprps.shield, 0.005F * tsd);
|
||||
}
|
||||
|
||||
if(pprps.shield > pprps.maxShield)
|
||||
pprps.shield = pprps.maxShield;
|
||||
if(pprps.shield > pprps.getEffectiveMaxShield())
|
||||
pprps.shield = pprps.getEffectiveMaxShield();
|
||||
|
||||
props.saveNBTData(data);
|
||||
pprps.saveNBTData(data);
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -20,7 +20,6 @@ import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -18,7 +18,6 @@ import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -15,7 +15,6 @@ import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -17,34 +17,33 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BoilerRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
PositionedStack input;
|
||||
PositionedStack result;
|
||||
|
||||
public SmeltingSet(ItemStack input, ItemStack result) {
|
||||
input.stackSize = 1;
|
||||
this.input = new PositionedStack(input, 21 + 9, 6 + 18);
|
||||
this.result = new PositionedStack(result, 120, 24);
|
||||
}
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
@Override
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
PositionedStack input;
|
||||
PositionedStack result;
|
||||
|
||||
public SmeltingSet(ItemStack input, ItemStack result) {
|
||||
input.stackSize = 1;
|
||||
this.input = new PositionedStack(input, 21 + 9, 6 + 18);
|
||||
this.result = new PositionedStack(result, 120, 24);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
|
||||
}
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Boiler";
|
||||
@ -55,23 +54,22 @@ public class BoilerRecipeHandler extends TemplateRecipeHandler {
|
||||
return RefStrings.MODID + ":textures/gui/nei/gui_nei_boiler.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
return super.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
return super.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if ((outputId.equals("ntmboiler")) && getClass() == BoilerRecipeHandler.class) {
|
||||
if((outputId.equals("ntmboiler")) && getClass() == BoilerRecipeHandler.class) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getBoilerRecipes();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(),
|
||||
(ItemStack)recipe.getValue()));
|
||||
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet((ItemStack) recipe.getKey(), (ItemStack) recipe.getValue()));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
@ -81,17 +79,15 @@ public class BoilerRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getBoilerRecipes();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if (compareFluidStacks((ItemStack)recipe.getValue(), result) ||
|
||||
compareFluidStacks((ItemStack)recipe.getValue(), result))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(),
|
||||
(ItemStack)recipe.getValue()));
|
||||
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if(compareFluidStacks((ItemStack) recipe.getValue(), result) || compareFluidStacks((ItemStack) recipe.getValue(), result))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack) recipe.getKey(), (ItemStack) recipe.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(String inputId, Object... ingredients) {
|
||||
if ((inputId.equals("ntmboiler")) && getClass() == BoilerRecipeHandler.class) {
|
||||
if((inputId.equals("ntmboiler")) && getClass() == BoilerRecipeHandler.class) {
|
||||
loadCraftingRecipes("ntmboiler", new Object[0]);
|
||||
} else {
|
||||
super.loadUsageRecipes(inputId, ingredients);
|
||||
@ -101,32 +97,31 @@ public class BoilerRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
Map<Object, Object> recipes = MachineRecipes.instance().getBoilerRecipes();
|
||||
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if (compareFluidStacks(ingredient, (ItemStack)recipe.getKey()))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(),
|
||||
(ItemStack)recipe.getValue()));
|
||||
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
|
||||
if(compareFluidStacks(ingredient, (ItemStack) recipe.getKey()))
|
||||
this.arecipes.add(new SmeltingSet((ItemStack) recipe.getKey(), (ItemStack) recipe.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean compareFluidStacks(ItemStack sta1, ItemStack sta2) {
|
||||
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
drawProgressBar(80, 23, 0, 85, 6, 17, 240, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
drawProgressBar(80, 23, 0, 85, 6, 17, 240, 3);
|
||||
}
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27 - 9, 23, 36, 18), "ntmboiler"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2 + 36, 89 - 29 - 18 - 18, 18, 18 * 2), "ntmboiler"));
|
||||
guiGui.add(GUIMachineBoiler.class);
|
||||
guiGui.add(GUIMachineBoilerElectric.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27 - 9, 23, 36, 18), "ntmboiler"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2 + 36, 89 - 29 - 18 - 18, 18, 18 * 2), "ntmboiler"));
|
||||
guiGui.add(GUIMachineBoiler.class);
|
||||
guiGui.add(GUIMachineBoilerElectric.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
}
|
||||
|
||||
16
src/main/java/com/hbm/handler/nei/HydrotreatingHandler.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.recipes.HydrotreatingRecipes;
|
||||
|
||||
public class HydrotreatingHandler extends NEIUniversalHandler {
|
||||
|
||||
public HydrotreatingHandler() {
|
||||
super("Hydrotreating", ModBlocks.machine_hydrotreater, HydrotreatingRecipes.getRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmHydrotreating";
|
||||
}
|
||||
}
|
||||
@ -1,65 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerLaunchPadTier1 extends Container {
|
||||
|
||||
private TileEntityLaunchPad diFurnace;
|
||||
|
||||
public ContainerLaunchPadTier1(InventoryPlayer invPlayer, TileEntityLaunchPad tedf) {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 26, 17));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 17));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 134, 17));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 2) {
|
||||
if(!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return diFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -38,8 +38,8 @@ public class GUILaunchPadLarge extends GuiInfoContainer {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 107, guiTop + 88 - 52, 16, 52, launchpad.power, launchpad.maxPower);
|
||||
launchpad.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 125, guiTop + 70 - 52, 16, 52);
|
||||
launchpad.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 143, guiTop + 70 - 52, 16, 52);
|
||||
launchpad.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 125, guiTop + 88 - 52, 16, 52);
|
||||
launchpad.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 143, guiTop + 88 - 52, 16, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerLaunchPadTier1;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||
|
||||
public class GUILaunchPadTier1 extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_launch_pad.png");
|
||||
private TileEntityLaunchPad diFurnace;
|
||||
|
||||
public GUILaunchPadTier1(InventoryPlayer invPlayer, TileEntityLaunchPad tedf) {
|
||||
super(new ContainerLaunchPadTier1(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 53, 160, 16, diFurnace.power, diFurnace.maxPower);
|
||||
|
||||
String[] text = new String[] { "First Slot:",
|
||||
" -Missile (no custom ones!)",
|
||||
" -Carrier Rocket" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "Second Slot:",
|
||||
" -Target designator for missiles",
|
||||
" -Satellite payload for the carrier rocket" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int j1 = (int)diFurnace.getPowerScaled(160);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 53, 8, 166, j1, 16);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@ import java.util.Locale;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -313,7 +314,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
public void drawIcon(boolean b) {
|
||||
try {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) 240 / 1.0F, (float) 240 / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
if(stack != null) {
|
||||
|
||||
@ -219,7 +219,6 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.tritium_deuterium_cake, 1), new AStack[] {new ComparableStack(ModItems.cell_deuterium, 6), new ComparableStack(ModItems.cell_tritium, 2), new OreDictStack(LI.ingot(), 4), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_cluster, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new ComparableStack(Blocks.tnt, 1), }, 50);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_buckshot, 1), new AStack[] {new OreDictStack(PB.nugget(), 6), }, 50);
|
||||
makeRecipe(new ComparableStack(ModItems.australium_iii, 1), new AStack[] {new ComparableStack(ModItems.nugget_australium, 6), new OreDictStack(STEEL.ingot(), 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.wire_copper, 6), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.magnetron, 1), new AStack[] {new OreDictStack(ALLOY.plate(), 3), new ComparableStack(ModItems.wire_tungsten, 1), new ComparableStack(ModItems.coil_tungsten, 1), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_schrabidium, 1), new AStack[] {new OreDictStack(SA326.ingot(), 5), new OreDictStack(IRON.plate(), 2), }, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.pellet_hes, 1), new AStack[] {new ComparableStack(ModItems.ingot_hes, 5), new OreDictStack(IRON.plate(), 2), }, 200);
|
||||
|
||||
@ -21,6 +21,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
|
||||
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
|
||||
@ -265,6 +266,12 @@ public class CentrifugeRecipes extends SerializableRecipe {
|
||||
new ItemStack(ModItems.nugget_pu_mix, 2),
|
||||
new ItemStack(ModItems.nugget_bismuth, 6),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 1) });
|
||||
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE)), new ItemStack[] {
|
||||
new ItemStack(ModItems.powder_cobalt_tiny, 2),
|
||||
new ItemStack(ModItems.powder_boron_tiny, 2),
|
||||
new ItemStack(ModItems.powder_niobium_tiny, 2),
|
||||
new ItemStack(ModItems.nugget_zirconium, 3) });
|
||||
|
||||
ArrayList<ItemStack> naquadriaNuggets = OreDictionary.getOres("nuggetNaquadria");
|
||||
if(naquadriaNuggets.size() != 0) {
|
||||
|
||||
@ -71,7 +71,7 @@ public class HydrotreatingRecipes extends SerializableRecipe {
|
||||
for(Entry<FluidType, Triplet<FluidStack, FluidStack, FluidStack>> recipe : recipes.entrySet()) {
|
||||
map.put(new ItemStack[] {
|
||||
ItemFluidIcon.make(recipe.getKey(), 1000),
|
||||
ItemFluidIcon.make(recipe.getValue().getX().type, recipe.getValue().getX().fill * 10) },
|
||||
ItemFluidIcon.make(recipe.getValue().getX().type, recipe.getValue().getX().fill * 10, 1) },
|
||||
new ItemStack[] {
|
||||
ItemFluidIcon.make(recipe.getValue().getY().type, recipe.getValue().getY().fill * 10),
|
||||
ItemFluidIcon.make(recipe.getValue().getZ().type, recipe.getValue().getZ().fill * 10) });
|
||||
|
||||
@ -312,7 +312,7 @@ public class AnvilRecipes {
|
||||
new AStack[] {
|
||||
new ComparableStack(Blocks.stonebrick, 8),
|
||||
new OreDictStack(KEY_LOG, 16),
|
||||
new OreDictStack(CU.plateWelded(), 2),
|
||||
new OreDictStack(CU.plateCast(), 2),
|
||||
new OreDictStack(KEY_BRICK, 16)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.furnace_combination))).setTier(2));
|
||||
|
||||
|
||||
@ -2017,10 +2017,6 @@ public class ModItems {
|
||||
public static Item robes_legs;
|
||||
public static Item robes_boots;
|
||||
|
||||
public static Item australium_iii;
|
||||
public static Item australium_iv;
|
||||
public static Item australium_v;
|
||||
|
||||
public static Item jetpack_boost;
|
||||
public static Item jetpack_break;
|
||||
public static Item jetpack_fly;
|
||||
@ -2212,6 +2208,7 @@ public class ModItems {
|
||||
public static Item night_vision;
|
||||
public static Item card_aos;
|
||||
public static Item card_qos;
|
||||
public static Item australium_iii;
|
||||
|
||||
public static Item hazmat_helmet;
|
||||
public static Item hazmat_plate;
|
||||
@ -3460,6 +3457,7 @@ public class ModItems {
|
||||
night_vision = new ItemModNightVision().setUnlocalizedName("night_vision").setTextureName(RefStrings.MODID + ":night_vision");
|
||||
card_aos = new ItemModCard().setUnlocalizedName("card_aos").setTextureName(RefStrings.MODID + ":card_aos");
|
||||
card_qos = new ItemModCard().setUnlocalizedName("card_qos").setTextureName(RefStrings.MODID + ":card_qos");
|
||||
australium_iii = new ItemModShield(25F).setUnlocalizedName("australium_iii").setTextureName(RefStrings.MODID + ":australium_iii");
|
||||
|
||||
cap_nuka = new Item().setUnlocalizedName("cap_nuka").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_nuka");
|
||||
cap_quantum = new Item().setUnlocalizedName("cap_quantum").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_quantum");
|
||||
@ -5371,8 +5369,6 @@ public class ModItems {
|
||||
liquidator_legs = new ArmorLiquidator(aMatLiquidator, 2, RefStrings.MODID + ":textures/armor/liquidator_2.png").cloneStats((ArmorFSB) liquidator_helmet).setUnlocalizedName("liquidator_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_legs");
|
||||
liquidator_boots = new ArmorLiquidator(aMatLiquidator, 3, RefStrings.MODID + ":textures/armor/liquidator_1.png").cloneStats((ArmorFSB) liquidator_helmet).setUnlocalizedName("liquidator_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_boots");
|
||||
|
||||
australium_iii = new ArmorAustralium(MainRegistry.aMatAus3, 1).setUnlocalizedName("australium_iii").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":australium_iii");
|
||||
|
||||
jetpack_boost = new JetpackBooster(Fluids.BALEFIRE, 32000).setUnlocalizedName("jetpack_boost").setCreativeTab(CreativeTabs.tabCombat).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_boost");
|
||||
jetpack_break = new JetpackBreak(Fluids.KEROSENE, 12000).setUnlocalizedName("jetpack_break").setCreativeTab(CreativeTabs.tabCombat).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_break");
|
||||
jetpack_fly = new JetpackRegular(Fluids.KEROSENE, 12000).setUnlocalizedName("jetpack_fly").setCreativeTab(CreativeTabs.tabCombat).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_fly");
|
||||
@ -7580,6 +7576,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(night_vision, night_vision.getUnlocalizedName());
|
||||
GameRegistry.registerItem(card_aos, card_aos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(card_qos, card_qos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(australium_iii, australium_iii.getUnlocalizedName());
|
||||
|
||||
//Chaos
|
||||
GameRegistry.registerItem(chocolate_milk, chocolate_milk.getUnlocalizedName());
|
||||
@ -7863,7 +7860,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(apple_euphemium, apple_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(watch, watch.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mask_of_infamy, mask_of_infamy.getUnlocalizedName());
|
||||
GameRegistry.registerItem(australium_iii, australium_iii.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jackt, jackt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jackt2, jackt2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_fly, jetpack_fly.getUnlocalizedName());
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ArmorAustralium extends ItemArmor {
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public ArmorAustralium(ArmorMaterial armorMaterial, int armorType) {
|
||||
super(armorMaterial, 0, armorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack armor) {
|
||||
if(armor.getItemDamage() < armor.getMaxDamage()) {
|
||||
if (armor.getItem() == ModItems.australium_iii) {
|
||||
if(rand.nextInt(3) == 0) {
|
||||
armor.damageItem(1, player);
|
||||
}
|
||||
if(!player.isPotionActive(Potion.field_76444_x.id))
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 80, 2, true));
|
||||
}
|
||||
if (armor.getItem() == ModItems.australium_iv) {
|
||||
if(rand.nextInt(5) == 0) {
|
||||
armor.damageItem(1, player);
|
||||
}
|
||||
if(!player.isPotionActive(Potion.field_76444_x.id))
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 80, 4, true));
|
||||
}
|
||||
if (armor.getItem() == ModItems.australium_v) {
|
||||
if(rand.nextInt(7) == 0) {
|
||||
armor.damageItem(1, player);
|
||||
}
|
||||
if(!player.isPotionActive(Potion.field_76444_x.id))
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 80, 3, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if (itemstack.getItem() == ModItems.australium_iii)
|
||||
list.add("Ouch, that hurts.");
|
||||
if (itemstack.getItem() == ModItems.australium_iv)
|
||||
list.add("Just do it.");
|
||||
if (itemstack.getItem() == ModItems.australium_v)
|
||||
list.add("Gobbles up less australium than Mark IV!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
if(stack.getItem().equals(ModItems.australium_iii)) {
|
||||
return (RefStrings.MODID + ":textures/armor/australium_iii.png");
|
||||
}
|
||||
if(stack.getItem().equals(ModItems.australium_iv)) {
|
||||
return (RefStrings.MODID + ":textures/armor/australium_iv.png");
|
||||
}
|
||||
if(stack.getItem().equals(ModItems.australium_v)) {
|
||||
return (RefStrings.MODID + ":textures/armor/australium_v.png");
|
||||
}
|
||||
|
||||
else return null;
|
||||
}
|
||||
|
||||
}
|
||||
33
src/main/java/com/hbm/items/armor/ItemModShield.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemModShield extends ItemArmorMod {
|
||||
|
||||
public final float shield;
|
||||
|
||||
public ItemModShield(float shield) {
|
||||
super(ArmorModHandler.kevlar, false, true, false, false);
|
||||
this.shield = shield;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.YELLOW : EnumChatFormatting.GOLD);
|
||||
list.add(color + "+" + (Math.round(shield * 10) * 0.1) + " shield");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.YELLOW : EnumChatFormatting.GOLD);
|
||||
list.add(color + " " + stack.getDisplayName() + " (+" + (Math.round(shield * 10) * 0.1) + " health)");
|
||||
}
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class ItemFlask extends ItemEnumMulti {
|
||||
float infusion = 5F;
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
props.maxShield = Math.min(props.shieldCap, props.maxShield + infusion);
|
||||
props.shield = Math.min(props.shield + infusion, props.maxShield);
|
||||
props.shield = Math.min(props.shield + infusion, props.getEffectiveMaxShield());
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
||||
@ -98,7 +98,8 @@ public class ItemBedrockOre extends ItemEnumMulti {
|
||||
CHLOROCALCITE("Chlorocalcite", 0xCDE036, B_LITHIUM, B_SILICON, B_SILICON), //i guess?
|
||||
FLUORITE("Fluorite", 0xF6F3E7, B_SILICON, B_LITHIUM, B_ALUMINIUM), //different silicon-bearing gemstones, generic lithium, aluminium from sodium compound trailings
|
||||
HEMATITE("Hematite", 0xA37B72, B_SULFUR, B_TITANIUM, B_TITANIUM), //titanium, sulfur from pyrite
|
||||
MALACHITE("Malachite", 0x66B48C, B_SULFUR, B_SULFUR, B_SULFUR); //sulfur sulfur sulfur sulfur
|
||||
MALACHITE("Malachite", 0x66B48C, B_SULFUR, B_SULFUR, B_SULFUR), //sulfur sulfur sulfur sulfur
|
||||
NEODYMIUM("Neodymium", 0x8F8F5F, B_LITHIUM, B_SILICON, B_BISMUTH); //yeah whatever
|
||||
|
||||
public String oreName;
|
||||
public int color;
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.weapon;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.weapon;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ public class ItemMissile extends ItemCustomLore {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.ITALIC + this.tier.display);
|
||||
list.add("Fuel: " + this.fuel.display);
|
||||
if(this.fuelCap > 0) list.add("Fuel capacity: " + this.fuelCap + "mB");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
|
||||
public class HbmChestContents {
|
||||
|
||||
|
||||
@ -1715,6 +1715,9 @@ public class ClientProxy extends ServerProxy {
|
||||
fx.setBaseScale(data.getFloat("base"));
|
||||
fx.setMaxScale(data.getFloat("max"));
|
||||
fx.setLife(data.getInteger("life") / (particleSetting + 1));
|
||||
if(data.hasKey("noWind")) fx.noWind();
|
||||
if(data.hasKey("strafe")) fx.setStrafe(data.getFloat("strafe"));
|
||||
if(data.hasKey("alpha")) fx.alphaMod(data.getFloat("alpha"));
|
||||
|
||||
if(data.hasKey("color")) {
|
||||
Color color = new Color(data.getInteger("color"));
|
||||
|
||||
@ -41,7 +41,7 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.satellites.Satellite;
|
||||
import com.hbm.tileentity.TileMappings;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPadBase;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||
@ -332,7 +332,7 @@ public class MainRegistry {
|
||||
|
||||
TileMappings.writeMappings();
|
||||
MachineDynConfig.initialize();
|
||||
TileEntityLaunchPad.registerLaunchables();
|
||||
TileEntityLaunchPadBase.registerLaunchables();
|
||||
|
||||
for(Entry<Class<? extends TileEntity>, String[]> e : TileMappings.map.entrySet()) {
|
||||
|
||||
|
||||
@ -364,7 +364,7 @@ public class ModEventHandlerClient {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SubscribeEvent(receiveCanceled = true)
|
||||
public void onOverlayRender(RenderGameOverlayEvent.Post event) {
|
||||
|
||||
/// HANDLE ELECTRIC FSB HUD ///
|
||||
@ -374,7 +374,7 @@ public class ModEventHandlerClient {
|
||||
|
||||
if(!event.isCanceled() && event.type == event.type.HEALTH) {
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
if(props.maxShield > 0) {
|
||||
if(props.getEffectiveMaxShield() > 0) {
|
||||
RenderScreenOverlay.renderShieldBar(event.resolution, Minecraft.getMinecraft().ingameGUI);
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,7 @@ public class NEIConfig implements IConfigureNEI {
|
||||
registerHandler(new VacuumRecipeHandler());
|
||||
registerHandler(new CrackingHandler());
|
||||
registerHandler(new ReformingHandler());
|
||||
registerHandler(new HydrotreatingHandler());
|
||||
registerHandler(new BoilerRecipeHandler());
|
||||
registerHandler(new ChemplantRecipeHandler());
|
||||
registerHandler(new CrystallizerRecipeHandler());
|
||||
|
||||
@ -1088,7 +1088,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom soyuz_launcher_support = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/launch_table/soyuz_launcher_support.obj"), false).asDisplayList();
|
||||
|
||||
//Missile Parts
|
||||
public static final IModelCustom missile_pad = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missilePad.obj"));
|
||||
public static final IModelCustom missile_pad = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/launch_pad_silo.obj"));
|
||||
public static final IModelCustom missile_erector = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/launch_pad_erector.obj")).asDisplayList();
|
||||
public static final IModelCustom missile_assembly = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_assembly.obj"));
|
||||
public static final IModelCustom strut = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/strut.obj"));
|
||||
@ -1289,7 +1289,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation soyuz_launcher_support_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_launcher/launcher_support.png");
|
||||
|
||||
//Missile Parts
|
||||
public static final ResourceLocation missile_pad_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missilePad.png");
|
||||
public static final ResourceLocation missile_pad_tex = new ResourceLocation(RefStrings.MODID, "textures/models/launchpad/silo.png");
|
||||
public static final ResourceLocation missile_erector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/launchpad/pad.png");
|
||||
public static final ResourceLocation missile_erector_micro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/launchpad/erector_micro.png");
|
||||
public static final ResourceLocation missile_erector_v2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/launchpad/erector_v2.png");
|
||||
|
||||
@ -15,6 +15,9 @@ public class ParticleCoolingTower extends EntityFX {
|
||||
private float baseScale = 1.0F;
|
||||
private float maxScale = 1.0F;
|
||||
private float lift = 0.3F;
|
||||
private float strafe = 0.075F;
|
||||
private boolean windDir = true;
|
||||
private float alphaMod = 0.25F;
|
||||
|
||||
public ParticleCoolingTower(TextureManager texman, World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
@ -23,21 +26,13 @@ public class ParticleCoolingTower extends EntityFX {
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void setBaseScale(float f) {
|
||||
this.baseScale = f;
|
||||
}
|
||||
|
||||
public void setMaxScale(float f) {
|
||||
this.maxScale = f;
|
||||
}
|
||||
|
||||
public void setLift(float f) {
|
||||
this.lift = f;
|
||||
}
|
||||
|
||||
public void setLife(int i) {
|
||||
this.particleMaxAge = i;
|
||||
}
|
||||
public void setBaseScale(float f) { this.baseScale = f; }
|
||||
public void setMaxScale(float f) { this.maxScale = f; }
|
||||
public void setLift(float f) { this.lift = f; }
|
||||
public void setLife(int i) { this.particleMaxAge = i; }
|
||||
public void setStrafe(float f) { this.strafe = f; }
|
||||
public void noWind() { this.windDir = false; }
|
||||
public void alphaMod(float mod) { this.alphaMod = mod; }
|
||||
|
||||
public void onUpdate() {
|
||||
|
||||
@ -47,20 +42,25 @@ public class ParticleCoolingTower extends EntityFX {
|
||||
|
||||
float ageScale = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
|
||||
this.particleAlpha = 0.25F - ageScale * 0.25F;
|
||||
this.particleAlpha = alphaMod - ageScale * alphaMod;
|
||||
this.particleScale = baseScale + (float)Math.pow((maxScale * ageScale - baseScale), 2);
|
||||
|
||||
this.particleAge++;
|
||||
|
||||
if(this.motionY < this.lift) {
|
||||
|
||||
if(lift > 0 && this.motionY < this.lift) {
|
||||
this.motionY += 0.01F;
|
||||
}
|
||||
if(lift < 0 && this.motionY > this.lift) {
|
||||
this.motionY -= 0.01F;
|
||||
}
|
||||
|
||||
this.motionX += rand.nextGaussian() * 0.075D * ageScale;
|
||||
this.motionZ += rand.nextGaussian() * 0.075D * ageScale;
|
||||
this.motionX += rand.nextGaussian() * strafe * ageScale;
|
||||
this.motionZ += rand.nextGaussian() * strafe * ageScale;
|
||||
|
||||
this.motionX += 0.02 * ageScale;
|
||||
this.motionX -= 0.01 * ageScale;
|
||||
if(windDir) {
|
||||
this.motionX += 0.02 * ageScale;
|
||||
this.motionZ -= 0.01 * ageScale;
|
||||
}
|
||||
|
||||
if(this.particleAge == this.particleMaxAge) {
|
||||
this.setDead();
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderMissileGeneric;
|
||||
@ -21,13 +22,18 @@ public class RenderLaunchPad extends TileEntitySpecialRenderer {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.missile_pad_tex);
|
||||
ResourceManager.missile_pad.renderAll();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(tileEntity instanceof TileEntityLaunchPad) {
|
||||
ItemStack toRender = ((TileEntityLaunchPad) tileEntity).toRender;
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ public class RenderScreenOverlay {
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
gui.drawTexturedModalRect(left, top, 146, 0, 81, 9);
|
||||
int i = (int) Math.ceil(props.shield * 79 / props.maxShield);
|
||||
int i = (int) Math.ceil(props.shield * 79 / props.getEffectiveMaxShield());
|
||||
gui.drawTexturedModalRect(left + 1, top, 147, 9, i, 9);
|
||||
|
||||
String label = "" + ((int) (props.shield * 10F)) / 10D;
|
||||
|
||||
@ -340,6 +340,7 @@ public class TileMappings {
|
||||
put(TileEntitySpacer.class, "tileentity_fraction_spacer");
|
||||
put(TileEntityMachineCatalyticCracker.class, "tileentity_catalytic_cracker");
|
||||
put(TileEntityMachineCatalyticReformer.class, "tileentity_catalytic_reformer");
|
||||
put(TileEntityMachineHydrotreater.class, "tileentity_hydrotreater");
|
||||
put(TileEntityMachineCoker.class, "tileentity_coker");
|
||||
put(TileEntityChimneyBrick.class, "tileentity_chimney_brick");
|
||||
put(TileEntityChimneyIndustrial.class, "tileentity_chimney_industrial");
|
||||
|
||||
@ -1,230 +1,65 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.LaunchPad;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.missile.EntityCarrier;
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBaseNT;
|
||||
import com.hbm.entity.missile.EntityMissileDoomsday;
|
||||
import com.hbm.entity.missile.EntityMissileShuttle;
|
||||
import com.hbm.entity.missile.EntityMissileStealth;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.*;
|
||||
import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.container.ContainerLaunchPadTier1;
|
||||
import com.hbm.inventory.gui.GUILaunchPadTier1;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.item.IDesignatorItem;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
import li.cil.oc.api.machine.Callback;
|
||||
import li.cil.oc.api.machine.Context;
|
||||
import li.cil.oc.api.network.SimpleComponent;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityLaunchPad extends TileEntityMachineBase implements IEnergyUser, SimpleComponent, IGUIProvider, IRadarCommandReceiver {
|
||||
|
||||
/** Automatic instantiation of generic missiles, i.e. everything that both extends EntityMissileBaseNT and needs a designator */
|
||||
public static final HashMap<ComparableStack, Class<? extends EntityMissileBaseNT>> missiles = new HashMap();
|
||||
|
||||
public static void registerLaunchables() {
|
||||
public class TileEntityLaunchPad extends TileEntityLaunchPadBase implements IEnergyUser, IFluidStandardReceiver {
|
||||
|
||||
//Tier 0
|
||||
missiles.put(new ComparableStack(ModItems.missile_micro), EntityMissileMicro.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_schrabidium), EntityMissileSchrabidium.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_bhole), EntityMissileBHole.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_taint), EntityMissileTaint.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_emp), EntityMissileEMP.class);
|
||||
//Tier 1
|
||||
missiles.put(new ComparableStack(ModItems.missile_generic), EntityMissileGeneric.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_decoy), EntityMissileDecoy.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_incendiary), EntityMissileIncendiary.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_cluster), EntityMissileCluster.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_buster), EntityMissileBunkerBuster.class);
|
||||
//Tier 2
|
||||
missiles.put(new ComparableStack(ModItems.missile_strong), EntityMissileStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_incendiary_strong), EntityMissileIncendiaryStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_cluster_strong), EntityMissileClusterStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_buster_strong), EntityMissileBusterStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_emp_strong), EntityMissileEMPStrong.class);
|
||||
//Tier 3
|
||||
missiles.put(new ComparableStack(ModItems.missile_burst), EntityMissileBurst.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_inferno), EntityMissileInferno.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_rain), EntityMissileRain.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_drill), EntityMissileDrill.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_shuttle), EntityMissileShuttle.class);
|
||||
//Tier 4
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear), EntityMissileNuclear.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear_cluster), EntityMissileMirv.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_volcano), EntityMissileVolcano.class);
|
||||
|
||||
missiles.put(new ComparableStack(ModItems.missile_doomsday), EntityMissileDoomsday.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_stealth), EntityMissileStealth.class);
|
||||
}
|
||||
|
||||
public ItemStack toRender;
|
||||
@Override public boolean isReadyForLaunch() { return delay <= 0; }
|
||||
@Override public double getLaunchOffset() { return 2D; }
|
||||
|
||||
public long power;
|
||||
public final long maxPower = 100000;
|
||||
|
||||
private static final int[] slots_bottom = new int[] {0, 1, 2};
|
||||
private static final int[] slots_side = new int[] {0};
|
||||
|
||||
public TileEntityLaunchPad() {
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.launchPad";
|
||||
}
|
||||
public int delay = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 2, power, maxPower);
|
||||
this.updateConnections();
|
||||
if(this.delay > 0) delay--;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
if(slots[0] != null) {
|
||||
data.setInteger("id", Item.getIdFromItem(slots[0].getItem()));
|
||||
data.setShort("meta", (short) slots[0].getItemDamage());
|
||||
}
|
||||
networkPack(data, 250);
|
||||
} else {
|
||||
|
||||
|
||||
List<EntityMissileBaseNT> entities = worldObj.getEntitiesWithinAABB(EntityMissileBaseNT.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord, zCoord - 0.5, xCoord + 1.5, yCoord + 10, zCoord + 1.5));
|
||||
|
||||
if(!entities.isEmpty()) {
|
||||
|
||||
for(int i = 0; i < 15; i++) {
|
||||
|
||||
boolean dir = worldObj.rand.nextBoolean();
|
||||
float moX = (float) (dir ? 0 : worldObj.rand.nextGaussian() * 0.5F);
|
||||
float moZ = (float) (!dir ? 0 : worldObj.rand.nextGaussian() * 0.5F);
|
||||
|
||||
MainRegistry.proxy.spawnParticle(xCoord + 0.5, yCoord + 0.25, zCoord + 0.5, "launchsmoke", new float[] { moX, 0, moZ });
|
||||
}
|
||||
if(!this.isMissileValid() || !this.hasFuel()) {
|
||||
this.delay = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.power = nbt.getLong("power");
|
||||
|
||||
if(nbt.hasKey("id")) {
|
||||
this.toRender = new ItemStack(Item.getItemById(nbt.getInteger("id")), 1, nbt.getShort("meta"));
|
||||
} else {
|
||||
this.toRender = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
this.trySubscribe(worldObj, xCoord + 1, yCoord, zCoord, Library.POS_X);
|
||||
this.trySubscribe(worldObj, xCoord - 1, yCoord, zCoord, Library.NEG_X);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord, zCoord + 1, Library.POS_Z);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord, zCoord - 1, Library.NEG_Z);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return true;
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
power = nbt.getLong("power");
|
||||
|
||||
if(slots == null || slots.length != 3) slots = new ItemStack[3];
|
||||
|
||||
this.delay = nbt.getInteger("delay");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
|
||||
nbt.setInteger("delay", delay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == 0 ? slots_bottom : (side == 1 ? new int[0] : slots_side);
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long transferPower(long power) {
|
||||
this.power += power;
|
||||
if(this.power > this.getMaxPower()) {
|
||||
long overshoot = this.power - this.getMaxPower();
|
||||
this.power = this.getMaxPower();
|
||||
return overshoot;
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 15,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return dir != ForgeDirection.UP && dir != ForgeDirection.UNKNOWN;
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -232,181 +67,4 @@ public class TileEntityLaunchPad extends TileEntityMachineBase implements IEnerg
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
public boolean hasPower() {
|
||||
return this.power >= 75_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendCommandPosition(int x, int y, int z) {
|
||||
return this.launchToCoordinate(x, z) == BombReturnCode.LAUNCHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendCommandEntity(Entity target) {
|
||||
return this.launchToEntity(target) == BombReturnCode.LAUNCHED;
|
||||
}
|
||||
|
||||
public BombReturnCode launchFromDesignator() {
|
||||
if(slots[0] == null) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
boolean needsDesignator = missiles.containsKey(new ComparableStack(slots[0]).makeSingular());
|
||||
|
||||
int targetX = 0;
|
||||
int targetZ = 0;
|
||||
|
||||
if(slots[1] != null && slots[1].getItem() instanceof IDesignatorItem) {
|
||||
|
||||
IDesignatorItem designator = (IDesignatorItem) slots[1].getItem();
|
||||
|
||||
if(!designator.isReady(worldObj, slots[1], xCoord, yCoord, zCoord) && needsDesignator) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
Vec3 coords = designator.getCoords(worldObj, slots[1], xCoord, yCoord, zCoord);
|
||||
targetX = (int) Math.floor(coords.xCoord);
|
||||
targetZ = (int) Math.floor(coords.zCoord);
|
||||
|
||||
} else {
|
||||
if(needsDesignator) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
}
|
||||
|
||||
return this.launchToCoordinate(targetX, targetZ);
|
||||
}
|
||||
|
||||
public BombReturnCode launchToEntity(Entity entity) {
|
||||
if(!hasPower()) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
Entity e = instantiateMissile((int) Math.floor(entity.posX), (int) Math.floor(entity.posZ));
|
||||
if(e != null) {
|
||||
|
||||
if(e instanceof EntityMissileAntiBallistic) {
|
||||
EntityMissileAntiBallistic abm = (EntityMissileAntiBallistic) e;
|
||||
abm.tracking = entity;
|
||||
}
|
||||
|
||||
finalizeLaunch(e);
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
}
|
||||
|
||||
public BombReturnCode launchToCoordinate(int targetX, int targetZ) {
|
||||
if(!hasPower()) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
Entity e = instantiateMissile(targetX, targetZ);
|
||||
if(e != null) {
|
||||
finalizeLaunch(e);
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
}
|
||||
|
||||
public Entity instantiateMissile(int targetX, int targetZ) {
|
||||
|
||||
if(slots[0] == null) return null;
|
||||
|
||||
if(slots[0].getItem() == ModItems.missile_carrier) {
|
||||
EntityCarrier missile = new EntityCarrier(worldObj);
|
||||
missile.posX = xCoord + 0.5F;
|
||||
missile.posY = yCoord + 1F;
|
||||
missile.posZ = zCoord + 0.5F;
|
||||
if(slots[1] != null) {
|
||||
missile.setPayload(slots[1]);
|
||||
this.slots[1] = null;
|
||||
}
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord, zCoord + 0.5, "hbm:entity.rocketTakeoff", 100.0F, 1.0F);
|
||||
return missile;
|
||||
}
|
||||
|
||||
Class<? extends EntityMissileBaseNT> clazz = this.missiles.get(new ComparableStack(slots[0]).makeSingular());
|
||||
|
||||
if(clazz != null) {
|
||||
try {
|
||||
EntityMissileBaseNT missile = clazz.getConstructor(World.class, float.class, float.class, float.class, int.class, int.class).newInstance(worldObj, xCoord + 0.5F, yCoord + 1F, zCoord + 0.5F, targetX, targetZ);
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord, zCoord + 0.5, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
|
||||
if(GeneralConfig.enableExtendedLogging) MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + xCoord + " / " + yCoord + " / " + zCoord + " to " + xCoord + " / " + zCoord + "!");
|
||||
return missile;
|
||||
} catch(Exception e) { }
|
||||
}
|
||||
|
||||
if(slots[0].getItem() == ModItems.missile_anti_ballistic) {
|
||||
EntityMissileAntiBallistic missile = new EntityMissileAntiBallistic(worldObj);
|
||||
missile.posX = xCoord + 0.5F;
|
||||
missile.posY = yCoord + 0.5F;
|
||||
missile.posZ = zCoord + 0.5F;
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord, zCoord + 0.5, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
|
||||
return missile;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void finalizeLaunch(Entity missile) {
|
||||
this.power -= 75_000;
|
||||
worldObj.spawnEntityInWorld(missile);
|
||||
this.decrStackSize(0, 1);
|
||||
}
|
||||
|
||||
// do some opencomputer stuff
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "launch_pad";
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower()};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getCoords(Context context, Arguments args) {
|
||||
if (slots[1] != null && slots[1].getItem() instanceof IDesignatorItem) {
|
||||
int xCoord2;
|
||||
int zCoord2;
|
||||
if (slots[1].stackTagCompound != null) {
|
||||
xCoord2 = slots[1].stackTagCompound.getInteger("xCoord");
|
||||
zCoord2 = slots[1].stackTagCompound.getInteger("zCoord");
|
||||
} else
|
||||
return new Object[] {false};
|
||||
|
||||
// Not sure if i should have this
|
||||
/*
|
||||
if(xCoord2 == xCoord && zCoord2 == zCoord) {
|
||||
xCoord2 += 1;
|
||||
}
|
||||
*/
|
||||
|
||||
return new Object[] {xCoord2, zCoord2};
|
||||
}
|
||||
return new Object[] {false, "Designator not found"};
|
||||
}
|
||||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setCoords(Context context, Arguments args) {
|
||||
if (slots[1] != null && slots[1].getItem() instanceof IDesignatorItem) {
|
||||
slots[1].stackTagCompound = new NBTTagCompound();
|
||||
slots[1].stackTagCompound.setInteger("xCoord", args.checkInteger(0));
|
||||
slots[1].stackTagCompound.setInteger("zCoord", args.checkInteger(1));
|
||||
|
||||
return new Object[] {true};
|
||||
}
|
||||
return new Object[] {false, "Designator not found"};
|
||||
}
|
||||
|
||||
@Callback
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] launch(Context context, Arguments args) {
|
||||
((LaunchPad) ModBlocks.launch_pad).explode(worldObj, xCoord, yCoord, zCoord);
|
||||
return new Object[] {};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerLaunchPadTier1(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUILaunchPadTier1(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@ -8,6 +9,31 @@ import org.apache.logging.log4j.Level;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBaseNT;
|
||||
import com.hbm.entity.missile.EntityMissileDoomsday;
|
||||
import com.hbm.entity.missile.EntityMissileShuttle;
|
||||
import com.hbm.entity.missile.EntityMissileStealth;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.EntityMissileBHole;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.EntityMissileEMP;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.EntityMissileMicro;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.EntityMissileSchrabidium;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.EntityMissileTaint;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.EntityMissileBunkerBuster;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.EntityMissileCluster;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.EntityMissileDecoy;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.EntityMissileGeneric;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.EntityMissileIncendiary;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.EntityMissileBusterStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.EntityMissileClusterStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.EntityMissileEMPStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.EntityMissileIncendiaryStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.EntityMissileStrong;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.EntityMissileBurst;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.EntityMissileDrill;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.EntityMissileInferno;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.EntityMissileRain;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.EntityMissileMirv;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.EntityMissileNuclear;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.EntityMissileVolcano;
|
||||
import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.container.ContainerLaunchPadLarge;
|
||||
@ -37,10 +63,49 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase implements IEnergyUser, IFluidStandardReceiver, IGUIProvider, IRadarCommandReceiver {
|
||||
|
||||
/** Automatic instantiation of generic missiles, i.e. everything that both extends EntityMissileBaseNT and needs a designator */
|
||||
public static final HashMap<ComparableStack, Class<? extends EntityMissileBaseNT>> missiles = new HashMap();
|
||||
|
||||
public static void registerLaunchables() {
|
||||
|
||||
//Tier 0
|
||||
missiles.put(new ComparableStack(ModItems.missile_micro), EntityMissileMicro.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_schrabidium), EntityMissileSchrabidium.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_bhole), EntityMissileBHole.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_taint), EntityMissileTaint.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_emp), EntityMissileEMP.class);
|
||||
//Tier 1
|
||||
missiles.put(new ComparableStack(ModItems.missile_generic), EntityMissileGeneric.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_decoy), EntityMissileDecoy.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_incendiary), EntityMissileIncendiary.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_cluster), EntityMissileCluster.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_buster), EntityMissileBunkerBuster.class);
|
||||
//Tier 2
|
||||
missiles.put(new ComparableStack(ModItems.missile_strong), EntityMissileStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_incendiary_strong), EntityMissileIncendiaryStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_cluster_strong), EntityMissileClusterStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_buster_strong), EntityMissileBusterStrong.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_emp_strong), EntityMissileEMPStrong.class);
|
||||
//Tier 3
|
||||
missiles.put(new ComparableStack(ModItems.missile_burst), EntityMissileBurst.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_inferno), EntityMissileInferno.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_rain), EntityMissileRain.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_drill), EntityMissileDrill.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_shuttle), EntityMissileShuttle.class);
|
||||
//Tier 4
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear), EntityMissileNuclear.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear_cluster), EntityMissileMirv.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_volcano), EntityMissileVolcano.class);
|
||||
|
||||
missiles.put(new ComparableStack(ModItems.missile_doomsday), EntityMissileDoomsday.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_stealth), EntityMissileStealth.class);
|
||||
}
|
||||
|
||||
public ItemStack toRender;
|
||||
|
||||
@ -79,6 +144,13 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
this.power = Library.chargeTEFromItems(slots, 2, power, maxPower);
|
||||
tanks[0].loadTank(3, 4, slots);
|
||||
tanks[1].loadTank(5, 6, slots);
|
||||
|
||||
if(this.isMissileValid()) {
|
||||
if(slots[0].getItem() instanceof ItemMissile) {
|
||||
ItemMissile missile = (ItemMissile) slots[0].getItem();
|
||||
setFuel(missile);
|
||||
}
|
||||
}
|
||||
|
||||
this.networkPackNT(250);
|
||||
}
|
||||
@ -233,21 +305,22 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
|
||||
if(slots[0] == null) return null;
|
||||
|
||||
Class<? extends EntityMissileBaseNT> clazz = TileEntityLaunchPad.missiles.get(new ComparableStack(slots[0]).makeSingular());
|
||||
Class<? extends EntityMissileBaseNT> clazz = TileEntityLaunchPadBase.missiles.get(new ComparableStack(slots[0]).makeSingular());
|
||||
|
||||
if(clazz != null) {
|
||||
try {
|
||||
EntityMissileBaseNT missile = clazz.getConstructor(World.class, float.class, float.class, float.class, int.class, int.class).newInstance(worldObj, xCoord + 0.5F, yCoord + 2F, zCoord + 0.5F, targetX, targetZ);
|
||||
EntityMissileBaseNT missile = clazz.getConstructor(World.class, float.class, float.class, float.class, int.class, int.class).newInstance(worldObj, xCoord + 0.5F, yCoord + (float) getLaunchOffset() /* Position arguments need to be floats, jackass */, zCoord + 0.5F, targetX, targetZ);
|
||||
if(GeneralConfig.enableExtendedLogging) MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + xCoord + " / " + yCoord + " / " + zCoord + " to " + xCoord + " / " + zCoord + "!");
|
||||
missile.getDataWatcher().updateObject(3, (byte) MathHelper.clamp_int(this.getBlockMetadata() - 10, 2, 5));
|
||||
return missile;
|
||||
} catch(Exception e) { }
|
||||
}
|
||||
|
||||
if(slots[0].getItem() == ModItems.missile_anti_ballistic) {
|
||||
EntityMissileAntiBallistic missile = new EntityMissileAntiBallistic(worldObj);
|
||||
missile.posX = xCoord + 0.5F;
|
||||
missile.posY = yCoord + 2F;
|
||||
missile.posZ = zCoord + 0.5F;
|
||||
missile.posX = xCoord + 0.5D;
|
||||
missile.posY = yCoord + getLaunchOffset();
|
||||
missile.posZ = zCoord + 0.5D;
|
||||
return missile;
|
||||
}
|
||||
|
||||
@ -278,7 +351,6 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
int targetZ = 0;
|
||||
|
||||
if(slots[1] != null && slots[1].getItem() instanceof IDesignatorItem) {
|
||||
|
||||
IDesignatorItem designator = (IDesignatorItem) slots[1].getItem();
|
||||
|
||||
if(!designator.isReady(worldObj, slots[1], xCoord, yCoord, zCoord) && needsDesignator) return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
@ -365,4 +437,5 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
|
||||
/** Any extra conditions for launching in addition to the missile being valid and fueled */
|
||||
public abstract boolean isReadyForLaunch();
|
||||
public abstract double getLaunchOffset();
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import com.hbm.entity.missile.EntityMissileBaseNT;
|
||||
import com.hbm.items.weapon.ItemMissile;
|
||||
import com.hbm.items.weapon.ItemMissile.MissileFormFactor;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -13,7 +12,6 @@ import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
@ -43,10 +41,8 @@ public class TileEntityLaunchPadLarge extends TileEntityLaunchPadBase implements
|
||||
protected boolean liftMoving = false;
|
||||
protected boolean erectorMoving = false;
|
||||
|
||||
@Override
|
||||
public boolean isReadyForLaunch() {
|
||||
return this.erected && this.readyToLoad;
|
||||
}
|
||||
@Override public boolean isReadyForLaunch() { return this.erected && this.readyToLoad; }
|
||||
@Override public double getLaunchOffset() { return 2D; }
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
@ -63,7 +59,6 @@ public class TileEntityLaunchPadLarge extends TileEntityLaunchPadBase implements
|
||||
if(slots[0].getItem() instanceof ItemMissile) {
|
||||
ItemMissile missile = (ItemMissile) slots[0].getItem();
|
||||
this.formFactor = missile.formFactor.ordinal();
|
||||
setFuel(missile);
|
||||
|
||||
if(missile.formFactor == MissileFormFactor.ATLAS || missile.formFactor == MissileFormFactor.HUGE) {
|
||||
erectorSpeed /= 2F;
|
||||
@ -80,60 +75,62 @@ public class TileEntityLaunchPadLarge extends TileEntityLaunchPadBase implements
|
||||
delay = 20;
|
||||
}
|
||||
|
||||
if(delay > 0) {
|
||||
delay--;
|
||||
|
||||
if(delay < 10 && scheduleErect) {
|
||||
this.erected = true;
|
||||
this.scheduleErect = false;
|
||||
}
|
||||
|
||||
// if there is no missile or the missile isn't ready (i.e. the erector hasn't returned to zero position yet), retract
|
||||
if(slots[0] == null || !readyToLoad) {
|
||||
//fold back erector
|
||||
if(erector < 90F) {
|
||||
erector = Math.min(erector + erectorSpeed, 90F);
|
||||
if(erector == 90F) delay = 20;
|
||||
//extend lift
|
||||
} else if(lift < 1F) {
|
||||
lift = Math.min(lift + liftSpeed, 1F);
|
||||
if(erector == 1F) {
|
||||
//if the lift is fully extended, the loading can begin
|
||||
readyToLoad = true;
|
||||
delay = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
//only extend if the erector isn't up yet and the missile can be loaded
|
||||
if(!erected && readyToLoad) {
|
||||
//first, rotate the erector
|
||||
if(erector != 0F) {
|
||||
erector = Math.max(erector - erectorSpeed, 0F);
|
||||
if(erector == 0F) delay = 20;
|
||||
//then retract the lift
|
||||
} else if(lift > 0) {
|
||||
lift = Math.max(lift - liftSpeed, 0F);
|
||||
if(lift == 0F) {
|
||||
//once the lift is at the bottom, the missile is deployed
|
||||
scheduleErect = true;
|
||||
delay = 20;
|
||||
if(this.power >= 75_000) {
|
||||
if(delay > 0) {
|
||||
delay--;
|
||||
|
||||
if(delay < 10 && scheduleErect) {
|
||||
this.erected = true;
|
||||
this.scheduleErect = false;
|
||||
}
|
||||
|
||||
// if there is no missile or the missile isn't ready (i.e. the erector hasn't returned to zero position yet), retract
|
||||
if(slots[0] == null || !readyToLoad) {
|
||||
//fold back erector
|
||||
if(erector < 90F) {
|
||||
erector = Math.min(erector + erectorSpeed, 90F);
|
||||
if(erector == 90F) delay = 20;
|
||||
//extend lift
|
||||
} else if(lift < 1F) {
|
||||
lift = Math.min(lift + liftSpeed, 1F);
|
||||
if(erector == 1F) {
|
||||
//if the lift is fully extended, the loading can begin
|
||||
readyToLoad = true;
|
||||
delay = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//first, fold back the erector
|
||||
if(erector < 90F) {
|
||||
erector = Math.min(erector + erectorSpeed, 90F);
|
||||
if(erector == 90F) delay = 20;
|
||||
//then extend the lift again
|
||||
} else if(lift < 1F) {
|
||||
lift = Math.min(lift + liftSpeed, 1F);
|
||||
if(erector == 1F) {
|
||||
//if the lift is fully extended, the loading can begin
|
||||
readyToLoad = true;
|
||||
delay = 20;
|
||||
|
||||
//only extend if the erector isn't up yet and the missile can be loaded
|
||||
if(!erected && readyToLoad) {
|
||||
//first, rotate the erector
|
||||
if(erector != 0F) {
|
||||
erector = Math.max(erector - erectorSpeed, 0F);
|
||||
if(erector == 0F) delay = 20;
|
||||
//then retract the lift
|
||||
} else if(lift > 0) {
|
||||
lift = Math.max(lift - liftSpeed, 0F);
|
||||
if(lift == 0F) {
|
||||
//once the lift is at the bottom, the missile is deployed
|
||||
scheduleErect = true;
|
||||
delay = 20;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//first, fold back the erector
|
||||
if(erector < 90F) {
|
||||
erector = Math.min(erector + erectorSpeed, 90F);
|
||||
if(erector == 90F) delay = 20;
|
||||
//then extend the lift again
|
||||
} else if(lift < 1F) {
|
||||
lift = Math.min(lift + liftSpeed, 1F);
|
||||
if(erector == 1F) {
|
||||
//if the lift is fully extended, the loading can begin
|
||||
readyToLoad = true;
|
||||
delay = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,6 +184,22 @@ public class TileEntityLaunchPadLarge extends TileEntityLaunchPadBase implements
|
||||
this.audioErector = null;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.erected && (this.formFactor == MissileFormFactor.HUGE.ordinal() || this.formFactor == MissileFormFactor.ATLAS.ordinal()) && this.tanks[1].getFill() > 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tower");
|
||||
data.setFloat("lift", 0F);
|
||||
data.setFloat("base", 0.5F);
|
||||
data.setFloat("max", 2F);
|
||||
data.setInteger("life", 70 + worldObj.rand.nextInt(30));
|
||||
data.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextGaussian() * 0.5);
|
||||
data.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextGaussian() * 0.5);
|
||||
data.setDouble("posY", yCoord + 2);
|
||||
data.setBoolean("noWind", true);
|
||||
data.setFloat("alphaMod", 2F);
|
||||
data.setFloat("strafe", 0.05F);
|
||||
for(int i = 0; i < 3; i++) MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
}
|
||||
|
||||
super.updateEntity();
|
||||
@ -244,17 +257,6 @@ public class TileEntityLaunchPadLarge extends TileEntityLaunchPadBase implements
|
||||
nbt.setInteger("formFactor", formFactor);
|
||||
}
|
||||
|
||||
public Entity instantiateMissile(int targetX, int targetZ) {
|
||||
Entity missile = super.instantiateMissile(targetX, targetZ);
|
||||
|
||||
if(missile instanceof EntityMissileBaseNT) {
|
||||
EntityMissileBaseNT base = (EntityMissileBaseNT) missile;
|
||||
base.getDataWatcher().updateObject(3, (byte) (this.getBlockMetadata() - 10));
|
||||
}
|
||||
|
||||
return missile;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,11 +20,13 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -39,7 +41,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IEnergyGenerator, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent {
|
||||
public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IEnergyGenerator, INBTPacketReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000000L;
|
||||
@ -51,6 +53,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
|
||||
public FluidTank[] tanks;
|
||||
protected double[] info = new double[3];
|
||||
|
||||
private AudioWrapper audio;
|
||||
private float audioDesync;
|
||||
@ -69,6 +72,8 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.info = new double[3];
|
||||
|
||||
boolean operational = false;
|
||||
FluidType in = tanks[0].getTankType();
|
||||
boolean valid = false;
|
||||
@ -83,6 +88,9 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
info[0] = ops * trait.amountReq;
|
||||
info[1] = ops * trait.amountProduced;
|
||||
info[2] = ops * trait.heatEnergy * eff;
|
||||
valid = true;
|
||||
operational = ops > 0;
|
||||
}
|
||||
@ -373,4 +381,12 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, info[1] > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, info[0]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, info[1]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, info[2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,35 +1,29 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.saveddata.TomSaveData;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, INBTPacketReceiver {
|
||||
public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidStandardTransceiver, INBTPacketReceiver, IInfoProviderEC {
|
||||
|
||||
public int age = 0;
|
||||
public FluidTank[] tanks;
|
||||
public List<IFluidAcceptor> list = new ArrayList();
|
||||
|
||||
public int waterTimer = 0;
|
||||
protected int throughput;
|
||||
|
||||
public TileEntityCondenser() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 100, 0);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 100, 1);
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 100);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,6 +43,8 @@ public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidA
|
||||
this.waterTimer--;
|
||||
|
||||
int convert = Math.min(tanks[0].getFill(), tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
this.throughput = convert;
|
||||
|
||||
if(extraCondition(convert)) {
|
||||
tanks[0].setFill(tanks[0].getFill() - convert);
|
||||
|
||||
@ -71,7 +67,6 @@ public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidA
|
||||
this.subscribeToAllAround(tanks[0].getTankType(), this);
|
||||
this.sendFluidToAll(tanks[1], this);
|
||||
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
data.setByte("timer", (byte) this.waterTimer);
|
||||
packExtra(data);
|
||||
INBTPacketReceiver.networkPack(this, data, 150);
|
||||
@ -103,76 +98,6 @@ public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidA
|
||||
tanks[1].writeToNBT(nbt, "steam");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] {tanks [1]};
|
||||
@ -187,4 +112,10 @@ public class TileEntityCondenser extends TileEntityLoadedBase implements IFluidA
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, throughput);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, throughput);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,8 +91,6 @@ public class TileEntityCondenserPowered extends TileEntityCondenser implements I
|
||||
tanks[1].writeToNBT(nbt, "steam");
|
||||
}
|
||||
|
||||
@Deprecated @Override public void fillFluidInit(FluidType type) { }
|
||||
|
||||
@Override
|
||||
public void subscribeToAllAround(FluidType type, TileEntity te) {
|
||||
for(DirPos pos : getConPos()) {
|
||||
|
||||
@ -12,8 +12,10 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityMachinePolluting;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -27,7 +29,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityDiFurnace extends TileEntityMachinePolluting implements IFluidStandardSender, IGUIProvider {
|
||||
public class TileEntityDiFurnace extends TileEntityMachinePolluting implements IFluidStandardSender, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public int progress;
|
||||
public int fuel;
|
||||
@ -270,4 +272,11 @@ public class TileEntityDiFurnace extends TileEntityMachinePolluting implements I
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return this.getSmokeTanks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setLong(CompatEnergyControl.L_ENERGY_, this.fuel);
|
||||
data.setLong(CompatEnergyControl.L_CAPACITY_, this.maxFuel);
|
||||
data.setInteger(CompatEnergyControl.I_PROGRESS, this.progress);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,10 @@ import com.hbm.inventory.recipes.BlastFurnaceRecipes;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.RTGUtil;
|
||||
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -18,8 +20,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGUIProvider
|
||||
{
|
||||
public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public short progress;
|
||||
private short processSpeed = 0;
|
||||
// Edit as needed
|
||||
@ -219,4 +221,9 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
return new GUIMachineDiFurnaceRTG(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setLong(CompatEnergyControl.L_FUEL, this.getPower());
|
||||
data.setInteger(CompatEnergyControl.I_PROGRESS, this.progress);
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +40,8 @@ public class TileEntityFurnaceBrick extends TileEntityMachineBase implements IGU
|
||||
burnSpeed.put(Item.getItemFromBlock(Blocks.netherrack), 4);
|
||||
burnSpeed.put(Item.getItemFromBlock(Blocks.cobblestone), 2);
|
||||
burnSpeed.put(Item.getItemFromBlock(Blocks.sand), 2);
|
||||
burnSpeed.put(Item.getItemFromBlock(Blocks.log), 2);
|
||||
burnSpeed.put(Item.getItemFromBlock(Blocks.log2), 2);
|
||||
}
|
||||
|
||||
public int burnTime;
|
||||
|
||||
@ -27,10 +27,12 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -44,7 +46,7 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser, IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IGUIProvider /* TODO: finish fluid API impl */ {
|
||||
public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser, IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 10000000;
|
||||
@ -649,4 +651,12 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIITER(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.isOn && plasma.getFill() > 0);
|
||||
int output = FusionRecipes.getSteamProduction(plasma.getTankType());
|
||||
data.setDouble("consumption", output * 10);
|
||||
data.setDouble("outputmb", output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,27 +3,33 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineAmgen extends TileEntityLoadedBase implements IEnergyGenerator {
|
||||
public class TileEntityMachineAmgen extends TileEntityLoadedBase implements IEnergyGenerator, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public long maxPower = 500;
|
||||
protected long output = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.output = 0;
|
||||
|
||||
Block block = worldObj.getBlock(xCoord, yCoord, zCoord);
|
||||
|
||||
if(block == ModBlocks.machine_amgen) {
|
||||
float rad = ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord);
|
||||
power += rad;
|
||||
this.output += rad;
|
||||
ChunkRadiationManager.proxy.decrementRad(worldObj, xCoord, yCoord, zCoord, 5F);
|
||||
|
||||
} else if(block == ModBlocks.machine_geo) {
|
||||
@ -31,6 +37,7 @@ public class TileEntityMachineAmgen extends TileEntityLoadedBase implements IEne
|
||||
this.checkGeoInteraction(xCoord, yCoord - 1, zCoord);
|
||||
}
|
||||
|
||||
this.power += this.output;
|
||||
if(power > maxPower)
|
||||
power = maxPower;
|
||||
|
||||
@ -44,21 +51,21 @@ public class TileEntityMachineAmgen extends TileEntityLoadedBase implements IEne
|
||||
Block b = worldObj.getBlock(x, y, z);
|
||||
|
||||
if(b == ModBlocks.geysir_water) {
|
||||
power += 75;
|
||||
this.output += 75;
|
||||
} else if(b == ModBlocks.geysir_chlorine) {
|
||||
power += 100;
|
||||
this.output += 100;
|
||||
} else if(b == ModBlocks.geysir_vapor) {
|
||||
power += 50;
|
||||
this.output += 50;
|
||||
} else if(b == ModBlocks.geysir_nether) {
|
||||
power += 500;
|
||||
this.output += 500;
|
||||
} else if(b == Blocks.lava) {
|
||||
power += 100;
|
||||
this.output += 100;
|
||||
|
||||
if(worldObj.rand.nextInt(6000) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.obsidian);
|
||||
}
|
||||
} else if(b == Blocks.flowing_lava) {
|
||||
power += 25;
|
||||
this.output += 25;
|
||||
|
||||
if(worldObj.rand.nextInt(3000) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.cobblestone);
|
||||
@ -80,4 +87,10 @@ public class TileEntityMachineAmgen extends TileEntityLoadedBase implements IEne
|
||||
public long getMaxPower() {
|
||||
return this.maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.output > 0);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,8 +11,10 @@ import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -26,7 +28,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements ISidedInventory, IEnergyUser, IGUIProvider {
|
||||
public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements ISidedInventory, IEnergyUser, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
@ -400,4 +402,10 @@ public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineArcFurnace(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.hasPower() && this.canProcess());
|
||||
data.setInteger(CompatEnergyControl.I_PROGRESS, this.dualCookTime);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,9 +15,11 @@ import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -30,7 +32,7 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyUser, IGUIProvider, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineCentrifuge extends TileEntityMachineBase implements IEnergyUser, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public int progress;
|
||||
public long power;
|
||||
@ -345,4 +347,10 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
||||
if(type == UpgradeType.OVERDRIVE) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.progress > 0);
|
||||
data.setInteger(CompatEnergyControl.B_ACTIVE, this.progress);
|
||||
}
|
||||
}
|
||||
@ -30,12 +30,14 @@ import com.hbm.tileentity.IConditionalInvAccess;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -50,7 +52,7 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineCyclotron extends TileEntityMachineBase implements IFluidSource, IFluidAcceptor, IEnergyUser, IFluidStandardTransceiver, IGUIProvider, IConditionalInvAccess, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineCyclotron extends TileEntityMachineBase implements IFluidSource, IFluidAcceptor, IEnergyUser, IFluidStandardTransceiver, IGUIProvider, IConditionalInvAccess, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000;
|
||||
@ -613,4 +615,10 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
if(type == UpgradeType.EFFECT) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.isOn && this.progress > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_HE, this.progress > 0 ? consumption - 100_000 * getConsumption() : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,10 +24,12 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachinePolluting;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -38,7 +40,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyGenerator, IFluidContainer, IFluidAcceptor, IFluidStandardTransceiver, IConfigurableMachine, IGUIProvider {
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyGenerator, IFluidContainer, IFluidAcceptor, IFluidStandardTransceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public int soundCycle = 0;
|
||||
@ -326,4 +328,13 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return this.getSmokeTanks();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
long he = getHEFromFuel(tank.getTankType());
|
||||
boolean active = tank.getFill() > 0 && he > 0;
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, active);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, active ? 1D : 0D);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, he);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,9 +13,11 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -28,7 +30,7 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineEPress extends TileEntityMachineBase implements IEnergyUser, IGUIProvider, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineEPress extends TileEntityMachineBase implements IEnergyUser, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power = 0;
|
||||
public final static long maxPower = 50000;
|
||||
@ -281,4 +283,9 @@ public class TileEntityMachineEPress extends TileEntityMachineBase implements IE
|
||||
if(type == UpgradeType.SPEED) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setInteger(CompatEnergyControl.I_PROGRESS, this.press);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,11 +15,13 @@ import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -34,7 +36,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
//epic!
|
||||
public class TileEntityMachineGasCent extends TileEntityMachineBase implements IEnergyUser, IFluidStandardReceiver, IGUIProvider {
|
||||
public class TileEntityMachineGasCent extends TileEntityMachineBase implements IEnergyUser, IFluidStandardReceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public int progress;
|
||||
@ -452,4 +454,10 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineGasCent(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.progress > 0);
|
||||
data.setInteger(CompatEnergyControl.I_PROGRESS, this.progress);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,11 +18,13 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.RTGUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -37,7 +39,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineIGenerator extends TileEntityMachineBase implements IFluidAcceptor, IEnergyGenerator, IFluidStandardReceiver, IConfigurableMachine, IGUIProvider {
|
||||
public class TileEntityMachineIGenerator extends TileEntityMachineBase implements IFluidAcceptor, IEnergyGenerator, IFluidStandardReceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public int spin;
|
||||
@ -66,6 +68,8 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
public static int waterRate = 10;
|
||||
public static int lubeRate = 1;
|
||||
public static long fluidHeatDiv = 1_000L;
|
||||
|
||||
protected long output;
|
||||
|
||||
@Override
|
||||
public String getConfigName() {
|
||||
@ -219,7 +223,8 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
this.tanks[2].setFill(this.tanks[2].getFill() - lubeRate);
|
||||
}
|
||||
|
||||
this.power += this.spin * genMult;
|
||||
this.output = (long) (this.spin * genMult);
|
||||
this.power += this.output;
|
||||
|
||||
if(this.power > this.maxPower)
|
||||
this.power = this.maxPower;
|
||||
@ -385,4 +390,10 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIIGenerator(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.output > 0);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,10 +21,12 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -42,13 +44,14 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineLargeTurbine extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IEnergyGenerator, IFluidStandardTransceiver, IGUIProvider, SimpleComponent {
|
||||
public class TileEntityMachineLargeTurbine extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IEnergyGenerator, IFluidStandardTransceiver, IGUIProvider, SimpleComponent, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000000;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
protected double[] info = new double[3];
|
||||
|
||||
private boolean shouldTurn;
|
||||
public float rotor;
|
||||
@ -79,9 +82,10 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.info = new double[3];
|
||||
|
||||
age++;
|
||||
if(age >= 2)
|
||||
{
|
||||
if(age >= 2) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
@ -112,6 +116,9 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
info[0] = ops * trait.amountReq;
|
||||
info[1] = ops * trait.amountProduced;
|
||||
info[2] = ops * trait.heatEnergy * eff;
|
||||
valid = true;
|
||||
operational = ops > 0;
|
||||
}
|
||||
@ -377,4 +384,12 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineLargeTurbine(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, info[1] > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, info[0]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, info[1]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, info[2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,11 +2,14 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineMiniRTG extends TileEntityLoadedBase implements IEnergyGenerator {
|
||||
public class TileEntityMachineMiniRTG extends TileEntityLoadedBase implements IEnergyGenerator, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
boolean tact = false;
|
||||
@ -16,10 +19,7 @@ public class TileEntityMachineMiniRTG extends TileEntityLoadedBase implements IE
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(this.getBlockType() == ModBlocks.machine_powerrtg)
|
||||
power += 2500;
|
||||
else
|
||||
power += 700;
|
||||
power += this.getOutput();
|
||||
|
||||
if(power > getMaxPower())
|
||||
power = getMaxPower();
|
||||
@ -28,15 +28,16 @@ public class TileEntityMachineMiniRTG extends TileEntityLoadedBase implements IE
|
||||
this.sendPower(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public long getOutput() {
|
||||
if(this.getBlockType() == ModBlocks.machine_powerrtg) return 2_500;
|
||||
return 700;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
|
||||
if(this.getBlockType() == ModBlocks.machine_powerrtg)
|
||||
return 50000;
|
||||
|
||||
return 1400;
|
||||
if(this.getBlockType() == ModBlocks.machine_powerrtg) return 50_000;
|
||||
return 1_400;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -48,4 +49,11 @@ public class TileEntityMachineMiniRTG extends TileEntityLoadedBase implements IE
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, true);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.getOutput());
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,9 +8,11 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.RTGUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -24,7 +26,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineRTG extends TileEntityLoadedBase implements ISidedInventory, IEnergyGenerator, IGUIProvider {
|
||||
public class TileEntityMachineRTG extends TileEntityLoadedBase implements ISidedInventory, IEnergyGenerator, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
@ -249,4 +251,10 @@ public class TileEntityMachineRTG extends TileEntityLoadedBase implements ISided
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineRTG(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.heat > 0);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, heat * 5D);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,9 +11,11 @@ import com.hbm.items.special.ItemWasteLong;
|
||||
import com.hbm.items.special.ItemWasteShort;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.Tuple.Triplet;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -28,12 +30,13 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineRadGen extends TileEntityMachineBase implements IEnergyGenerator, IGUIProvider {
|
||||
public class TileEntityMachineRadGen extends TileEntityMachineBase implements IEnergyGenerator, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public int[] progress = new int[12];
|
||||
public int[] maxProgress = new int[12];
|
||||
public int[] production = new int[12];
|
||||
public ItemStack[] processing = new ItemStack[12];
|
||||
protected int output;
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000;
|
||||
@ -53,6 +56,8 @@ public class TileEntityMachineRadGen extends TileEntityMachineBase implements IE
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.output = 0;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
this.sendPower(worldObj, this.xCoord - dir.offsetX * 4, this.yCoord, this.zCoord - dir.offsetZ * 4, dir.getOpposite());
|
||||
@ -82,6 +87,7 @@ public class TileEntityMachineRadGen extends TileEntityMachineBase implements IE
|
||||
|
||||
this.isOn = true;
|
||||
this.power += production[i];
|
||||
this.output += production[i];
|
||||
progress[i]++;
|
||||
|
||||
if(progress[i] >= maxProgress[i]) {
|
||||
@ -290,4 +296,9 @@ public class TileEntityMachineRadGen extends TileEntityMachineBase implements IE
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineRadGen(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,12 +19,14 @@ import com.hbm.items.machine.ItemRTGPelletDepleted;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.RTGUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -37,7 +39,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineRadiolysis extends TileEntityMachineBase implements IEnergyGenerator, IFluidAcceptor, IFluidSource, IFluidContainer, IFluidStandardTransceiver, IGUIProvider {
|
||||
public class TileEntityMachineRadiolysis extends TileEntityMachineBase implements IEnergyGenerator, IFluidAcceptor, IFluidSource, IFluidContainer, IFluidStandardTransceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final int maxPower = 1000000;
|
||||
@ -384,4 +386,9 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIRadiolysis(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.heat * 10);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,9 @@ import com.hbm.inventory.recipes.BreederRecipes;
|
||||
import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -28,7 +30,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineReactorBreeding extends TileEntityMachineBase implements SimpleComponent, IGUIProvider {
|
||||
public class TileEntityMachineReactorBreeding extends TileEntityMachineBase implements SimpleComponent, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public int flux;
|
||||
public float progress;
|
||||
@ -251,4 +253,9 @@ public class TileEntityMachineReactorBreeding extends TileEntityMachineBase impl
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineReactorBreeding(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setInteger(CompatEnergyControl.I_FLUX, flux);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class TileEntityMachineSPP extends TileEntityLoadedBase implements IEnergyGenerator {
|
||||
public class TileEntityMachineSPP extends TileEntityLoadedBase implements IEnergyGenerator, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -86,4 +89,9 @@ public class TileEntityMachineSPP extends TileEntityLoadedBase implements IEnerg
|
||||
return this.maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.gen > 0);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.gen);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.container.ContainerMachineTurbine;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -19,10 +14,12 @@ import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -42,14 +39,13 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineTurbine extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IFluidAcceptor, IFluidSource, IEnergyGenerator, IFluidStandardTransceiver, IGUIProvider, SimpleComponent {
|
||||
public class TileEntityMachineTurbine extends TileEntityLoadedBase implements ISidedInventory, IFluidContainer, IEnergyGenerator, IFluidStandardTransceiver, IGUIProvider, SimpleComponent, IInfoProviderEC {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000;
|
||||
public int age = 0;
|
||||
public List<IFluidAcceptor> list2 = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
|
||||
private static final int[] slots_top = new int[] {4};
|
||||
@ -57,6 +53,7 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
private static final int[] slots_side = new int[] {4};
|
||||
|
||||
private String customName;
|
||||
protected double[] info = new double[3];
|
||||
|
||||
public TileEntityMachineTurbine() {
|
||||
slots = new ItemStack[7];
|
||||
@ -230,16 +227,16 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.info = new double[3];
|
||||
|
||||
age++;
|
||||
if(age >= 2)
|
||||
{
|
||||
if(age >= 2) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
this.subscribeToAllAround(tanks[0].getTankType(), this);
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
this.sendPower(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
@ -262,6 +259,9 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
info[0] = ops * trait.amountReq;
|
||||
info[1] = ops * trait.amountProduced;
|
||||
info[2] = ops * trait.heatEnergy * eff;
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
@ -279,32 +279,6 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
@ -323,14 +297,6 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
@ -343,16 +309,6 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
list2.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
@ -423,4 +379,12 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineTurbine(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, info[1] > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, info[0]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, info[1]);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, info[2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,9 +19,11 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -39,7 +41,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineTurbineGas extends TileEntityMachineBase implements IFluidStandardTransceiver, IEnergyGenerator, IControlReceiver, IGUIProvider, SimpleComponent {
|
||||
public class TileEntityMachineTurbineGas extends TileEntityMachineBase implements IFluidStandardTransceiver, IEnergyGenerator, IControlReceiver, IGUIProvider, SimpleComponent, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000L;
|
||||
@ -649,4 +651,15 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineTurbineGas(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.state == 1);
|
||||
data.setDouble(CompatEnergyControl.D_HEAT_C, Math.max(20D, this.temp));
|
||||
data.setDouble(CompatEnergyControl.D_TURBINE_PERCENT, this.powerSliderPos * 100D / 60D);
|
||||
data.setInteger(CompatEnergyControl.I_TURBINE_SPEED, this.rpm);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, this.instantPowerOutput);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, this.waterToBoil);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, this.waterToBoil * 10);
|
||||
}
|
||||
}
|
||||
@ -16,10 +16,12 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.module.ModuleBurnTime;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -31,7 +33,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineWoodBurner extends TileEntityMachineBase implements IFluidStandardReceiver, IControlReceiver, IEnergyGenerator, IGUIProvider {
|
||||
public class TileEntityMachineWoodBurner extends TileEntityMachineBase implements IFluidStandardReceiver, IControlReceiver, IEnergyGenerator, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100_000;
|
||||
@ -39,6 +41,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
public int maxBurnTime;
|
||||
public boolean liquidBurn = false;
|
||||
public boolean isOn = false;
|
||||
protected int powerGen = 0;
|
||||
|
||||
public FluidTank tank;
|
||||
|
||||
@ -63,6 +66,8 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
powerGen = 0;
|
||||
|
||||
this.tank.setType(2, slots);
|
||||
this.tank.loadTank(3, 4, slots);
|
||||
this.power = Library.chargeItemsFromTE(slots, 5, power, maxPower);
|
||||
@ -96,8 +101,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
|
||||
} else if(this.power < this.maxPower && isOn){
|
||||
this.burnTime--;
|
||||
this.power += 100;
|
||||
if(power > maxPower) this.power = this.maxPower;
|
||||
this.powerGen += 100;
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND);
|
||||
}
|
||||
|
||||
@ -111,7 +115,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
int toBurn = Math.min(tank.getFill(), 2);
|
||||
|
||||
if(toBurn > 0) {
|
||||
this.power += trait.getHeatEnergy() * toBurn / 2_000L;
|
||||
this.powerGen += trait.getHeatEnergy() * toBurn / 2_000L;
|
||||
this.tank.setFill(this.tank.getFill() - toBurn);
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * toBurn / 2F);
|
||||
}
|
||||
@ -119,6 +123,7 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
}
|
||||
}
|
||||
|
||||
this.power += this.powerGen;
|
||||
if(this.power > this.maxPower) this.power = this.maxPower;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@ -301,4 +306,11 @@ public class TileEntityMachineWoodBurner extends TileEntityMachineBase implement
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, isOn);
|
||||
if(this.liquidBurn) data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, 1D);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_HE, power);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,9 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPlateFuel;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -39,7 +41,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
//TODO: fix reactor control;
|
||||
public class TileEntityReactorResearch extends TileEntityMachineBase implements IControlReceiver, SimpleComponent, IGUIProvider {
|
||||
public class TileEntityReactorResearch extends TileEntityMachineBase implements IControlReceiver, SimpleComponent, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double lastLevel;
|
||||
@ -446,4 +448,11 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIReactorResearch(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setDouble(CompatEnergyControl.D_HEAT_C, Math.round(heat * 2.0E-5D * 980.0D + 20.0D));
|
||||
data.setInteger(CompatEnergyControl.I_FLUX, totalFlux);
|
||||
data.setInteger(CompatEnergyControl.I_WATER, water);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,10 +28,12 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -50,7 +52,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IGUIProvider {
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public int heat;
|
||||
public static final int maxHeat = 100000;
|
||||
@ -64,6 +66,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
public FluidTank steam;
|
||||
public FluidTank carbonDioxide;
|
||||
public FluidTank water;
|
||||
protected int output;
|
||||
|
||||
private static final int[] slots_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 };
|
||||
|
||||
@ -188,6 +191,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.output = 0;
|
||||
age++;
|
||||
|
||||
if (age >= 20) {
|
||||
@ -254,11 +258,11 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
// function of SHS produced per tick
|
||||
// (heat - 10256)/100000 * steamFill (max efficiency at 14b) * 25 * 5 (should get rid of any rounding errors)
|
||||
if(this.heat > 10256) {
|
||||
int Water = (int)((((float)heat - 10256F) / (float)maxHeat) * Math.min(((float)carbonDioxide.getFill() / 14000F), 1F) * 25F * 5F);
|
||||
int Steam = Water * 1;
|
||||
int cycle = (int)((((float)heat - 10256F) / (float)maxHeat) * Math.min(((float)carbonDioxide.getFill() / 14000F), 1F) * 25F * 5F);
|
||||
this.output = cycle;
|
||||
|
||||
water.setFill(water.getFill() - Water);
|
||||
steam.setFill(steam.getFill() + Steam);
|
||||
water.setFill(water.getFill() - cycle);
|
||||
steam.setFill(steam.getFill() + cycle);
|
||||
|
||||
if(water.getFill() < 0)
|
||||
water.setFill(0);
|
||||
@ -606,4 +610,13 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIReactorZirnox(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setDouble(CompatEnergyControl.D_HEAT_C, Math.round(heat * 1.0E-5D * 780.0D + 20.0D));
|
||||
data.setDouble(CompatEnergyControl.D_MAXHEAT_C, Math.round(maxHeat * 1.0E-5D * 780.0D + 20.0D));
|
||||
data.setLong(CompatEnergyControl.L_PRESSURE_BAR, Math.round(pressure * 1.0E-5D * 30.0D));
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, output);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,10 +15,12 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.WeightedRandomObject;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -32,7 +34,7 @@ import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcceptor, IFluidStandardReceiver, IGUIProvider {
|
||||
public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public EnumWavelengths mode = EnumWavelengths.NULL;
|
||||
public boolean hasLaser;
|
||||
@ -373,4 +375,13 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUISILEX(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.progress > 0);
|
||||
if(current == null)
|
||||
data.setString("tank2", "N/A");
|
||||
else
|
||||
data.setString("tank2", String.format("%s: %s mB", current.toStack().getDisplayName(), currentFill));
|
||||
}
|
||||
}
|
||||
@ -16,8 +16,8 @@ public class TileEntityTowerLarge extends TileEntityCondenser {
|
||||
|
||||
public TileEntityTowerLarge() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 10000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 10000, 1);
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 10000);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 10000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -43,18 +43,6 @@ public class TileEntityTowerLarge extends TileEntityCondenser {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
for(int i = 2; i < 6; i++) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
fillFluid(xCoord + dir.offsetX * 5, yCoord, zCoord + dir.offsetZ * 5, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * 3, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscribeToAllAround(FluidType type, TileEntity te) {
|
||||
|
||||
|
||||
@ -11,14 +11,13 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityTowerSmall extends TileEntityCondenser {
|
||||
|
||||
public TileEntityTowerSmall() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 1000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 1000, 1);
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 1000);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -59,15 +58,6 @@ public class TileEntityTowerSmall extends TileEntityCondenser {
|
||||
this.sendFluid(this.tanks[1], worldObj, xCoord, yCoord, zCoord + 3, Library.POS_Z);
|
||||
this.sendFluid(this.tanks[1], worldObj, xCoord, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
for(int i = 2; i <= 6; i++) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
fillFluid(xCoord + dir.offsetX * 3, yCoord, zCoord + dir.offsetZ * 3, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@ -19,11 +19,13 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardSender;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -35,7 +37,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineLiquefactor extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineLiquefactor extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -326,4 +328,10 @@ public class TileEntityMachineLiquefactor extends TileEntityMachineBase implemen
|
||||
if(type == UpgradeType.POWER) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.progress > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_HE, this.usage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,12 +16,14 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -33,7 +35,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineSolidifier extends TileEntityMachineBase implements IEnergyUser, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, IUpgradeInfoProvider {
|
||||
public class TileEntityMachineSolidifier extends TileEntityMachineBase implements IEnergyUser, IFluidAcceptor, IFluidStandardReceiver, IGUIProvider, IUpgradeInfoProvider, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
@ -302,4 +304,10 @@ public class TileEntityMachineSolidifier extends TileEntityMachineBase implement
|
||||
if(type == UpgradeType.POWER) return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.progress > 0);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_HE, this.usage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,16 +80,18 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
|
||||
goesDown = false;
|
||||
|
||||
if(!worldObj.isRemote && this.canTargetInteract()) {
|
||||
if(this.loadedItem != null) {
|
||||
getColumnAtPos().load(this.loadedItem);
|
||||
this.loadedItem = null;
|
||||
} else {
|
||||
IRBMKLoadable column = getColumnAtPos();
|
||||
this.loadedItem = column.provideNext();
|
||||
column.unload();
|
||||
IRBMKLoadable column = getColumnAtPos();
|
||||
if(column != null) { // canTargetInteract already assumes this, but there seems to be some freak race conditions that cause the column to be null anyway
|
||||
if(this.loadedItem != null) {
|
||||
column.load(this.loadedItem);
|
||||
this.loadedItem = null;
|
||||
} else {
|
||||
this.loadedItem = column.provideNext();
|
||||
column.unload();
|
||||
}
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import api.hbm.energy.*;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
|
||||
import com.hbm.blocks.machine.MachineBattery;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.container.ContainerMachineBattery;
|
||||
@ -9,6 +11,8 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -32,7 +36,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "opencomputers")})
|
||||
public class TileEntityMachineBattery extends TileEntityMachineBase implements IEnergyUser, IPersistentNBT, SimpleComponent, IGUIProvider {
|
||||
public class TileEntityMachineBattery extends TileEntityMachineBase implements IEnergyUser, IPersistentNBT, SimpleComponent, IGUIProvider, IInfoProviderEC {
|
||||
|
||||
public long[] log = new long[20];
|
||||
public long delta = 0;
|
||||
@ -464,4 +468,9 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineBattery(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setLong(CompatEnergyControl.L_DIFF_HE, (log[0] - log[19]) / 20L);
|
||||
}
|
||||
}
|
||||
|
||||
164
src/main/java/com/hbm/util/CompatEnergyControl.java
Normal file
@ -0,0 +1,164 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineGasCent.PseudoFluidTank;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKBase;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.fluid.IFluidUser;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/** Provides data specified by EC's CrossModBase */
|
||||
public class CompatEnergyControl {
|
||||
|
||||
/** Returns true for stacks with electric items like batteries or powertools (i.e. implements IBatteryItem) */
|
||||
public static boolean isElectricItem(ItemStack stack) {
|
||||
return stack.getItem() instanceof IBatteryItem;
|
||||
}
|
||||
|
||||
/** Standardized discharge for IBatteryItem, returns the amount that was removed */
|
||||
public static double dischargeItem(ItemStack stack, double needed) {
|
||||
IBatteryItem battery = (IBatteryItem) stack.getItem();
|
||||
long toDischarge = Math.min(battery.getDischargeRate(), Math.min(battery.getCharge(stack), (long) needed));
|
||||
battery.dischargeBattery(stack, toDischarge);
|
||||
return toDischarge;
|
||||
}
|
||||
|
||||
/** Returns the power and maxPower values for IEnergyUser */
|
||||
public static void getEnergyData(TileEntity tile, NBTTagCompound data) {
|
||||
|
||||
data.setString(KEY_EUTYPE, "HE");
|
||||
|
||||
if(tile instanceof IEnergyUser) {
|
||||
IEnergyUser user = (IEnergyUser) tile;
|
||||
data.setDouble(L_ENERGY_HE, user.getPower());
|
||||
data.setDouble(L_CAPACITY_HE, user.getMaxPower());
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the heat for RBMKs */
|
||||
public static int getHeat(TileEntity tile) {
|
||||
if(tile instanceof TileEntityRBMKBase) return (int) ((TileEntityRBMKBase) tile).heat;
|
||||
//original implementation also used the SNR and LNR for some reason, but those no longer exist. neither ZINOX nor research reactor were part of the system.
|
||||
return -1;
|
||||
}
|
||||
|
||||
/** Returns a list of Object arrays, one array for each fluid tank where the array contains fluid name, fill state and capacity (STRING, INTEGER, INTEGER) */
|
||||
public static List<Object[]> getAllTanks(TileEntity tile) {
|
||||
|
||||
List<Object[]> list = new ArrayList();
|
||||
|
||||
if(tile instanceof IFluidUser) {
|
||||
IFluidUser user = (IFluidUser) tile;
|
||||
|
||||
for(FluidTank tank : user.getAllTanks()) {
|
||||
if(tank.getTankType() == Fluids.SMOKE || tank.getTankType() == Fluids.SMOKE_LEADED || tank.getTankType() == Fluids.SMOKE_POISON) continue;
|
||||
list.add(toFluidInfo(tank));
|
||||
}
|
||||
}
|
||||
|
||||
if(tile instanceof TileEntityMachineGasCent) {
|
||||
TileEntityMachineGasCent cent = (TileEntityMachineGasCent) tile;
|
||||
list.add(toFluidInfo(cent.inputTank));
|
||||
list.add(toFluidInfo(cent.outputTank));
|
||||
}
|
||||
|
||||
if(!list.isEmpty()) return list;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Object[] toFluidInfo(FluidTank tank) {
|
||||
return new Object[] {tank.getTankType().getName(), tank.getFill(), tank.getMaxFill()};
|
||||
}
|
||||
|
||||
private static Object[] toFluidInfo(PseudoFluidTank tank) {
|
||||
return new Object[] {tank.getTankType().getName(), tank.getFill(), tank.getMaxFill()};
|
||||
}
|
||||
|
||||
/** Returns any non-standard data like progress, unique stats and so forth. Data comes from the IInfoProviderEC implementation */
|
||||
public static void getExtraData(TileEntity tile, NBTTagCompound data) {
|
||||
|
||||
if(tile instanceof IInfoProviderEC) {
|
||||
IInfoProviderEC provider = (IInfoProviderEC) tile;
|
||||
provider.provideExtraInfo(data);
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the core tile entity for that position, can resolve the MK1 "IMultiblock" and MK2 "BlockDummyable" systems. */
|
||||
public static TileEntity findTileEntity(World world, int x, int y, int z) {
|
||||
return CompatExternal.getCoreFromPos(world, x, y, z); //CompatExternal you're just standing around, do something for once
|
||||
}
|
||||
|
||||
/** Returns the ResourceLocation for the given fluid name */
|
||||
public static ResourceLocation getFluidTexture(String name) {
|
||||
FluidType type = Fluids.fromName(name);
|
||||
return type == null ? null : type.getTexture();
|
||||
}
|
||||
|
||||
/*
|
||||
* [DATA TYPE] _ [NAME] _ [UNIT]
|
||||
*/
|
||||
|
||||
public static final String KEY_EUTYPE = "euType";
|
||||
|
||||
public static final String L_ENERGY_HE = "energy";
|
||||
public static final String L_ENERGY_TU = "energyTU";
|
||||
public static final String L_ENERGY_ = "energy_"; // Blast Furnace fuel
|
||||
|
||||
public static final String L_CAPACITY_HE = "capacity";
|
||||
public static final String L_CAPACITY_TU = "capacityTU";
|
||||
public static final String L_CAPACITY_ = "capacity_"; // Blast Furnace fuel capacity
|
||||
|
||||
public static final String D_CONSUMPTION_HE = "consumptionHE";
|
||||
public static final String D_CONSUMPTION_MB = "consumption";
|
||||
@Deprecated public static final String S_CONSUMPTION_ = "consumption_"; // FWatz fluid consumption rates
|
||||
|
||||
public static final String D_OUTPUT_HE = "output";
|
||||
public static final String D_OUTPUT_MB = "outputmb";
|
||||
public static final String D_OUTPUT_TU = "outputTU";
|
||||
|
||||
public static final String L_DIFF_HE = "diff"; // Battery diff per tick
|
||||
@Deprecated public static final String I_TEMP_K = "temp"; // Unused?
|
||||
public static final String D_TURBINE_PERCENT = "turbine"; // CCGT slider
|
||||
public static final String I_TURBINE_SPEED = "speed"; // CCGT RPM
|
||||
public static final String L_COREHEAT_C = "core"; // Research Reactor core heat
|
||||
public static final String L_HULLHEAT_C = "hull"; // Research Reactor hull heat
|
||||
public static final String S_LEVEL_PERCENT = "level"; // Research Reactor rods
|
||||
@Deprecated public static final String L_HEATL = "heatL"; // AMS and old Watz heat values
|
||||
public static final String D_HEAT_C = "heat"; // Research Reactor and RBMK column heat
|
||||
public static final String D_MAXHEAT_C = "maxHeat"; // ZIRNOX melting temp
|
||||
public static final String L_PRESSURE_BAR = "bar"; // ZIRNOX pressure
|
||||
public static final String L_FUEL = "fuel"; // RTG Blast Furnace heat
|
||||
@Deprecated public static final String S_FUELTEXT = "fuelText"; // Large Nuclear Reactor only
|
||||
@Deprecated public static final String S_DEPLETED = "depleted"; // Large Nuclear Reactor only
|
||||
public static final String D_DEPLETION_PERCENT = "depletion"; // RBMK Fuel depletion
|
||||
public static final String D_XENON_PERCENT = "xenon"; // RBMK Fuel xenon poisoning
|
||||
public static final String D_SKIN_C = "skin"; // RBMK Fuel skin heat
|
||||
public static final String D_CORE_C = "c_heat"; // RBMK Fuel core heat
|
||||
public static final String D_MELT_C = "melt"; // RBMK Fuel melting point
|
||||
public static final String I_PROGRESS = "progress";
|
||||
public static final String I_FLUX = "flux"; // Research and Breeding Reactor flux
|
||||
public static final String I_WATER = "water"; // Research Reactor water gauge
|
||||
public static final String L_DURABILITY = "durability"; // DFC Stabilizer Lens
|
||||
public static final String S_TANK = "tank";
|
||||
public static final String S_TANK2 = "tank2";
|
||||
public static final String S_TANK3 = "tank3";
|
||||
public static final String S_TANK4 = "tank4";
|
||||
public static final String S_TANK5 = "tank5";
|
||||
@Deprecated public static final String I_PISTONS = "pistons"; // Radial Performance Engine piston count
|
||||
public static final String S_CHUNKRAD = "chunkRad"; // Geiger Counter
|
||||
public static final String B_ACTIVE = "active";
|
||||
}
|
||||
@ -10,6 +10,7 @@ import com.hbm.config.WorldConfig;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ItemEnums.EnumChunkType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
|
||||
import com.hbm.util.WeightedRandomGeneric;
|
||||
@ -28,21 +29,23 @@ public class BedrockOre {
|
||||
public static HashMap<String, BedrockOreDefinition> replacements = new HashMap();
|
||||
|
||||
public static void init() {
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.IRON, 1), WorldConfig.bedrockIronSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.COPPER, 1), WorldConfig.bedrockCopperSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.BORAX, 3, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockBoraxSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.CHLOROCALCITE, 3, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockChlorocalciteSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.ASBESTOS, 2), WorldConfig.bedrockAsbestosSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.NIOBIUM, 2, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockNiobiumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.TITANIUM, 2, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockTitaniumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.TUNGSTEN, 2, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockTungstenSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.GOLD, 1), WorldConfig.bedrockGoldSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.URANIUM, 4, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockUraniumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.THORIUM, 4, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockThoriumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.FLUORITE, 1), WorldConfig.bedrockFluoriteSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(Items.coal, 8), 1, 0x202020), WorldConfig.bedrockCoalSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(ModItems.niter, 4), 2, 0x808080, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockNiterSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(Items.redstone, 4), 1, 0xd01010), WorldConfig.bedrockRedstoneSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.IRON, 1), WorldConfig.bedrockIronSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.COPPER, 1), WorldConfig.bedrockCopperSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.BORAX, 3, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockBoraxSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.CHLOROCALCITE, 3, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockChlorocalciteSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.ASBESTOS, 2), WorldConfig.bedrockAsbestosSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.NIOBIUM, 2, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockNiobiumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.NEODYMIUM, 3, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockNeodymiumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.TITANIUM, 2, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockTitaniumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.TUNGSTEN, 2, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockTungstenSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.GOLD, 1), WorldConfig.bedrockGoldSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.URANIUM, 4, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockUraniumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.THORIUM, 4, new FluidStack(Fluids.SULFURIC_ACID, 500)), WorldConfig.bedrockThoriumSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.FLUORITE, 1), WorldConfig.bedrockFluoriteSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(Items.coal, 8), 1, 0x202020), WorldConfig.bedrockCoalSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(ModItems.niter, 4), 2, 0x808080, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockNiterSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(new ItemStack(Items.redstone, 4), 1, 0xd01010), WorldConfig.bedrockRedstoneSpawn);
|
||||
registerBedrockOre(weightedOres, new BedrockOreDefinition(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE), 2, 0x8F9999, new FluidStack(Fluids.ACID, 500)), WorldConfig.bedrockRedstoneSpawn);
|
||||
|
||||
registerBedrockOre(weightedOresNether, new BedrockOreDefinition(new ItemStack(Items.glowstone_dust, 4), 1, 0xF9FF4D), WorldConfig.bedrockGlowstoneSpawn);
|
||||
registerBedrockOre(weightedOresNether, new BedrockOreDefinition(new ItemStack(ModItems.powder_fire, 4), 1, 0xD7341F), WorldConfig.bedrockPhosphorusSpawn);
|
||||
|
||||
@ -346,7 +346,7 @@ container.heaterOven=Heizofen
|
||||
container.hydrotreater=Hydrotreater
|
||||
container.iGenerator=Industrieller Generator
|
||||
container.keyForge=Schlossertisch
|
||||
container.launchPad=Raketenabschussrampe
|
||||
container.launchPad=Startrampe
|
||||
container.launchTable=Große Startrampe
|
||||
container.leadBox=Sicherheitsbehälter
|
||||
container.machineArcWelder=Lichtbogenschweißer
|
||||
@ -2587,6 +2587,7 @@ item.ore.gold=Gold
|
||||
item.ore.hematite=Hematit
|
||||
item.ore.iron=Eisen
|
||||
item.ore.malachite=Malachit
|
||||
item.ore.neodymium=Neodym
|
||||
item.ore.niobium=Niob
|
||||
item.ore.titanium=Titan
|
||||
item.ore.tungsten=Wolfram
|
||||
@ -4072,7 +4073,8 @@ tile.lamp_tritium_green_off.name=Grüne Tritiumlampe
|
||||
tile.lamp_tritium_green_on.name=Grüne Tritiumlampe
|
||||
tile.lantern.name=Laterne
|
||||
tile.lantern_behemoth.name=Alte Laterne
|
||||
tile.launch_pad.name=Raketenabschussrampe
|
||||
tile.launch_pad.name=Silo-Startrampe
|
||||
tile.launch_pad_large.name=Startrampe
|
||||
tile.launch_table.name=Große Startrampe
|
||||
tile.leaves_layer.name=Totes Laub
|
||||
tile.lox_barrel.name=LOX-Fass
|
||||
|
||||
@ -705,7 +705,7 @@ container.heaterOven=Heating Oven
|
||||
container.hydrotreater=Hydrotreater
|
||||
container.iGenerator=Industrial Generator
|
||||
container.keyForge=Locksmith Table
|
||||
container.launchPad=Missile Launch Pad
|
||||
container.launchPad=Launch Pad
|
||||
container.launchTable=Large Launch Pad
|
||||
container.leadBox=Containment Box
|
||||
container.machineArcWelder=Arc Welder
|
||||
@ -3351,6 +3351,7 @@ item.ore.gold=Gold
|
||||
item.ore.hematite=Hematite
|
||||
item.ore.iron=Iron
|
||||
item.ore.malachite=Malachite
|
||||
item.ore.neodymium=Neodymium
|
||||
item.ore.niobium=Niobium
|
||||
item.ore.titanium=Titanium
|
||||
item.ore.tungsten=Tungsten
|
||||
@ -5077,7 +5078,8 @@ tile.lantern_behemoth.name=Old Lantern
|
||||
tile.spotlight_incandescent.name=Cage Lamp
|
||||
tile.spotlight_fluoro.name=Fluorescent Light
|
||||
tile.spotlight_halogen.name=Halogen Floodlight
|
||||
tile.launch_pad.name=Missile Launch Pad
|
||||
tile.launch_pad.name=Silo Launch Pad
|
||||
tile.launch_pad_large.name=Launch Pad
|
||||
tile.launch_table.name=Large Launch Pad
|
||||
tile.leaves_layer.name=Fallen Leaves
|
||||
tile.lox_barrel.name=LOX Barrel
|
||||
|
||||
@ -14124,30 +14124,30 @@ vt 0.975000 0.539474
|
||||
vt 0.925000 0.750000
|
||||
vt 1.000000 0.539474
|
||||
vt 0.975000 0.750000
|
||||
vt 0.925000 0.776316
|
||||
vt 0.900000 0.776316
|
||||
vt 0.900000 0.763158
|
||||
vt 0.975000 0.776316
|
||||
vt 1.000000 0.763158
|
||||
vt 1.000000 0.776316
|
||||
vt 0.925000 0.750000
|
||||
vt 0.975000 0.776316
|
||||
vt 0.900000 0.763158
|
||||
vt 0.900000 0.750000
|
||||
vt 0.925000 0.776316
|
||||
vt 0.900000 0.776316
|
||||
vt 1.000000 0.763158
|
||||
vt 0.975000 0.750000
|
||||
vt 1.000000 0.750000
|
||||
vt 1.000000 0.763158
|
||||
vt 0.975000 0.539474
|
||||
vt 1.000000 0.526316
|
||||
vt 1.000000 0.539474
|
||||
vt 0.900000 0.763158
|
||||
vt 0.900000 0.750000
|
||||
vt 0.925000 0.750000
|
||||
vt 0.900000 0.526316
|
||||
vt 0.925000 0.539474
|
||||
vt 0.900000 0.539474
|
||||
vt 0.900000 0.526316
|
||||
vt 0.975000 0.986842
|
||||
vt 1.000000 0.986842
|
||||
vt 1.000000 1.000000
|
||||
vt 0.925000 0.986842
|
||||
vt 1.000000 0.526316
|
||||
vt 1.000000 0.539474
|
||||
vt 0.975000 0.539474
|
||||
vt 0.900000 1.000000
|
||||
vt 0.900000 0.986842
|
||||
vt 0.925000 0.986842
|
||||
vt 1.000000 1.000000
|
||||
vt 0.975000 0.986842
|
||||
vt 1.000000 0.986842
|
||||
vt 1.000000 0.776316
|
||||
vt 0.975000 0.986842
|
||||
vt 0.975000 0.776316
|
||||
|
||||
255
src/main/resources/assets/hbm/models/weapons/launch_pad_silo.obj
Normal file
@ -0,0 +1,255 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: 'launch_pad_silo.blend'
|
||||
# www.blender.org
|
||||
o Plane
|
||||
v -1.500000 1.000000 1.500000
|
||||
v 1.500000 1.000000 1.500000
|
||||
v -1.500000 1.000000 -1.500000
|
||||
v 1.500000 1.000000 -1.500000
|
||||
v -0.500000 1.000000 0.500000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v 1.500000 0.000000 -0.500000
|
||||
v 0.500000 0.000000 -1.500000
|
||||
v 1.500000 0.000000 -1.500000
|
||||
v 0.500000 0.000000 1.500000
|
||||
v 1.500000 0.000000 1.500000
|
||||
v 0.500000 0.000000 0.500000
|
||||
v 1.500000 0.000000 0.500000
|
||||
v -1.500000 0.000000 -0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -1.500000 0.000000 -1.500000
|
||||
v -0.500000 0.000000 -1.500000
|
||||
v -1.500000 0.000000 1.500000
|
||||
v -0.500000 0.000000 1.500000
|
||||
v -1.500000 0.000000 0.500000
|
||||
v -0.500000 0.000000 0.500000
|
||||
v 0.500000 0.500000 -1.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 1.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v 0.500000 0.500000 1.500000
|
||||
v 1.500000 0.500000 0.500000
|
||||
v -1.500000 0.500000 -0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v -0.500000 0.500000 -1.500000
|
||||
v -0.500000 0.500000 1.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -1.500000 0.500000 0.500000
|
||||
v -0.500000 1.000000 0.500000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
v -0.500000 1.000000 0.500000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
vt 0.250000 0.750000
|
||||
vt 0.750000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.250000 0.500000
|
||||
vt -0.000000 0.250000
|
||||
vt 0.500000 0.750000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.500000 0.250000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.250000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.750000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.750000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.750000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.750000 -0.000000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 0.625000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.750000 -0.000000
|
||||
vt 0.250000 0.750000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.500000 0.750000
|
||||
vt 0.500000 0.500000
|
||||
vt 0.250000 0.750000
|
||||
vt 0.500000 0.750000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.500000 0.125000
|
||||
vt 0.250000 0.125000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.750000 0.500000
|
||||
vt 0.750000 0.500000
|
||||
vt 1.000000 0.250000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.250000 -0.000000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.500000 -0.000000
|
||||
vt 0.250000 0.500000
|
||||
vt 0.250000 0.500000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 5/1/1 3/2/1 1/3/1
|
||||
f 6/4/1 1/3/1 2/5/1
|
||||
f 7/6/1 4/7/1 3/2/1
|
||||
f 8/8/1 2/5/1 4/7/1
|
||||
f 8/9/2 28/10/2 6/11/2
|
||||
f 32/12/3 8/13/3 7/14/3
|
||||
f 35/15/4 7/16/4 5/17/4
|
||||
f 6/18/5 35/19/5 5/20/5
|
||||
f 11/21/6 10/22/6 9/23/6
|
||||
f 15/24/6 14/25/6 13/26/6
|
||||
f 19/27/6 18/28/6 17/29/6
|
||||
f 23/30/6 22/31/6 21/32/6
|
||||
f 29/33/2 15/34/2 13/35/2
|
||||
f 33/36/4 18/37/4 20/38/4
|
||||
f 27/39/6 28/40/6 26/41/6
|
||||
f 26/42/6 33/43/6 25/44/6
|
||||
f 32/45/6 36/46/6 31/47/6
|
||||
f 29/48/6 35/49/6 28/50/6
|
||||
f 35/51/4 22/52/4 24/53/4
|
||||
f 28/54/5 16/55/5 15/56/5
|
||||
f 26/57/2 11/58/2 9/59/2
|
||||
f 36/60/5 24/61/5 23/62/5
|
||||
f 14/63/4 30/64/4 2/5/4
|
||||
f 27/65/3 9/66/3 10/67/3
|
||||
f 30/64/4 4/7/4 2/5/4
|
||||
f 32/68/3 17/69/3 18/70/3
|
||||
f 14/71/3 29/72/3 13/73/3
|
||||
f 34/74/3 2/75/3 1/76/3
|
||||
f 34/74/3 21/77/3 22/78/3
|
||||
f 21/32/2 36/79/2 23/80/2
|
||||
f 3/81/2 36/79/2 1/82/2
|
||||
f 31/83/2 19/84/2 17/85/2
|
||||
f 19/86/5 33/87/5 20/88/5
|
||||
f 4/89/5 33/87/5 3/90/5
|
||||
f 25/91/5 12/92/5 11/93/5
|
||||
f 27/94/4 12/95/4 4/7/4
|
||||
f 37/96/1 40/97/1 39/98/1
|
||||
f 44/99/6 41/100/6 43/101/6
|
||||
f 5/1/1 7/6/1 3/2/1
|
||||
f 6/4/1 5/1/1 1/3/1
|
||||
f 7/6/1 8/8/1 4/7/1
|
||||
f 8/8/1 6/4/1 2/5/1
|
||||
f 8/9/2 26/102/2 28/10/2
|
||||
f 32/12/3 26/103/3 8/13/3
|
||||
f 35/15/4 32/104/4 7/16/4
|
||||
f 6/18/5 28/105/5 35/19/5
|
||||
f 11/21/6 12/106/6 10/22/6
|
||||
f 15/24/6 16/107/6 14/25/6
|
||||
f 19/27/6 20/108/6 18/28/6
|
||||
f 23/30/6 24/109/6 22/31/6
|
||||
f 29/33/2 28/110/2 15/34/2
|
||||
f 33/36/4 32/111/4 18/37/4
|
||||
f 27/39/6 30/112/6 28/40/6
|
||||
f 26/42/6 32/113/6 33/43/6
|
||||
f 32/45/6 35/114/6 36/46/6
|
||||
f 29/48/6 34/115/6 35/49/6
|
||||
f 35/51/4 34/116/4 22/52/4
|
||||
f 28/54/5 30/117/5 16/55/5
|
||||
f 26/57/2 25/118/2 11/58/2
|
||||
f 36/60/5 35/119/5 24/61/5
|
||||
f 14/63/4 16/120/4 30/64/4
|
||||
f 27/65/3 26/121/3 9/66/3
|
||||
f 30/64/4 27/94/4 4/7/4
|
||||
f 32/68/3 31/122/3 17/69/3
|
||||
f 14/71/3 2/75/3 29/72/3
|
||||
f 34/74/3 29/72/3 2/75/3
|
||||
f 34/74/3 1/76/3 21/77/3
|
||||
f 21/32/2 1/82/2 36/79/2
|
||||
f 3/81/2 31/83/2 36/79/2
|
||||
f 31/83/2 3/81/2 19/84/2
|
||||
f 19/86/5 3/90/5 33/87/5
|
||||
f 4/89/5 25/91/5 33/87/5
|
||||
f 25/91/5 4/89/5 12/92/5
|
||||
f 27/94/4 10/123/4 12/95/4
|
||||
f 37/96/1 38/124/1 40/97/1
|
||||
f 44/99/6 42/125/6 41/100/6
|
||||
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.5 KiB |