crystallizer upgrades, dud packet fix, recipes

This commit is contained in:
Bob 2020-08-04 21:36:47 +02:00
parent a675750793
commit 9836de8aa0
34 changed files with 653 additions and 236 deletions

View File

@ -17,44 +17,44 @@ v -0.125000 0.625000 -0.125000
v -0.125000 0.625000 0.125000
v -0.125000 0.375000 -0.125000
v -0.125000 0.375000 0.125000
vt 0.761905 1.000000
vt 0.904762 0.714286
vt 0.904762 1.000000
vt 0.761905 0.714286
vt 0.904762 1.000000
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.761905 1.000000
vt 0.714286 0.714286
vt 0.761905 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.714286 0.904762
vt 0.619048 0.714286
vt 0.714286 0.714286
vt 0.904762 0.714286
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.714286 1.000000
vt 0.619048 0.904762
vt 0.619048 0.904762
vt 0.619048 0.904762
vt 0.619048 0.904762
vt 0.761905 0.500000
vt 0.904762 0.357143
vt 0.904762 0.500000
vt 0.761905 0.357143
vt 0.904762 0.500000
vt 0.761905 0.500000
vt 0.714286 0.357143
vt 0.761905 0.357143
vt 0.761905 0.500000
vt 0.714286 0.357143
vt 0.761905 0.357143
vt 0.761905 0.500000
vt 0.714286 0.357143
vt 0.761905 0.357143
vt 0.761905 0.500000
vt 0.714286 0.357143
vt 0.761905 0.357143
vt 0.714286 0.452381
vt 0.619048 0.357143
vt 0.714286 0.357143
vt 0.714286 0.452381
vt 0.619048 0.357143
vt 0.714286 0.357143
vt 0.714286 0.452381
vt 0.619048 0.357143
vt 0.714286 0.357143
vt 0.714286 0.452381
vt 0.619048 0.357143
vt 0.714286 0.357143
vt 0.904762 0.357143
vt 0.714286 0.500000
vt 0.714286 0.500000
vt 0.714286 0.500000
vt 0.714286 0.500000
vt 0.619048 0.452381
vt 0.619048 0.452381
vt 0.619048 0.452381
vt 0.619048 0.452381
vn -1.0000 0.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
@ -179,134 +179,134 @@ v -0.132583 1.000000 -0.132583
v -0.132583 0.062500 -0.132583
v -0.353553 1.000000 -0.353553
v -0.353553 0.062500 -0.353553
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt -0.000000 0.761905
vt 0.380952 0.761905
vt 0.380952 0.809524
vt 0.000000 0.761905
vt 0.380952 0.761905
vt 0.000000 -0.000000
vt 0.380952 -0.000000
vt 0.380952 0.761905
vt 0.380952 0.404762
vt 0.000000 0.380952
vt 0.380952 0.380952
vt 0.380952 0.404762
vt 0.000000 0.380952
vt 0.380952 0.380952
vt 0.380952 0.404762
vt 0.000000 0.380952
vt 0.380952 0.380952
vt 0.380952 0.404762
vt 0.000000 0.380952
vt 0.380952 0.380952
vt 0.000000 0.000000
vt 0.380952 0.000000
vt 0.761905 -0.000000
vt 0.821429 0.666667
vt 0.761905 0.666667
vt 0.809524 0.714286
vt 0.773810 0.714286
vt 0.880952 -0.000000
vt 0.880952 0.666667
vt 0.940476 -0.000000
vt 0.940476 0.666667
vt 1.000000 -0.000000
vt 1.000000 0.666667
vt 0.523810 0.666667
vt 0.380952 0.380952
vt 0.000000 0.000000
vt 0.380952 0.000000
vt 0.761905 0.000000
vt 0.821429 0.333333
vt 0.761905 0.333333
vt 0.809524 0.357143
vt 0.773810 0.357143
vt 0.880952 0.000000
vt 0.880952 0.333333
vt 0.940476 0.000000
vt 0.940476 0.333333
vt 1.000000 0.000000
vt 1.000000 0.333333
vt 0.523810 0.333333
vt 0.583333 0.000000
vt 0.583333 0.666667
vt 0.642857 -0.000000
vt 0.642857 0.666667
vt 0.702381 -0.000000
vt 0.702381 0.666667
vt 0.750000 0.714286
vt 0.690476 0.714286
vt 0.654762 0.714286
vt 0.595238 0.714286
vt 0.630952 0.714286
vt 0.571429 0.714286
vt 0.535714 0.714286
vt 0.952381 0.714286
vt 0.988095 0.714286
vt 0.892857 0.714286
vt 0.928571 0.714286
vt 0.833333 0.714286
vt 0.869048 0.714286
vt 0.919818 0.876219
vt 0.906124 0.810097
vt 0.919818 0.743974
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.380952 0.714286
vt 0.523810 -0.000000
vt 0.523810 0.714286
vt 0.523810 -0.000000
vt 0.380952 0.714286
vt 0.523810 0.714286
vt 0.000000 0.809524
vt 0.000000 0.809524
vt -0.000000 0.809524
vt 0.000000 0.809524
vt 0.000000 0.761905
vt 0.821429 -0.000000
vt 0.583333 0.333333
vt 0.642857 0.000000
vt 0.642857 0.333333
vt 0.702381 0.000000
vt 0.702381 0.333333
vt 0.750000 0.357143
vt 0.690476 0.357143
vt 0.654762 0.357143
vt 0.595238 0.357143
vt 0.630952 0.357143
vt 0.571429 0.357143
vt 0.535714 0.357143
vt 0.952381 0.357143
vt 0.988095 0.357143
vt 0.892857 0.357143
vt 0.928571 0.357143
vt 0.833333 0.357143
vt 0.869048 0.357143
vt 0.916667 0.440476
vt 0.904762 0.404762
vt 0.916667 0.369048
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.714286 0.714286
vt 0.952879 0.716585
vt 0.985940 0.876219
vt 0.985940 0.743974
vt 0.999635 0.810097
vt 0.952879 0.903608
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.380952 -0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.380952 0.357143
vt 0.523810 0.000000
vt 0.523810 0.357143
vt 0.523810 0.000000
vt 0.380952 0.357143
vt 0.523810 0.357143
vt 0.000000 0.404762
vt 0.000000 0.404762
vt 0.000000 0.404762
vt 0.000000 0.404762
vt 0.000000 0.380952
vt 0.821429 0.000000
vt 0.523810 0.000000
vt 0.714286 0.357143
vt 0.952381 0.357143
vt 0.988095 0.440476
vt 0.988095 0.369048
vt 1.000000 0.404762
vt 0.952381 0.452381
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vt 0.380952 0.000000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1114,7 +1114,7 @@ public class ModBlocks {
machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
//machine_rtg_red = new MachineRTG(Material.iron).setBlockName("machine_rtg_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
//machine_rtg_orange = new MachineRTG(Material.iron).setBlockName("machine_rtg_orange").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
//machine_rtg_yellow = new MachineRTG(Material.iron).setBlockName("machine_rtg_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
@ -1124,7 +1124,7 @@ public class ModBlocks {
//machine_rtg_purple = new MachineRTG(Material.iron).setBlockName("machine_rtg_purple").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_amgen = new MachineAmgen(Material.iron).setBlockName("machine_amgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_geo = new MachineAmgen(Material.iron).setBlockName("machine_geo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_minirtg = new MachineAmgen(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_cell");
red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_wire_coated");
red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_cable_icon");

View File

@ -39,10 +39,6 @@ public class MachineAmgen extends BlockContainer {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_geo_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_geo_side");
}
if(this == ModBlocks.machine_minirtg) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_minirtg_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_minirtg_side");
}
}
@Override

