cleaned ome renderer classes, new UV for refinery

This commit is contained in:
Bob 2020-10-11 00:37:06 +02:00
parent b2e40abe83
commit 851e39d723
13 changed files with 4131 additions and 3509 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -58,7 +58,7 @@ public class MultiblockHandler {
public static final int[] chemplantDimensionWest = new int[] { 1, 2, 2, 0, 1, 2 };
public static final int[] fluidTankDimensionNS = new int[] { 1, 1, 2, 0, 2, 2 };
public static final int[] fluidTankDimensionEW = new int[] { 2, 2, 2, 0, 1, 1 };
public static final int[] refineryDimensions = new int[] { 1, 1, 9, 0, 1, 1 };
public static final int[] refineryDimensions = new int[] { 1, 1, 8, 0, 1, 1 };
public static final int[] pumpjackDimensionNorth = new int[] { 1, 1, 4, 0, 6, 0 };
public static final int[] pumpjackDimensionEast = new int[] { 0, 6, 4, 0, 1, 1 };
public static final int[] pumpjackDimensionSouth = new int[] { 1, 1, 4, 0, 0, 6 };

View File

@ -43,11 +43,24 @@ public class ResourceManager {
public static final IModelCustom mine_he = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_he.obj"));
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
//Derrick
public static final IModelCustom derrick = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/derrick.obj"));
//Pumpjack
public static final IModelCustom pumpjack_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pumpjack_base.obj"));
public static final IModelCustom pumpjack_head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pumpjack_head.obj"));
public static final IModelCustom pumpjack_rotor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pumpjack_rotor.obj"));
//Refinery
public static final IModelCustom refinery = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/refinery.obj"));
//Flare Stack
public static final IModelCustom oilflare = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/oilFlare.obj"));
//Tank
public static final IModelCustom tank_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/fluidtank_main.obj"));
public static final IModelCustom tank_label = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/fluidtank_label.obj"));
//Turbofan
public static final IModelCustom turbofan_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turbofan_body.obj"));
public static final IModelCustom turbofan_blades = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turbofan_blades.obj"));
@ -69,8 +82,18 @@ public class ResourceManager {
public static final IModelCustom epress_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/epress_body.obj"));
public static final IModelCustom epress_head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/epress_head.obj"));
//Assembler
public static final IModelCustom assembler_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_body.obj"));
public static final IModelCustom assembler_cog = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_cog.obj"));
public static final IModelCustom assembler_slider = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_slider.obj"));
public static final IModelCustom assembler_arm = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/assembler_new_arm.obj"));
//Chemplant
public static final IModelCustom chemplant_new = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_main_new.obj"));
public static final IModelCustom chemplant_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_body.obj"));
public static final IModelCustom chemplant_spinner = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_spinner.obj"));
public static final IModelCustom chemplant_piston = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_piston.obj"));
public static final IModelCustom chemplant_fluid = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluid.hmf"));
public static final IModelCustom chemplant_fluidcap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluidcap.hmf"));
//Centrifuge
public static final IModelCustom centrifuge_new = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/centrifuge_new.obj"));
@ -78,6 +101,10 @@ public class ResourceManager {
//Magnusson Device
public static final IModelCustom microwave = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/microwave.obj"));
//Mining Drill
public static final IModelCustom drill_body = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/drill_main.obj"));
public static final IModelCustom drill_bolt = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/drill_bolt.obj"));
//Laser Miner
public static final IModelCustom mining_laser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_laser.obj"));
@ -222,11 +249,24 @@ public class ResourceManager {
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_shrap.png");
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
//Derrick
public static final ResourceLocation derrick_tex = new ResourceLocation(RefStrings.MODID, "textures/models/derrick.png");
//Pumpjack
public static final ResourceLocation pumpjack_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pumpjack_base.png");
public static final ResourceLocation pumpjack_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pumpjack_head.png");
public static final ResourceLocation pumpjack_rotor_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pumpjack_rotor.png");
//Refinery
public static final ResourceLocation refinery_tex = new ResourceLocation(RefStrings.MODID, "textures/models/refinery.png");
//Flare Stack
public static final ResourceLocation oilflare_tex = new ResourceLocation(RefStrings.MODID, "textures/models/oilFlareTexture.png");
//Tank
public static final ResourceLocation tank_tex = new ResourceLocation(RefStrings.MODID, "textures/models/tank.png");
public static final ResourceLocation tank_label_tex = new ResourceLocation(RefStrings.MODID, "textures/models/tank_NONE.png");
//Turbofan
public static final ResourceLocation turbofan_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turbofan_body.png");
public static final ResourceLocation turbofan_blades_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turbofan_blades.png");
@ -252,8 +292,17 @@ public class ResourceManager {
public static final ResourceLocation epress_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/epress_body.png");
public static final ResourceLocation epress_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/epress_head.png");
//Assembler
public static final ResourceLocation assembler_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_base_new.png");
public static final ResourceLocation assembler_cog_tex = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_cog_new.png");
public static final ResourceLocation assembler_slider_tex = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_slider_new.png");
public static final ResourceLocation assembler_arm_tex = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_arm_new.png");
//Chemplant
public static final ResourceLocation chemplant_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_main_new.png");
public static final ResourceLocation chemplant_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_base_new.png");
public static final ResourceLocation chemplant_spinner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_spinner_new.png");
public static final ResourceLocation chemplant_piston_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_piston_new.png");
public static final ResourceLocation chemplant_fluid_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lavabase_small.png");
//Centrifuge
public static final ResourceLocation centrifuge_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_new.png");
@ -261,6 +310,10 @@ public class ResourceManager {
//Magnusson Device
public static final ResourceLocation microwave_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/microwave.png");
//Mining Drill
public static final ResourceLocation drill_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mining_drill.png");
public static final ResourceLocation drill_bolt_tex = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png");
//Laser Miner
public static final ResourceLocation mining_laser_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/mining_laser_base.png");

View File

@ -8,8 +8,8 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class ItemRenderLibrary {
@ -18,6 +18,22 @@ public class ItemRenderLibrary {
public static void init() {
renderers.put(Item.getItemFromBlock(ModBlocks.obj_tester), new ItemRenderBase() {
public void renderInventory() {
}
public void renderCommon() {
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.soyuz_module_dome_tex);
ResourceManager.soyuz_module.renderPart("Dome");
bindTexture(ResourceManager.soyuz_module_lander_tex);
ResourceManager.soyuz_module.renderPart("Capsule");
bindTexture(ResourceManager.soyuz_module_propulsion_tex);
ResourceManager.soyuz_module.renderPart("Propulsion");
bindTexture(ResourceManager.soyuz_module_solar_tex);
ResourceManager.soyuz_module.renderPart("Solar");
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_cyclotron), new ItemRenderBase() {
public void renderInventory() {
GL11.glScaled(2.25, 2.25, 2.25);
@ -133,6 +149,243 @@ public class ItemRenderLibrary {
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_selenium), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
GL11.glScaled(2, 2, 2);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.selenium_body_tex); ResourceManager.selenium_body.renderAll();
GL11.glTranslated(0.0D, 1.0D, 0.0D);
bindTexture(ResourceManager.selenium_rotor_tex); ResourceManager.selenium_rotor.renderAll();
bindTexture(ResourceManager.selenium_piston_tex);
for(int i = 0; i < 7; i++) {
ResourceManager.selenium_piston.renderAll(); GL11.glRotatef(360F/7F, 0, 0, 1);
}
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_reactor_small), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
bindTexture(ResourceManager.reactor_small_base_tex); ResourceManager.reactor_small_base.renderAll();
bindTexture(ResourceManager.reactor_small_rods_tex); ResourceManager.reactor_small_rods.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_industrial_generator), new ItemRenderBase() {
public void renderInventory() {
GL11.glScaled(4, 4, 4);
GL11.glRotated(90, 0, 1, 0);
}
public void renderCommon() {
GL11.glScaled(0.25, 0.25, 0.25);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.igen_tex); ResourceManager.igen.renderPart("Base");
bindTexture(ResourceManager.igen_rotor); ResourceManager.igen.renderPart("Rotor");
bindTexture(ResourceManager.igen_cog); ResourceManager.igen.renderPart("CogLeft"); ResourceManager.igen.renderPart("CogRight");
bindTexture(ResourceManager.igen_pistons); ResourceManager.igen.renderPart("Pistons");
bindTexture(ResourceManager.igen_arm); ResourceManager.igen.renderPart("ArmLeft"); ResourceManager.igen.renderPart("ArmRight");
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_radgen), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -1, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(4.5, 4.5, 4.5);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glTranslated(0, 0, 1.5);
bindTexture(ResourceManager.radgen_body_tex); ResourceManager.radgen_body.renderAll();
GL11.glTranslated(0, 1.5, 0);
bindTexture(ResourceManager.turbofan_blades_tex); ResourceManager.radgen_rotor.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_fensu), new ItemRenderBase() {
public void renderInventory() {
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, -2, 0);
GL11.glScaled(2.5, 2.5, 2.5);
}
public void renderCommon() {
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.fensu_tex); ResourceManager.fensu.renderPart("Base"); ResourceManager.fensu.renderPart("Disc");
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
ResourceManager.fensu.renderPart("Lights");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_assembler), new ItemRenderBase() {
public void renderInventory() {
GL11.glScaled(3.5, 3.5, 3.5);
}
public void renderCommon() {
bindTexture(ResourceManager.assembler_body_tex); ResourceManager.assembler_body.renderAll();
bindTexture(ResourceManager.assembler_slider_tex); ResourceManager.assembler_slider.renderAll();
bindTexture(ResourceManager.assembler_arm_tex); ResourceManager.assembler_arm.renderAll();
bindTexture(ResourceManager.assembler_cog_tex);
GL11.glPushMatrix();
GL11.glTranslated(-0.6, 0.75, 1.0625);
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0.6, 0.75, 1.0625);
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(-0.6, 0.75, -1.0625);
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0.6, 0.75, -1.0625);
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_chemplant), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -2, 0);
GL11.glScaled(3.5, 3.5, 3.5);
}
public void renderCommon() {
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.chemplant_body_tex); ResourceManager.chemplant_body.renderAll();
bindTexture(ResourceManager.chemplant_piston_tex); ResourceManager.chemplant_piston.renderAll();
bindTexture(ResourceManager.chemplant_spinner_tex);
GL11.glTranslated(-0.625, 0, 0.625);
ResourceManager.chemplant_spinner.renderAll();
GL11.glTranslated(1.25, 0, 0);
ResourceManager.chemplant_spinner.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_fluidtank), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -2, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
bindTexture(ResourceManager.tank_tex); ResourceManager.tank_body.renderAll();
bindTexture(ResourceManager.tank_label_tex); ResourceManager.tank_label.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_well), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
bindTexture(ResourceManager.derrick_tex); ResourceManager.derrick.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_pumpjack), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -2, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glTranslatef(0, 0, 3);
bindTexture(ResourceManager.pumpjack_base_tex); ResourceManager.pumpjack_base.renderAll();
GL11.glTranslated(0, 3.5, -2.5);
bindTexture(ResourceManager.pumpjack_head_tex); ResourceManager.pumpjack_head.renderAll();
GL11.glTranslated(0, -2, -3);
bindTexture(ResourceManager.pumpjack_rotor_tex); ResourceManager.pumpjack_rotor.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_flare), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(2.5, 2.5, 2.5);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.oilflare_tex); ResourceManager.oilflare.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_refinery), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
GL11.glRotated(180, 0, 1, 0);
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.refinery_tex); ResourceManager.refinery.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_drill), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -2, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
GL11.glRotated(180, 0, 1, 0);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.drill_body_tex); ResourceManager.drill_body.renderAll();
bindTexture(ResourceManager.drill_bolt_tex); ResourceManager.drill_bolt.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_mining_laser), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -0.5, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
bindTexture(ResourceManager.mining_laser_base_tex); ResourceManager.mining_laser.renderPart("Base");
bindTexture(ResourceManager.mining_laser_pivot_tex); ResourceManager.mining_laser.renderPart("Pivot");
GL11.glTranslated(0, -1, 0.75);
GL11.glRotated(90, 1, 0, 0);
bindTexture(ResourceManager.mining_laser_laser_tex); ResourceManager.mining_laser.renderPart("Laser");
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_turbofan), new ItemRenderBase() {
public void renderInventory() {
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(2, 2, 2);
}
public void renderCommon() {
bindTexture(ResourceManager.turbofan_body_tex); ResourceManager.turbofan_body.renderAll();
GL11.glTranslated(0, 1.5, 0);
bindTexture(ResourceManager.turbofan_blades_tex); ResourceManager.turbofan_blades.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.plasma_heater), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -1, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(2.5, 2.5, 2.5);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glTranslatef(0, 0, 14);
bindTexture(ResourceManager.iter_microwave);
ResourceManager.iter.renderPart("Microwave");
}});
}
private static void bindTexture(ResourceLocation res) {

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -12,21 +13,6 @@ import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderAssembler extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(RefStrings.MODID, "models/assembler_new_body.obj");
private static final ResourceLocation cog = new ResourceLocation(RefStrings.MODID, "models/assembler_new_cog.obj");
private static final ResourceLocation slider = new ResourceLocation(RefStrings.MODID, "models/assembler_new_slider.obj");
private static final ResourceLocation arm = new ResourceLocation(RefStrings.MODID, "models/assembler_new_arm.obj");
private static final IModelCustom bodyModel = AdvancedModelLoader.loadModel(body);
private static final IModelCustom cogModel = AdvancedModelLoader.loadModel(cog);
private static final IModelCustom sliderModel = AdvancedModelLoader.loadModel(slider);
private static final IModelCustom armModel = AdvancedModelLoader.loadModel(arm);
private static final ResourceLocation bodyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_base_new.png");
private static final ResourceLocation cogTexture = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_cog_new.png");
private static final ResourceLocation sliderTexture = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_slider_new.png");
private static final ResourceLocation armTexture = new ResourceLocation(RefStrings.MODID, "textures/models/assembler_arm_new.png");
public RenderAssembler() { }
@ -54,9 +40,9 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
}
bindTexture(bodyTexture);
bindTexture(ResourceManager.assembler_body_tex);
bodyModel.renderAll();
ResourceManager.assembler_body.renderAll();
GL11.glPopMatrix();
@ -86,7 +72,7 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
}
bindTexture(sliderTexture);
bindTexture(ResourceManager.assembler_slider_tex);
int offset = (int) (System.currentTimeMillis() % 5000) / 5;
@ -98,9 +84,9 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
if(assembler.isProgressing)
GL11.glTranslated(offset * 0.003 - 0.75, 0, 0);
sliderModel.renderAll();
ResourceManager.assembler_slider.renderAll();
bindTexture(armTexture);
bindTexture(ResourceManager.assembler_arm_tex);
double sway = (System.currentTimeMillis() % 2000) / 2;
@ -108,7 +94,7 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
if(assembler.isProgressing)
GL11.glTranslated(0, 0, sway * 0.3);
armModel.renderAll();
ResourceManager.assembler_arm.renderAll();
GL11.glPopMatrix();
@ -137,7 +123,7 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
}
bindTexture(cogTexture);
bindTexture(ResourceManager.assembler_cog_tex);
int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5;
@ -149,25 +135,25 @@ public class RenderAssembler extends TileEntitySpecialRenderer {
GL11.glPushMatrix();
GL11.glTranslated(-0.6, 0.75, 1.0625);
GL11.glRotatef(-rotation, 0F, 0F, 1F);
cogModel.renderAll();
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0.6, 0.75, 1.0625);
GL11.glRotatef(rotation, 0F, 0F, 1F);
cogModel.renderAll();
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(-0.6, 0.75, -1.0625);
GL11.glRotatef(-rotation, 0F, 0F, 1F);
cogModel.renderAll();
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0.6, 0.75, -1.0625);
GL11.glRotatef(rotation, 0F, 0F, 1F);
cogModel.renderAll();
ResourceManager.assembler_cog.renderAll();
GL11.glPopMatrix();
GL11.glPopMatrix();

