finished engine, fluid fixes, more .44 models, configs
@ -87,5 +87,5 @@ public interface IFluidConnector {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = true;
|
||||
public static final boolean particleDebug = false;
|
||||
}
|
||||
|
||||
@ -91,6 +91,10 @@ public class PipeNet implements IPipeNet {
|
||||
return fill;
|
||||
|
||||
List<IFluidConnector> subList = new ArrayList(subscribers);
|
||||
return fairTransfer(subList, type, fill);
|
||||
}
|
||||
|
||||
public static long fairTransfer(List<IFluidConnector> subList, FluidType type, long fill) {
|
||||
|
||||
List<Long> weight = new ArrayList();
|
||||
long totalReq = 0;
|
||||
|
||||
@ -929,6 +929,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_diesel;
|
||||
public static final int guiID_machine_diesel = 31;
|
||||
public static Block machine_combustion_engine;
|
||||
|
||||
public static Block machine_shredder;
|
||||
public static final int guiID_machine_shredder = 34;
|
||||
@ -1938,6 +1939,7 @@ public class ModBlocks {
|
||||
machine_coal_on = new MachineCoal(true).setBlockName("machine_coal_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
|
||||
machine_diesel = new MachineDiesel(Material.iron).setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_combustion_engine = new MachineCombustionEngine().setBlockName("machine_combustion_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
machine_shredder = new MachineShredder(Material.iron).setBlockName("machine_shredder").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_shredder_large = new MachineShredderLarge(Material.iron).setBlockName("machine_shredder_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":code");
|
||||
@ -2177,7 +2179,7 @@ public class ModBlocks {
|
||||
rbmk_loader = new RBMKLoader(Material.iron).setBlockName("rbmk_loader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_loader");
|
||||
rbmk_steam_inlet = new RBMKInlet(Material.iron).setBlockName("rbmk_steam_inlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_inlet");
|
||||
rbmk_steam_outlet = new RBMKOutlet(Material.iron).setBlockName("rbmk_steam_outlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_outlet");
|
||||
rbmk_heatex = new RBMKHeatex(Material.iron).setBlockName("rbmk_heatex").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_heatex");
|
||||
rbmk_heatex = new RBMKHeatex(Material.iron).setBlockName("rbmk_heatex").setCreativeTab(null).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_heatex");
|
||||
pribris = new RBMKDebris().setBlockName("pribris").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris");
|
||||
pribris_burning = new RBMKDebrisBurning().setBlockName("pribris_burning").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_burning");
|
||||
pribris_radiating = new RBMKDebrisRadiating().setBlockName("pribris_radiating").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_radiating");
|
||||
@ -3073,8 +3075,9 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_rtg_furnace_on, machine_rtg_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_off, machine_coal_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_on, machine_coal_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_diesel, ItemBlockBase.class, machine_diesel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_selenium, ItemBlockBase.class, machine_selenium.getUnlocalizedName());
|
||||
register(machine_diesel);
|
||||
register(machine_selenium);
|
||||
register(machine_combustion_engine);
|
||||
GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_controller, machine_controller.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(reactor_research, reactor_research.getUnlocalizedName());
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCombustionEngine;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineCombustionEngine extends BlockDummyable {
|
||||
|
||||
public MachineCombustionEngine() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12)
|
||||
return new TileEntityMachineCombustionEngine();
|
||||
if(hasExtra(meta))
|
||||
return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 1, 0, 3, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX, y, z - rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX + rot.offsetX, y, z - dir.offsetZ + rot.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX - rot.offsetX, y, z - dir.offsetZ - rot.offsetZ);
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.blocks.machine.rbmk;
|
||||
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityHeatex;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -15,6 +13,6 @@ public class RBMKHeatex extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityHeatex();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,8 @@ public class WorldConfig {
|
||||
public static int gasbubbleSpawn = 4;
|
||||
public static int explosivebubbleSpawn = 8;
|
||||
public static int cobaltSpawn = 2;
|
||||
public static int oilSpawn = 25;
|
||||
public static int bedrockOilSpawn = 50;
|
||||
|
||||
public static int ironClusterSpawn = 4;
|
||||
public static int titaniumClusterSpawn = 2;
|
||||
@ -117,6 +119,8 @@ public class WorldConfig {
|
||||
cobaltSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.18_cobaltSpawnRate", "Amount of cobalt ore veins per chunk", 2);
|
||||
explosivebubbleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.19_explosiveBubbleSpawnRate", "Spawns an explosive gas bubble every nTH chunk", 8);
|
||||
alexandriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.20_alexandriteSpawnRate", "Spawns an alexandrite vein every nTH chunk", 100);
|
||||
oilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.21_oilSpawnRate", "Spawns an oil bubble every nTH chunk", 25);
|
||||
bedrockOilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.22_bedrockOilSpawnRate", "Spawns a bedrock oil node every nTH chunk", 50);
|
||||
|
||||
ironClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C00_ironClusterSpawn", "Amount of iron cluster veins per chunk", 4);
|
||||
titaniumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C01_titaniumClusterSpawn", "Amount of titanium cluster veins per chunk", 2);
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCombustionEngine;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
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 ContainerCombustionEngine extends Container {
|
||||
|
||||
private TileEntityMachineCombustionEngine engine;
|
||||
|
||||
public ContainerCombustionEngine(InventoryPlayer invPlayer, TileEntityMachineCombustionEngine tedf) {
|
||||
this.engine = tedf;
|
||||
this.engine.openInventory();
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 17, 17));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 1, 17, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 88, 71));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 143, 71));
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 35, 71));
|
||||
|
||||
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, 121 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 179));
|
||||
}
|
||||
}
|
||||
|
||||
@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 <= 4) {
|
||||
if(!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IBatteryItem) {
|
||||
if(!this.mergeItemStack(var5, 3, 4, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() instanceof IItemFluidIdentifier) {
|
||||
if(!this.mergeItemStack(var5, 4, 5, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() == ModItems.piston_set) {
|
||||
if(!this.mergeItemStack(var5, 2, 3, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(var5, 0, 1, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return engine.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
this.engine.closeInventory();
|
||||
}
|
||||
}
|
||||
137
src/main/java/com/hbm/inventory/gui/GUICombustionEngine.java
Normal file
@ -0,0 +1,137 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerCombustionEngine;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCombustionEngine;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUICombustionEngine extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/generators/gui_combustion.png");
|
||||
private TileEntityMachineCombustionEngine engine;
|
||||
private int setting = 0;
|
||||
private boolean isMouseLocked = false;
|
||||
|
||||
public GUICombustionEngine(InventoryPlayer invPlayer, TileEntityMachineCombustionEngine tedf) {
|
||||
super(new ContainerCombustionEngine(invPlayer, tedf));
|
||||
engine = tedf;
|
||||
this.setting = engine.setting;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 203;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
if(!isMouseLocked) {
|
||||
this.drawElectricityInfo(this, x, y, guiLeft + 143, guiTop + 17, 16, 52, engine.getPower(), engine.maxPower);
|
||||
engine.tank.renderTankInfo(this, x, y, guiLeft + 35, guiTop + 17, 16, 52);
|
||||
}
|
||||
|
||||
if(isMouseLocked || (guiLeft + 80 <= x && guiLeft + 80 + 34 > x && guiTop + 38 < y && guiTop + 38 + 8 >= y)) {
|
||||
drawCreativeTabHoveringText(((setting * 2) / 10D) + "mB/t", MathHelper.clamp_int(x, guiLeft + 80, guiLeft + 114), MathHelper.clamp_int(y, guiTop + 38, guiTop + 46));
|
||||
}
|
||||
|
||||
if(engine.slots[2] != null && engine.slots[2].getItem() == ModItems.piston_set) {
|
||||
double power = 0;
|
||||
if(engine.tank.getTankType().hasTrait(FT_Combustible.class)) {
|
||||
FT_Combustible trait = engine.tank.getTankType().getTrait(FT_Combustible.class);
|
||||
int i = engine.slots[2].getItemDamage();
|
||||
EnumPistonType piston = EnumUtil.grabEnumSafely(EnumPistonType.class, i);
|
||||
power = setting * 0.2 * trait.getCombustionEnergy() / 1_000D * piston.eff[trait.getGrade().ordinal()];
|
||||
}
|
||||
String c = EnumChatFormatting.YELLOW + "";
|
||||
drawCustomInfoStat(x, y, guiLeft + 79, guiTop + 50, 35, 14, x, y, c + String.format("%,d", (int)(power)) + " HE/t", c + String.format("%,d", (int)(power * 20)) + " HE/s");
|
||||
}
|
||||
|
||||
drawCustomInfoStat(x, y, guiLeft + 79, guiTop + 13, 35, 15, x, y, "Ignition");
|
||||
|
||||
if(isMouseLocked) {
|
||||
|
||||
int setting = (x - guiLeft - 81) * 30 / 32;
|
||||
setting = MathHelper.clamp_int(setting, 0, 30);
|
||||
|
||||
if(this.setting != setting) {
|
||||
this.setting = setting;
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("setting", setting);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, engine.xCoord, engine.yCoord, engine.zCoord));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 89 <= x && guiLeft + 89 + 16 > x && guiTop + 13 < y && guiTop + 13 + 14 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean("turnOn", true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, engine.xCoord, engine.yCoord, engine.zCoord));
|
||||
}
|
||||
|
||||
if(guiLeft + 79 <= x && guiLeft + 79 + 36 > x && guiTop + 38 < y && guiTop + 38 + 8 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
isMouseLocked = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseMovedOrUp(int x, int y, int i) {
|
||||
super.mouseMovedOrUp(x, y, i);
|
||||
|
||||
if(isMouseLocked) {
|
||||
|
||||
if(i == 0 || i == 1) {
|
||||
isMouseLocked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
if(engine.slots[2] != null && engine.slots[2].getItem() == ModItems.piston_set) {
|
||||
int i = engine.slots[2].getItemDamage();
|
||||
drawTexturedModalRect(guiLeft + 80, guiTop + 51, 176, 52 + i * 12, 25, 12);
|
||||
}
|
||||
|
||||
drawTexturedModalRect(guiLeft + 79 + (setting * 32 / 30), guiTop + 38, 192, 15, 4, 8);
|
||||
|
||||
if(engine.isOn) {
|
||||
drawTexturedModalRect(guiLeft + 79, guiTop + 13, 192, 0, 35, 15);
|
||||
}
|
||||
|
||||
int i = (int) (engine.power * 53 / engine.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 143, guiTop + 69 - i, 176, 52 - i, 16, i);
|
||||
|
||||
engine.tank.renderTank(guiLeft + 35, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -89,9 +89,13 @@ public abstract class GUITurretBase extends GuiInfoContainer {
|
||||
|
||||
if(list.size() < 10) {
|
||||
lines.add(list.toArray());
|
||||
} else {
|
||||
} else if(list.size() < 24) {
|
||||
lines.add(list.subList(0, list.size() / 2).toArray());
|
||||
lines.add(list.subList(list.size() / 2, list.size()).toArray());
|
||||
} else {
|
||||
lines.add(list.subList(0, list.size() / 3).toArray());
|
||||
lines.add(list.subList(list.size() / 3, list.size() / 3 * 2).toArray());
|
||||
lines.add(list.subList(list.size() / 3 * 2, list.size()).toArray());
|
||||
}
|
||||
|
||||
lines.add(new Object[] {I18nUtil.resolveKey(selected.getDisplayName())});
|
||||
|
||||
@ -33,7 +33,7 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
gui.drawInfo(new String[] { BobMathUtil.getShortNumber(power) + "/" + BobMathUtil.getShortNumber(maxPower) + "HE" }, mouseX, mouseY);
|
||||
}
|
||||
|
||||
public void drawCustomInfoStat(int mouseX, int mouseY, int x, int y, int width, int height, int tPosX, int tPosY, String[] text) { drawCustomInfoStat(mouseX, mouseY, x, y, width, height, tPosX, tPosY, Arrays.asList(text)); }
|
||||
public void drawCustomInfoStat(int mouseX, int mouseY, int x, int y, int width, int height, int tPosX, int tPosY, String... text) { drawCustomInfoStat(mouseX, mouseY, x, y, width, height, tPosX, tPosY, Arrays.asList(text)); }
|
||||
|
||||
public void drawCustomInfoStat(int mouseX, int mouseY, int x, int y, int width, int height, int tPosX, int tPosY, List text) {
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@ -462,6 +463,42 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.circuit_red_copper, 8),
|
||||
new OreDictStack(KEY_CIRCUIT_BISMUTH, 1)
|
||||
}, 600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_combustion_engine, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.plate(), 12),
|
||||
new OreDictStack(IRON.plate(), 8),
|
||||
new OreDictStack(CU.ingot(), 8),
|
||||
new ComparableStack(ModItems.generator_steel, 1),
|
||||
new ComparableStack(ModItems.tank_steel, 2),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 8),
|
||||
new ComparableStack(ModItems.wire_red_copper, 24),
|
||||
new ComparableStack(ModItems.circuit_copper, 1)
|
||||
}, 300);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.STEEL.ordinal()), new AStack[] {
|
||||
new OreDictStack(STEEL.plate(), 16),
|
||||
new OreDictStack(CU.plate(), 4),
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.DURA.ordinal()), new AStack[] {
|
||||
new OreDictStack(DURA.ingot(), 24),
|
||||
new OreDictStack(TI.plate(), 8),
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.DESH.ordinal()), new AStack[] {
|
||||
new OreDictStack(DESH.ingot(), 24),
|
||||
new OreDictStack(ANY_PLASTIC.ingot(), 12),
|
||||
new OreDictStack(CU.plate(), 24),
|
||||
new OreDictStack(W.ingot(), 16),
|
||||
new ComparableStack(ModItems.bolt_compound, 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.STARMETAL.ordinal()), new AStack[] {
|
||||
new OreDictStack(STAR.ingot(), 24),
|
||||
new OreDictStack(RUBBER.ingot(), 16),
|
||||
new OreDictStack(BIGMT.plate(), 24),
|
||||
new OreDictStack(NB.ingot(), 16),
|
||||
new ComparableStack(ModItems.bolt_compound, 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_large_turbine, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.plate(), 12),
|
||||
new OreDictStack(RUBBER.ingot(), 4),
|
||||
|
||||
@ -266,6 +266,14 @@ public class AnvilRecipes {
|
||||
new ComparableStack(ModItems.circuit_copper, 1)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.heater_electric))).setTier(3));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(RUBBER.ingot(), 4),
|
||||
new OreDictStack(CU.ingot(), 16),
|
||||
new OreDictStack(STEEL.plate(), 16),
|
||||
new ComparableStack(ModItems.pipes_steel, 1),
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.heater_heatex))).setTier(3));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new ComparableStack(Blocks.stonebrick, 16),
|
||||
|
||||
@ -788,6 +788,7 @@ public class ModItems {
|
||||
public static Item pellet_advanced;
|
||||
|
||||
public static Item piston_selenium;
|
||||
public static Item piston_set;
|
||||
|
||||
//public static Item crystal_energy;
|
||||
//public static Item pellet_coolant;
|
||||
@ -3244,6 +3245,7 @@ public class ModItems {
|
||||
tritium_deuterium_cake = new ItemCustomLore().setUnlocalizedName("tritium_deuterium_cake").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":tritium_deuterium_cake");
|
||||
|
||||
piston_selenium = new Item().setUnlocalizedName("piston_selenium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":piston_selenium");
|
||||
piston_set = new ItemPistons().setUnlocalizedName("piston_set").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1);
|
||||
|
||||
//crystal_energy = new ItemCustomLore().setUnlocalizedName("crystal_energy").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":crystal_energy");
|
||||
//pellet_coolant = new ItemCustomLore().setUnlocalizedName("pellet_coolant").setMaxDamage(41400).setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_coolant");
|
||||
@ -6473,6 +6475,7 @@ public class ModItems {
|
||||
|
||||
//Engine Pieces
|
||||
GameRegistry.registerItem(piston_selenium, piston_selenium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(piston_set, piston_set.getUnlocalizedName());
|
||||
|
||||
//Cells
|
||||
GameRegistry.registerItem(cell_empty, cell_empty.getUnlocalizedName());
|
||||
|
||||
67
src/main/java/com/hbm/items/machine/ItemPistons.java
Normal file
@ -0,0 +1,67 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemPistons extends ItemEnumMulti {
|
||||
|
||||
public ItemPistons() {
|
||||
super(EnumPistonType.class, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
Enum[] enums = theEnum.getEnumConstants();
|
||||
this.icons = new IIcon[enums.length];
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
EnumPistonType type = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
|
||||
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
for(int i = 0; i < type.eff.length; i++) {
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.values()[i].getGrade() + ": " + EnumChatFormatting.RED + "" + (int)(type.eff[i] * 100) + "%");
|
||||
}
|
||||
}
|
||||
|
||||
public static enum EnumPistonType {
|
||||
STEEL (1.00, 0.75, 0.25, 0.00),
|
||||
DURA (0.50, 1.00, 0.90, 0.50),
|
||||
DESH (0.00, 0.50, 1.00, 0.75),
|
||||
STARMETAL (0.50, 0.75, 1.00, 0.90);
|
||||
|
||||
public double[] eff;
|
||||
|
||||
private EnumPistonType(double... eff) {
|
||||
this.eff = new double[Math.min(FuelGrade.values().length, eff.length)];
|
||||
for(int i = 0; i < eff.length; i++) {
|
||||
this.eff[i] = eff[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -577,7 +577,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(25) == 0) {
|
||||
if(WorldConfig.oilSpawn > 0 && rand.nextInt(WorldConfig.oilSpawn) == 0) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(25);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
@ -585,7 +585,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
OilBubble.spawnOil(world, randPosX, randPosY, randPosZ, 7 + rand.nextInt(9));
|
||||
}
|
||||
|
||||
if(rand.nextInt(50) == 0) {
|
||||
if(WorldConfig.bedrockOilSpawn > 0 && rand.nextInt(WorldConfig.bedrockOilSpawn) == 0) {
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
|
||||
|
||||
@ -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 (4431)";
|
||||
public static final String VERSION = "1.0.27 BETA (4438)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -258,6 +258,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrucible.class, new RenderCrucible());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeatBoiler.class, new RenderBoiler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamEngine.class, new RenderSteamEngine());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCombustionEngine.class, new RenderCombustionEngine());
|
||||
//Foundry
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());
|
||||
@ -447,11 +448,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_defabricator, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_dash, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_twigun, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderOverkill());
|
||||
//MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_dampfmaschine, new ItemRenderBullshit());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action, new ItemRenderWeaponFFMaresLeg(ResourceManager.ff_gun_bright, ResourceManager.ff_wood));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action, new ItemRenderWeaponFFBolt(ResourceManager.rem700, ResourceManager.rem700_tex));
|
||||
@ -494,6 +490,10 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_glass_cannon, new ItemRenderWeaponGlass());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderWeaponChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderWeaponNovac());
|
||||
//multitool
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool());
|
||||
|
||||
@ -838,7 +838,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_loader, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.plate(), 'C', CU.ingot(), 'B', ModItems.tank_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_inlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', IRON.plate(), 'B', ModItems.tank_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_outlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.tank_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_heatex, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.pipes_steel });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.rbmk_heatex, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.pipes_steel });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk, 8), new Object[] { "R", 'R', ModBlocks.rbmk_blank });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk_smooth, 1), new Object[] { "R", 'R', ModBlocks.deco_rbmk });
|
||||
|
||||
@ -124,6 +124,9 @@ public class ResourceManager {
|
||||
public static final IModelCustom selenium_rotor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/selenium_engine_rotor.obj"));
|
||||
public static final IModelCustom selenium_piston = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/selenium_engine_piston.obj"));
|
||||
|
||||
//Combustion Engine
|
||||
public static final IModelCustom combustion_engine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/combustion_engine.obj")).asDisplayList();
|
||||
|
||||
//Press
|
||||
public static final IModelCustom press_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/press_body.obj"));
|
||||
public static final IModelCustom press_head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/press_head.obj"));
|
||||
@ -456,6 +459,9 @@ public class ResourceManager {
|
||||
public static final ResourceLocation selenium_piston_tex = new ResourceLocation(RefStrings.MODID, "textures/models/selenium_engine_piston.png");
|
||||
public static final ResourceLocation selenium_rotor_tex = new ResourceLocation(RefStrings.MODID, "textures/models/selenium_engine_rotor.png");
|
||||
|
||||
//Combustion Engine
|
||||
public static final ResourceLocation combustion_engine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/combustion_engine.png");
|
||||
|
||||
//Press
|
||||
public static final ResourceLocation press_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/press_body.png");
|
||||
public static final ResourceLocation press_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/press_head.png");
|
||||
@ -709,6 +715,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom bio_revolver = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/bio_revolver.obj"));
|
||||
public static final IModelCustom chemthrower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/chemthrower.obj")).asDisplayList();
|
||||
public static final IModelCustom novac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/novac.obj"));
|
||||
public static final IModelCustom novac_scoped = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/novac_scoped.obj"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
@ -789,6 +796,11 @@ public class ResourceManager {
|
||||
public static final ResourceLocation bio_revolver_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/bio_revolver.png");
|
||||
public static final ResourceLocation chemthrower_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/chemthrower.png");
|
||||
public static final ResourceLocation novac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/novac.png");
|
||||
public static final ResourceLocation novac_scope_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/novac_scope.png");
|
||||
public static final ResourceLocation lil_pip_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lil_pip.png");
|
||||
public static final ResourceLocation blackjack_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/blackjack.png");
|
||||
public static final ResourceLocation lent_gun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lent_gun.png");
|
||||
public static final ResourceLocation red_key_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/red_key.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -36,7 +37,12 @@ public class ItemRenderWeaponNovac implements IItemRenderer {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.novac_tex);
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver_nopip) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.novac_tex);
|
||||
if(item.getItem() == ModItems.gun_revolver_pip) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lil_pip_tex);
|
||||
if(item.getItem() == ModItems.gun_revolver_blackjack) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.blackjack_tex);
|
||||
if(item.getItem() == ModItems.gun_revolver_silver) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lent_gun_tex);
|
||||
if(item.getItem() == ModItems.gun_revolver_red) Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.red_key_tex);
|
||||
|
||||
switch(type) {
|
||||
|
||||
@ -46,7 +52,7 @@ public class ItemRenderWeaponNovac implements IItemRenderer {
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glRotated(80, 0, 1, 0);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.25F, 0.0F, -1.25F);
|
||||
GL11.glTranslatef(-0.0F, 0.0F, -1.25F);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
|
||||
break;
|
||||
@ -87,7 +93,15 @@ public class ItemRenderWeaponNovac implements IItemRenderer {
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.novac.renderAll();
|
||||
if(item.getItem() == ModItems.gun_revolver_pip) {
|
||||
ResourceManager.novac_scoped.renderPart("Gun");
|
||||
ResourceManager.novac_scoped.renderPart("Hammer");
|
||||
ResourceManager.novac_scoped.renderPart("Cylinder");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.novac_scope_tex);
|
||||
ResourceManager.novac_scoped.renderPart("Scope");
|
||||
} else {
|
||||
ResourceManager.novac.renderAll();
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -0,0 +1,81 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCombustionEngine;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderCombustionEngine extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(-0.5, 0, 3);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.combustion_engine_tex);
|
||||
ResourceManager.combustion_engine.renderPart("Engine");
|
||||
|
||||
TileEntityMachineCombustionEngine engine = (TileEntityMachineCombustionEngine) tile;
|
||||
|
||||
int color = engine.tank.getTankType().getContainerColor();
|
||||
if(color != 0xffffff) {
|
||||
float r = ((color & 0xff0000) >> 16) / 256F;
|
||||
float g = ((color & 0x00ff00) >> 8) / 256F;
|
||||
float b = ((color & 0x0000ff) >> 0) / 256F;
|
||||
GL11.glColor4f(r, g, b, 1F);
|
||||
}
|
||||
ResourceManager.combustion_engine.renderPart("Canister");
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
GL11.glTranslated(1, 0, -2.6875);
|
||||
GL11.glRotated(engine.prevDoorAngle + (engine.doorAngle - engine.prevDoorAngle) * interp, 0, -1, 0);
|
||||
GL11.glTranslated(-1, 0, 2.6875);
|
||||
ResourceManager.combustion_engine.renderPart("Hatch");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_combustion_engine);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glScaled(2.75, 2.75, 2.75);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0, 0, 2.75);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.combustion_engine_tex);
|
||||
ResourceManager.combustion_engine.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -271,6 +271,8 @@ public class TileMappings {
|
||||
put(TileEntityMachineLargeTurbine.class, "tileentity_industrial_turbine");
|
||||
put(TileEntityChungus.class, "tileentity_chungus");
|
||||
|
||||
put(TileEntityMachineCombustionEngine.class, "tileentity_combustion_engine");
|
||||
|
||||
put(TileEntityMachineAssembler.class, "tileentity_assembly_machine");
|
||||
put(TileEntityMachineAssemfac.class, "tileentity_assemfac");
|
||||
put(TileEntityMachineChemplant.class, "tileentity_chemical_plant");
|
||||
|
||||
@ -0,0 +1,306 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerCombustionEngine;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
import com.hbm.inventory.gui.GUICombustionEngine;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energy.IEnergyGenerator;
|
||||
import api.hbm.fluid.IFluidStandardReceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineCombustionEngine extends TileEntityMachineBase implements IEnergyGenerator, IFluidStandardReceiver, IControlReceiver, IGUIProvider {
|
||||
|
||||
public boolean isOn = false;
|
||||
public static long maxPower = 2_500_000;
|
||||
public long power;
|
||||
private int playersUsing = 0;
|
||||
public int setting = 0;
|
||||
public boolean wasOn = false;
|
||||
|
||||
public float doorAngle = 0;
|
||||
public float prevDoorAngle = 0;
|
||||
|
||||
private AudioWrapper audio;
|
||||
|
||||
public FluidTank tank;
|
||||
public int tenth = 0;
|
||||
|
||||
public TileEntityMachineCombustionEngine() {
|
||||
super(5);
|
||||
this.tank = new FluidTank(Fluids.DIESEL, 24_000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.combustionEngine";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.tank.loadTank(0, 1, slots);
|
||||
if(this.tank.setType(4, slots)) {
|
||||
this.tenth = 0;
|
||||
}
|
||||
|
||||
wasOn = false;
|
||||
|
||||
int fill = tank.getFill() * 10 + tenth;
|
||||
if(isOn && setting > 0 && slots[2] != null && slots[2].getItem() == ModItems.piston_set && fill > 0 && tank.getTankType().hasTrait(FT_Combustible.class)) {
|
||||
EnumPistonType piston = EnumUtil.grabEnumSafely(EnumPistonType.class, slots[2].getItemDamage());
|
||||
FT_Combustible trait = tank.getTankType().getTrait(FT_Combustible.class);
|
||||
|
||||
double eff = piston.eff[trait.getGrade().ordinal()];
|
||||
|
||||
if(eff > 0) {
|
||||
int speed = setting * 2;
|
||||
|
||||
int toBurn = Math.min(fill, speed);
|
||||
this.power += toBurn * (trait.getCombustionEnergy() / 10_000D) * eff;
|
||||
fill -= toBurn;
|
||||
|
||||
if(toBurn > 0) {
|
||||
wasOn = true;
|
||||
}
|
||||
|
||||
tank.setFill(fill / 10);
|
||||
tenth = fill % 10;
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", Math.min(power, maxPower));
|
||||
|
||||
this.power = Library.chargeItemsFromTE(slots, 3, power, power);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.sendPower(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tank.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
if(power > maxPower)
|
||||
power = maxPower;
|
||||
|
||||
data.setInteger("playersUsing", playersUsing);
|
||||
data.setInteger("setting", setting);
|
||||
data.setBoolean("isOn", isOn);
|
||||
data.setBoolean("wasOn", wasOn);
|
||||
tank.writeToNBT(data, "tank");
|
||||
this.networkPack(data, 50);
|
||||
|
||||
} else {
|
||||
this.prevDoorAngle = this.doorAngle;
|
||||
float swingSpeed = (doorAngle / 10F) + 3;
|
||||
|
||||
if(this.playersUsing > 0) {
|
||||
this.doorAngle += swingSpeed;
|
||||
} else {
|
||||
this.doorAngle -= swingSpeed;
|
||||
}
|
||||
|
||||
this.doorAngle = MathHelper.clamp_float(this.doorAngle, 0F, 135F);
|
||||
|
||||
if(wasOn) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = createAudioLoop();
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 1 - rot.offsetX, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ, dir.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.igeneratorOperate", xCoord, yCoord, zCoord, 2.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
|
||||
super.invalidate();
|
||||
|
||||
if(audio != null) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return dir != ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(FluidType type, ForgeDirection dir) {
|
||||
return dir != ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.playersUsing = nbt.getInteger("playersUsing");
|
||||
this.setting = nbt.getInteger("setting");
|
||||
this.power = nbt.getLong("power");
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.wasOn = nbt.getBoolean("wasOn");
|
||||
this.tank.readFromNBT(nbt, "tank");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.setting = nbt.getInteger("setting");
|
||||
this.power = nbt.getLong("power");
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.tank.readFromNBT(nbt, "tank");
|
||||
this.tenth = nbt.getInteger("tenth");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("setting", setting);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
tank.writeToNBT(nbt, "tank");
|
||||
nbt.setInteger("tenth", tenth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
if(!worldObj.isRemote) this.playersUsing++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
if(!worldObj.isRemote) this.playersUsing--;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerCombustionEngine(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUICombustionEngine(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return new FluidTank[] {tank};
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] {tank};
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 3,
|
||||
yCoord,
|
||||
zCoord - 3,
|
||||
xCoord + 4,
|
||||
yCoord + 2,
|
||||
zCoord + 4
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return player.getDistance(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 25;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("turnOn")) this.isOn = !this.isOn;
|
||||
if(data.hasKey("setting")) this.setting = data.getInteger("setting");
|
||||
|
||||
this.markChanged();
|
||||
}
|
||||
}
|
||||
@ -45,14 +45,14 @@ public class TileEntityMachineSeleniumEngine extends TileEntityLoadedBase implem
|
||||
|
||||
public static long maxPower = 250000;
|
||||
public static int fluidCap = 16000;
|
||||
public static double pistonExp = 1.15D;
|
||||
public static double pistonExp = 1.0D;
|
||||
public static boolean shutUp = false;
|
||||
public static HashMap<FuelGrade, Double> fuelEfficiency = new HashMap();
|
||||
static {
|
||||
fuelEfficiency.put(FuelGrade.LOW, 1.0D);
|
||||
fuelEfficiency.put(FuelGrade.MEDIUM, 0.75D);
|
||||
fuelEfficiency.put(FuelGrade.HIGH, 0.5D);
|
||||
fuelEfficiency.put(FuelGrade.AERO, 0.05D);
|
||||
fuelEfficiency.put(FuelGrade.LOW, 0.75D);
|
||||
fuelEfficiency.put(FuelGrade.MEDIUM, 0.5D);
|
||||
fuelEfficiency.put(FuelGrade.HIGH, 0.25D);
|
||||
fuelEfficiency.put(FuelGrade.AERO, 0.00D);
|
||||
}
|
||||
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
|
||||
@ -112,7 +112,7 @@ public class TileEntitySawmill extends TileEntityMachineBase {
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
cog.motionX = rot.offsetX;
|
||||
cog.motionY = 1;
|
||||
cog.motionY = 1 + (heat - 100) * 0.0001D;
|
||||
cog.motionZ = rot.offsetZ;
|
||||
worldObj.spawnEntityInWorld(cog);
|
||||
|
||||
@ -179,6 +179,20 @@ public class TileEntitySawmill extends TileEntityMachineBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.hasBlade = nbt.getBoolean("hasBlade");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setBoolean("hasBlade", hasBlade);
|
||||
nbt.setInteger("progress", progress);
|
||||
}
|
||||
|
||||
protected void tryPullHeat() {
|
||||
TileEntity con = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ public class TileEntityMachineLiquefactor extends TileEntityMachineBase implemen
|
||||
int power = Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3);
|
||||
|
||||
this.processTime = processTimeBase - (processTimeBase / 4) * speed;
|
||||
this.usage = usageBase - (usageBase / 4) * speed;
|
||||
this.usage = usageBase - (usageBase / 4) * speed / power;
|
||||
|
||||
if(this.canProcess())
|
||||
this.process();
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -15,12 +17,19 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidConductor;
|
||||
import api.hbm.fluid.IFluidConnector;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import api.hbm.fluid.PipeNet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IPersistentNBT {
|
||||
|
||||
@ -55,7 +64,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
tank.unloadTank(4, 5, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
if(this.mode == 1 || this.mode == 2) {
|
||||
/*if(this.mode == 1 || this.mode == 2) {
|
||||
this.sendFluidToAll(tank.getTankType(), this);
|
||||
}
|
||||
|
||||
@ -63,7 +72,9 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
this.subscribeToAllAround(tank.getTankType(), worldObj, xCoord, yCoord, zCoord);
|
||||
} else {
|
||||
this.unsubscribeToAllAround(tank.getTankType(), worldObj, xCoord, yCoord, zCoord);
|
||||
}
|
||||
}*/
|
||||
|
||||
tank.setFill(transmitFluidFairly(worldObj, tank.getTankType(), this, tank.getFill(), this.mode == 0 || this.mode == 1, this.mode == 1 || this.mode == 2, getConPos()));
|
||||
|
||||
age++;
|
||||
if(age >= 20)
|
||||
@ -81,6 +92,54 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
this.networkPack(data, 50);
|
||||
}
|
||||
}
|
||||
|
||||
protected DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + 1, yCoord, zCoord, Library.POS_X),
|
||||
new DirPos(xCoord - 1, yCoord, zCoord, Library.NEG_X),
|
||||
new DirPos(xCoord, yCoord + 1, zCoord, Library.POS_Y),
|
||||
new DirPos(xCoord, yCoord - 1, zCoord, Library.NEG_Y),
|
||||
new DirPos(xCoord, yCoord, zCoord + 1, Library.POS_Z),
|
||||
new DirPos(xCoord, yCoord, zCoord - 1, Library.NEG_Z)
|
||||
};
|
||||
}
|
||||
|
||||
protected static int transmitFluidFairly(World world, FluidType type, IFluidConnector that, int fill, boolean connect, boolean send, DirPos[] connections) {
|
||||
|
||||
Set<IPipeNet> nets = new HashSet();
|
||||
Set<IFluidConnector> consumers = new HashSet();
|
||||
|
||||
for(DirPos pos : connections) {
|
||||
|
||||
TileEntity te = world.getTileEntity(pos.getX(), pos.getY(), pos.getZ());
|
||||
|
||||
if(te instanceof IFluidConductor) {
|
||||
IFluidConductor con = (IFluidConductor) te;
|
||||
if(con.getPipeNet(type) != null) {
|
||||
nets.add(con.getPipeNet(type));
|
||||
con.getPipeNet(type).unsubscribe(that);
|
||||
consumers.addAll(con.getPipeNet(type).getSubscribers());
|
||||
}
|
||||
|
||||
//if it's just a consumer, buffer it as a subscriber
|
||||
} else if(te instanceof IFluidConnector) {
|
||||
consumers.add((IFluidConnector) te);
|
||||
}
|
||||
}
|
||||
|
||||
if(fill > 0 && send) {
|
||||
List<IFluidConnector> con = new ArrayList();
|
||||
con.addAll(consumers);
|
||||
fill = (int) PipeNet.fairTransfer(con, type, fill);
|
||||
}
|
||||
|
||||
//resubscribe to buffered nets, if necessary
|
||||
if(connect) {
|
||||
nets.forEach(x -> x.subscribe(that));
|
||||
}
|
||||
|
||||
return fill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
|
||||
@ -2,12 +2,11 @@ package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
|
||||
@ -28,29 +27,19 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
worldObj.newExplosion(null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 10, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void subscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
||||
this.trySubscribe(type, world, xCoord + 1, yCoord, zCoord + 3, Library.POS_Z);
|
||||
this.trySubscribe(type, world, xCoord - 1, yCoord, zCoord + 3, Library.POS_Z);
|
||||
this.trySubscribe(type, world, xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
this.trySubscribe(type, world, xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
this.trySubscribe(type, world, xCoord + 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
this.trySubscribe(type, world, xCoord - 3, yCoord, zCoord + 1, Library.NEG_X);
|
||||
this.trySubscribe(type, world, xCoord + 3, yCoord, zCoord - 1, Library.POS_X);
|
||||
this.trySubscribe(type, world, xCoord - 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unsubscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
||||
this.tryUnsubscribe(type, world, xCoord + 1, yCoord, zCoord + 3);
|
||||
this.tryUnsubscribe(type, world, xCoord - 1, yCoord, zCoord + 3);
|
||||
this.tryUnsubscribe(type, world, xCoord + 1, yCoord, zCoord - 3);
|
||||
this.tryUnsubscribe(type, world, xCoord - 1, yCoord, zCoord - 3);
|
||||
this.tryUnsubscribe(type, world, xCoord + 3, yCoord, zCoord + 1);
|
||||
this.tryUnsubscribe(type, world, xCoord - 3, yCoord, zCoord + 1);
|
||||
this.tryUnsubscribe(type, world, xCoord + 3, yCoord, zCoord - 1);
|
||||
this.tryUnsubscribe(type, world, xCoord - 3, yCoord, zCoord - 1);
|
||||
protected DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + 1, yCoord, zCoord + 3, Library.POS_Z),
|
||||
new DirPos(xCoord - 1, yCoord, zCoord + 3, Library.POS_Z),
|
||||
new DirPos(xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z),
|
||||
new DirPos(xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z),
|
||||
new DirPos(xCoord + 3, yCoord, zCoord + 1, Library.POS_X),
|
||||
new DirPos(xCoord - 3, yCoord, zCoord + 1, Library.NEG_X),
|
||||
new DirPos(xCoord + 3, yCoord, zCoord - 1, Library.POS_X),
|
||||
new DirPos(xCoord - 3, yCoord, zCoord - 1, Library.NEG_X)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -65,17 +54,6 @@ public class TileEntityMachineBAT9000 extends TileEntityBarrel {
|
||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord - 1, getTact(), type);
|
||||
}
|
||||
|
||||
public void sendFluidToAll(FluidType type, TileEntity te) {
|
||||
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord + 3, Library.POS_Z);
|
||||
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord + 3, Library.POS_Z);
|
||||
sendFluid(type, worldObj, xCoord + 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
sendFluid(type, worldObj, xCoord - 1, yCoord, zCoord - 3, Library.NEG_Z);
|
||||
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord + 1, Library.POS_X);
|
||||
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord + 1, Library.NEG_X);
|
||||
sendFluid(type, worldObj, xCoord + 3, yCoord, zCoord - 1, Library.POS_X);
|
||||
sendFluid(type, worldObj, xCoord - 3, yCoord, zCoord - 1, Library.NEG_X);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -51,7 +51,7 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
if(age >= 20)
|
||||
age = 0;
|
||||
|
||||
if(this.mode == 2 || this.mode == 3) {
|
||||
/*if(this.mode == 2 || this.mode == 3) {
|
||||
for(DirPos pos : getConPos()) this.tryUnsubscribe(tank.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
if(this.mode == 0 || this.mode == 1) {
|
||||
@ -59,7 +59,9 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
}
|
||||
if(this.mode == 1 || this.mode == 2) {
|
||||
for(DirPos pos : getConPos()) this.sendFluid(tank.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
}*/
|
||||
|
||||
tank.setFill(TileEntityBarrel.transmitFluidFairly(worldObj, tank.getTankType(), this, tank.getFill(), this.mode == 0 || this.mode == 1, this.mode == 1 || this.mode == 2, getConPos()));
|
||||
|
||||
if((mode == 1 || mode == 2) && (age == 9 || age == 19))
|
||||
fillFluidInit(tank.getTankType());
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine.storage;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -38,47 +39,29 @@ public class TileEntityMachineOrbus extends TileEntityBarrel {
|
||||
}
|
||||
}
|
||||
|
||||
public void sendFluidToAll(FluidType type, TileEntity te) {
|
||||
protected DirPos[] conPos;
|
||||
|
||||
@Override
|
||||
protected DirPos[] getConPos() {
|
||||
|
||||
if(conPos != null)
|
||||
return conPos;
|
||||
|
||||
conPos = new DirPos[8];
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = -1; i < 6; i += 6) {
|
||||
ForgeDirection out = i == -1 ? ForgeDirection.DOWN : ForgeDirection.UP;
|
||||
sendFluid(type, worldObj, xCoord, yCoord + i, zCoord, out);
|
||||
sendFluid(type, worldObj, xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, out);
|
||||
sendFluid(type, worldObj, xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, out);
|
||||
sendFluid(type, worldObj, xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, out);
|
||||
int index = i == -1 ? 0 : 1;
|
||||
conPos[index + 0] = new DirPos(xCoord, yCoord + i, zCoord, out);
|
||||
conPos[index + 1] = new DirPos(xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, out);
|
||||
conPos[index + 2] = new DirPos(xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, out);
|
||||
conPos[index + 3] = new DirPos(xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, out);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = -1; i < 6; i += 6) {
|
||||
ForgeDirection out = i == -1 ? ForgeDirection.DOWN : ForgeDirection.UP;
|
||||
this.trySubscribe(type, world, xCoord, yCoord + i, zCoord, out);
|
||||
this.trySubscribe(type, world, xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ, out);
|
||||
this.trySubscribe(type, world, xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ, out);
|
||||
this.trySubscribe(type, world, xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ, out);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unsubscribeToAllAround(FluidType type, World world, int x, int y, int z) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
for(int i = -1; i < 7; i += 7) {
|
||||
this.tryUnsubscribe(type, world, xCoord, yCoord + i, zCoord);
|
||||
this.tryUnsubscribe(type, world, xCoord + dir.offsetX, yCoord + i, zCoord + dir.offsetZ);
|
||||
this.tryUnsubscribe(type, world, xCoord + rot.offsetX, yCoord + i, zCoord + rot.offsetZ);
|
||||
this.tryUnsubscribe(type, world, xCoord + dir.offsetX + rot.offsetX, yCoord + i, zCoord + dir.offsetZ + rot.offsetZ);
|
||||
}
|
||||
return conPos;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@ -4,12 +4,16 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
import com.hbm.inventory.fluid.trait.FT_Flammable;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Liquid;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -50,9 +54,14 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
||||
|
||||
ammoStacks = new ArrayList();
|
||||
|
||||
ammoStacks.add(new ItemStack(ModItems.fluid_icon, 1, Fluids.DIESEL.getID()));
|
||||
ammoStacks.add(new ItemStack(ModItems.ammo_fuel));
|
||||
|
||||
for(FluidType type : Fluids.getInNiceOrder()) {
|
||||
if(type.hasTrait(FT_Combustible.class) && type.hasTrait(FT_Liquid.class)) {
|
||||
ammoStacks.add(new ItemStack(ModItems.fluid_icon, 1, type.getID()));
|
||||
}
|
||||
}
|
||||
|
||||
return ammoStacks;
|
||||
}
|
||||
|
||||
@ -89,17 +98,24 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
||||
@Override
|
||||
public void updateFiringTick() {
|
||||
|
||||
if(this.tank.getTankType() == Fluids.DIESEL && this.tank.getFill() >= 10) {
|
||||
if(this.tank.getTankType().hasTrait(FT_Flammable.class) && this.tank.getTankType().hasTrait(FT_Liquid.class) && this.tank.getFill() >= 2) {
|
||||
|
||||
FT_Flammable trait = this.tank.getTankType().getTrait(FT_Flammable.class);
|
||||
BulletConfiguration conf = BulletConfigSyncingUtil.pullConfig(BulletConfigSyncingUtil.FLA_NORMAL);
|
||||
this.spawnBullet(conf);
|
||||
this.tank.setFill(this.tank.getFill() - 10);
|
||||
this.tank.setFill(this.tank.getFill() - 2);
|
||||
|
||||
Vec3 pos = this.getTurretPos();
|
||||
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
|
||||
vec.rotateAroundZ((float) -this.rotationPitch);
|
||||
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
|
||||
|
||||
EntityBulletBase proj = new EntityBulletBase(worldObj, BulletConfigSyncingUtil.getKey(conf));
|
||||
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, 0.0F, 0.0F);
|
||||
proj.overrideDamage = (float) (trait.getHeatEnergy() / 500_000F);
|
||||
|
||||
proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, conf.velocity, conf.spread);
|
||||
worldObj.spawnEntityInWorld(proj);
|
||||
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.flamethrowerShoot", 2F, 1F + worldObj.rand.nextFloat() * 0.5F);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@ -141,23 +157,23 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * 0, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * -1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * -2, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * -2, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * 1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 0, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * -1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * 0, ForgeDirection.SOUTH);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * -1, ForgeDirection.SOUTH);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * -2, ForgeDirection.WEST);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * -2, ForgeDirection.WEST);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * 1, ForgeDirection.EAST);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 1, ForgeDirection.EAST);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 0, ForgeDirection.NORTH);
|
||||
this.trySubscribe(worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * -1, ForgeDirection.NORTH);
|
||||
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * 0, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * -1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * -2, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * -2, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * 1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 0, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * -1, ForgeDirection.UNKNOWN);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * 0, ForgeDirection.SOUTH);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * -1 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * -1 + rot.offsetZ * -1, ForgeDirection.SOUTH);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * -2, ForgeDirection.WEST);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * -2, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * -2, ForgeDirection.WEST);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 0 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 0 + rot.offsetZ * 1, ForgeDirection.EAST);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 1 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 1, ForgeDirection.EAST);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 0, ForgeDirection.NORTH);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX * 2 + rot.offsetX * -1, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * -1, ForgeDirection.NORTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -306,6 +306,7 @@ container.gasFlare=Abfackelturm
|
||||
container.generator=Atomreaktor
|
||||
container.hadron=Teilchenbeschleuniger
|
||||
container.heaterFirebox=Feuerbüchse
|
||||
container.heaterHeatex=Wärmetauscher
|
||||
container.heaterOilburner=Brenner
|
||||
container.heaterOven=Heizofen
|
||||
container.iGenerator=Industrieller Generator
|
||||
@ -2394,6 +2395,10 @@ item.pipes_steel.name=Stahlrohre
|
||||
item.pirfenidone.name=Pirfenidon
|
||||
item.pipes_steel.desc=Auf Recycling-Rezepte wurden wegen$Steuerhinterziehung verzichtet.
|
||||
item.piston_selenium.name=Motorkolben
|
||||
item.piston_set_desh.name=Ottomotorenkolben (Desh)
|
||||
item.piston_set_dura.name=Ottomotorenkolben (Schnellarbeitsstahl)
|
||||
item.piston_set_starmetal.name=Ottomotorenkolben (Sternmetall)
|
||||
item.piston_set_steel.name=Ottomotorenkolben (Stahl)
|
||||
item.plan_c.name=Plan C
|
||||
item.plant_item.rope.name=Seil
|
||||
item.plant_item.tobacco.name=Tabak
|
||||
@ -3647,6 +3652,7 @@ tile.machine_chungus.desc=Effizienz: 85%%
|
||||
tile.machine_coal_off.name=Verbrennungsgenerator
|
||||
tile.machine_coal_on.name=Verbrennungsgenerator
|
||||
tile.machine_combine_factory.name=CMB-Stahl Hochofen
|
||||
tile.machine_combustion_engine.name=Industrieller Verbrennungsmotor
|
||||
tile.machine_condenser.name=Dampfkondensierer
|
||||
tile.machine_controller.name=Reaktorfernsteuerung
|
||||
tile.machine_converter_he_rf.name=HE zu RF Konverter
|
||||
|
||||
@ -584,6 +584,7 @@ container.gasFlare=Flare Stack
|
||||
container.generator=Nuclear Reactor
|
||||
container.hadron=Particle Accelerator
|
||||
container.heaterFirebox=Firebox
|
||||
container.heaterHeatex=Heat Exchanger
|
||||
container.heaterOilburner=Fluid Burner
|
||||
container.heaterOven=Heating Oven
|
||||
container.iGenerator=Industrial Generator
|
||||
@ -2821,6 +2822,10 @@ item.pipes_steel.name=Steel Pipes
|
||||
item.pipes_steel.desc=Uncrafting was omitted due to tax evasion.
|
||||
item.pirfenidone.name=Pirfenidone
|
||||
item.piston_selenium.name=Combustion Engine Piston
|
||||
item.piston_set_desh.name=Desh Piston Set
|
||||
item.piston_set_dura.name=High-Speed Steel Piston Set
|
||||
item.piston_set_starmetal.name=Starmetal Piston Set
|
||||
item.piston_set_steel.name=Steel Piston Set
|
||||
item.plan_c.name=Plan C
|
||||
item.plant_item.rope.name=Rope
|
||||
item.plant_item.tobacco.name=Tobacco
|
||||
@ -4175,6 +4180,7 @@ tile.machine_chungus.desc=Efficiency: 85%%
|
||||
tile.machine_coal_off.name=Combustion Generator
|
||||
tile.machine_coal_on.name=Combustion Generator
|
||||
tile.machine_combine_factory.name=CMB Steel Furnace
|
||||
tile.machine_combustion_engine.name=Industrial Combustion Engine
|
||||
tile.machine_condenser.name=Steam Condenser
|
||||
tile.machine_controller.name=Reactor Remote Control Block
|
||||
tile.machine_converter_he_rf.name=HE to RF Converter
|
||||
|
||||
3975
src/main/resources/assets/hbm/models/weapons/novac_scoped.obj
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/main/resources/assets/hbm/textures/items/piston_set.png
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
src/main/resources/assets/hbm/textures/items/piston_set_desh.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
src/main/resources/assets/hbm/textures/items/piston_set_dura.png
Normal file
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4431",
|
||||
"version":"1.0.27_X4438",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||