my ass is heavy

This commit is contained in:
Bob 2024-09-15 22:45:57 +02:00
parent 2a81e2c5a7
commit ee8089ddf4
46 changed files with 8543 additions and 26 deletions

16
.editorconfig Normal file
View File

@ -0,0 +1,16 @@
root = true
[*]
charset = utf-8
end_of_line = crlf
indent_style = tab
indent_size = tab
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = off
[{*.info,*.json,*.mcmeta,*.md,*.cfg,*.yml,*.toml}]
tab_width = 2
[{*.info,*.mcmeta,*.cfg}]
end_of_line = lf

View File

@ -2,11 +2,20 @@
* Settings tool
* Allows settings of blocks and machines to be copied
* Uses settings such as conveyor item filters, fluid types and liquid metal types
* Pyrolysis oven
* An oil 3 machine with multiple applications
* Can solidify most oils like a solidifier, but is way more efficient
* Can create syngas with high efficiency from coal, coke and biomass
* Large amounts of tar can be processed into fine soot, the base ingredient for fullerene
* Upgrades are not implemented yet
* Has a very short "chimney", exhaust pipes have to be connected there to work
* If no exhaust pipes are connected, the chimney will spawn particles
## Changed
* Most loot piles now have configurable loot pools
* The ntmsatellites command now has the "list" parameter which shows all active satellites in orbit
* Burning in the nether in 528 mode now has a config option, and it no longer affects NPCs
* Jet fuel can now be solidified
## Fixed
* Fixed some things not using variable max charge for armor mods, like static pads and DNT nanosuit tooltips

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5082
mod_build_number=5089
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\

View File

@ -943,6 +943,7 @@ public class ModBlocks {
public static Block machine_catalytic_reformer;
public static Block machine_hydrotreater;
public static Block machine_coker;
public static Block machine_pyrooven;
public static Block machine_boiler_off;
@ -2164,6 +2165,7 @@ public class ModBlocks {
machine_catalytic_reformer = new MachineCatalyticReformer(Material.iron).setBlockName("machine_catalytic_reformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_hydrotreater = new MachineHydrotreater(Material.iron).setBlockName("machine_hydrotreater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_coker = new MachineCoker(Material.iron).setBlockName("machine_coker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_pyrooven = new MachinePyroOven(Material.iron).setBlockName("machine_pyrooven").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_ore_slopper = new MachineOreSlopper().setBlockName("machine_ore_slopper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3228,6 +3230,7 @@ public class ModBlocks {
register(machine_catalytic_reformer);
register(machine_hydrotreater);
register(machine_coker);
register(machine_pyrooven);
register(machine_autosaw);
register(machine_excavator);
register(machine_ore_slopper);

View File

@ -0,0 +1,55 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.oil.TileEntityMachinePyroOven;
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 MachinePyroOven extends BlockDummyable {
public MachinePyroOven(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachinePyroOven();
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
return null;
}
@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);
}
@Override
public int[] getDimensions() {
return new int[] {2, 0, 3, 3, 2, 2};
}
@Override
public int getOffset() {
return 3;
}
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
x += dir.offsetX * o;
z += dir.offsetZ * o;
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
for(int i = -2; i <= 2; i++) {
this.makeExtra(world, x + dir.offsetX * i + rot.offsetX * 2, y, z + dir.offsetZ * i + rot.offsetZ * 2);
}
this.makeExtra(world, x - rot.offsetX, y + 2, z - rot.offsetZ);
}
}

View File

@ -0,0 +1,27 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.gui.GUIPyroOven;
import com.hbm.inventory.recipes.PyroOvenRecipes;
public class PyroHandler extends NEIUniversalHandler {
public PyroHandler() {
super("Pyrolysis", ModBlocks.machine_pyrooven, PyroOvenRecipes.getRecipes());
}
@Override
public String getKey() {
return "ntmPyrolysis";
}
@Override
public void loadTransferRects() {
super.loadTransferRects();
transferRectsGui.add(new RecipeTransferRect(new Rectangle(50, 35, 28, 14), "ntmPyrolysis"));
guiGui.add(GUIPyroOven.class);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
}

View File

@ -0,0 +1,86 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.items.ModItems;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.tileentity.machine.oil.TileEntityMachinePyroOven;
import api.hbm.energymk2.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 ContainerPyroOven extends Container {
private TileEntityMachinePyroOven pyro;
public ContainerPyroOven(InventoryPlayer invPlayer, TileEntityMachinePyroOven tedf) {
pyro = tedf;
//Battery
this.addSlotToContainer(new Slot(tedf, 0, 152, 72));
//Input
this.addSlotToContainer(new Slot(tedf, 1, 35, 45));
//Output
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 2, 89, 45));
//Fluid ID
this.addSlotToContainer(new Slot(tedf, 3, 8, 72));
//Upgrades
this.addSlotToContainer(new Slot(tedf, 4, 71, 72));
this.addSlotToContainer(new Slot(tedf, 5, 89, 72));
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, 122 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 180));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack rStack = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
rStack = stack.copy();
if(index <= 5) {
if(!this.mergeItemStack(stack, 6, this.inventorySlots.size(), true)) {
return null;
}
} else {
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
} else if(rStack.getItem() instanceof IItemFluidIdentifier) {
if(!this.mergeItemStack(stack, 3, 4, false)) return null;
} else if(rStack.getItem() instanceof ItemMachineUpgrade) {
if(!this.mergeItemStack(stack, 4, 6, false)) return null;
} else {
if(!this.mergeItemStack(stack, 1, 2, false)) return null;
}
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return rStack;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return pyro.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,62 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerPyroOven;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.oil.TileEntityMachinePyroOven;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIPyroOven extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_pyrooven.png");
private TileEntityMachinePyroOven pyro;
public GUIPyroOven(InventoryPlayer playerInv, TileEntityMachinePyroOven tile) {
super(new ContainerPyroOven(playerInv, tile));
this.pyro = tile;
this.xSize = 176;
this.ySize = 204;
}
@Override
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
pyro.tanks[0].renderTankInfo(this, x, y, guiLeft + 8, guiTop + 18, 16, 52);
pyro.tanks[1].renderTankInfo(this, x, y, guiLeft + 116, guiTop + 18, 16, 52);
this.drawElectricityInfo(this, x, y, guiLeft + 152, guiTop + 18, 16, 52, pyro.getPower(), pyro.getMaxPower());
this.drawCustomInfoStat(x, y, guiLeft + 108, guiTop + 76, 8, 8, guiLeft + 108, guiTop + 76, this.getUpgradeInfo(pyro));
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.pyro.hasCustomInventoryName() ? this.pyro.getInventoryName() : I18n.format(this.pyro.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2 - 18, 6, 4210752);
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);
int i = (int) (pyro.power * 52 / pyro.maxPower);
drawTexturedModalRect(guiLeft + 152, guiTop + 70 - i, 176, 64 - i, 16, i);
int p = (int) (pyro.progress * 27);
drawTexturedModalRect(guiLeft + 57, guiTop + 47, 176, 0, p, 12);
pyro.tanks[0].renderTank(guiLeft + 8, guiTop + 70, this.zLevel, 16, 52);
pyro.tanks[1].renderTank(guiLeft + 116, guiTop + 70, this.zLevel, 16, 52);
this.drawInfoPanel(guiLeft + 108, guiTop + 76, 8, 8, 8);
}
}

View File

@ -957,6 +957,14 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_pyrooven, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.plateWelded(), 16) : new OreDictStack(STEEL.heavyComp(), 4),
new OreDictStack(ANY_HARDPLASTIC.ingot(), 16),
new ComparableStack(ModItems.ingot_cft, 4),
new OreDictStack(CU.pipe(), 12),
new ComparableStack(ModItems.motor_desh, 1),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_compressor, 1), new AStack[] {
new OreDictStack(STEEL.plateCast(), 8),

View File

@ -0,0 +1,185 @@
package com.hbm.inventory.recipes;
import static com.hbm.inventory.OreDictManager.*;
import static com.hbm.inventory.fluid.Fluids.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.trait.FT_Flammable;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ItemEnums.EnumAshType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class PyroOvenRecipes extends SerializableRecipe {
public static List<PyroOvenRecipe> recipes = new ArrayList();
@Override
public void registerDefaults() {
//solid fuel
registerSFAuto(SMEAR);
registerSFAuto(HEATINGOIL);
registerSFAuto(HEATINGOIL_VACUUM);
registerSFAuto(RECLAIMED);
registerSFAuto(PETROIL);
registerSFAuto(NAPHTHA);
registerSFAuto(NAPHTHA_CRACK);
registerSFAuto(DIESEL);
registerSFAuto(DIESEL_REFORM);
registerSFAuto(DIESEL_CRACK);
registerSFAuto(DIESEL_CRACK_REFORM);
registerSFAuto(LIGHTOIL);
registerSFAuto(LIGHTOIL_CRACK);
registerSFAuto(LIGHTOIL_VACUUM);
registerSFAuto(KEROSENE);
registerSFAuto(KEROSENE_REFORM);
registerSFAuto(SOURGAS);
registerSFAuto(REFORMGAS);
registerSFAuto(SYNGAS);
registerSFAuto(PETROLEUM);
registerSFAuto(LPG);
registerSFAuto(BIOFUEL);
registerSFAuto(AROMATICS);
registerSFAuto(UNSATURATEDS);
registerSFAuto(REFORMATE);
registerSFAuto(XYLENE);
registerSFAuto(BALEFIRE, 24_000_000L, ModItems.solid_fuel_bf);
//other
recipes.add(new PyroOvenRecipe(100)
.in(new FluidStack(Fluids.STEAM, 500)).in(new OreDictStack(COAL.gem()))
.out(new FluidStack(Fluids.SYNGAS, 1_000)));
recipes.add(new PyroOvenRecipe(100)
.in(new FluidStack(Fluids.STEAM, 500)).in(new OreDictStack(COAL.dust()))
.out(new FluidStack(Fluids.SYNGAS, 1_000)));
recipes.add(new PyroOvenRecipe(100)
.in(new FluidStack(Fluids.STEAM, 250)).in(new OreDictStack(ANY_COKE.gem()))
.out(new FluidStack(Fluids.SYNGAS, 1_000)));
recipes.add(new PyroOvenRecipe(100)
.in(new ComparableStack(ModItems.biomass, 4))
.out(new FluidStack(Fluids.SYNGAS, 1_000)).out(new ItemStack(Items.coal, 1, 1)));
recipes.add(new PyroOvenRecipe(40)
.out(new FluidStack(Fluids.HYDROGEN, 250)).in(new OreDictStack(ANY_TAR.any(), 8))
.out(new FluidStack(Fluids.CARBONDIOXIDE, 1_000)).out(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.SOOT)));
}
private static void registerSFAuto(FluidType fluid) {
registerSFAuto(fluid, 1_440_000L, ModItems.solid_fuel); //3200 burntime * 1.5 burntime bonus * 300 TU/t
}
private static void registerSFAuto(FluidType fluid, long tuPerSF, Item fuel) {
long tuPerBucket = fluid.getTrait(FT_Flammable.class).getHeatEnergy();
double bonus = 0.5D; //double efficiency!!
int mB = (int) (tuPerSF * 1000L * bonus / tuPerBucket);
if(mB > 10_000) mB -= (mB % 1000);
else if(mB > 1_000) mB -= (mB % 100);
else if(mB > 100) mB -= (mB % 10);
mB = Math.max(mB, 1);
registerRecipe(fluid, mB, fuel);
}
private static void registerRecipe(FluidType type, int quantity, Item output) { registerRecipe(type, quantity, new ItemStack(output)); }
private static void registerRecipe(FluidType type, int quantity, ItemStack output) { recipes.add(new PyroOvenRecipe(60).in(new FluidStack(type, quantity)).out(output)); }
public static HashMap getRecipes() {
HashMap<Object[], Object[]> map = new HashMap<Object[], Object[]>();
for(PyroOvenRecipe rec : recipes) {
Object[] in = null;
Object[] out = null;
if(rec.inputFluid != null && rec.inputItem != null) in = new Object[] {ItemFluidIcon.make(rec.inputFluid), rec.inputItem};
if(rec.inputFluid != null && rec.inputItem == null) in = new Object[] {ItemFluidIcon.make(rec.inputFluid)};
if(rec.inputFluid == null && rec.inputItem != null) in = new Object[] {rec.inputItem};
if(rec.outputFluid != null && rec.outputItem != null) out = new Object[] {rec.outputItem, ItemFluidIcon.make(rec.outputFluid)};
if(rec.outputFluid != null && rec.outputItem == null) out = new Object[] {ItemFluidIcon.make(rec.outputFluid)};
if(rec.outputFluid == null && rec.outputItem != null) out = new Object[] {rec.outputItem};
if(in != null && out != null) {
map.put(in, out);
}
}
return map;
}
@Override
public String getFileName() {
return "hbmPyrolysis.json";
}
@Override
public Object getRecipeObject() {
return recipes;
}
@Override
public void deleteRecipes() {
recipes.clear();
}
@Override
public void readRecipe(JsonElement recipe) {
JsonObject obj = (JsonObject) recipe;
AStack inputItem = obj.has("inputItem") ? this.readAStack(obj.get("inputItem").getAsJsonArray()) : null;
FluidStack inputFluid = obj.has("inputFluid") ? this.readFluidStack(obj.get("inputFluid").getAsJsonArray()) : null;
ItemStack outputItem = obj.has("outputItem") ? this.readItemStack(obj.get("outputItem").getAsJsonArray()) : null;
FluidStack outputFluid = obj.has("outputFluid") ? this.readFluidStack(obj.get("outputFluid").getAsJsonArray()) : null;
int duration = obj.get("duration").getAsInt();
recipes.add(new PyroOvenRecipe(duration).in(inputFluid).in(inputItem).out(outputFluid).out(outputItem));
}
@Override
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
PyroOvenRecipe rec = (PyroOvenRecipe) recipe;
if(rec.inputFluid != null) { writer.name("inputFluid"); this.writeFluidStack(rec.inputFluid, writer); }
if(rec.inputItem != null) { writer.name("inputItem"); this.writeAStack(rec.inputItem, writer); }
if(rec.outputFluid != null) { writer.name("outputFluid"); this.writeFluidStack(rec.outputFluid, writer); }
if(rec.outputItem != null) { writer.name("outputItem"); this.writeItemStack(rec.outputItem, writer); }
writer.name("duration").value(rec.duration);
}
public static class PyroOvenRecipe {
public FluidStack inputFluid;
public AStack inputItem;
public FluidStack outputFluid;
public ItemStack outputItem;
public int duration;
public PyroOvenRecipe(int duration) {
this.duration = duration;
}
public PyroOvenRecipe in(FluidStack stack) { this.inputFluid = stack; return this; }
public PyroOvenRecipe in(AStack stack) { this.inputItem = stack; return this; }
public PyroOvenRecipe out(FluidStack stack) { this.outputFluid = stack; return this; }
public PyroOvenRecipe out(ItemStack stack) { this.outputItem = stack; return this; }
}
}