View File

@ -0,0 +1,36 @@
package com.hbm.blocks.machine;
import com.hbm.tileentity.machine.TileEntityMachineMiniRTG;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineMiniRTG extends BlockContainer {
public MachineMiniRTG(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineMiniRTG();
}
@Override
public int getRenderType() {
return 334087;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
}

View File

@ -28,7 +28,7 @@ public class MachineRTG extends BlockContainer {
@Override
public int getRenderType() {
return -1;
return 334087;
}
@Override

View File

@ -33,7 +33,7 @@ public class CrystallizerRecipes {
recipes.put("oreTitanium", new ItemStack(ModItems.crystal_titanium));
recipes.put("oreSulfur", new ItemStack(ModItems.crystal_sulfur));
recipes.put("oreNiter", new ItemStack(ModItems.crystal_niter));
recipes.put("oreSalpeter", new ItemStack(ModItems.crystal_niter));
recipes.put("oreSaltpeter", new ItemStack(ModItems.crystal_niter));
recipes.put("oreCopper", new ItemStack(ModItems.crystal_copper));
recipes.put("oreTungsten", new ItemStack(ModItems.crystal_tungsten));
recipes.put("oreAluminum", new ItemStack(ModItems.crystal_aluminium));

View File

@ -1,6 +1,7 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotMachineOutput;
import com.hbm.inventory.SlotUpgrade;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import net.minecraft.entity.player.EntityPlayer;
@ -21,7 +22,9 @@ public class ContainerCrystallizer extends Container {
this.addSlotToContainer(new Slot(tedf, 1, 8, 53));
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 140, 35));
this.addSlotToContainer(new Slot(tedf, 3, 26, 17));
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 25, 53));
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 26, 53));
this.addSlotToContainer(new SlotUpgrade(tedf, 5, 98, 17));
this.addSlotToContainer(new SlotUpgrade(tedf, 6, 116, 17));
for(int i = 0; i < 3; i++)
{
@ -57,7 +60,8 @@ public class ContainerCrystallizer extends Container {
if (!this.mergeItemStack(var5, 0, 2, false))
if (!this.mergeItemStack(var5, 3, 4, false))
return null;
if (!this.mergeItemStack(var5, 5, 7, false))
return null;
}
if (var5.stackSize == 0)

View File

@ -31,6 +31,12 @@ public class GUICrystallizer extends GuiInfoContainer {
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 51 - 34, 16, 34, acidomatic.power, acidomatic.maxPower);
acidomatic.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 17, 16, 52);
String[] text = new String[] { "Acceptable upgrades:",
" -Speed (stacks to level 3)",
" -Effectiveness (stacks to level 3)",
" -Overdrive (stacks to level 3)"};
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 87, guiTop + 21, 8, 8, guiLeft + 200, guiTop + 45, text);
}
@Override
@ -52,6 +58,8 @@ public class GUICrystallizer extends GuiInfoContainer {
int j = acidomatic.getProgressScaled(23);
drawTexturedModalRect(guiLeft + 104, guiTop + 34, 192, 0, j, 16);
this.drawInfoPanel(guiLeft + 87, guiTop + 21, 8, 8, 8);
Minecraft.getMinecraft().getTextureManager().bindTexture(acidomatic.tank.getSheet());
acidomatic.tank.renderTank(this, guiLeft + 44, guiTop + 69, acidomatic.tank.getTankType().textureX() * FluidTank.x, acidomatic.tank.getTankType().textureY() * FluidTank.y, 16, 52);

View File

@ -7,6 +7,7 @@ import com.hbm.inventory.FluidTank;
import com.hbm.inventory.container.ContainerMachineBoiler;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineBoiler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
@ -72,27 +73,30 @@ public class GUIMachineBoiler extends GuiInfoContainer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(diFurnace.burnTime > 0)
drawTexturedModalRect(guiLeft + 97, guiTop + 34, 176, 0, 18, 18);
int j = (int)diFurnace.getHeatScaled(17);
drawTexturedModalRect(guiLeft + 103, guiTop + 33 - j, 194, 16 - j, 6, j);
//"It just works" -Todd Howard
TileEntityMachineBoiler dud = diFurnace;
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineBoiler)
diFurnace = (TileEntityMachineBoiler) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
dud = (TileEntityMachineBoiler) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
if(dud.burnTime > 0)
drawTexturedModalRect(guiLeft + 97, guiTop + 34, 176, 0, 18, 18);
int j = (int)dud.getHeatScaled(17);
drawTexturedModalRect(guiLeft + 103, guiTop + 33 - j, 194, 16 - j, 6, j);
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
if(diFurnace.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
if(dud.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
}
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[0].getSheet());
diFurnace.tanks[0].renderTank(this, guiLeft + 62, guiTop + 69, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(dud.tanks[0].getSheet());
dud.tanks[0].renderTank(this, guiLeft + 62, guiTop + 69, dud.tanks[0].getTankType().textureX() * FluidTank.x, dud.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[1].getSheet());
diFurnace.tanks[1].renderTank(this, guiLeft + 134, guiTop + 69, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(dud.tanks[1].getSheet());
dud.tanks[1].renderTank(this, guiLeft + 134, guiTop + 69, dud.tanks[1].getTankType().textureX() * FluidTank.x, dud.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
}
}

View File

@ -74,30 +74,33 @@ public class GUIMachineBoilerElectric extends GuiInfoContainer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(diFurnace.power > 0)
drawTexturedModalRect(guiLeft + 97, guiTop + 34, 176, 0, 18, 18);
int j = (int)diFurnace.getHeatScaled(17);
drawTexturedModalRect(guiLeft + 103, guiTop + 33 - j, 194, 16 - j, 6, j);
int i = (int)diFurnace.getPowerScaled(34);
drawTexturedModalRect(guiLeft + 123, guiTop + 69 - i, 200, 34 - i, 7, i);
//<insert witty line here>
TileEntityMachineBoilerElectric dud = diFurnace;
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineBoilerElectric)
diFurnace = (TileEntityMachineBoilerElectric) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
dud = (TileEntityMachineBoilerElectric) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
if(dud.power > 0)
drawTexturedModalRect(guiLeft + 97, guiTop + 34, 176, 0, 18, 18);
int j = (int)dud.getHeatScaled(17);
drawTexturedModalRect(guiLeft + 103, guiTop + 33 - j, 194, 16 - j, 6, j);
int i = (int)dud.getPowerScaled(34);
drawTexturedModalRect(guiLeft + 123, guiTop + 69 - i, 200, 34 - i, 7, i);
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
if(diFurnace.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
if(dud.tanks[1].getTankType().name().equals(FluidType.NONE.name())) {
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
}
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[0].getSheet());
diFurnace.tanks[0].renderTank(this, guiLeft + 62, guiTop + 69, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(dud.tanks[0].getSheet());
dud.tanks[0].renderTank(this, guiLeft + 62, guiTop + 69, dud.tanks[0].getTankType().textureX() * FluidTank.x, dud.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tanks[1].getSheet());
diFurnace.tanks[1].renderTank(this, guiLeft + 134, guiTop + 69, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(dud.tanks[1].getSheet());
dud.tanks[1].renderTank(this, guiLeft + 134, guiTop + 69, dud.tanks[1].getTankType().textureX() * FluidTank.x, dud.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
}
}

View File

@ -70,26 +70,29 @@ public class GUIMachineCoal extends GuiInfoContainer {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineCoal)
diFurnace = (TileEntityMachineCoal) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
//It's as horrifying as it is functional.
TileEntityMachineCoal dud = diFurnace;
if(diFurnace.power > 0) {
int i = (int)diFurnace.getPowerScaled(52);
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineCoal)
dud = (TileEntityMachineCoal) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
if(dud.power > 0) {
int i = (int)dud.getPowerScaled(52);
drawTexturedModalRect(guiLeft + 152, guiTop + 69 - i, 176, 52 - i, 16, i);
}
if(diFurnace.burnTime > 0)
if(dud.burnTime > 0)
{
drawTexturedModalRect(guiLeft + 79, guiTop + 34, 208, 0, 18, 18);
}
if(diFurnace.tank.getFill() <= 0)
if(dud.tank.getFill() <= 0)
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tank.getSheet());
diFurnace.tank.renderTank(this, guiLeft + 8, guiTop + 69, diFurnace.tank.getTankType().textureX() * FluidTank.x, diFurnace.tank.getTankType().textureY() * FluidTank.y, 16, 52);
Minecraft.getMinecraft().getTextureManager().bindTexture(dud.tank.getSheet());
dud.tank.renderTank(this, guiLeft + 8, guiTop + 69, dud.tank.getTankType().textureX() * FluidTank.x, dud.tank.getTankType().textureY() * FluidTank.y, 16, 52);
}
}