View File

@ -3,34 +3,14 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.loader.HmfController;
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderChemplant extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(RefStrings.MODID, "models/chemplant_new_body.obj");
private static final ResourceLocation spinner = new ResourceLocation(RefStrings.MODID, "models/chemplant_new_spinner.obj");
private static final ResourceLocation piston = new ResourceLocation(RefStrings.MODID, "models/chemplant_new_piston.obj");
private static final ResourceLocation fluid = new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluid.hmf");
private static final ResourceLocation fluidcap = new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluidcap.hmf");
private static final IModelCustom bodyModel = AdvancedModelLoader.loadModel(body);
private static final IModelCustom spinnerModel = AdvancedModelLoader.loadModel(spinner);
private static final IModelCustom pistonModel = AdvancedModelLoader.loadModel(piston);
private static final IModelCustom fluidModel = AdvancedModelLoader.loadModel(fluid);
private static final IModelCustom fluidcapModel = AdvancedModelLoader.loadModel(fluidcap);
private static final ResourceLocation bodyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_base_new.png");
private static final ResourceLocation spinnerTexture = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_spinner_new.png");
private static final ResourceLocation pistonTexture = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_piston_new.png");
private static final ResourceLocation fluidTexture = new ResourceLocation(RefStrings.MODID, "textures/models/lavabase_small.png");
public RenderChemplant() { }
@ -58,9 +38,9 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
GL11.glTranslated(0.5D, 0.0D, -0.5D); break;
}
bindTexture(bodyTexture);
bindTexture(ResourceManager.chemplant_body_tex);
bodyModel.renderAll();
ResourceManager.chemplant_body.renderAll();
GL11.glPopMatrix();
@ -90,7 +70,7 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
}
bindTexture(spinnerTexture);
bindTexture(ResourceManager.chemplant_spinner_tex);
int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5;
@ -102,7 +82,7 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
else
GL11.glRotatef(-45, 0F, 1F, 0F);
spinnerModel.renderAll();
ResourceManager.chemplant_spinner.renderAll();
GL11.glPopMatrix();
GL11.glPushMatrix();
@ -113,12 +93,12 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
else
GL11.glRotatef(45, 0F, 1F, 0F);
spinnerModel.renderAll();
ResourceManager.chemplant_spinner.renderAll();
GL11.glPopMatrix();
double push = Math.sin((System.currentTimeMillis() % 2000) / 1000D * Math.PI) * 0.25 - 0.25;
bindTexture(pistonTexture);
bindTexture(ResourceManager.chemplant_piston_tex);
GL11.glPushMatrix();
@ -127,10 +107,10 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
else
GL11.glTranslated(0, -0.25, 0);
pistonModel.renderAll();
ResourceManager.chemplant_piston.renderAll();
GL11.glPopMatrix();
bindTexture(fluidTexture);
bindTexture(ResourceManager.chemplant_fluid_tex);
int color = 0;
GL11.glDisable(GL11.GL_LIGHTING);
@ -150,9 +130,9 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
for(int i = 0; i < count; i++) {
if(i < count - 1)
fluidModel.renderAll();
ResourceManager.chemplant_fluid.renderAll();
else
fluidcapModel.renderAll();
ResourceManager.chemplant_fluidcap.renderAll();
GL11.glTranslated(0, 0.125, 0);
}
GL11.glPopMatrix();
@ -174,9 +154,9 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
for(int i = 0; i < count; i++) {
if(i < count - 1)
fluidModel.renderAll();
ResourceManager.chemplant_fluid.renderAll();
else
fluidcapModel.renderAll();
ResourceManager.chemplant_fluidcap.renderAll();
GL11.glTranslated(0, 0.125, 0);
}
GL11.glPopMatrix();

View File

@ -2,38 +2,24 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderDerrick extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(RefStrings.MODID, "models/derrick.obj");
private IModelCustom genModel;
private ResourceLocation genTexture;
public RenderDerrick()
{
genModel = AdvancedModelLoader.loadModel(body);
genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/derrick.png");
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
{
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
bindTexture(genTexture);
genModel.renderAll();
bindTexture(ResourceManager.derrick_tex);
ResourceManager.derrick.renderAll();
GL11.glPopMatrix();
}

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.TileEntityMachineFluidTank;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@ -12,22 +13,6 @@ import net.minecraftforge.client.model.IModelCustom;
public class RenderFluidTank extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/fluidtank_main.obj");
private static final ResourceLocation rotor = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/fluidtank_label.obj");
private IModelCustom genModel;
private IModelCustom rotModel;
private ResourceLocation genTexture;
private ResourceLocation rotTexture;
public RenderFluidTank()
{
genModel = AdvancedModelLoader.loadModel(body);
rotModel = AdvancedModelLoader.loadModel(rotor);
//gadgetTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/tank.png");
rotTexture = new ResourceLocation(RefStrings.MODID, "textures/models/tank_none.png");
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
{
@ -41,21 +26,17 @@ public class RenderFluidTank extends TileEntitySpecialRenderer {
{
case 2:
GL11.glRotatef(90, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D);
case 4:
GL11.glRotatef(180, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D);
case 3:
GL11.glRotatef(270, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D);
case 5:
GL11.glRotatef(0, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D);
}
bindTexture(genTexture);
bindTexture(ResourceManager.tank_tex);
genModel.renderAll();
ResourceManager.tank_body.renderAll();
GL11.glPopMatrix();
@ -89,9 +70,9 @@ public class RenderFluidTank extends TileEntitySpecialRenderer {
String s = "NONE";
if(tileEntity instanceof TileEntityMachineFluidTank)
s = ((TileEntityMachineFluidTank)tileEntity).tank.getTankType().name();
rotTexture = new ResourceLocation(RefStrings.MODID, "textures/models/tank_" + s + ".png");
bindTexture(rotTexture);
rotModel.renderAll();
bindTexture(new ResourceLocation(RefStrings.MODID, "textures/models/tank_" + s + ".png"));
ResourceManager.tank_label.renderAll();
GL11.glPopMatrix();
}

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@ -12,28 +13,18 @@ import net.minecraftforge.client.model.IModelCustom;
public class RenderGasFlare extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(RefStrings.MODID, "models/oilFlare.obj");
private IModelCustom genModel;
private ResourceLocation genTexture;
public RenderGasFlare()
{
genModel = AdvancedModelLoader.loadModel(body);
genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/oilFlareTexture.png");
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
{
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
bindTexture(genTexture);
bindTexture(ResourceManager.oilflare_tex);
genModel.renderAll();
ResourceManager.oilflare.renderAll();
GL11.glPopMatrix();
}

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -13,22 +14,6 @@ import net.minecraftforge.client.model.IModelCustom;
public class RenderMiningDrill extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/drill_main.obj");
private static final ResourceLocation bolt = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/drill_bolt.obj");
private IModelCustom bodyModel;
private ResourceLocation bodyTexture;
private IModelCustom boltModel;
private ResourceLocation boltTexture;
public RenderMiningDrill()
{
bodyModel = AdvancedModelLoader.loadModel(body);
bodyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/mining_drill.png");
boltModel = AdvancedModelLoader.loadModel(bolt);
boltTexture = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png");
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
{
@ -41,21 +26,17 @@ public class RenderMiningDrill extends TileEntitySpecialRenderer {
{
case 2:
GL11.glRotatef(180, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 4:
GL11.glRotatef(270, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 3:
GL11.glRotatef(0, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 5:
GL11.glRotatef(90, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
}
bindTexture(bodyTexture);
bindTexture(ResourceManager.drill_body_tex);
bodyModel.renderAll();
ResourceManager.drill_body.renderAll();
GL11.glPopMatrix();
@ -73,22 +54,18 @@ public class RenderMiningDrill extends TileEntitySpecialRenderer {
{
case 2:
GL11.glRotatef(90, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 4:
GL11.glRotatef(180, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 3:
GL11.glRotatef(270, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
case 5:
GL11.glRotatef(0, 0F, 1F, 0F); break;
//GL11.glTranslated(0.5D, 0.0D, 0.0D); break;
}
GL11.glRotatef(((TileEntityMachineMiningDrill)tileEntity).rotation, 0F, 1F, 0F);
bindTexture(boltTexture);
boltModel.renderAll();
bindTexture(ResourceManager.drill_bolt_tex);
ResourceManager.drill_bolt.renderAll();
GL11.glPopMatrix();
}

View File

@ -2,38 +2,27 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderRefinery extends TileEntitySpecialRenderer {
private static final ResourceLocation body = new ResourceLocation(RefStrings.MODID, "models/refinery.obj");
private IModelCustom genModel;
private ResourceLocation genTexture;
public RenderRefinery()
{
genModel = AdvancedModelLoader.loadModel(body);
genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/refinery.png");
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
{
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
bindTexture(genTexture);
genModel.renderAll();
bindTexture(ResourceManager.refinery_tex);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.refinery.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}

View File

@ -13,7 +13,7 @@ public class TileEntityMachineMiniRTG extends TileEntity implements ISource {
public List<IConsumer> list = new ArrayList();
public long power;
public long maxPower = 100;
public long maxPower = 1400;
boolean tact = false;
@Override
@ -21,7 +21,7 @@ public class TileEntityMachineMiniRTG extends TileEntity implements ISource {
if(!worldObj.isRemote) {
power += 25;
power += 70;
if(power > maxPower)
power = maxPower;