View File

@ -99,6 +99,7 @@ public class SolidificationRecipes extends SerializableRecipe {
registerSFAuto(LIGHTOIL_CRACK);
registerSFAuto(LIGHTOIL_VACUUM);
registerSFAuto(KEROSENE);
registerSFAuto(KEROSENE_REFORM);
//registerSFAuto(GAS);
registerSFAuto(SOURGAS);
registerSFAuto(REFORMGAS);
@ -111,7 +112,7 @@ public class SolidificationRecipes extends SerializableRecipe {
registerSFAuto(UNSATURATEDS);
registerSFAuto(REFORMATE);
registerSFAuto(XYLENE);
registerSFAuto(BALEFIRE, 24000000L, ModItems.solid_fuel_bf); //holy shit this is energy dense*/
registerSFAuto(BALEFIRE, 24_000_000L, ModItems.solid_fuel_bf); //holy shit this is energy dense*/
}
@ -127,6 +128,8 @@ public class SolidificationRecipes extends SerializableRecipe {
if(mB > 10_000) mB -= (mB % 1000);
else if(mB > 1_000) mB -= (mB % 100);
else if(mB > 100) mB -= (mB % 10);
mB = Math.max(mB, 1);
registerRecipe(fluid, mB, fuel);
}

View File

@ -58,6 +58,7 @@ public abstract class SerializableRecipe {
recipeHandlers.add(new LiquefactionRecipes());
recipeHandlers.add(new SolidificationRecipes());
recipeHandlers.add(new CokerRecipes());
recipeHandlers.add(new PyroOvenRecipes());
recipeHandlers.add(new BreederRecipes());
recipeHandlers.add(new CyclotronRecipes());
recipeHandlers.add(new HadronRecipes());

View File

@ -66,8 +66,8 @@ public class Lego {
case CYCLE:
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addKeyframePosition(0, 0, 0, 50).addKeyframePosition(0, 0, -3, 50).addKeyframePosition(0, 0, 0, 250))
.addBus("HAMMER", new BusAnimationSequence().addKeyframePosition(0, 0, 1, 50).addKeyframePosition(0, 0, 1, 300).addKeyframePosition(0, 0, 0, 200))
.addBus("DRUM", new BusAnimationSequence().addKeyframePosition(0, 0, 1, 50));
.addBus("HAMMER", new BusAnimationSequence().addKeyframePosition(0, 0, 1, 50).addKeyframePosition(0, 0, 1, 300 + 200).addKeyframePosition(0, 0, 0, 200))
.addBus("DRUM", new BusAnimationSequence().addKeyframePosition(0, 0, 0, 350 + 200).addKeyframePosition(0, 0, 1, 200));
case CYCLE_EMPTY: break;
case ALT_CYCLE: break;
case EQUIP: return new BusAnimation().addBus("ROTATE", new BusAnimationSequence().addKeyframePosition(-360, 0, 0, 350));

View File

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

View File

@ -317,6 +317,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCatalyticReformer.class, new RenderCatalyticReformer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineHydrotreater.class, new RenderHydrotreater());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCoker.class, new RenderCoker());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePyroOven.class, new RenderPyroOven());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RenderFan());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPistonInserter.class, new RenderPistonInserter());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConveyorPress.class, new RenderConveyorPress());

