mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
buffed combustion engines and geothermal w/ lava, more slime w/ beheader
This commit is contained in:
parent
816db93991
commit
bc3fd09b44
@ -19,7 +19,9 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityMagmaCube;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@ -287,6 +289,10 @@ public abstract class WeaponAbility {
|
||||
living.entityDropItem(new ItemStack(Items.skull, 1, 2), 0.0F);
|
||||
} else if(living instanceof EntityCreeper) {
|
||||
living.entityDropItem(new ItemStack(Items.skull, 1, 4), 0.0F);
|
||||
} else if(living instanceof EntityMagmaCube) {
|
||||
living.entityDropItem(new ItemStack(Items.magma_cream, 3), 0.0F);
|
||||
} else if(living instanceof EntitySlime) {
|
||||
living.entityDropItem(new ItemStack(Items.slime_ball, 3), 0.0F);
|
||||
} else if(living instanceof EntityPlayer) {
|
||||
|
||||
ItemStack head = new ItemStack(Items.skull, 1, 3);
|
||||
|
||||
@ -1,15 +1,23 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerMachineDiesel;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
@ -32,20 +40,17 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.powerCap);
|
||||
|
||||
String[] text = new String[] { "Accepted Fuels:",
|
||||
" Diesel (500 HE/t)",
|
||||
" Petroil (300 HE/t)",
|
||||
" Biofuel (400 HE/t)",
|
||||
" Ethanol (200 HE/t)",
|
||||
" LPG (450 HE/t)",
|
||||
" Hydrogen (10 HE/t)",
|
||||
" Leaded Gasoline (1500 HE/t)",
|
||||
" NITAN Superfuel (5000 HE/t)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
||||
|
||||
for(Entry<FluidType, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
||||
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
||||
}
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text.toArray(new String[0]));
|
||||
|
||||
String[] text1 = new String[] { "Fuel consumption rate:",
|
||||
" 10 mB/t",
|
||||
" 200 mB/s",
|
||||
" 1 mB/t",
|
||||
" 20 mB/s",
|
||||
"(Consumption rate is constant)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
|
||||
|
||||
@ -1,15 +1,23 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerMachineSelenium;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineSelenium extends GuiInfoContainer {
|
||||
@ -31,26 +39,23 @@ public class GUIMachineSelenium extends GuiInfoContainer {
|
||||
|
||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 18, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 108, 160, 16, diFurnace.power, diFurnace.powerCap);
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.YELLOW + "Accepted Fuels:");
|
||||
|
||||
String[] text = new String[] { "Accepted Fuels:",
|
||||
" Industrial Oil (50 HE/t)",
|
||||
" Heating Oil (75 HE/t)",
|
||||
" Hydrogen (500 HE/t)",
|
||||
" Diesel (225 HE/t)",
|
||||
" Kerosene (300 HE/t)",
|
||||
" Reclaimed Oil (100 HE/t)",
|
||||
" Petroil (125 HE/t)",
|
||||
" Biofuel (200 HE/t)",
|
||||
" Leaded Gasoline (700 HE/t)",
|
||||
" NITAN Superfuel (2500 HE/t)",
|
||||
"(These numbers are base values,",
|
||||
"actual output is based",
|
||||
"on piston count)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
for(Entry<FluidType, Integer> entry : TileEntityMachineDiesel.fuels.entrySet()) {
|
||||
text.add(" " + I18nUtil.resolveKey(entry.getKey().getUnlocalizedName()) + " (" + entry.getValue() + " HE/t)");
|
||||
}
|
||||
|
||||
text.add(EnumChatFormatting.ITALIC + "(These numbers are base values,");
|
||||
text.add(EnumChatFormatting.ITALIC + "actual output is based");
|
||||
text.add(EnumChatFormatting.ITALIC + "on piston count)");
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text.toArray(new String[0]));
|
||||
|
||||
String[] text1 = new String[] { "Fuel consumption rate:",
|
||||
" 5 mB/t",
|
||||
" 100 mB/s",
|
||||
" 1 mB/t",
|
||||
" 20 mB/s",
|
||||
"(Consumption rate per piston)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
|
||||
|
||||
@ -28,52 +28,12 @@ public class TileEntityMachineAmgen extends TileEntity implements IEnergyGenerat
|
||||
|
||||
if(block == ModBlocks.machine_amgen) {
|
||||
float rad = ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord);
|
||||
|
||||
power += rad;
|
||||
|
||||
ChunkRadiationManager.proxy.decrementRad(worldObj, xCoord, yCoord, zCoord, 5F);
|
||||
|
||||
} else if(block == ModBlocks.machine_geo) {
|
||||
|
||||
Block b = worldObj.getBlock(xCoord, yCoord - 1, zCoord);
|
||||
|
||||
if(b == ModBlocks.geysir_water) {
|
||||
power += 75;
|
||||
} else if(b == ModBlocks.geysir_chlorine) {
|
||||
power += 100;
|
||||
} else if(b == ModBlocks.geysir_vapor) {
|
||||
power += 50;
|
||||
} else if(b == ModBlocks.geysir_nether) {
|
||||
power += 500;
|
||||
} else if(b == Blocks.lava) {
|
||||
power += 100;
|
||||
|
||||
if(worldObj.rand.nextInt(1200) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.obsidian);
|
||||
}
|
||||
} else if(b == Blocks.flowing_lava) {
|
||||
power += 25;
|
||||
|
||||
if(worldObj.rand.nextInt(600) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.cobblestone);
|
||||
}
|
||||
}
|
||||
|
||||
b = worldObj.getBlock(xCoord, yCoord + 1, zCoord);
|
||||
|
||||
if(b == Blocks.lava) {
|
||||
power += 100;
|
||||
|
||||
if(worldObj.rand.nextInt(1200) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord + 1, zCoord, Blocks.obsidian);
|
||||
}
|
||||
} else if(b == Blocks.flowing_lava) {
|
||||
power += 25;
|
||||
|
||||
if(worldObj.rand.nextInt(600) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord + 1, zCoord, Blocks.cobblestone);
|
||||
}
|
||||
}
|
||||
this.checkGeoInteraction(xCoord, yCoord + 1, zCoord);
|
||||
this.checkGeoInteraction(xCoord, yCoord - 1, zCoord);
|
||||
}
|
||||
|
||||
if(power > maxPower)
|
||||
@ -83,6 +43,33 @@ public class TileEntityMachineAmgen extends TileEntity implements IEnergyGenerat
|
||||
this.sendPower(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkGeoInteraction(int x, int y, int z) {
|
||||
|
||||
Block b = worldObj.getBlock(x, y, z);
|
||||
|
||||
if(b == ModBlocks.geysir_water) {
|
||||
power += 75;
|
||||
} else if(b == ModBlocks.geysir_chlorine) {
|
||||
power += 100;
|
||||
} else if(b == ModBlocks.geysir_vapor) {
|
||||
power += 50;
|
||||
} else if(b == ModBlocks.geysir_nether) {
|
||||
power += 500;
|
||||
} else if(b == Blocks.lava) {
|
||||
power += 100;
|
||||
|
||||
if(worldObj.rand.nextInt(6000) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.obsidian);
|
||||
}
|
||||
} else if(b == Blocks.flowing_lava) {
|
||||
power += 25;
|
||||
|
||||
if(worldObj.rand.nextInt(3000) == 0) {
|
||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Blocks.cobblestone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
@ -132,25 +133,23 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
||||
return getHEFromFuel() > 0;
|
||||
}
|
||||
|
||||
public static final HashMap<FluidType, Integer> fuels = new HashMap();
|
||||
|
||||
static {
|
||||
fuels.put(FluidType.HYDROGEN, 10);
|
||||
fuels.put(FluidType.DIESEL, 500);
|
||||
fuels.put(FluidType.PETROIL, 300);
|
||||
fuels.put(FluidType.BIOFUEL, 400);
|
||||
fuels.put(FluidType.GASOLINE, 1500);
|
||||
fuels.put(FluidType.NITAN, 5000);
|
||||
fuels.put(FluidType.LPG, 450);
|
||||
fuels.put(FluidType.ETHANOL, 200);
|
||||
}
|
||||
|
||||
public int getHEFromFuel() {
|
||||
FluidType type = tank.getTankType();
|
||||
if(type.name().equals(FluidType.HYDROGEN.name()))
|
||||
return 10;
|
||||
if(type.name().equals(FluidType.DIESEL.name()))
|
||||
return 500;
|
||||
if(type.name().equals(FluidType.PETROIL.name()))
|
||||
return 300;
|
||||
if(type.name().equals(FluidType.BIOFUEL.name()))
|
||||
return 400;
|
||||
if(type.name().equals(FluidType.GASOLINE.name()))
|
||||
return 1500;
|
||||
if(type.name().equals(FluidType.NITAN.name()))
|
||||
return 5000;
|
||||
if(type.name().equals(FluidType.LPG.name()))
|
||||
return 450;
|
||||
if(type.name().equals(FluidType.ETHANOL.name()))
|
||||
return 200;
|
||||
return 0;
|
||||
Integer value = fuels.get(type);
|
||||
return value != null ? value : null;
|
||||
}
|
||||
|
||||
public void generate() {
|
||||
@ -166,7 +165,7 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
||||
if (soundCycle >= 3)
|
||||
soundCycle = 0;
|
||||
|
||||
tank.setFill(tank.getFill() - 10);
|
||||
tank.setFill(tank.getFill() - 1);
|
||||
if (tank.getFill() < 0)
|
||||
tank.setFill(0);
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
@ -255,29 +256,27 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
return getHEFromFuel() > 0;
|
||||
}
|
||||
|
||||
public static final HashMap<FluidType, Integer> fuels = new HashMap();
|
||||
|
||||
static {
|
||||
fuels.put(FluidType.SMEAR, 50);
|
||||
fuels.put(FluidType.HEATINGOIL, 75);
|
||||
fuels.put(FluidType.HYDROGEN, 5);
|
||||
fuels.put(FluidType.DIESEL, 225);
|
||||
fuels.put(FluidType.KEROSENE, 300);
|
||||
fuels.put(FluidType.RECLAIMED, 100);
|
||||
fuels.put(FluidType.PETROIL, 125);
|
||||
fuels.put(FluidType.BIOFUEL, 200);
|
||||
fuels.put(FluidType.GASOLINE, 700);
|
||||
fuels.put(FluidType.NITAN, 2500);
|
||||
fuels.put(FluidType.LPG, 200);
|
||||
fuels.put(FluidType.ETHANOL, 75);
|
||||
}
|
||||
|
||||
public int getHEFromFuel() {
|
||||
FluidType type = tank.getTankType();
|
||||
if(type.name().equals(FluidType.SMEAR.name()))
|
||||
return 50;
|
||||
if(type.name().equals(FluidType.HEATINGOIL.name()))
|
||||
return 75;
|
||||
if(type.name().equals(FluidType.HYDROGEN.name()))
|
||||
return 5;
|
||||
if(type.name().equals(FluidType.DIESEL.name()))
|
||||
return 225;
|
||||
if(type.name().equals(FluidType.KEROSENE.name()))
|
||||
return 300;
|
||||
if(type.name().equals(FluidType.RECLAIMED.name()))
|
||||
return 100;
|
||||
if(type.name().equals(FluidType.PETROIL.name()))
|
||||
return 125;
|
||||
if(type.name().equals(FluidType.BIOFUEL.name()))
|
||||
return 200;
|
||||
if(type.name().equals(FluidType.GASOLINE.name()))
|
||||
return 700;
|
||||
if(type.name().equals(FluidType.NITAN.name()))
|
||||
return 2500;
|
||||
return 0;
|
||||
Integer value = fuels.get(type);
|
||||
return value != null ? value : null;
|
||||
}
|
||||
|
||||
public void generate() {
|
||||
@ -294,8 +293,8 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
if (soundCycle >= 3)
|
||||
soundCycle = 0;
|
||||
|
||||
tank.setFill(tank.getFill() - this.pistonCount * 5);
|
||||
if (tank.getFill() < 0)
|
||||
tank.setFill(tank.getFill() - this.pistonCount);
|
||||
if(tank.getFill() < 0)
|
||||
tank.setFill(0);
|
||||
|
||||
power += getHEFromFuel() * Math.pow(this.pistonCount, 1.15D);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user