View File

@ -49,13 +49,25 @@ public class GUIMachineReactor extends GuiInfoContainer {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(breeder.hasPower())
/*
* A dud is a tile entity which did not survive a block state change (i.e. a furnace becoming lit) on the client.
* Usually, most functionality is preserved since vanilla interacts with the open GUI screen rather than the TE
* itself, though this does not apply to NTM packets. The client will think the TE bound to the GUI is invalid,
* and therefore miss out on NTM status packets, but it will still require the old TE for slot changes. The refreshed
* "dud" is only used for status bars, it will not replace the actual invalid TE instance in the GUI screen.
*/
TileEntityMachineReactor dud = breeder;
if(breeder.isInvalid() && breeder.getWorldObj().getTileEntity(breeder.xCoord, breeder.yCoord, breeder.zCoord) instanceof TileEntityMachineReactor)
dud = (TileEntityMachineReactor) breeder.getWorldObj().getTileEntity(breeder.xCoord, breeder.yCoord, breeder.zCoord);
if(dud.hasPower())
drawTexturedModalRect(guiLeft + 55, guiTop + 35, 176, 0, 18, 16);
int i = breeder.getProgressScaled(23);
int i = dud.getProgressScaled(23);
drawTexturedModalRect(guiLeft + 80, guiTop + 34, 176, 16, i, 16);
int j = breeder.getHeatScaled(16);
int j = dud.getHeatScaled(16);
drawTexturedModalRect(guiLeft + 48, guiTop + 51 - j, 194, 16 - j, 4, j);
}

View File

@ -659,6 +659,34 @@ public class ItemAssemblyTemplate extends Item {
new ItemStack(ModItems.circuit_targeting_tier4, 1)),
new ItemStack(ModItems.mp_warhead_15_n2)),
SOYUZ(2000, Arrays.asList(
new ItemStack(ModItems.rocket_fuel, 40),
new ItemStack(ModBlocks.det_cord, 20),
new ItemStack(ModItems.thruster_medium, 12),
new ItemStack(ModItems.thruster_small, 12),
new ItemStack(ModItems.tank_steel, 10),
new ItemStack(ModItems.circuit_targeting_tier4, 4),
new ItemStack(ModItems.circuit_targeting_tier3, 8),
new ItemStack(ModItems.plate_polymer, 64),
new ItemStack(ModItems.fins_small_steel, 4),
new ItemStack(ModItems.hull_big_titanium, 40),
new ItemStack(ModItems.hull_big_steel, 24),
new ItemStack(ModItems.ingot_fiberglass, 64)),
new ItemStack(ModItems.missile_soyuz)),
LANDER(1000, Arrays.asList(
new ItemStack(ModItems.rocket_fuel, 10),
new ItemStack(ModItems.thruster_small, 3),
new ItemStack(ModItems.tank_steel, 2),
new ItemStack(ModItems.circuit_targeting_tier3, 4),
new ItemStack(ModItems.plate_polymer, 32),
new ItemStack(ModItems.hull_big_aluminium, 2),
new ItemStack(ModItems.sphere_steel, 1),
new ItemStack(ModItems.ingot_fiberglass, 12)),
new ItemStack(ModItems.missile_soyuz_lander)),
GERALD(1200, Arrays.asList(
new ItemStack(ModItems.cap_star, 1),
new ItemStack(ModItems.chlorine_pinwheel, 1),

View File

@ -23,6 +23,9 @@ public class ItemMachineUpgrade extends Item {
list.add("");
list.add("Chemical Plant:");
list.add("Delay -25 / Consumption +300");
list.add("");
list.add("Crystallizer");
list.add("Delay -10% / Consumption +1000");
}
if(this == ModItems.upgrade_speed_2)
@ -35,6 +38,9 @@ public class ItemMachineUpgrade extends Item {
list.add("");
list.add("Chemical Plant:");
list.add("Delay -50 / Consumption +600");
list.add("");
list.add("Crystallizer");
list.add("Delay -20% / Consumption +2000");
}
if(this == ModItems.upgrade_speed_3)
@ -47,24 +53,36 @@ public class ItemMachineUpgrade extends Item {
list.add("");
list.add("Chemical Plant:");
list.add("Delay -75 / Consumption +900");
list.add("");
list.add("Crystallizer");
list.add("Speed Delay -30% / Consumption +3000");
}
if(this == ModItems.upgrade_effect_1)
{
list.add("Mining Drill:");
list.add("Radius +1 / Consumption +80");
list.add("");
list.add("Crystallizer");
list.add("+5% chance of not consuming an item / Acid consumption +1000mB");
}
if(this == ModItems.upgrade_effect_2)
{
list.add("Mining Drill:");
list.add("Radius +2 / Consumption +160");
list.add("");
list.add("Crystallizer");
list.add("+10% chance of not consuming an item / Acid consumption +2000mB");
}
if(this == ModItems.upgrade_effect_3)
{
list.add("Mining Drill:");
list.add("Radius +3 / Consumption +240");
list.add("");
list.add("Crystallizer");
list.add("+15% chance of not consuming an item / Acid consumption +3000mB");
}
if(this == ModItems.upgrade_power_1)

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3565)";
public static final String VERSION = "1.0.27 BETA (3586)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -138,6 +138,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCrystallizer.class, new RenderCrystallizer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMicrowave.class, new RenderMicrowave());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRTG.class, new RenderRTG());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiniRTG.class, new RenderRTG());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFF.class, new RenderForceField());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForceField.class, new RenderMachineForceField());
//AMS
@ -454,6 +455,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerBlockHandler(new RenderAntennaTop());
RenderingRegistry.registerBlockHandler(new RenderConserve());
RenderingRegistry.registerBlockHandler(new RenderConveyor());
RenderingRegistry.registerBlockHandler(new RenderRTGBlock());
}
@Override

