holy fuck

the gas centrifuge is pure spaghetti, the zirnox will not cooperate with the rework, i'm doing this tomorrow
This commit is contained in:
Vaern 2022-01-31 19:44:16 -08:00
parent 227bb059da
commit a52bbfda60
13 changed files with 2396 additions and 49 deletions

View File

@ -68,20 +68,4 @@ public class MachineRadiolysis extends BlockDummyable {
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o + 1);
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o - 1);
}
//Temporary until model made
@Override
public int getRenderType() {
return 0;
}
@Override
public boolean isOpaqueCube() {
return true;
}
@Override
public boolean renderAsNormalBlock() {
return true;
}
}

View File

@ -79,11 +79,11 @@ public class ContainerReactorZirnox extends Container {
} else {
if(FluidContainerRegistry.getFluidContent(stack, Fluids.CARBONDIOXIDE) > 0) {
if(!this.mergeItemStack(stack, 24, 25, true))
if(!this.mergeItemStack(stack, 24, 26, false))
return null;
} else if(FluidContainerRegistry.getFluidContent(stack, Fluids.WATER) > 0) {
if(!this.mergeItemStack(stack, 25, 26, true))
if(!this.mergeItemStack(stack, 26, 28, false))
return null;
} else {

View File

@ -1,5 +1,6 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotMachineOutput;
import com.hbm.items.ModItems;
import com.hbm.tileentity.machine.TileEntitySILEX;
@ -24,14 +25,14 @@ public class ContainerSILEX extends Container {
this.addSlotToContainer(new Slot(te, 2, 8 + 18, 24));
this.addSlotToContainer(new Slot(te, 3, 8 + 18*2, 24));
//Output
this.addSlotToContainer(new Slot(te, 4, 116, 90));
this.addSlotToContainer(new SlotMachineOutput(te, 4, 116, 90));
//Output Queue
this.addSlotToContainer(new Slot(te, 5, 134, 72));
this.addSlotToContainer(new Slot(te, 6, 152, 72));
this.addSlotToContainer(new Slot(te, 7, 134, 90));
this.addSlotToContainer(new Slot(te, 8, 152, 90));
this.addSlotToContainer(new Slot(te, 9, 134, 108));
this.addSlotToContainer(new Slot(te, 10, 152, 108));
this.addSlotToContainer(new SlotMachineOutput(te, 5, 134, 72));
this.addSlotToContainer(new SlotMachineOutput(te, 6, 152, 72));
this.addSlotToContainer(new SlotMachineOutput(te, 7, 134, 90));
this.addSlotToContainer(new SlotMachineOutput(te, 8, 152, 90));
this.addSlotToContainer(new SlotMachineOutput(te, 9, 134, 108));
this.addSlotToContainer(new SlotMachineOutput(te, 10, 152, 108));
for(int i = 0; i < 3; i++)
{

View File

@ -36,7 +36,7 @@ public class GUIReactorZirnox extends GuiInfoContainer {
zirnox.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 108, 18, 12);
zirnox.carbonDioxide.renderTankInfo(this, mouseX, mouseY, guiLeft + 142, guiTop + 108, 18, 12);
zirnox.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 108, 18, 12);
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 33, 18, 17, new String[] { "Temperature:", " " + Math.round((zirnox.heat) * 0.00001 * 480 + 20) + "°C" });
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 33, 18, 17, new String[] { "Temperature:", " " + Math.round((zirnox.heat) * 0.00001 * 780 + 20) + "°C" });
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 33, 18, 17, new String[] { "Pressure:", " " + Math.round((zirnox.pressure) * 0.00001 * 30) + " bar" });
String[] info = new String[] { "CO2 transfers heat from the core", "to the water. This will boil", "the water into steam.", "Water Consumption Rate:", "100 mB/t", "2000 mB/s" };

View File

@ -69,6 +69,8 @@ public class GasCentrifugeRecipes {
};
//TODO: Make a Triplet with input fluid, fluid consumed, and itemstack outputs. use that to rework everything below; look at RadiolysisRecipes
//Recipes for NEI
public static List<ItemStack> getGasCentOutputs(FluidType fluid) {
List<ItemStack> outputs = new ArrayList(4);

View File

@ -204,7 +204,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDeuteriumTower.class, new RenderDeuteriumTower());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCatalyticCracker.class, new RenderCatalyticCracker());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineLiquefactor.class, new RenderLiquefactor());
//ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadiolysis.class, new RenderRadiolysis());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadiolysis.class, new RenderRadiolysis());
//AMS
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());

View File

@ -279,7 +279,7 @@ public class ResourceManager {
public static final IModelCustom substation = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/network/substation.obj"));
//Radiolysis
//public static final IModelCustom radiolysis = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/radiolysis"));
public static final IModelCustom radiolysis = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/radiolysis.obj"));
////Textures TEs
@ -579,7 +579,7 @@ public class ResourceManager {
public static final ResourceLocation substation_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/substation.png");
//Radiolysis
//public static final ResourceLocation radiolysis_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radiolysis");
public static final ResourceLocation radiolysis_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radiolysis.png");
////Obj Items

View File

@ -1195,7 +1195,7 @@ public class ItemRenderLibrary {
GL11.glShadeModel(GL11.GL_FLAT);
}});
/*renderers.put(Item.getItemFromBlock(ModBlocks.machine_radiolysis), new ItemRenderBase( ) {
renderers.put(Item.getItemFromBlock(ModBlocks.machine_radiolysis), new ItemRenderBase( ) {
public void renderInventory() {
GL11.glTranslated(0, -2.5, 0);
GL11.glScaled(3, 3, 3);
@ -1204,7 +1204,7 @@ public class ItemRenderLibrary {
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.radiolysis_tex); ResourceManager.radiolysis.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}});*/
}});
}
private static void bindTexture(ResourceLocation res) {

View File

@ -2,6 +2,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -11,34 +12,29 @@ public class RenderRadiolysis extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
/*GL11.glPushMatrix();
GL11.glTranslated(x + 0.0D, y, z + 0.0D);
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180F, 0F, 1F, 0F);
switch(tileEntity.getBlockMetadata() - 10) {
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
case 2:
GL11.glRotatef(0F, 0F, 1F, 0F);
GL11.glTranslatef(0F, 0F, -1F);
break;
GL11.glRotatef(180, 0F, 1F, 0F); break;
case 3:
GL11.glRotatef(180F, 0F, 1F, 0F);
GL11.glTranslatef(1F, 0F, 0F);
break;
GL11.glRotatef(0, 0F, 1F, 0F); break;
case 4:
GL11.glRotatef(90F, 0F, 1F, 0F);
GL11.glTranslatef(1F, 0F, -1F);
break;
GL11.glRotatef(90, 0F, 1F, 0F); break;
case 5:
GL11.glRotatef(270F, 0F, 1F, 0F);
break;
GL11.glRotatef(270, 0F, 1F, 0F); break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.radiolysis_tex);
ResourceManager.radiolysis.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();*/
GL11.glPopMatrix();
}
}

View File

@ -7,6 +7,7 @@ import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.interfaces.IFluidContainer;
import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
@ -36,6 +37,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
@Spaghetti("I still can't believe this was my idea of a 'rework'")
public class TileEntityMachineGasCent extends TileEntityMachineBase implements IEnergyUser, IFluidContainer, IFluidAcceptor {
public byte age;
@ -226,7 +228,7 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
setTankType(1);
if(inputTank.getTankType() == PseudoFluidType.PF6 || inputTank.getTankType() == PseudoFluidType.NUF6) {
if(inputTank.getTankType() == PseudoFluidType.PF6 || inputTank.getTankType() == PseudoFluidType.NUF6 || inputTank.getTankType() == PseudoFluidType.MUD) {
tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
attemptConversion();
}
@ -334,10 +336,17 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
if(newType == Fluids.UF6) {
inputTank.setTankType(PseudoFluidType.NUF6);
outputTank.setTankType(PseudoFluidType.NUF6.getOutputFluid());
return;
}
if(newType == Fluids.PUF6) {
inputTank.setTankType(PseudoFluidType.PF6);
outputTank.setTankType(PseudoFluidType.PF6.getOutputFluid());
return;
}
if(newType == Fluids.WATZ) {
inputTank.setTankType(PseudoFluidType.MUD);
outputTank.setTankType(PseudoFluidType.MUD.getOutputFluid());
return;
}
}
return;

View File

@ -22,11 +22,14 @@ import com.hbm.util.RTGUtil;
import com.hbm.util.Tuple.Pair;
import api.hbm.energy.IEnergyGenerator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineRadiolysis extends TileEntityMachineBase implements IEnergyGenerator, IFluidAcceptor, IFluidSource, IFluidContainer {
@ -318,4 +321,13 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
if(type == tanks[2].getTankType())
list2.clear();
}
public AxisAlignedBB getRenderBoundingBox() {
return AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 3, zCoord + 2);
}
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB