oil 3 inbound

This commit is contained in:
Bob 2023-03-02 21:15:07 +01:00
parent c775bb7803
commit 6538b34d70
11 changed files with 233 additions and 1 deletions

View File

@ -923,10 +923,11 @@ public class ModBlocks {
public static Block machine_flare;
public static Block machine_refinery;
public static Block machine_vacuum_distill;
public static Block machine_fraction_tower;
public static Block fraction_spacer;
public static Block machine_catalytic_cracker;
public static Block machine_catalytic_reformer;
public static Block machine_boiler_off;
public static Block machine_boiler_on;
@ -2127,9 +2128,11 @@ public class ModBlocks {
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 + ":block_steel");
machine_refinery = new MachineRefinery(Material.iron).setBlockName("machine_refinery").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_refinery");
machine_vacuum_distill = new MachineVacuumDistill(Material.iron).setBlockName("machine_vacuum_distill").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
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");
machine_catalytic_cracker = new MachineCatalyticCracker(Material.iron).setBlockName("machine_catalytic_cracker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
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_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_drill");
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3174,9 +3177,11 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_fracking_tower, machine_fracking_tower.getUnlocalizedName());
GameRegistry.registerBlock(machine_flare, ItemBlockBase.class, machine_flare.getUnlocalizedName());
register(machine_refinery);
register(machine_vacuum_distill);
GameRegistry.registerBlock(machine_fraction_tower, machine_fraction_tower.getUnlocalizedName());
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
GameRegistry.registerBlock(machine_catalytic_cracker, machine_catalytic_cracker.getUnlocalizedName());
register(machine_catalytic_reformer);
GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName());
GameRegistry.registerBlock(machine_autosaw, machine_autosaw.getUnlocalizedName());
register(machine_excavator);

View File

@ -0,0 +1,33 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.machine.oil.TileEntityMachineCatalyticReformer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineCatalyticReformer extends BlockDummyable {
public MachineCatalyticReformer(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachineCatalyticReformer();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {6, 0, 1, 1, 2, 2};
}
@Override
public int getOffset() {
return 1;
}
}

View File

@ -0,0 +1,33 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.machine.oil.TileEntityMachineVacuumDistill;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineVacuumDistill extends BlockDummyable {
public MachineVacuumDistill(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachineVacuumDistill();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {8, 0, 1, 1, 1, 1};
}
@Override
public int getOffset() {
return 1;
}
}

View File

@ -270,6 +270,8 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMixer.class, new RenderMixer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineHephaestus.class, new RenderHephaestus());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAutosaw.class, new RenderAutosaw());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineVacuumDistill.class, new RenderVacuumDistill());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCatalyticReformer.class, new RenderCatalyticReformer());
//Foundry
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());

View File

@ -68,10 +68,12 @@ public class ResourceManager {
//Refinery
public static final IModelCustom refinery = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/refinery.obj"));
public static final IModelCustom vacuum_distill = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/vacuum_distill.obj"));
public static final IModelCustom refinery_exploded = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/refinery_exploded.obj"));
public static final IModelCustom fraction_tower = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/fraction_tower.obj"));
public static final IModelCustom fraction_spacer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/fraction_spacer.obj"));
public static final IModelCustom cracking_tower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/cracking_tower.obj"));
public static final IModelCustom catalytic_reformer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/catalytic_reformer.obj"));
public static final IModelCustom liquefactor = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/liquefactor.obj"));
public static final IModelCustom solidifier = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/solidifier.obj"));
@ -387,9 +389,11 @@ public class ResourceManager {
//Refinery
public static final ResourceLocation refinery_tex = new ResourceLocation(RefStrings.MODID, "textures/models/refinery.png");
public static final ResourceLocation vacuum_distill_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/vacuum_distill.png");
public static final ResourceLocation fraction_tower_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fraction_tower.png");
public static final ResourceLocation fraction_spacer_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fraction_spacer.png");
public static final ResourceLocation cracking_tower_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/cracking_tower.png");
public static final ResourceLocation catalytic_reformer_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/catalytic_reformer.png");
public static final ResourceLocation liquefactor_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/liquefactor.png");
public static final ResourceLocation solidifier_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/solidifier.png");

View File

@ -9,6 +9,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderCatalyticCracker extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {

View File

@ -0,0 +1,61 @@
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 net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderCatalyticReformer 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.glDisable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.catalytic_reformer_tex);
ResourceManager.catalytic_reformer.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_catalytic_reformer);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.catalytic_reformer_tex);
ResourceManager.catalytic_reformer.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -0,0 +1,50 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderVacuumDistill extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.vacuum_distill_tex);
ResourceManager.vacuum_distill.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_vacuum_distill);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.vacuum_distill_tex);
ResourceManager.vacuum_distill.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -298,9 +298,11 @@ public class TileMappings {
put(TileEntityMachineFrackingTower.class, "tileentity_fracking_tower");
put(TileEntityMachineGasFlare.class, "tileentity_gasflare");
put(TileEntityMachineRefinery.class, "tileentity_refinery");
put(TileEntityMachineVacuumDistill.class, "tileentity_vacuuum_distill");
put(TileEntityMachineFractionTower.class, "tileentity_fraction_tower");
put(TileEntitySpacer.class, "tileentity_fraction_spacer");
put(TileEntityMachineCatalyticCracker.class, "tileentity_catalytic_cracker");
put(TileEntityMachineCatalyticReformer.class, "tileentity_catalytic_reformer");
put(TileEntityReactorZirnox.class, "tileentity_zirnox");
put(TileEntityZirnoxDestroyed.class, "tileentity_zirnox_destroyed");

View File

@ -0,0 +1,21 @@
package com.hbm.tileentity.machine.oil;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityMachineCatalyticReformer extends TileEntityMachineBase {
public TileEntityMachineCatalyticReformer() {
super(0);
}
@Override
public String getName() {
return "container.catalyticReformer";
}
@Override
public void updateEntity() {
}
}

View File

@ -0,0 +1,20 @@
package com.hbm.tileentity.machine.oil;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityMachineVacuumDistill extends TileEntityMachineBase {
public TileEntityMachineVacuumDistill() {
super(0);
}
@Override
public String getName() {
return "container.vacuumDistill";
}
@Override
public void updateEntity() {
}
}