View File

@ -572,6 +572,7 @@ public class MainRegistry
GameRegistry.registerTileEntity(TileEntityNukeBalefire.class, "tileentity_nuke_fstbmb");
GameRegistry.registerTileEntity(TileEntityProxyCombo.class, "tileentity_proxy_combo");
GameRegistry.registerTileEntity(TileEntityMicrowave.class, "tileentity_microwave");
GameRegistry.registerTileEntity(TileEntityMachineMiniRTG.class, "tileentity_mini_rtg");
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);

View File

@ -31,6 +31,8 @@ import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.player.EntityPlayer;
@ -122,6 +124,26 @@ public class ModEventHandlerClient {
if(time > animation.animation.getDuration())
HbmAnimations.hotbar[i] = null;
}
if(event.type == ElementType.CROSSHAIRS && player.ticksExisted < 200) {
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
ScaledResolution resolution = event.resolution;
int pX = resolution.getScaledWidth() / 2;
int pZ = resolution.getScaledHeight() / 2;
String msg = "PLEASE";
font.drawStringWithShadow(msg, pX - font.getStringWidth(msg) / 2, pZ - 40, 0xffffff);
msg = "THIS IS A DEVELOPMENT VERSION";
if(player.ticksExisted > 30) font.drawStringWithShadow(msg, pX - font.getStringWidth(msg) / 2, pZ - 20, 0xffffff);
msg = "OBVIOUSLY SOME THINGS AREN'T GOING TO WORK";
if(player.ticksExisted > 60) font.drawStringWithShadow(msg, pX - font.getStringWidth(msg) / 2, pZ, 0xffffff);
msg = "PLEASE AT LEAST TRY TO REMEMBER THAT";
if(player.ticksExisted > 90) font.drawStringWithShadow(msg, pX - font.getStringWidth(msg) / 2, pZ + 20, 0xffffff);
msg = "FOR THE LOVE OF GOD";
if(player.ticksExisted > 120) font.drawStringWithShadow(msg, pX - font.getStringWidth(msg) / 2, pZ + 40, 0xb00000);
}
}
@SubscribeEvent

View File

@ -249,6 +249,7 @@ public class ResourceManager {
//RTG
public static final ResourceLocation rtg_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rtg.png");
public static final ResourceLocation rtg_cell_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rtg_cell.png");
//Anti Mass Spectrometer
public static final ResourceLocation ams_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_base.png");

View File

@ -0,0 +1,53 @@
package com.hbm.render.block;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class RenderRTGBlock implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
IIcon iicon = block.getIcon(0, 0);
tessellator.setColorOpaque_F(1, 1, 1);
if (renderer.hasOverrideBlockTexture())
{
iicon = renderer.overrideBlockTexture;
}
GL11.glTranslated(0, -0.5, 0);
tessellator.startDrawingQuads();
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rtg, "Gen", iicon, tessellator, 0, false);
tessellator.draw();
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
return false;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
@Override
public int getRenderId() {
return 334087;
}
}

View File

@ -2,6 +2,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
@ -18,8 +19,12 @@ public class RenderRTG extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
bindTexture(ResourceManager.rtg_tex);
if(te.getBlockType() == ModBlocks.machine_rtg_grey)
bindTexture(ResourceManager.rtg_tex);
else
bindTexture(ResourceManager.rtg_cell_tex);
ResourceManager.rtg.renderPart("Gen");
int ix = te.xCoord;

View File

@ -50,4 +50,52 @@ public class ObjUtil {
}
}
}
public static void renderPartWithIcon(WavefrontObject model, String name, IIcon icon, Tessellator tes, float rot, boolean shadow) {
GroupObject go = null;
for(GroupObject obj : model.groupObjects) {
if(obj.name.equals(name))
go = obj;
}
if(go == null)
return;
for(Face f : go.faces) {
Vertex n = f.faceNormal;
tes.setNormal(n.x, n.y, n.z);
if(shadow) {
float brightness = (n.y + 1) * 0.65F;
if(brightness < 0.45F)
brightness = 0.45F;
tes.setColorOpaque_F(brightness, brightness, brightness);
}
for(int i = 0; i < f.vertices.length; i++) {
Vertex v = f.vertices[i];
Vec3 vec = Vec3.createVectorHelper(v.x, v.y, v.z);
vec.rotateAroundY(rot);
float x = (float) vec.xCoord;
float y = (float) vec.yCoord;
float z = (float) vec.zCoord;
TextureCoordinate t = f.textureCoordinates[i];
tes.addVertexWithUV(x, y, z, icon.getInterpolatedU(t.u * 16), icon.getInterpolatedV(t.v * 16));
// The shoddy way of rendering a tringulated model with a quad
// tessellator
if(i % 3 == 2)
tes.addVertexWithUV(x, y, z, icon.getInterpolatedU(t.u * 16), icon.getInterpolatedV(t.v * 16));
}
}
}
}

View File

@ -37,10 +37,6 @@ public class TileEntityMachineAmgen extends TileEntity implements ISource {
data.decrementRad(worldObj, xCoord, zCoord, 5F);
} else if(block == ModBlocks.machine_minirtg) {
power += 25;
} else if(block == ModBlocks.machine_geo) {
Block b = worldObj.getBlock(xCoord, yCoord - 1, zCoord);

View File

@ -258,7 +258,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
mark = true;
}
if(burnTime > 0 && worldObj.getBlock(xCoord, yCoord, zCoord) == ModBlocks.machine_boiler_on)
if(burnTime <= 0 && worldObj.getBlock(xCoord, yCoord, zCoord) == ModBlocks.machine_boiler_on)
MachineBoiler.updateBlockState(false, worldObj, xCoord, yCoord, zCoord);
if(heat > maxHeat)

View File