View File

@ -105,7 +105,6 @@ import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@ -1083,15 +1082,16 @@ public class ModEventHandlerClient {
boolean gunKey = keyCode == HbmKeybinds.gunPrimaryKey.getKeyCode() || keyCode == HbmKeybinds.gunSecondaryKey.getKeyCode() ||
keyCode == HbmKeybinds.gunTertiaryKey.getKeyCode() || keyCode == HbmKeybinds.reloadKey.getKeyCode();
/* Shoot in favor of attacking */
if(gunKey && keyCode == mc.gameSettings.keyBindAttack.getKeyCode()) {
mc.gameSettings.keyBindAttack.pressed = false;
mc.gameSettings.keyBindAttack.pressTime = 0;
}
EntityPlayer player = mc.thePlayer;
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) {
/* Shoot in favor of attacking */
if(gunKey && keyCode == mc.gameSettings.keyBindAttack.getKeyCode()) {
mc.gameSettings.keyBindAttack.pressed = false;
mc.gameSettings.keyBindAttack.pressTime = 0;
}
if(gunKey && keyCode == mc.gameSettings.keyBindPickBlock.getKeyCode()) {
mc.gameSettings.keyBindPickBlock.pressed = false;
mc.gameSettings.keyBindPickBlock.pressTime = 0;

View File

@ -51,6 +51,7 @@ public class NEIRegistry {
handlers.add(new LiquefactionHandler());
handlers.add(new SolidificationHandler());
handlers.add(new CokingHandler());
handlers.add(new PyroHandler());
handlers.add(new FractioningHandler());
handlers.add(new BoilingHandler());
handlers.add(new CombinationHandler());

View File

@ -82,6 +82,7 @@ public class ResourceManager {
public static final IModelCustom solidifier = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/solidifier.obj")).asVBO();
public static final IModelCustom compressor = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/compressor.obj")).asVBO();
public static final IModelCustom coker = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/coker.obj")).asVBO();
public static final IModelCustom pyrooven = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/pyrooven.obj")).asVBO();
//Flare Stack
public static final IModelCustom oilflare = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/flare_stack.obj")).asVBO();
@ -476,6 +477,7 @@ public class ResourceManager {
public static final ResourceLocation solidifier_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/solidifier.png");
public static final ResourceLocation compressor_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/compressor.png");
public static final ResourceLocation coker_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/coker.png");
public static final ResourceLocation pyrooven_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/pyrooven.png");
//Flare Stack
public static final ResourceLocation oilflare_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/flare_stack.png");

View File

@ -35,7 +35,8 @@ public class ItemRenderDebug extends ItemRenderWeaponBase {
GL11.glRotated(equipSpin[0], 0, 0, 1);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
//GL11.glTranslated(-recoil[2], 0, 0);
GL11.glTranslated(0, 0, recoil[2]);
GL11.glRotated(recoil[2] * 10, 0, 0, 1);
GL11.glShadeModel(GL11.GL_SMOOTH);

View File

@ -0,0 +1,79 @@
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.oil.TileEntityMachinePyroOven;
import com.hbm.util.BobMathUtil;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderPyroOven extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z + 0.5);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
}
TileEntityMachinePyroOven pyro = (TileEntityMachinePyroOven) tile;
float anim = pyro.prevAnim + (pyro.anim - pyro.prevAnim) * f;
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.pyrooven_tex);
ResourceManager.pyrooven.renderPart("Oven");
GL11.glPushMatrix();
GL11.glTranslated(BobMathUtil.sps(anim * 0.125) / 2 - 0.5, 0, 0);
ResourceManager.pyrooven.renderPart("Slider");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(1.5, 0, 1.5);
GL11.glRotated(anim * -15D % 360D, 0, 1, 0);
GL11.glTranslated(-1.5, 0, -1.5);
ResourceManager.pyrooven.renderPart("Fan");
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_pyrooven);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -1, 0);
GL11.glScaled(3.5, 3.5, 3.5);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glRotatef(90, 0F, 1F, 0F);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.pyrooven_tex);
ResourceManager.pyrooven.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -340,6 +340,7 @@ public class TileMappings {
put(TileEntityMachineCatalyticReformer.class, "tileentity_catalytic_reformer");
put(TileEntityMachineHydrotreater.class, "tileentity_hydrotreater");
put(TileEntityMachineCoker.class, "tileentity_coker");
put(TileEntityMachinePyroOven.class, "tileentity_pyrooven");
put(TileEntityChimneyBrick.class, "tileentity_chimney_brick");
put(TileEntityChimneyIndustrial.class, "tileentity_chimney_industrial");

View File

@ -37,7 +37,6 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;

View File

@ -1,6 +1,5 @@
package com.hbm.tileentity.machine;
import com.hbm.interfaces.ICopiable;
import com.hbm.inventory.material.Mats;
import com.hbm.inventory.material.Mats.MaterialStack;
import com.hbm.packet.PacketDispatcher;

View File

@ -32,7 +32,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityHeatBoiler extends TileEntityLoadedBase implements INBTPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine, IFluidCopiable {

View File

@ -27,7 +27,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase implements INBTPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine, IFluidCopiable {

View File

@ -2,7 +2,6 @@ package com.hbm.tileentity.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.interfaces.ICopiable;
import com.hbm.inventory.container.ContainerHeaterHeatex;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;

View File

@ -166,6 +166,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
};
}
@Override
public AudioWrapper createAudioLoop() {
return MainRegistry.proxy.getLoopedSound("hbm:block.igeneratorOperate", xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F, 20);
}
@ -181,7 +182,6 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
@Override
public void invalidate() {
super.invalidate();
if(audio != null) {

View File

@ -6,7 +6,6 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.UpgradeManager;
import com.hbm.inventory.container.ContainerMixer;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIMixer;

View File

@ -2,7 +2,6 @@ package com.hbm.tileentity.machine;
import java.util.HashSet;
import com.hbm.interfaces.ICopiable;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.lib.Library;

View File

@ -102,7 +102,7 @@ public class TileEntityMachineCoker extends TileEntityMachineBase implements IFl
}
}
if(wasOn && worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 20);
if(wasOn && worldObj.getTotalWorldTime() % 5 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 5);
}
for(DirPos pos : getConPos()) {

View File

@ -0,0 +1,328 @@
package com.hbm.tileentity.machine.oil;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.inventory.container.ContainerPyroOven;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIPyroOven;
import com.hbm.inventory.recipes.PyroOvenRecipes;
import com.hbm.inventory.recipes.PyroOvenRecipes.PyroOvenRecipe;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.sound.AudioWrapper;
import com.hbm.tileentity.IFluidCopiable;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachinePolluting;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.fluid.IFluidStandardTransceiver;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachinePyroOven extends TileEntityMachinePolluting implements IEnergyReceiverMK2, IFluidStandardTransceiver, IGUIProvider, IFluidCopiable {
public long power;
public static final long maxPower = 1_000_000;
public boolean isVenting;
public boolean isProgressing;
public float progress;
public int consumption = 10_000;
public int prevAnim;
public int anim = 0;
public FluidTank[] tanks;
private AudioWrapper audio;
public TileEntityMachinePyroOven() {
super(6, 50);
tanks = new FluidTank[2];
tanks[0] = new FluidTank(Fluids.NONE, 24_000);
tanks[1] = new FluidTank(Fluids.NONE, 24_000);
}
@Override
public String getName() {
return "container.machinePyroOven";
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
tanks[0].setType(3, slots);
for(DirPos pos : getConPos()) {
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
if(tanks[0].getTankType() != Fluids.NONE) this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
if(tanks[1].getFill() > 0) this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
if(smoke.getFill() > 0) this.sendFluid(smoke, worldObj, xCoord - rot.offsetX, yCoord + 3, zCoord - rot.offsetZ, Library.POS_Y);
//UpgradeManager.eval(slots, 4, 5);
this.isProgressing = false;
this.isVenting = false;
if(this.canProcess()) {
PyroOvenRecipe recipe = getMatchingRecipe();
this.progress += 1F / recipe.duration;
this.isProgressing = true;
this.power -= this.consumption;
if(progress >= 1F) {
this.progress = 0F;
this.finishRecipe(recipe);
this.markDirty();
}
this.pollute(PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND);
} else {
this.progress = 0F;
}
this.networkPackNT(50);
} else {
this.prevAnim = this.anim;
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
if(isProgressing) {
this.anim++;
if(audio == null) {
audio = createAudioLoop();
audio.startSound();
} else if(!audio.isPlaying()) {
audio = rebootAudio(audio);
}
audio.keepAlive();
audio.updateVolume(this.getVolume(1F));
if(MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 3, zCoord + 0.5) < 50) {
if(worldObj.rand.nextInt(20) == 0) worldObj.spawnParticle("cloud", xCoord + 0.5 - rot.offsetX - dir.offsetX * 0.875, yCoord + 3, zCoord + 0.5 - rot.offsetZ - dir.offsetZ * 0.875, 0.0, 0.05, 0.0);
if(worldObj.rand.nextInt(20) == 0) worldObj.spawnParticle("cloud", xCoord + 0.5 - rot.offsetX - dir.offsetX * 2.375, yCoord + 3, zCoord + 0.5 - rot.offsetZ - dir.offsetZ * 2.375, 0.0, 0.05, 0.0);
if(worldObj.rand.nextInt(20) == 0) worldObj.spawnParticle("cloud", xCoord + 0.5 - rot.offsetX + dir.offsetX * 0.875, yCoord + 3, zCoord + 0.5 - rot.offsetZ + dir.offsetZ * 0.875, 0.0, 0.05, 0.0);
if(worldObj.rand.nextInt(20) == 0) worldObj.spawnParticle("cloud", xCoord + 0.5 - rot.offsetX + dir.offsetX * 2.375, yCoord + 3, zCoord + 0.5 - rot.offsetZ + dir.offsetZ * 2.375, 0.0, 0.05, 0.0);
}
} else {
if(audio != null) {
audio.stopSound();
audio = null;
}
}
if(this.isVenting) {
if(worldObj.getTotalWorldTime() % 2 == 0) {
NBTTagCompound fx = new NBTTagCompound();
fx.setString("type", "tower");
fx.setFloat("lift", 10F);
fx.setFloat("base", 0.25F);
fx.setFloat("max", 2.5F);
fx.setInteger("life", 100 + worldObj.rand.nextInt(20));
fx.setInteger("color",0x202020);
fx.setDouble("posX", xCoord + 0.5 - rot.offsetX);
fx.setDouble("posY", yCoord + 3);
fx.setDouble("posZ", zCoord + 0.5 - rot.offsetZ);
MainRegistry.proxy.effectNT(fx);
}
}
}
}
protected PyroOvenRecipe lastValidRecipe;
public PyroOvenRecipe getMatchingRecipe() {
if(lastValidRecipe != null && doesRecipeMatch(lastValidRecipe)) return lastValidRecipe;
for(PyroOvenRecipe rec : PyroOvenRecipes.recipes) {
if(doesRecipeMatch(rec)) {
lastValidRecipe = rec;
return rec;
}
}
return null;
}
public boolean doesRecipeMatch(PyroOvenRecipe recipe) {
if(recipe.inputFluid != null) {
if(tanks[0].getTankType() != recipe.inputFluid.type) return false; // recipe needs fluid, fluid doesn't match
}
if(recipe.inputItem != null) {
if(slots[1] == null) return false; // recipe needs item, no item present
if(!recipe.inputItem.matchesRecipe(slots[1], true)) return false; // recipe needs item, item doesn't match
} else {
if(slots[1] != null) return false; // recipe does not need item, but item is present
}
return true;
}
public boolean canProcess() {
if(power < consumption) return false; // not enough power
PyroOvenRecipe recipe = this.getMatchingRecipe();
if(recipe == null) return false; // no matching recipe
if(recipe.inputFluid != null && tanks[0].getFill() < recipe.inputFluid.fill) return false; // not enough input fluid
if(recipe.inputItem != null && slots[1].stackSize < recipe.inputItem.stacksize) return false; // not enough input item
if(recipe.outputFluid != null && recipe.outputFluid.fill + tanks[1].getFill() > tanks[1].getMaxFill()) return false; // too much output fluid
if(recipe.outputItem != null && slots[2] != null && recipe.outputItem.stackSize + slots[2].stackSize > slots[2].getMaxStackSize()) return false; // too much output item
if(recipe.outputItem != null && slots[2] != null && recipe.outputItem.getItem() != slots[2].getItem()) return false; // output item doesn't match
if(recipe.outputItem != null && slots[2] != null && recipe.outputItem.getItemDamage() != slots[2].getItemDamage()) return false; // output meta doesn't match
return true;
}
public void finishRecipe(PyroOvenRecipe recipe) {
if(recipe.outputItem != null) {
if(slots[2] == null) {
slots[2] = recipe.outputItem.copy();
} else {
slots[2].stackSize += recipe.outputItem.stackSize;
}
}
if(recipe.outputFluid != null) {
tanks[1].setTankType(recipe.outputFluid.type);
tanks[1].setFill(tanks[1].getFill() + recipe.outputFluid.fill);
}
if(recipe.inputItem != null) {
this.decrStackSize(1, recipe.inputItem.stacksize);
}
if(recipe.inputFluid != null) {
tanks[0].setFill(tanks[0].getFill() - recipe.inputFluid.fill);
}
}
protected DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
return new DirPos[] {
new DirPos(xCoord + dir.offsetX * 2 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 3, rot),
new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 3, rot),
new DirPos(xCoord + rot.offsetX * 3, yCoord, zCoord + rot.offsetZ * 3, rot),
new DirPos(xCoord - dir.offsetX * 1 + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ * 1 + rot.offsetZ * 3, rot),
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 3, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 3, rot),
};
}
@Override public void serialize(ByteBuf buf) {
super.serialize(buf);
tanks[0].serialize(buf);
tanks[1].serialize(buf);
buf.writeLong(power);
buf.writeBoolean(isVenting);
buf.writeBoolean(isProgressing);
buf.writeFloat(progress);
}
@Override public void deserialize(ByteBuf buf) {
super.deserialize(buf);
tanks[0].deserialize(buf);
tanks[1].deserialize(buf);
power = buf.readLong();
isVenting = buf.readBoolean();
isProgressing = buf.readBoolean();
progress = buf.readFloat();
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.tanks[0].readFromNBT(nbt, "t0");
this.tanks[1].readFromNBT(nbt, "t1");
this.progress = nbt.getFloat("prog");
this.power = nbt.getLong("power");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
this.tanks[0].writeToNBT(nbt, "t0");
this.tanks[1].writeToNBT(nbt, "t1");
nbt.setFloat("prog", progress);
nbt.setLong("power", power);
}
@Override public int[] getAccessibleSlotsFromSide(int meta) { return new int[] { 1, 2 }; }
@Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { return i == 1; }
@Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { return i == 2; }
@Override
public void pollute(PollutionType type, float amount) {
FluidTank tank = type == PollutionType.SOOT ? smoke : type == PollutionType.HEAVYMETAL ? smoke_leaded : smoke_poison;
int fluidAmount = (int) Math.ceil(amount * 100);
tank.setFill(tank.getFill() + fluidAmount);
if(tank.getFill() > tank.getMaxFill()) {
int overflow = tank.getFill() - tank.getMaxFill();
tank.setFill(tank.getMaxFill());
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, type, overflow / 100F);
this.isVenting = true;
}
}
@Override public AudioWrapper createAudioLoop() {
return MainRegistry.proxy.getLoopedSound("hbm:block.pyroOperate", xCoord, yCoord, zCoord, 1.0F, 15F, 1.0F, 20);
}
@Override public void onChunkUnload() {
if(audio != null) { audio.stopSound(); audio = null; }
}
@Override public void invalidate() {
super.invalidate();
if(audio != null) { audio.stopSound(); audio = null; }
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord - 3, yCoord, zCoord - 3, xCoord + 4, yCoord + 3.5, zCoord + 4);
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
@Override public long getPower() { return power; }
@Override public void setPower(long power) { this.power = power; }
@Override public long getMaxPower() { return maxPower; }
@Override public FluidTank[] getAllTanks() { return new FluidTank[] { tanks[0], tanks[1], smoke }; }
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] { tanks[1], smoke }; }
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] { tanks[0] }; }
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerPyroOven(player.inventory, this); }
@Override public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIPyroOven(player.inventory, this); }
}

View File

@ -24,7 +24,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public abstract class TileEntityOilDrillBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver, IConfigurableMachine, IPersistentNBT, IGUIProvider, IUpgradeInfoProvider, IFluidCopiable {

View File

@ -8,7 +8,6 @@ import com.hbm.items.ModItems;
import com.hbm.module.ModulePatternMatcher;
import com.hbm.tileentity.IControlReceiverFilter;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.util.ItemStackUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;

View File

@ -16,7 +16,6 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;

View File

@ -1,6 +1,5 @@
package com.hbm.tileentity.network;
import com.hbm.blocks.network.FluidDuctBase;
import com.hbm.blocks.network.IBlockFluidDuct;
import com.hbm.extprop.HbmPlayerProps;
import com.hbm.handler.HbmKeybinds;

View File

@ -371,6 +371,7 @@ container.machineLargeTurbine=Industrielle Dampfturbine
container.machineLiquefactor=Verflüssiger
container.machineMixer=Industrieller Mixer
container.machineOreSlopper=B.E.M.
container.machinePyroOven=Pyrolyseofen
container.machineRefinery=Ölraffinerie
container.machineSelenium=Hochleistungs-Sternmotor
container.machineShredder=Brecher
@ -4343,6 +4344,7 @@ tile.machine_powerrtg.name=PT-Isotopenzelle
tile.machine_press.name=Befeuerte Presse
tile.machine_puf6_tank.name=Plutoniumhexafluorid-Tank
tile.machine_pumpjack.name=Pferdekopfpumpe
tile.machine_pyrooven.name=Pyrolyseofen
tile.machine_radar.name=Radar
tile.machine_radar_large.name=Großes Radar
tile.machine_radgen.name=Strahlenbetriebener Generator

View File

@ -773,6 +773,7 @@ container.machineLargeTurbine=Industrial Steam Turbine
container.machineLiquefactor=Liquefactor
container.machineMixer=Industrial Mixer
container.machineOreSlopper=B.O.P.
container.machinePyroOven=Pyrolysis Oven
container.machineRefinery=Oil Refinery
container.machineSelenium=Radial Performance Engine
container.machineShredder=Shredder
@ -5441,6 +5442,7 @@ tile.machine_powerrtg.name=PT Isotope Cell
tile.machine_press.name=Burner Press
tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank
tile.machine_pumpjack.name=Pumpjack
tile.machine_pyrooven.name=Pyrolysis Oven
tile.machine_radar.name=Radar
tile.machine_radar_large.name=Large Radar
tile.machine_radgen.name=Radiation-Powered Engine

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,7 @@
"block.fel": {"category": "block", "sounds": [{"name": "block/fel", "stream": false}]},
"block.hephaestusRunning": {"category": "block", "sounds": [{"name": "block/hephaestusRunning", "stream": false}]},
"block.squeakyToy": {"category": "block", "sounds": [{"name": "block/squeakyToy", "stream": false}]},
"block.pyroOperate": {"category": "block", "sounds": [{"name": "block/pyroOperate", "stream": false}]},
"door.TransitionSealOpen": {"category": "block", "sounds": [{"name": "block/door/transition_seal_open", "stream": true}]},
"door.wghStart": {"category": "block", "sounds": [{"name": "block/door/wgh_start", "stream": true}]},

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB