FUCKING BNUUY
@ -2123,7 +2123,7 @@ public class ModBlocks {
|
||||
machine_pumpjack = new MachinePumpjack().setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_pumpjack");
|
||||
machine_fracking_tower = new MachineFrackingTower().setBlockName("machine_fracking_tower").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
oil_pipe = new BlockNoDrop(Material.iron).setBlockName("oil_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":oil_pipe");
|
||||
machine_flare = new MachineGasFlare(Material.iron).setBlockName("machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_flare");
|
||||
machine_flare = new MachineGasFlare(Material.iron).setBlockName("machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_refinery = new MachineRefinery(Material.iron).setBlockName("machine_refinery").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_refinery");
|
||||
machine_fraction_tower = new MachineFractionTower(Material.iron).setBlockName("machine_fraction_tower").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
fraction_spacer = new FractionSpacer(Material.iron).setBlockName("fraction_spacer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3111,7 +3111,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_well, machine_well.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_pumpjack, machine_pumpjack.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_fracking_tower, machine_fracking_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_flare, machine_flare.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_flare, ItemBlockBase.class, machine_flare.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_refinery, machine_refinery.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_fraction_tower, machine_fraction_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
|
||||
|
||||
@ -7,8 +7,7 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticCracker;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -56,7 +55,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
|
||||
if(!world.isRemote && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -68,7 +67,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
return false;
|
||||
|
||||
TileEntityMachineCatalyticCracker cracker = (TileEntityMachineCatalyticCracker) te;
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
cracker.tanks[0].setTankType(type);
|
||||
cracker.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
@ -6,8 +6,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineFractionTower;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -55,7 +54,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
|
||||
if(!world.isRemote && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.fluid_identifier) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -71,7 +70,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
if(world.getTileEntity(pos[0], pos[1] - 3, pos[2]) instanceof TileEntityMachineFractionTower) {
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "You can only change the type in the bottom segment!"));
|
||||
} else {
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
@ -56,8 +56,12 @@ public class MachineGasFlare extends BlockDummyable implements ITooltipProvider
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + "Can burn or vent gasses");
|
||||
list.add(EnumChatFormatting.GOLD + "Burns up to " + EnumChatFormatting.RED + "10mB/t");
|
||||
list.add(EnumChatFormatting.GOLD + "Vents up to " + EnumChatFormatting.RED + "50mB/t");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: 50%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: " + EnumChatFormatting.RED + "50%");
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityMachineLiquefactor) { return new ContainerLiquefactor(player.inventory, (TileEntityMachineLiquefactor) entity); }
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new ContainerSolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new ContainerRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
if(entity instanceof TileEntityMachineAssemfac) { return new ContainerAssemfac(player.inventory, (TileEntityMachineAssemfac) entity); }
|
||||
if(entity instanceof TileEntityMachineChemfac) { return new ContainerChemfac(player.inventory, (TileEntityMachineChemfac) entity); }
|
||||
if(entity instanceof TileEntityElectrolyser) { return new ContainerElectrolyser(player.inventory, (TileEntityElectrolyser) entity); }
|
||||
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssemfac;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public class ContainerAssemfac extends Container {
|
||||
|
||||
private TileEntityMachineAssemfac assemfac;
|
||||
|
||||
public ContainerAssemfac(InventoryPlayer playerInv, TileEntityMachineAssemfac tile) {
|
||||
assemfac = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -13,6 +13,7 @@ import com.hbm.render.util.EnumSymbol;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FluidType {
|
||||
|
||||
@ -157,7 +158,11 @@ public class FluidType {
|
||||
* @param tank
|
||||
* @param overflowAmount
|
||||
*/
|
||||
public void onFluidRelease(TileEntity te, FluidTank tank, int overflowAmount) { }
|
||||
public void onFluidRelease(TileEntity te, FluidTank tank, int overflowAmount) {
|
||||
this.onFluidRelease(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, tank, overflowAmount);
|
||||
}
|
||||
|
||||
public void onFluidRelease(World world, int x, int y, int z, FluidTank tank, int overflowAmount) { }
|
||||
//public void onFluidTransmit(FluidNetwork net) { }
|
||||
|
||||
public void addInfo(List<String> info) {
|
||||
|
||||
@ -155,8 +155,8 @@ public class Fluids {
|
||||
BALEFIRE = new FluidType( "BALEFIRE", 0x28e02e, 4, 4, 3, EnumSymbol.RADIATION).setTemp(1500).addTraits(FluidTrait.CORROSIVE);
|
||||
MERCURY = new FluidType( "MERCURY", 0x808080, 2, 0, 0, EnumSymbol.NONE);
|
||||
PAIN = new FluidType( "PAIN", 0x938541, 2, 0, 1, EnumSymbol.ACID).setTemp(300).addTraits(FluidTrait.CORROSIVE);
|
||||
WASTEFLUID = new RadioactiveLiquid( "WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).addTraits(FluidTrait.NO_CONTAINER);
|
||||
WASTEGAS = new RadioactiveGas( "WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).addTraits(FluidTrait.NO_CONTAINER);
|
||||
WASTEFLUID = new RadioactiveLiquid( "WASTEFLUID", 0x544400, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
||||
WASTEGAS = new RadioactiveGas( "WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).setRadiation(0.5F).addTraits(FluidTrait.NO_CONTAINER);
|
||||
GASOLINE = new Fuel( "GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 1_000_000).setHeatEnergy(400_000).addContainers(0x2F7747, ExtContainer.CANISTER);
|
||||
COALGAS = new Fuel( "COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.MEDIUM, 150_000).setHeatEnergy(75_000);
|
||||
SPENTSTEAM = new Gas( "SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).addTraits(FluidTrait.NO_CONTAINER).setCompression(1D);
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
package com.hbm.inventory.fluid.types;
|
||||
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RadioactiveFluid extends FluidType {
|
||||
|
||||
float radPerMB = 0;
|
||||
|
||||
public RadioactiveFluid(String name, int color, int p, int f, int r, EnumSymbol symbol) {
|
||||
super(name, color, p, f, r, symbol);
|
||||
}
|
||||
|
||||
public RadioactiveFluid setRadiation(float rad) {
|
||||
this.radPerMB = rad;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFluidRelease(World world, int x, int y, int z, FluidTank tank, int overflowAmount) {
|
||||
ChunkRadiationManager.proxy.incrementRad(world, x, y, z, overflowAmount * radPerMB);
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,8 @@
|
||||
package com.hbm.inventory.fluid.types;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
|
||||
public class RadioactiveGas extends FluidType {
|
||||
public class RadioactiveGas extends RadioactiveFluid {
|
||||
|
||||
public RadioactiveGas(String name, int color, int p, int f, int r, EnumSymbol symbol) {
|
||||
super(name, color, p, f, r, symbol);
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package com.hbm.inventory.fluid.types;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
|
||||
public class RadioactiveLiquid extends FluidType {
|
||||
public class RadioactiveLiquid extends RadioactiveFluid {
|
||||
|
||||
public RadioactiveLiquid(String name, int color, int p, int f, int r, EnumSymbol symbol) {
|
||||
super(name, color, p, f, r, symbol);
|
||||
|
||||
@ -80,7 +80,7 @@ public class GUIMachineGasFlare extends GuiInfoContainer {
|
||||
if(flare.isOn) drawTexturedModalRect(guiLeft + 79, guiTop + 20, 176, 0, 35, 10);
|
||||
if(flare.doesBurn) drawTexturedModalRect(guiLeft + 79, guiTop + 54, 176, 10, 35, 14);
|
||||
|
||||
if(flare.isOn && flare.doesBurn && flare.tank.getTankType().traits.contains(FluidTrait.GASEOUS) && flare.tank.getTankType() instanceof FluidTypeFlammable)
|
||||
if(flare.isOn && flare.doesBurn && flare.tank.getFill() > 0 && flare.tank.getTankType().traits.contains(FluidTrait.GASEOUS) && flare.tank.getTankType() instanceof FluidTypeFlammable)
|
||||
drawTexturedModalRect(guiLeft + 88, guiTop + 34, 176, 24, 18, 18);
|
||||
|
||||
flare.tank.renderTank(guiLeft + 35, guiTop + 69, this.zLevel, 16, 52);
|
||||
|
||||
@ -265,7 +265,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(COAL.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(CU.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new ComparableStack(ModItems.powder_plutonium, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.thermo_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 2), new OreDictStack(IRON.plate(), 1), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModItems.wire_aluminium, 2), new OreDictStack(NETHERQUARTZ.dust(), 2), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.thermo_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 1), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModItems.wire_aluminium, 2), new OreDictStack(NETHERQUARTZ.dust(), 2), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.limiter, 1), new AStack[] {new OreDictStack(STEEL.plate(), 3), new OreDictStack(IRON.plate(), 1), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.wire_copper, 4), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.plate_dalekanium, 1), new AStack[] {new ComparableStack(ModBlocks.block_meteor, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModBlocks.block_meteor, 1), new AStack[] {new ComparableStack(ModItems.fragment_meteorite, 100), },500);
|
||||
@ -286,7 +286,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_red_copper, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2), new ComparableStack(ModBlocks.red_wire_coated, 1), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModBlocks.steel_beam, 8), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 3), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.wire_red_copper, 6), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.block(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.ingot(), 24), new OreDictStack(STEEL.plate(), 16), new OreDictStack(AL.plate(), 6), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.wire_red_copper, 8), },400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 28), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.thermo_element, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.tank_steel, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 8), new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(ModItems.thermo_element, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 16), new OreDictStack(STEEL.plate(), 20), new OreDictStack(CU.plate(), 16), new ComparableStack(ModItems.hull_big_steel, 6), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.coil_tungsten, 8), new ComparableStack(ModItems.wire_red_copper, 8), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },350);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.bolt_tungsten, 4), new ComparableStack(ModItems.coil_copper, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.canister_full, 1, Fluids.LUBRICANT.getID()), },160);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(CU.plate(), 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },200);
|
||||
|
||||
@ -4980,13 +4980,12 @@ public class ModItems {
|
||||
|
||||
ArmorMaterial aMatDiesel = EnumHelper.addArmorMaterial("HBM_BNUUY", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatDiesel.customCraftingMaterial = ModItems.plate_copper;
|
||||
dieselsuit_helmet = new ArmorDiesel(aMatDiesel, 2, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.DIESEL, 360000, 500, 50, 1).setThreshold(5F).setMod(0.8F)
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.digSpeed.id, 20, 4))
|
||||
.setBlastProtection(0.5F)
|
||||
.addResistance("monoxide", 0F)
|
||||
dieselsuit_helmet = new ArmorDiesel(aMatDiesel, 2, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.DIESEL, 360000, 500, 50, 1).setThreshold(2F).setMod(0.7F)
|
||||
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 2))
|
||||
.addEffect(new PotionEffect(Potion.jump.id, 20, 2))
|
||||
.enableThermalSight(true)
|
||||
.enableVATS(true)
|
||||
.addResistance("fall", 0)
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("dieselsuit_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_helmet");
|
||||
dieselsuit_plate = new ArmorDiesel(aMatDiesel, 2, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", Fluids.DIESEL, 360000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_plate");
|
||||
dieselsuit_legs = new ArmorDiesel(aMatDiesel, 2, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", Fluids.DIESEL, 360000, 500, 50, 1).cloneStats((ArmorFSB) dieselsuit_helmet).setUnlocalizedName("dieselsuit_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":dieselsuit_legs");
|
||||
@ -7916,6 +7915,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(steamsuit_plate, steamsuit_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(steamsuit_legs, steamsuit_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(steamsuit_boots, steamsuit_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_helmet, dieselsuit_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_plate, dieselsuit_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_legs, dieselsuit_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dieselsuit_boots, dieselsuit_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_helmet, t45_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_plate, t45_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(t45_legs, t45_legs.getUnlocalizedName());
|
||||
|
||||
@ -24,29 +24,29 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ArmorAsbestos extends ItemArmor implements ISpecialArmor {
|
||||
|
||||
|
||||
private ResourceLocation asbestosBlur = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_asbestos.png");
|
||||
|
||||
|
||||
public ArmorAsbestos(ArmorMaterial armorMaterial, int renderIndex, int armorType) {
|
||||
super(armorMaterial, renderIndex, armorType);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
if(stack.getItem().equals(ModItems.asbestos_helmet) || stack.getItem().equals(ModItems.asbestos_plate) || stack.getItem().equals(ModItems.asbestos_boots)) {
|
||||
return (RefStrings.MODID + ":textures/armor/asbestos_1.png");
|
||||
return(RefStrings.MODID + ":textures/armor/asbestos_1.png");
|
||||
}
|
||||
if(stack.getItem().equals(ModItems.asbestos_legs)) {
|
||||
return (RefStrings.MODID + ":textures/armor/asbestos_2.png");
|
||||
return(RefStrings.MODID + ":textures/armor/asbestos_2.png");
|
||||
}
|
||||
|
||||
else return null;
|
||||
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
|
||||
if(source.isFireDamage())
|
||||
{
|
||||
if(source.isFireDamage()) {
|
||||
return new ArmorProperties(1, 1, MathHelper.floor_double(999999999));
|
||||
}
|
||||
return new ArmorProperties(0, 0, 0);
|
||||
@ -54,20 +54,16 @@ public class ArmorAsbestos extends ItemArmor implements ISpecialArmor {
|
||||
|
||||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
|
||||
if(slot == 0)
|
||||
{
|
||||
if(slot == 0) {
|
||||
return 3;
|
||||
}
|
||||
if(slot == 1)
|
||||
{
|
||||
if(slot == 1) {
|
||||
return 8;
|
||||
}
|
||||
if(slot == 2)
|
||||
{
|
||||
if(slot == 2) {
|
||||
return 6;
|
||||
}
|
||||
if(slot == 3)
|
||||
{
|
||||
if(slot == 3) {
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
@ -76,39 +72,39 @@ public class ArmorAsbestos extends ItemArmor implements ISpecialArmor {
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
|
||||
stack.damageItem(damage * 1, entity);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack armor) {
|
||||
|
||||
player.extinguish();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY){
|
||||
|
||||
if(this != ModItems.asbestos_helmet)
|
||||
return;
|
||||
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(asbestosBlur);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, (double)resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double)resolution.getScaledWidth(), (double)resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double)resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
player.extinguish();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY) {
|
||||
|
||||
if(this != ModItems.asbestos_helmet)
|
||||
return;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(asbestosBlur);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, (double) resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), (double) resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,15 +4,22 @@ import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.render.model.ModelArmorDesh;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.render.model.ModelArmorDiesel;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ArmorDiesel extends ArmorFSBFueled {
|
||||
|
||||
@ -29,19 +36,31 @@ public class ArmorDiesel extends ArmorFSBFueled {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelArmorDesh[] models;
|
||||
ModelArmorDiesel[] models;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if(models == null) {
|
||||
models = new ModelArmorDesh[4];
|
||||
models = new ModelArmorDiesel[4];
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
models[i] = new ModelArmorDesh(i);
|
||||
models[i] = new ModelArmorDiesel(i);
|
||||
}
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
super.onArmorTick(world, player, stack);
|
||||
|
||||
if(this == ModItems.dieselsuit_legs && this.hasFSBArmor(player) && world.getTotalWorldTime() % 3 == 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "bnuuy");
|
||||
data.setInteger("player", player.getEntityId());
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, player.posX, player.posY, player.posZ), new TargetPoint(world.provider.dimensionId, player.posX, player.posY, player.posZ, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -614,6 +614,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
if(overlay == null)
|
||||
return;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
|
||||
@ -123,7 +123,8 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||
return;
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(tex);
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
|
||||
@ -30,101 +30,101 @@ public class ArmorHEV extends ArmorFSBPowered {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
|
||||
if(models == null) {
|
||||
models = new ModelArmorHEV[4];
|
||||
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
models[i] = new ModelArmorHEV(i);
|
||||
}
|
||||
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void handleOverlay(RenderGameOverlayEvent.Pre event, EntityPlayer player) {
|
||||
|
||||
if(this.hasFSBArmorIgnoreCharge(player)) {
|
||||
|
||||
if(event.type == ElementType.ARMOR) {
|
||||
event.setCanceled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(event.type == ElementType.HEALTH) {
|
||||
event.setCanceled(true);
|
||||
renderOverlay(event, player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(this.hasFSBArmorIgnoreCharge(player)) {
|
||||
|
||||
if(event.type == ElementType.ARMOR) {
|
||||
event.setCanceled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(event.type == ElementType.HEALTH) {
|
||||
event.setCanceled(true);
|
||||
renderOverlay(event, player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static long lastSurvey;
|
||||
private static float prevResult;
|
||||
private static float lastResult;
|
||||
|
||||
private void renderOverlay(RenderGameOverlayEvent.Pre event, EntityPlayer player) {
|
||||
|
||||
|
||||
private void renderOverlay(RenderGameOverlayEvent.Pre event, EntityPlayer player) {
|
||||
|
||||
float in = HbmLivingProps.getRadiation(player);
|
||||
|
||||
float radiation = 0;
|
||||
|
||||
radiation = lastResult - prevResult;
|
||||
|
||||
if(System.currentTimeMillis() >= lastSurvey + 1000) {
|
||||
lastSurvey = System.currentTimeMillis();
|
||||
prevResult = lastResult;
|
||||
lastResult = in;
|
||||
}
|
||||
|
||||
float radiation = 0;
|
||||
|
||||
radiation = lastResult - prevResult;
|
||||
|
||||
if(System.currentTimeMillis() >= lastSurvey + 1000) {
|
||||
lastSurvey = System.currentTimeMillis();
|
||||
prevResult = lastResult;
|
||||
lastResult = in;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
ScaledResolution res = event.resolution;
|
||||
|
||||
double scale = 2D;
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
int hX = (int)(8 / scale);
|
||||
int hY = (int)((res.getScaledHeight() - 18 - 2) / scale);
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
ScaledResolution res = event.resolution;
|
||||
|
||||
double scale = 2D;
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
int hX = (int) (8 / scale);
|
||||
int hY = (int) ((res.getScaledHeight() - 18 - 2) / scale);
|
||||
|
||||
int healthColor = player.getHealth() * 5 > 15 ? 0xff8000 : 0xff0000;
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("+" + (int)(player.getHealth() * 5), hX, hY, healthColor);
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("+" + (int) (player.getHealth() * 5), hX, hY, healthColor);
|
||||
|
||||
double c = 0D;
|
||||
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
|
||||
|
||||
ItemStack armor = player.inventory.armorInventory[i];
|
||||
ArmorFSBPowered item = ((ArmorFSBPowered)player.inventory.armorInventory[i].getItem());
|
||||
|
||||
c += (double)item.getCharge(armor) / (double)item.getMaxCharge();
|
||||
ArmorFSBPowered item = ((ArmorFSBPowered) player.inventory.armorInventory[i].getItem());
|
||||
|
||||
c += (double) item.getCharge(armor) / (double) item.getMaxCharge();
|
||||
}
|
||||
|
||||
int aX = (int)(70 / scale);
|
||||
int aY = (int)((res.getScaledHeight() - 18 - 2) / scale);
|
||||
|
||||
|
||||
int aX = (int) (70 / scale);
|
||||
int aY = (int) ((res.getScaledHeight() - 18 - 2) / scale);
|
||||
|
||||
int armorColor = c * 25 > 15 ? 0xff8000 : 0xff0000;
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("||" + (int)(c * 25), aX, aY, armorColor);
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("||" + (int) (c * 25), aX, aY, armorColor);
|
||||
|
||||
String rad = "☢ [";
|
||||
|
||||
|
||||
for(int i = 0; i < 10; i++) {
|
||||
|
||||
|
||||
if(in / 100 > i) {
|
||||
|
||||
int mid = (int)(in - i * 100);
|
||||
|
||||
|
||||
int mid = (int) (in - i * 100);
|
||||
|
||||
if(mid < 33)
|
||||
rad += "..";
|
||||
else if(mid < 67)
|
||||
@ -135,43 +135,43 @@ public class ArmorHEV extends ArmorFSBPowered {
|
||||
rad += " ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rad += "]";
|
||||
|
||||
int rX = (int)(8 / scale);
|
||||
int rY = (int)((res.getScaledHeight() - 40) / scale);
|
||||
|
||||
|
||||
int rX = (int) (8 / scale);
|
||||
int rY = (int) ((res.getScaledHeight() - 40) / scale);
|
||||
|
||||
int radColor = in < 800 ? 0xff8000 : 0xff0000;
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(rad, rX, rY, radColor);
|
||||
|
||||
GL11.glScaled(1/scale, 1/scale, 1/scale);
|
||||
|
||||
scale = 1D;
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
if(radiation > 0) {
|
||||
|
||||
int dX = (int)(32 / scale);
|
||||
int dY = (int)((res.getScaledHeight() - 55) / scale);
|
||||
|
||||
|
||||
GL11.glScaled(1 / scale, 1 / scale, 1 / scale);
|
||||
|
||||
scale = 1D;
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
if(radiation > 0) {
|
||||
|
||||
int dX = (int) (32 / scale);
|
||||
int dY = (int) ((res.getScaledHeight() - 55) / scale);
|
||||
|
||||
String delta = "" + Math.round(radiation);
|
||||
|
||||
|
||||
if(radiation > 1000)
|
||||
delta = ">1000";
|
||||
else if(radiation < 1)
|
||||
delta = "<1";
|
||||
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(delta + " RAD/s", dX, dY, 0xFF0000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ public class ArmorHazmat extends ArmorFSB {
|
||||
if(this != ModItems.hazmat_helmet && this != ModItems.hazmat_paa_helmet)
|
||||
return;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
|
||||
@ -60,6 +60,7 @@ public class ArmorLiquidator extends ArmorFSB {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY) {
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
|
||||
@ -28,9 +28,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Spaghetti("more ctor stuff, less if/else bullshittery")
|
||||
//turns out you can't actually pass a model in the ctor because ModelBiped is clientonly...
|
||||
// turns out you can't actually pass a model in the ctor because ModelBiped is
|
||||
// clientonly...
|
||||
public class ArmorModel extends ItemArmor {
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelGoggles modelGoggles;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -56,33 +57,33 @@ public class ArmorModel extends ItemArmor {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if (this == ModItems.goggles) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.modelGoggles == null) {
|
||||
if(this == ModItems.goggles) {
|
||||
if(armorSlot == 0) {
|
||||
if(this.modelGoggles == null) {
|
||||
this.modelGoggles = new ModelGoggles();
|
||||
}
|
||||
return this.modelGoggles;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.oxy_mask) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.modelOxy == null) {
|
||||
if(this == ModItems.oxy_mask) {
|
||||
if(armorSlot == 0) {
|
||||
if(this.modelOxy == null) {
|
||||
this.modelOxy = new ModelOxygenMask();
|
||||
}
|
||||
return this.modelOxy;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.hat) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.modelHat == null) {
|
||||
if(this == ModItems.hat) {
|
||||
if(armorSlot == 0) {
|
||||
if(this.modelHat == null) {
|
||||
this.modelHat = new ModelHat(0);
|
||||
}
|
||||
return this.modelHat;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.cape_test || this == ModItems.cape_radiation || this == ModItems.cape_gasmask || this == ModItems.cape_schrabidium || this == ModItems.cape_hidden) {
|
||||
if (armorSlot == 1) {
|
||||
if (this.modelCloak == null) {
|
||||
if(this == ModItems.cape_test || this == ModItems.cape_radiation || this == ModItems.cape_gasmask || this == ModItems.cape_schrabidium || this == ModItems.cape_hidden) {
|
||||
if(armorSlot == 1) {
|
||||
if(this.modelCloak == null) {
|
||||
this.modelCloak = new ModelCloak();
|
||||
}
|
||||
return this.modelCloak;
|
||||
@ -93,42 +94,43 @@ public class ArmorModel extends ItemArmor {
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
if (stack.getItem() == ModItems.goggles) {
|
||||
if(stack.getItem() == ModItems.goggles) {
|
||||
return "hbm:textures/models/Goggles.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.oxy_mask) {
|
||||
if(stack.getItem() == ModItems.oxy_mask) {
|
||||
return null;
|
||||
}
|
||||
if (stack.getItem() == ModItems.cape_test) {
|
||||
if(stack.getItem() == ModItems.cape_test) {
|
||||
return "hbm:textures/models/TestCape.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.cape_radiation) {
|
||||
if(stack.getItem() == ModItems.cape_radiation) {
|
||||
return "hbm:textures/models/capes/CapeRadiation.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.cape_gasmask) {
|
||||
if(stack.getItem() == ModItems.cape_gasmask) {
|
||||
return "hbm:textures/models/capes/CapeGasMask.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.cape_schrabidium) {
|
||||
if(stack.getItem() == ModItems.cape_schrabidium) {
|
||||
return "hbm:textures/models/capes/CapeSchrabidium.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.cape_hidden) {
|
||||
if(stack.getItem() == ModItems.cape_hidden) {
|
||||
return "hbm:textures/models/capes/CapeHidden.png";
|
||||
}
|
||||
|
||||
|
||||
return "hbm:textures/models/capes/CapeUnknown.png";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY){
|
||||
|
||||
if(this != ModItems.goggles && this != ModItems.hazmat_helmet_red && this != ModItems.hazmat_helmet_grey)
|
||||
return;
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY) {
|
||||
|
||||
if(this != ModItems.goggles && this != ModItems.hazmat_helmet_red && this != ModItems.hazmat_helmet_grey)
|
||||
return;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
switch((int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D)) {
|
||||
case 0:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur0);
|
||||
@ -152,19 +154,19 @@ public class ArmorModel extends ItemArmor {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5);
|
||||
break;
|
||||
}
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, (double)resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double)resolution.getScaledWidth(), (double)resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double)resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(0.0D, (double) resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), (double) resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
|
||||
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
@ -1106,8 +1106,18 @@ public class ClientProxy extends ServerProxy {
|
||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
||||
}
|
||||
|
||||
if(fx != null)
|
||||
if(fx != null) {
|
||||
|
||||
if(data.getBoolean("noclip")) {
|
||||
fx.noClip = true;
|
||||
}
|
||||
|
||||
if(data.getInteger("overrideAge") > 0) {
|
||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, data.getInteger("overrideAge"), "particleMaxAge", "field_70547_e");
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
|
||||
if("vanilla".equals(type)) {
|
||||
@ -1199,6 +1209,47 @@ public class ClientProxy extends ServerProxy {
|
||||
}
|
||||
}
|
||||
|
||||
if("bnuuy".equals(type)) {
|
||||
|
||||
if(particleSetting == 2)
|
||||
return;
|
||||
|
||||
Entity ent = world.getEntityByID(data.getInteger("player"));
|
||||
|
||||
if(ent instanceof EntityPlayer) {
|
||||
|
||||
EntityPlayer p = (EntityPlayer)ent;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(0, 0, -0.6);
|
||||
Vec3 offset = Vec3.createVectorHelper(0.275, 0, 0);
|
||||
float angle = (float) -Math.toRadians(p.rotationYawHead - (p.rotationYawHead - p.renderYawOffset));
|
||||
|
||||
vec.rotateAroundY(angle);
|
||||
offset.rotateAroundY(angle);
|
||||
|
||||
double ix = p.posX + vec.xCoord;
|
||||
double iy = p.posY + p.eyeHeight - 1 + 0.4;
|
||||
double iz = p.posZ + vec.zCoord;
|
||||
double ox = offset.xCoord;
|
||||
double oz = offset.zCoord;
|
||||
|
||||
vec = vec.normalize();
|
||||
double mult = 0.025D;
|
||||
double mX = vec.xCoord * mult;
|
||||
double mZ = vec.zCoord * mult;
|
||||
|
||||
//Minecraft.getMinecraft().effectRenderer.addEffect(new EntityFlameFX(world, ix + ox, iy, iz + oz, 0, 0, 0));
|
||||
//Minecraft.getMinecraft().effectRenderer.addEffect(new EntityFlameFX(world, ix - ox, iy, iz - oz, 0, 0, 0));
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
net.minecraft.client.particle.EntitySmokeFX fx = new net.minecraft.client.particle.EntitySmokeFX(world, ix + ox * (i == 0 ? -1 : 1), iy, iz + oz * (i == 0 ? -1 : 1), mX, 0, mZ);
|
||||
float scale = 0.5F;
|
||||
ReflectionHelper.setPrivateValue(net.minecraft.client.particle.EntitySmokeFX.class, (net.minecraft.client.particle.EntitySmokeFX)fx, scale, "smokeParticleScale", "field_70587_a");
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if("jetpack_bj".equals(type)) {
|
||||
|
||||
if(particleSetting == 2)
|
||||
|
||||
@ -661,6 +661,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom armor_fau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/fau.obj"));
|
||||
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj"));
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj"));
|
||||
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj"));
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj"));
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj"));
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj"));
|
||||
@ -778,6 +779,11 @@ public class ResourceManager {
|
||||
public static final ResourceLocation steamsuit_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/steamsuit_chest.png");
|
||||
public static final ResourceLocation steamsuit_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/steamsuit_arm.png");
|
||||
|
||||
public static final ResourceLocation dieselsuit_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/bnuuy_helmet.png");
|
||||
public static final ResourceLocation dieselsuit_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/bnuuy_leg.png");
|
||||
public static final ResourceLocation dieselsuit_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/bnuuy_chest.png");
|
||||
public static final ResourceLocation dieselsuit_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/bnuuy_arm.png");
|
||||
|
||||
public static final ResourceLocation rpa_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_helmet.png");
|
||||
public static final ResourceLocation rpa_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_leg.png");
|
||||
public static final ResourceLocation rpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_chest.png");
|
||||
|
||||
58
src/main/java/com/hbm/render/model/ModelArmorDiesel.java
Normal file
@ -0,0 +1,58 @@
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.loader.ModelRendererObj;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelArmorDiesel extends ModelArmorBase {
|
||||
|
||||
public ModelArmorDiesel(int type) {
|
||||
super(type);
|
||||
|
||||
head = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Head");
|
||||
body = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Body");
|
||||
leftArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
rightArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
leftLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
rightLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
leftFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
rightFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
if(type == 0) {
|
||||
bindTexture(ResourceManager.dieselsuit_helmet);
|
||||
head.render(par7);
|
||||
}
|
||||
if(type == 1) {
|
||||
bindTexture(ResourceManager.dieselsuit_chest);
|
||||
body.render(par7);
|
||||
bindTexture(ResourceManager.dieselsuit_arm);
|
||||
leftArm.render(par7);
|
||||
rightArm.render(par7);
|
||||
}
|
||||
if(type == 2) {
|
||||
bindTexture(ResourceManager.dieselsuit_leg);
|
||||
leftLeg.render(par7);
|
||||
rightLeg.render(par7);
|
||||
}
|
||||
if(type == 3) {
|
||||
bindTexture(ResourceManager.dieselsuit_leg);
|
||||
leftFoot.render(par7);
|
||||
rightFoot.render(par7);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -81,14 +81,16 @@ public class RenderInfoSystem {
|
||||
int height = messages.size() * 10 + pZ + 2;
|
||||
int z = 0;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(0.5F, 0.5F, 0.5F, 0.5F);
|
||||
tess.setColorRGBA_F(0.25F, 0.25F, 0.25F, 0.5F);
|
||||
tess.addVertex(pX - 5, pZ - 5, z);
|
||||
tess.addVertex(pX - 5, height, z);
|
||||
tess.addVertex(side, height, z);
|
||||
tess.addVertex(side, pZ - 5, z);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
int off = 0;
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
@ -59,4 +59,8 @@ public class AudioDynamic extends MovingSound {
|
||||
public float func(float f, float v) {
|
||||
return (f / v) * -2 + 2;
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
return Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,5 +17,6 @@ public class AudioWrapper {
|
||||
public void startSound() { }
|
||||
|
||||
public void stopSound() { }
|
||||
|
||||
|
||||
public boolean isPlaying() { return false; }
|
||||
}
|
||||
|
||||
@ -14,41 +14,52 @@ public class AudioWrapperClient extends AudioWrapper {
|
||||
sound = new AudioDynamic(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePosition(float x, float y, float z) {
|
||||
if(sound != null)
|
||||
sound.setPosition(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateVolume(float volume) {
|
||||
if(sound != null)
|
||||
sound.setVolume(volume);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updatePitch(float pitch) {
|
||||
if(sound != null)
|
||||
sound.setPitch(pitch);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getVolume() {
|
||||
if(sound != null)
|
||||
return sound.getVolume();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getPitch() {
|
||||
if(sound != null)
|
||||
return sound.getPitch();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void startSound() {
|
||||
if(sound != null)
|
||||
sound.start();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopSound() {
|
||||
if(sound != null)
|
||||
sound.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlaying() {
|
||||
return sound.isPlaying();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -216,4 +217,13 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
|
||||
return Math.max(volume, 0);
|
||||
}
|
||||
|
||||
public AudioWrapper createAudioLoop() { return null; }
|
||||
|
||||
public AudioWrapper rebootAudio(AudioWrapper wrapper) {
|
||||
wrapper.stopSound();
|
||||
AudioWrapper audio = createAudioLoop();
|
||||
audio.startSound();
|
||||
return audio;
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,8 +40,9 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
||||
if(age >= 2) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
|
||||
this.tanks[0].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
this.tanks[1].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
int convert = Math.min(tanks[0].getFill(), tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
tanks[0].setFill(tanks[0].getFill() - convert);
|
||||
|
||||
@ -170,8 +170,10 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB
|
||||
if(process > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:weapon.tauChargeLoop", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
audio = createAudioLoop();
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -183,6 +185,10 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB
|
||||
}
|
||||
}
|
||||
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:weapon.tauChargeLoop", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -124,7 +123,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
||||
|
||||
if(overflow > 0) {
|
||||
this.tanks[i].setFill(this.tanks[i].getFill() - overflow);
|
||||
ChunkRadiationManager.proxy.incrementRad(worldObj, xCoord, yCoord, zCoord, overflow * 0.5F);
|
||||
this.tanks[i].getTankType().onFluidRelease(this, this.tanks[i], overflow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -49,6 +49,8 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
super.readFromNBT(nbt);
|
||||
this.power = nbt.getLong("powerTime");
|
||||
tank.readFromNBT(nbt, "gas");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
doesBurn = nbt.getBoolean("doesBurn");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -56,6 +58,8 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("powerTime", power);
|
||||
tank.writeToNBT(nbt, "gas");
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
nbt.setBoolean("doesBurn", doesBurn);
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
@ -93,12 +97,15 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
tank.loadTank(1, 2, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
int maxVent = 50;
|
||||
int maxBurn = 10;
|
||||
|
||||
if(isOn && tank.getFill() > 0) {
|
||||
|
||||
if(!doesBurn || !(tank.getTankType() instanceof FluidTypeFlammable)) {
|
||||
|
||||
if(tank.getTankType().traits.contains(FluidTrait.GASEOUS)) {
|
||||
int eject = Math.min(10, tank.getFill());
|
||||
int eject = Math.min(maxVent, tank.getFill());
|
||||
tank.setFill(tank.getFill() - eject);
|
||||
tank.getTankType().onFluidRelease(this, tank, eject);
|
||||
|
||||
@ -108,7 +115,7 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
} else {
|
||||
|
||||
if(tank.getTankType().traits.contains(FluidTrait.GASEOUS) && tank.getTankType() instanceof FluidTypeFlammable) {
|
||||
int eject = Math.min(10, tank.getFill());
|
||||
int eject = Math.min(maxBurn, tank.getFill());
|
||||
tank.setFill(tank.getFill() - eject);
|
||||
power += ((FluidTypeFlammable) tank.getTankType()).getHeatEnergy() * eject / 2_000; // divided by 1000 per mB and 2 for the 50% penalty
|
||||
|
||||
@ -140,26 +147,45 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
|
||||
} else {
|
||||
|
||||
if(isOn && tank.getFill() > 0) {
|
||||
if(isOn && tank.getFill() > 0 && tank.getTankType().traits.contains(FluidTrait.GASEOUS)) {
|
||||
|
||||
if(!doesBurn || !(tank.getTankType() instanceof FluidTypeFlammable)) {
|
||||
|
||||
if(tank.getTankType().traits.contains(FluidTrait.GASEOUS)) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tower");
|
||||
data.setFloat("lift", 1F);
|
||||
data.setFloat("base", 0.25F);
|
||||
data.setFloat("max", 3F);
|
||||
data.setInteger("life", 150 + worldObj.rand.nextInt(20));
|
||||
data.setInteger("color", tank.getTankType().getColor());
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tower");
|
||||
data.setFloat("lift", 1F);
|
||||
data.setFloat("base", 0.25F);
|
||||
data.setFloat("max", 3F);
|
||||
data.setInteger("life", 150 + worldObj.rand.nextInt(20));
|
||||
data.setInteger("color", tank.getTankType().getColor());
|
||||
|
||||
data.setDouble("posX", xCoord + 0.5);
|
||||
data.setDouble("posZ", zCoord + 0.5);
|
||||
data.setDouble("posY", yCoord + 11);
|
||||
data.setDouble("posX", xCoord + 0.5);
|
||||
data.setDouble("posZ", zCoord + 0.5);
|
||||
data.setDouble("posY", yCoord + 11);
|
||||
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
|
||||
}
|
||||
|
||||
if(doesBurn && tank.getTankType() instanceof FluidTypeFlammable && MainRegistry.proxy.me().getDistanceSq(xCoord, yCoord + 10, zCoord) <= 1024) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", "smoke");
|
||||
data.setBoolean("noclip", true);
|
||||
data.setInteger("overrideAge", 50);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 2 == 0) {
|
||||
data.setDouble("posX", xCoord + 1.5);
|
||||
data.setDouble("posZ", zCoord + 1.5);
|
||||
data.setDouble("posY", yCoord + 10.75);
|
||||
} else {
|
||||
data.setDouble("posX", xCoord + 1.125);
|
||||
data.setDouble("posZ", zCoord - 0.5);
|
||||
data.setDouble("posY", yCoord + 11.75);
|
||||
}
|
||||
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1282,6 +1282,10 @@ item.detonator_laser.name=Laserzünder
|
||||
item.detonator_multi.name=Mehrfach-Fernzünder
|
||||
item.deuterium_filter.name=Deuteriumfilter
|
||||
item.diamond_gavel.name=Diamantener Richterhammer
|
||||
item.dieselsuit_boots.name=Dieselgetriebene High Heels
|
||||
item.dieselsuit_helmet.name=Dieselgetriebene Umgebungssensoren
|
||||
item.dieselsuit_legs.name=Dieselgetriebene Beinservos
|
||||
item.dieselsuit_plate.name=Dieselgetriebene Kybernetik
|
||||
item.digamma_diagnostic.name=Digamma-Diagnosegerät
|
||||
item.dns_boots.name=DNT-Nanoanzug Stiefel
|
||||
item.dns_legs.name=DNT-Nanoanzug Beinschützer
|
||||
|
||||
@ -1506,6 +1506,10 @@ item.detonator_laser.name=Laser Detonator
|
||||
item.detonator_multi.name=Multi Detonator
|
||||
item.deuterium_filter.name=Deuterium Filter
|
||||
item.diamond_gavel.name=Diamond Gavel
|
||||
item.dieselsuit_boots.name=Diesel-Powered High Heels
|
||||
item.dieselsuit_helmet.name=Diesel-Powered Head-Mounted Environmental Sensor
|
||||
item.dieselsuit_legs.name=Diesel-Powered Leg Servos
|
||||
item.dieselsuit_plate.name=Diesel-Powered Cybernetics
|
||||
item.digamma_diagnostic.name=Digamma Diagnostic
|
||||
item.dns_boots.name=DNT Nano Suit Boots
|
||||
item.dns_legs.name=DNT Nano Suit Leggings
|
||||
|
||||
4153
src/main/resources/assets/hbm/models/armor/bnuuy.obj
Normal file
BIN
src/main/resources/assets/hbm/textures/armor/bnuuy_arm.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/bnuuy_chest.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/bnuuy_helmet.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/bnuuy_leg.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 380 B |
BIN
src/main/resources/assets/hbm/textures/items/dieselsuit_legs.png
Normal file
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |