the feds are trying to poison me
@ -24,8 +24,11 @@
|
|||||||
* Certain earlygame things can now be recycled like stirling engines and gears
|
* Certain earlygame things can now be recycled like stirling engines and gears
|
||||||
* Antenna part recycling has been moved to the anvil
|
* Antenna part recycling has been moved to the anvil
|
||||||
* NTM's pickaxes now have a break speed bonus for glass
|
* NTM's pickaxes now have a break speed bonus for glass
|
||||||
* renamed the foundry slag outlet to foundry spill outlet because people always assume it's for slag and only slag (it is not)
|
* Renamed the foundry slag outlet to foundry spill outlet because people always assume it's for slag and only slag (it is not)
|
||||||
* The description for heatable/coolable fluid tags is now written in the same line as the label
|
* The description for heatable/coolable fluid tags is now written in the same line as the label
|
||||||
|
* Rubber can now be made from acidizing latex with sour gas (requires just 25mB)
|
||||||
|
* Heating oil can now be reformed into naphtha
|
||||||
|
* Coker naphtha can now also be reformed like the other naphtha types (yields refgas instead of petgas as a byproduct)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed DFC receivers not outputting power
|
* Fixed DFC receivers not outputting power
|
||||||
@ -34,4 +37,6 @@
|
|||||||
* Fixed general weirdness with the schrabidium transmutator item IO
|
* Fixed general weirdness with the schrabidium transmutator item IO
|
||||||
* Fixed certain tooltips using the backslash escape character despite not needing them
|
* Fixed certain tooltips using the backslash escape character despite not needing them
|
||||||
* Hopefully fixed the immense lag caused by tom post impact mechanics, burning grass will now only spread 20% of the time (instead of 100) and the world destruction handler will only process half the blocks per chunk
|
* Hopefully fixed the immense lag caused by tom post impact mechanics, burning grass will now only spread 20% of the time (instead of 100) and the world destruction handler will only process half the blocks per chunk
|
||||||
* Hopefully fixed an issue where substations would not reliably connect to cable blocks
|
* Hopefully fixed an issue where substations would not reliably connect to cable blocks
|
||||||
|
* Fixed assembler rendering bugging out with Angelica installed and a door template loaded
|
||||||
|
* Fixed medium pylon localizations
|
||||||
@ -892,6 +892,7 @@ public class ModBlocks {
|
|||||||
public static Block iter;
|
public static Block iter;
|
||||||
public static Block plasma_heater;
|
public static Block plasma_heater;
|
||||||
|
|
||||||
|
public static Block machine_icf_press;
|
||||||
public static Block icf;
|
public static Block icf;
|
||||||
public static Block icf_controller;
|
public static Block icf_controller;
|
||||||
public static Block icf_laser_component;
|
public static Block icf_laser_component;
|
||||||
@ -2009,6 +2010,7 @@ public class ModBlocks {
|
|||||||
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":iter");
|
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":iter");
|
||||||
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
||||||
|
|
||||||
|
machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
icf_controller = new MachineICFController().setBlockName("icf_controller").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":icf_casing");
|
icf_controller = new MachineICFController().setBlockName("icf_controller").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":icf_casing");
|
||||||
icf_laser_component = new BlockICFLaserComponent().setBlockName("icf_laser_component").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab);
|
icf_laser_component = new BlockICFLaserComponent().setBlockName("icf_laser_component").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
@ -3343,6 +3345,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
||||||
|
|
||||||
|
register(machine_icf_press);
|
||||||
register(icf_laser_component);
|
register(icf_laser_component);
|
||||||
register(icf_controller);
|
register(icf_controller);
|
||||||
register(icf_block);
|
register(icf_block);
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockICF extends BlockContainer implements IBlockCT {
|
public class BlockICF extends BlockContainer implements IBlockCT {
|
||||||
|
|
||||||
@ -211,5 +212,11 @@ public class BlockICF extends BlockContainer implements IBlockCT {
|
|||||||
super.onChunkUnload();
|
super.onChunkUnload();
|
||||||
this.isLoaded = false;
|
this.isLoaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canConnect(ForgeDirection dir) {
|
||||||
|
if(this.getBlockMetadata() != 1) return false;
|
||||||
|
return dir != ForgeDirection.UNKNOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
39
src/main/java/com/hbm/blocks/machine/MachineICFPress.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MachineICFPress extends BlockContainer {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||||
|
|
||||||
|
public MachineICFPress() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_icf_press_top");
|
||||||
|
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_icf_press_side");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import com.hbm.inventory.container.ContainerICF;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.render.util.GaugeUtil;
|
import com.hbm.render.util.GaugeUtil;
|
||||||
import com.hbm.tileentity.machine.TileEntityICF;
|
import com.hbm.tileentity.machine.TileEntityICF;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
@ -30,6 +31,8 @@ public class GUIICF extends GuiInfoContainer {
|
|||||||
icf.tanks[0].renderTankInfo(this, x, y, guiLeft + 44, guiTop + 18, 16, 70);
|
icf.tanks[0].renderTankInfo(this, x, y, guiLeft + 44, guiTop + 18, 16, 70);
|
||||||
icf.tanks[1].renderTankInfo(this, x, y, guiLeft + 188, guiTop + 18, 16, 70);
|
icf.tanks[1].renderTankInfo(this, x, y, guiLeft + 188, guiTop + 18, 16, 70);
|
||||||
icf.tanks[2].renderTankInfo(this, x, y, guiLeft + 224, guiTop + 18, 16, 70);
|
icf.tanks[2].renderTankInfo(this, x, y, guiLeft + 224, guiTop + 18, 16, 70);
|
||||||
|
|
||||||
|
this.drawCustomInfoStat(x, y, guiLeft + 8, guiTop + 18, 16, 70, x, y, icf.maxLaser <= 0 ? "OFFLINE" : (BobMathUtil.getShortNumber(icf.laser) + "TU - " + (icf.laser * 1000 / icf.maxLaser) / 10D + "%"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -42,7 +45,13 @@ public class GUIICF extends GuiInfoContainer {
|
|||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, 114);
|
||||||
|
drawTexturedModalRect(guiLeft + 36, guiTop + 122, 36, 122, 176, 108);
|
||||||
|
|
||||||
|
if(icf.maxLaser > 0) {
|
||||||
|
int p = (int) (icf.laser * 70 / icf.maxLaser);
|
||||||
|
drawTexturedModalRect(guiLeft + 8, guiTop + 88 - p, 212, 192 - p, 16, p);
|
||||||
|
}
|
||||||
|
|
||||||
GaugeUtil.drawSmoothGauge(guiLeft + 196, guiTop + 98, this.zLevel, 0D, 5, 2, 1, 0xFF00AF);
|
GaugeUtil.drawSmoothGauge(guiLeft + 196, guiTop + 98, this.zLevel, 0D, 5, 2, 1, 0xFF00AF);
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,8 @@ public class CrystallizerRecipes extends SerializableRecipe {
|
|||||||
registerRecipe(new ComparableStack(ModItems.powder_semtex_mix), new CrystallizerRecipe(ModItems.ingot_semtex, baseTime));
|
registerRecipe(new ComparableStack(ModItems.powder_semtex_mix), new CrystallizerRecipe(ModItems.ingot_semtex, baseTime));
|
||||||
registerRecipe(new ComparableStack(ModItems.powder_desh_ready), new CrystallizerRecipe(ModItems.ingot_desh, baseTime));
|
registerRecipe(new ComparableStack(ModItems.powder_desh_ready), new CrystallizerRecipe(ModItems.ingot_desh, baseTime));
|
||||||
registerRecipe(new ComparableStack(ModItems.powder_meteorite), new CrystallizerRecipe(ModItems.fragment_meteorite, utilityTime));
|
registerRecipe(new ComparableStack(ModItems.powder_meteorite), new CrystallizerRecipe(ModItems.fragment_meteorite, utilityTime));
|
||||||
registerRecipe(CD.dust(), new CrystallizerRecipe(ModItems.ingot_rubber, baseTime), new FluidStack(Fluids.FISHOIL, 250));
|
registerRecipe(CD.dust(), new CrystallizerRecipe(ModItems.ingot_rubber, utilityTime), new FluidStack(Fluids.FISHOIL, 250));
|
||||||
|
registerRecipe(LATEX.ingot(), new CrystallizerRecipe(ModItems.ingot_rubber, mixingTime), new FluidStack(Fluids.SOURGAS, 25));
|
||||||
registerRecipe(new ComparableStack(ModItems.powder_sawdust), new CrystallizerRecipe(ModItems.cordite, mixingTime), new FluidStack(Fluids.NITROGLYCERIN, 250));
|
registerRecipe(new ComparableStack(ModItems.powder_sawdust), new CrystallizerRecipe(ModItems.cordite, mixingTime), new FluidStack(Fluids.NITROGLYCERIN, 250));
|
||||||
|
|
||||||
registerRecipe(new ComparableStack(ModItems.meteorite_sword_treated), new CrystallizerRecipe(ModItems.meteorite_sword_etched, baseTime));
|
registerRecipe(new ComparableStack(ModItems.meteorite_sword_treated), new CrystallizerRecipe(ModItems.meteorite_sword_etched, baseTime));
|
||||||
|
|||||||
@ -22,6 +22,11 @@ public class ReformingRecipes extends SerializableRecipe {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerDefaults() {
|
public void registerDefaults() {
|
||||||
|
recipes.put(Fluids.HEATINGOIL, new Triplet(
|
||||||
|
new FluidStack(Fluids.NAPHTHA, 50),
|
||||||
|
new FluidStack(Fluids.PETROLEUM, 15),
|
||||||
|
new FluidStack(Fluids.HYDROGEN, 10)
|
||||||
|
));
|
||||||
recipes.put(Fluids.NAPHTHA, new Triplet(
|
recipes.put(Fluids.NAPHTHA, new Triplet(
|
||||||
new FluidStack(Fluids.REFORMATE, 50),
|
new FluidStack(Fluids.REFORMATE, 50),
|
||||||
new FluidStack(Fluids.PETROLEUM, 15),
|
new FluidStack(Fluids.PETROLEUM, 15),
|
||||||
@ -32,6 +37,11 @@ public class ReformingRecipes extends SerializableRecipe {
|
|||||||
new FluidStack(Fluids.AROMATICS, 10),
|
new FluidStack(Fluids.AROMATICS, 10),
|
||||||
new FluidStack(Fluids.HYDROGEN, 5)
|
new FluidStack(Fluids.HYDROGEN, 5)
|
||||||
));
|
));
|
||||||
|
recipes.put(Fluids.NAPHTHA_COKER, new Triplet(
|
||||||
|
new FluidStack(Fluids.REFORMATE, 50),
|
||||||
|
new FluidStack(Fluids.REFORMGAS, 10),
|
||||||
|
new FluidStack(Fluids.HYDROGEN, 5)
|
||||||
|
));
|
||||||
recipes.put(Fluids.LIGHTOIL, new Triplet(
|
recipes.put(Fluids.LIGHTOIL, new Triplet(
|
||||||
new FluidStack(Fluids.AROMATICS, 50),
|
new FluidStack(Fluids.AROMATICS, 50),
|
||||||
new FluidStack(Fluids.REFORMGAS, 10),
|
new FluidStack(Fluids.REFORMGAS, 10),
|
||||||
|
|||||||
@ -1182,6 +1182,10 @@ public class ModItems {
|
|||||||
public static Item watz_pellet;
|
public static Item watz_pellet;
|
||||||
public static Item watz_pellet_depleted;
|
public static Item watz_pellet_depleted;
|
||||||
|
|
||||||
|
public static Item icf_pellet_empty;
|
||||||
|
public static Item icf_pellet;
|
||||||
|
public static Item icf_pellet_depleted;
|
||||||
|
|
||||||
public static Item scrap_plastic;
|
public static Item scrap_plastic;
|
||||||
public static Item scrap;
|
public static Item scrap;
|
||||||
public static Item scrap_oil;
|
public static Item scrap_oil;
|
||||||
@ -3835,6 +3839,10 @@ public class ModItems {
|
|||||||
|
|
||||||
watz_pellet = new ItemWatzPellet().setUnlocalizedName("watz_pellet").setTextureName(RefStrings.MODID + ":watz_pellet");
|
watz_pellet = new ItemWatzPellet().setUnlocalizedName("watz_pellet").setTextureName(RefStrings.MODID + ":watz_pellet");
|
||||||
watz_pellet_depleted = new ItemWatzPellet().setUnlocalizedName("watz_pellet_depleted").setTextureName(RefStrings.MODID + ":watz_pellet");
|
watz_pellet_depleted = new ItemWatzPellet().setUnlocalizedName("watz_pellet_depleted").setTextureName(RefStrings.MODID + ":watz_pellet");
|
||||||
|
|
||||||
|
icf_pellet_empty = new Item().setUnlocalizedName("icf_pellet_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":icf_pellet_empty");
|
||||||
|
icf_pellet = new Item().setUnlocalizedName("icf_pellet").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":icf_pellet");
|
||||||
|
icf_pellet_depleted = new Item().setUnlocalizedName("icf_pellet_depleted").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":icf_pellet");
|
||||||
|
|
||||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new");
|
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new");
|
||||||
nuclear_waste_long = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long");
|
nuclear_waste_long = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long");
|
||||||
@ -6778,6 +6786,10 @@ public class ModItems {
|
|||||||
|
|
||||||
GameRegistry.registerItem(watz_pellet, watz_pellet.getUnlocalizedName());
|
GameRegistry.registerItem(watz_pellet, watz_pellet.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(watz_pellet_depleted, watz_pellet_depleted.getUnlocalizedName());
|
GameRegistry.registerItem(watz_pellet_depleted, watz_pellet_depleted.getUnlocalizedName());
|
||||||
|
|
||||||
|
GameRegistry.registerItem(icf_pellet_empty, icf_pellet_empty.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(icf_pellet, icf_pellet.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(icf_pellet_depleted, icf_pellet_depleted.getUnlocalizedName());
|
||||||
|
|
||||||
GameRegistry.registerItem(debris_graphite, debris_graphite.getUnlocalizedName());
|
GameRegistry.registerItem(debris_graphite, debris_graphite.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(debris_metal, debris_metal.getUnlocalizedName());
|
GameRegistry.registerItem(debris_metal, debris_metal.getUnlocalizedName());
|
||||||
|
|||||||
@ -377,6 +377,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityICF.class, new RenderICF());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityICF.class, new RenderICF());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityICFController.class, new RenderICFController());
|
||||||
//Watz
|
//Watz
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.render.util.BeamPronter;
|
||||||
|
import com.hbm.render.util.BeamPronter.EnumBeamType;
|
||||||
|
import com.hbm.render.util.BeamPronter.EnumWaveType;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityICFController;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
|
||||||
|
public class RenderICFController extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
|
||||||
|
|
||||||
|
TileEntityICFController controller = (TileEntityICFController) tile;
|
||||||
|
|
||||||
|
if(controller.laserLength > 0) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||||
|
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||||
|
switch(tile.getBlockMetadata()) {
|
||||||
|
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||||
|
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||||
|
case 5: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||||
|
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||||
|
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||||
|
BeamPronter.prontBeam(Vec3.createVectorHelper(controller.laserLength, 0, 0), EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0x202020, 0x100000, 0, 1, 0F, 10, 0.125F);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glPopAttrib();
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@ import com.hbm.tileentity.TileEntityMachineBase;
|
|||||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
@ -19,6 +20,9 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider, IFluidStandardTransceiver {
|
public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider, IFluidStandardTransceiver {
|
||||||
|
|
||||||
|
public long laser;
|
||||||
|
public long maxLaser;
|
||||||
|
|
||||||
public FluidTank[] tanks;
|
public FluidTank[] tanks;
|
||||||
|
|
||||||
public TileEntityICF() {
|
public TileEntityICF() {
|
||||||
@ -37,13 +41,30 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
|||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++) tanks[i].setFill(tanks[i].getMaxFill());
|
|
||||||
|
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
for(int i = 0; i < 3; i++) tanks[i].setFill(tanks[i].getMaxFill());
|
||||||
|
|
||||||
|
this.networkPackNT(150);
|
||||||
|
this.laser = 0;
|
||||||
|
this.maxLaser = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override public void serialize(ByteBuf buf) {
|
||||||
|
super.serialize(buf);
|
||||||
|
buf.writeLong(laser);
|
||||||
|
buf.writeLong(maxLaser);
|
||||||
|
for(int i = 0; i < 3; i++) tanks[i].serialize(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public void deserialize(ByteBuf buf) {
|
||||||
|
super.deserialize(buf);
|
||||||
|
this.laser = buf.readLong();
|
||||||
|
this.maxLaser = buf.readLong();
|
||||||
|
for(int i = 0; i < 3; i++) tanks[i].deserialize(buf);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||||
return slot < 5;
|
return slot < 5;
|
||||||
|
|||||||
@ -4,17 +4,24 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.tileentity.TileEntityTickingBase;
|
import com.hbm.tileentity.TileEntityTickingBase;
|
||||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class TileEntityICFController extends TileEntityTickingBase implements IEnergyReceiverMK2 {
|
public class TileEntityICFController extends TileEntityTickingBase implements IEnergyReceiverMK2 {
|
||||||
|
|
||||||
public long power;
|
public long power;
|
||||||
|
public int laserLength;
|
||||||
|
|
||||||
public int cellCount;
|
public int cellCount;
|
||||||
public int emitterCount;
|
public int emitterCount;
|
||||||
@ -76,6 +83,8 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
|
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
this.networkPackNT(50);
|
||||||
|
|
||||||
if(this.assembled) {
|
if(this.assembled) {
|
||||||
for(BlockPos pos : ports) {
|
for(BlockPos pos : ports) {
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
@ -83,9 +92,64 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
if(this.getMaxPower() > 0) this.trySubscribe(worldObj, portPos.getX(), portPos.getY(), portPos.getZ(), dir);
|
if(this.getMaxPower() > 0) this.trySubscribe(worldObj, portPos.getX(), portPos.getY(), portPos.getZ(), dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.power > 0) {
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||||
|
|
||||||
|
for(int i = 1; i < 50; i++) {
|
||||||
|
this.laserLength = i;
|
||||||
|
|
||||||
|
Block b = worldObj.getBlock(xCoord + dir.offsetX * i, yCoord, zCoord + dir.offsetZ * i);
|
||||||
|
if(b == ModBlocks.icf) {
|
||||||
|
TileEntity tile = worldObj.getTileEntity(xCoord + dir.offsetX * (i + 8), yCoord - 3, zCoord + dir.offsetZ * (i + 8));
|
||||||
|
if(tile instanceof TileEntityICF) {
|
||||||
|
TileEntityICF icf = (TileEntityICF) tile;
|
||||||
|
icf.laser += this.getPower();
|
||||||
|
icf.maxLaser += this.getMaxPower();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!b.isAir(worldObj, xCoord + dir.offsetX * i, yCoord, zCoord + dir.offsetZ * i)) {
|
||||||
|
float hardness = b.getExplosionResistance(null);
|
||||||
|
if(hardness < 6000) worldObj.func_147480_a(xCoord + dir.offsetX * i, yCoord, zCoord + dir.offsetZ * i, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double blx = Math.min(xCoord, xCoord + dir.offsetX * laserLength) + 0.2;
|
||||||
|
double bux = Math.max(xCoord, xCoord + dir.offsetX * laserLength) + 0.8;
|
||||||
|
double bly = Math.min(yCoord, yCoord + dir.offsetY * laserLength) + 0.2;
|
||||||
|
double buy = Math.max(yCoord, yCoord + dir.offsetY * laserLength) + 0.8;
|
||||||
|
double blz = Math.min(zCoord, zCoord + dir.offsetZ * laserLength) + 0.2;
|
||||||
|
double buz = Math.max(zCoord, zCoord + dir.offsetZ * laserLength) + 0.8;
|
||||||
|
|
||||||
|
List<Entity> list = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(blx, bly, blz, bux, buy, buz));
|
||||||
|
|
||||||
|
for(Entity e : list) {
|
||||||
|
e.attackEntityFrom(DamageSource.inFire, 50);
|
||||||
|
e.setFire(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setPower(0);
|
||||||
|
} else {
|
||||||
|
this.laserLength = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.laserLength = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
this.networkPackNT(50);
|
if(this.laserLength > 0 && worldObj.rand.nextInt(5) == 0) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
double offXZ = worldObj.rand.nextDouble() * 0.25 - 0.125;
|
||||||
|
double offY = worldObj.rand.nextDouble() * 0.25 - 0.125;
|
||||||
|
double dist = 0.55;
|
||||||
|
worldObj.spawnParticle("reddust", xCoord + 0.5 + dir.offsetX * dist + rot.offsetX * offXZ, yCoord + 0.5 + offY, zCoord + 0.5 + dir.offsetZ * dist + rot.offsetZ * offXZ, 0, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +158,7 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
buf.writeLong(power);
|
buf.writeLong(power);
|
||||||
buf.writeInt(capacitorCount);
|
buf.writeInt(capacitorCount);
|
||||||
buf.writeInt(turbochargerCount);
|
buf.writeInt(turbochargerCount);
|
||||||
|
buf.writeInt(laserLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void deserialize(ByteBuf buf) {
|
@Override public void deserialize(ByteBuf buf) {
|
||||||
@ -101,12 +166,15 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
this.power = buf.readLong();
|
this.power = buf.readLong();
|
||||||
this.capacitorCount = buf.readInt();
|
this.capacitorCount = buf.readInt();
|
||||||
this.turbochargerCount = buf.readInt();
|
this.turbochargerCount = buf.readInt();
|
||||||
|
this.laserLength = buf.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbt) {
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
super.readFromNBT(nbt);
|
super.readFromNBT(nbt);
|
||||||
|
|
||||||
|
this.power = nbt.getLong("power");
|
||||||
|
|
||||||
this.assembled = nbt.getBoolean("assembled");
|
this.assembled = nbt.getBoolean("assembled");
|
||||||
this.cellCount = nbt.getInteger("cellCount");
|
this.cellCount = nbt.getInteger("cellCount");
|
||||||
this.emitterCount = nbt.getInteger("emitterCount");
|
this.emitterCount = nbt.getInteger("emitterCount");
|
||||||
@ -125,6 +193,8 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
public void writeToNBT(NBTTagCompound nbt) {
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
super.writeToNBT(nbt);
|
super.writeToNBT(nbt);
|
||||||
|
|
||||||
|
nbt.setLong("power", power);
|
||||||
|
|
||||||
nbt.setBoolean("assembled", assembled);
|
nbt.setBoolean("assembled", assembled);
|
||||||
nbt.setInteger("cellCount", cellCount);
|
nbt.setInteger("cellCount", cellCount);
|
||||||
nbt.setInteger("emitterCount", emitterCount);
|
nbt.setInteger("emitterCount", emitterCount);
|
||||||
@ -150,6 +220,25 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMaxPower() {
|
public long getMaxPower() {
|
||||||
return capacitorCount * 1_000_000 + turbochargerCount * 2_500_000; //TEMP
|
return (long) (Math.sqrt(capacitorCount) * 5_000_000 + Math.sqrt(Math.min(turbochargerCount, capacitorCount)) * 10_000_000);
|
||||||
|
}
|
||||||
|
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
|
||||||
|
if(bb == null) {
|
||||||
|
bb = AxisAlignedBB.getBoundingBox(
|
||||||
|
xCoord + 0.5 - 50,
|
||||||
|
yCoord,
|
||||||
|
zCoord + 0.5 - 50,
|
||||||
|
xCoord + 0.5 + 50,
|
||||||
|
yCoord + 1,
|
||||||
|
zCoord + 0.5 + 50
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 25 KiB |