@ -8,6 +8,8 @@ import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.inventory.CrystallizerRecipes;
import com.hbm.inventory.FluidTank;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.lib.Library;
import com.hbm.tileentity.TileEntityMachineBase;
@ -22,7 +24,7 @@ import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineCrystallizer extends TileEntityMachineBase implements IConsumer, IFluidAcceptor {
public long power;
public static final long maxPower = 100000;
public static final long maxPower = 1000000;
public static final int demand = 1000;
public static final int acidRequired = 500;
public short progress;
@ -34,7 +36,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
public FluidTank tank;
public TileEntityMachineCrystallizer() {
super(5);
super(7);
tank = new FluidTank(FluidType.ACID, 8000, 0);
}
@ -51,21 +53,24 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
power = Library.chargeTEFromItems(slots, 1, power, maxPower);
tank.loadTank(3, 4, slots);
if(canProcess()) {
for(int i = 0; i < getCycleCount(); i++) {
progress++;
power -= demand;
if(progress > duration) {
progress = 0;
tank.setFill(tank.getFill() - acidRequired);
processItem();
if(canProcess()) {
this.markDirty();
progress++;
power -= getPowerRequired();
if(progress > getDuration()) {
progress = 0;
tank.setFill(tank.getFill() - getRequiredAcid());
processItem();
this.markDirty();
}
} else {
progress = 0;
}
} else {
progress = 0;
}
tank.updateTank(xCoord, yCoord, zCoord, this.worldObj.provider.dimensionId);
@ -79,7 +84,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
prevAngle = angle;
if(progress > 0) {
angle += 5F;
angle += 5F * this.getCycleCount();
if(angle >= 360) {
angle -= 360;
@ -107,7 +112,10 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
else if(slots[2].stackSize < slots[2].getMaxStackSize())
slots[2].stackSize++;
this.decrStackSize(0, 1);
float freeChance = this.getFreeChance();
if(freeChance == 0 || freeChance < worldObj.rand.nextFloat())
this.decrStackSize(0, 1);
}
private boolean canProcess() {
@ -116,10 +124,10 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
if(slots[0] == null)
return false;
if(power < demand)
if(power < getPowerRequired())
return false;
if(tank.getFill() < acidRequired)
if(tank.getFill() < getRequiredAcid())
return false;
ItemStack result = CrystallizerRecipes.getOutput(slots[0]);
@ -139,6 +147,91 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
return true;
}
public int getRequiredAcid() {
int extra = 0;
for(int i = 5; i <= 6; i++) {
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_1)
extra += 1000;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_2)
extra += 2000;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_3)
extra += 3000;
}
return acidRequired + Math.min(extra, 3000);
}
public float getFreeChance() {
float chance = 0.0F;
for(int i = 5; i <= 6; i++) {
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_1)
chance += 0.05F;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_2)
chance += 0.1F;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_effect_3)
chance += 0.15F;
}
return Math.min(chance, 0.15F);
}
public int getDuration() {
float durationMod = 1;
for(int i = 5; i <= 6; i++) {
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_1)
durationMod -= 0.1F;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_2)
durationMod -= 0.2F;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_3)
durationMod -= 0.3F;
}
return (int) (duration * Math.max(durationMod, 0.7F));
}
public int getPowerRequired() {
int consumption = 0;
for(int i = 5; i <= 6; i++) {
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_1)
consumption += 1000;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_2)
consumption += 2000;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_speed_3)
consumption += 3000;
}
return (int) (demand + Math.min(consumption, 3000));
}
public float getCycleCount() {
int cycles = 1;
for(int i = 5; i <= 6; i++) {
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_overdrive_1)
cycles += 1;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_overdrive_2)
cycles += 2;
if(slots[i] != null && slots[i].getItem() == ModItems.upgrade_overdrive_3)
cycles += 3;
}
return Math.min(cycles, 4);
}
public long getPowerScaled(int i) {
return (power * i) / maxPower;
}
@ -242,4 +335,12 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
{
return 65536.0D;
}
@Override
public void setInventorySlotContents(int i, ItemStack stack) {
super.setInventorySlotContents(i, stack);
if(stack != null && i >= 5 && i <= 6 && stack.getItem() instanceof ItemMachineUpgrade)
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
}
}

View File

@ -0,0 +1,76 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.lib.Library;
import net.minecraft.tileentity.TileEntity;
public class TileEntityMachineMiniRTG extends TileEntity implements ISource {
public List<IConsumer> list = new ArrayList();
public long power;
public long maxPower = 100;
boolean tact = false;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
power += 25;
if(power > maxPower)
power = maxPower;
tact = false;
ffgeuaInit();
tact = true;
ffgeuaInit();
}
}
@Override
public void ffgeuaInit() {
ffgeua(this.xCoord, this.yCoord + 1, this.zCoord, getTact());
ffgeua(this.xCoord, this.yCoord - 1, this.zCoord, getTact());
ffgeua(this.xCoord - 1, this.yCoord, this.zCoord, getTact());
ffgeua(this.xCoord + 1, this.yCoord, this.zCoord, getTact());
ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact());
ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact());
}
@Override
public void ffgeua(int x, int y, int z, boolean newTact) {
Library.ffgeua(x, y, z, newTact, this, worldObj);
}
@Override
public boolean getTact() {
return tact;
}
@Override
public long getSPower() {
return power;
}
@Override
public void setSPower(long i) {
power = i;
}
@Override
public List<IConsumer> getList() {
return list;
}
@Override
public void clearList() {
list.clear();
}
}