mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-21 05:22:35 +00:00
LazPaint fucking sucks
This commit is contained in:
parent
38e58117da
commit
2a0d887526
@ -336,6 +336,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation pheo_fire_door_orange_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_orange.png");
|
||||
public static IModelCustomNamed pheo_fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/fire_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_airlock_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door.png");
|
||||
public static final ResourceLocation pheo_airlock_door_clean_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_clean.png");
|
||||
public static final ResourceLocation pheo_airlock_door_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/airlock_door_green.png");
|
||||
public static IModelCustomNamed pheo_airlock_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/airlock_door.obj")).asVBO();
|
||||
public static final ResourceLocation pheo_blast_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/blast_door.png");
|
||||
public static IModelCustomNamed pheo_blast_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/blast_door.obj")).asVBO();
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.items.weapon.ItemAmmoHIMARS.HIMARSRocket;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.tileentity.RenderBobble;
|
||||
import com.hbm.render.tileentity.RenderDemonLamp;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@ -26,6 +25,7 @@ public class ItemRenderLibrary {
|
||||
public static HashMap<Item, ItemRenderBase> renderers = new HashMap();
|
||||
|
||||
public static void init() {
|
||||
ItemRenderLibraryDoors.init();
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.obj_tester), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
@ -595,186 +595,6 @@ public class ItemRenderLibrary {
|
||||
bindTexture(ResourceManager.satdock_tex); ResourceManager.satDock.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.vault_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.vault_cog_tex); ResourceManager.vault_cog.renderAll();
|
||||
bindTexture(ResourceManager.vault_label_101_tex); ResourceManager.vault_label.renderAll();
|
||||
}});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.secure_access_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(2.4, 2.4, 2.4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_secure_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_secure_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.fire_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
int index = (int) ((Clock.get_ms() % 3000) / 1000);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(
|
||||
index == 2 ? ResourceManager.pheo_fire_door_orange_tex :
|
||||
index == 1 ? ResourceManager.pheo_fire_door_black_tex :
|
||||
ResourceManager.pheo_fire_door_tex);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_fire_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.sliding_blast_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2.75, 0);
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_blast_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_blast_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.large_vehicle_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(1.8, 1.8, 1.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_vehicle_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_vehicle_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.water_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(4, 4, 4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_water_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_water_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(2, 2, 2);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -1.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 1.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch_large), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_large_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -2.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 2.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.qe_containment), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.5, 0);
|
||||
GL11.glScaled(3.8, 3.8, 3.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_containment_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_containment_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.qe_sliding_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_sliding_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_sliding_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.round_airlock_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_airlock_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_airlock_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.sliding_seal_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(7, 7, 7);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_seal_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_seal_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.blast_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.blast_door_base_tex); ResourceManager.blast_door_base.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_tooth_tex); ResourceManager.blast_door_tooth.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_slider_tex); ResourceManager.blast_door_slider.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_block_tex); ResourceManager.blast_door_block.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_microwave), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 4);
|
||||
|
||||
211
src/main/java/com/hbm/render/item/ItemRenderLibraryDoors.java
Normal file
211
src/main/java/com/hbm/render/item/ItemRenderLibraryDoors.java
Normal file
@ -0,0 +1,211 @@
|
||||
package com.hbm.render.item;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
// the ItemRenderLibrary system sucks and is ugly as hell but it's the quickest way of doing it
|
||||
// due to the sheer size if this stupid fucking class i just janked this part out into its own thing
|
||||
// that way, code hotswap doesn't take 5 years to work while vomitting out error messages like
|
||||
// i vomitted out that 20 pack of soggy chicken nuggets last year
|
||||
// still a better use of €15 than hollow knight
|
||||
@NotableComments
|
||||
public class ItemRenderLibraryDoors {
|
||||
|
||||
public static void init() {
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.vault_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.vault_cog_tex); ResourceManager.vault_cog.renderAll();
|
||||
bindTexture(ResourceManager.vault_label_101_tex); ResourceManager.vault_label.renderAll();
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.secure_access_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(2.4, 2.4, 2.4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.SECURE_ACCESS_DOOR.getCyclingSkins());
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_secure_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.fire_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.FIRE_DOOR.getCyclingSkins());
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_fire_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.sliding_blast_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2.75, 0);
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_blast_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_blast_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.large_vehicle_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(1.8, 1.8, 1.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_vehicle_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_vehicle_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.water_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -4, 0);
|
||||
GL11.glScaled(4, 4, 4);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
bindTexture(ResourceManager.pheo_water_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_water_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(2, 2, 2);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -1.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 1.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.silo_hatch_large), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.silo_hatch_large_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Frame");
|
||||
GL11.glTranslated(0, 0.875, -2.875);
|
||||
GL11.glRotated(-120, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, 2.875);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.silo_hatch_large.renderPart("Hatch");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.qe_containment), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.5, 0);
|
||||
GL11.glScaled(3.8, 3.8, 3.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_containment_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_containment_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.qe_sliding_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_sliding_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_sliding_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.round_airlock_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3.75, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.ROUND_AIRLOCK_DOOR.getCyclingSkins());
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_airlock_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.sliding_seal_door), new ItemRenderBase(){
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(7, 7, 7);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.pheo_seal_door_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.pheo_seal_door.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
ItemRenderLibrary.renderers.put(Item.getItemFromBlock(ModBlocks.blast_door), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.blast_door_base_tex); ResourceManager.blast_door_base.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_tooth_tex); ResourceManager.blast_door_tooth.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_slider_tex); ResourceManager.blast_door_slider.renderAll();
|
||||
bindTexture(ResourceManager.blast_door_block_tex); ResourceManager.blast_door_block.renderAll();
|
||||
}});
|
||||
}
|
||||
|
||||
private static void bindTexture(ResourceLocation res) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(res);
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -17,7 +18,7 @@ public class RenderAirlockDoor implements IRenderDoors {
|
||||
@Override
|
||||
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.pheo_airlock_door_tex);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.ROUND_AIRLOCK_DOOR.getSkinFromIndex(door.getSkinIndex()));
|
||||
|
||||
double maxOpen = 1.5;
|
||||
double open = 0;
|
||||
|
||||
@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -17,10 +18,7 @@ public class RenderFireDoor implements IRenderDoors {
|
||||
@Override
|
||||
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(
|
||||
door.getSkinIndex() == 2 ? ResourceManager.pheo_fire_door_orange_tex :
|
||||
door.getSkinIndex() == 1 ? ResourceManager.pheo_fire_door_black_tex :
|
||||
ResourceManager.pheo_fire_door_tex);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.FIRE_DOOR.getSkinFromIndex(door.getSkinIndex()));
|
||||
|
||||
double maxRaise = 2.75;
|
||||
double raise = 0;
|
||||
|
||||
@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -17,10 +18,7 @@ public class RenderSecureDoor implements IRenderDoors {
|
||||
@Override
|
||||
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(
|
||||
door.getSkinIndex() == 1 ?
|
||||
ResourceManager.pheo_secure_door_grey_tex :
|
||||
ResourceManager.pheo_secure_door_tex);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.SECURE_ACCESS_DOOR.getSkinFromIndex(door.getSkinIndex()));
|
||||
|
||||
double maxRaise = 3.5;
|
||||
double raise = 0;
|
||||
|
||||
@ -10,6 +10,8 @@ import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.loader.IModelCustomNamed;
|
||||
import com.hbm.render.tileentity.door.*;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -119,7 +121,13 @@ public abstract class DoorDecl {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public int getSkinCount() { return 3; }
|
||||
public final ResourceLocation[] skins = new ResourceLocation[] {
|
||||
ResourceManager.pheo_fire_door_tex,
|
||||
ResourceManager.pheo_fire_door_black_tex,
|
||||
ResourceManager.pheo_fire_door_orange_tex,
|
||||
};
|
||||
|
||||
@Override public ResourceLocation[] getSEDNASkins() { return skins; }
|
||||
|
||||
@Override public int timeToOpen() { return 160; }
|
||||
@Override public int[][] getDoorOpenRanges() { return new int[][] { { -1, 0, 0, 3, 4, 1 } }; }
|
||||
@ -127,19 +135,12 @@ public abstract class DoorDecl {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open)
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
if(z == 1) {
|
||||
return AxisAlignedBB.getBoundingBox(0.5, 0, 0, 1, 1, 1);
|
||||
} else if(z == -2) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.5, 1, 1);
|
||||
} else if(y > 1) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.75, 0, 1, 1, 1);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.1, 1);
|
||||
} else {
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
if(!open) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
if(z == 1) return AxisAlignedBB.getBoundingBox(0.5, 0, 0, 1, 1, 1);
|
||||
else if(z == -2) return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.5, 1, 1);
|
||||
else if(y > 1) return AxisAlignedBB.getBoundingBox(0, 0.75, 0, 1, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.1, 1);
|
||||
else return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
};
|
||||
|
||||
@ -174,11 +175,8 @@ public abstract class DoorDecl {
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(open) {
|
||||
if(y == 3) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.08, 1);
|
||||
}
|
||||
if(y == 3) return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.08, 1);
|
||||
}
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
@ -208,11 +206,8 @@ public abstract class DoorDecl {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(forCollision && open) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);
|
||||
} else {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.25, 1, 1, 1);
|
||||
}
|
||||
if(forCollision && open) return AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);
|
||||
else return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.25, 1, 1, 1);
|
||||
};
|
||||
|
||||
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 0, 0, 0, 1, 2, 2 } }; }
|
||||
@ -246,26 +241,21 @@ public abstract class DoorDecl {
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open) {
|
||||
if(y > 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.375, 1, 1, 0.625);
|
||||
}
|
||||
if(y > 0) return AxisAlignedBB.getBoundingBox(0, 0, 0.375, 1, 1, 0.625);
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
}
|
||||
if(y == 1) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
} else if(y == 4) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0.15, 1, 1, 0.85);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
}else {
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
if(y == 1) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
else if(y == 4) return AxisAlignedBB.getBoundingBox(0, 0.5, 0.15, 1, 1, 0.85);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
|
||||
else return super.getBlockBound(x, y, z, open, forCollision);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSkinCount() {
|
||||
return 2;
|
||||
}
|
||||
public final ResourceLocation[] skins = new ResourceLocation[] {
|
||||
ResourceManager.pheo_secure_door_tex,
|
||||
ResourceManager.pheo_secure_door_grey_tex
|
||||
};
|
||||
|
||||
@Override public ResourceLocation[] getSEDNASkins() { return skins; }
|
||||
};
|
||||
|
||||
public static final DoorDecl ROUND_AIRLOCK_DOOR = new DoorDecl() {
|
||||
@ -286,19 +276,21 @@ public abstract class DoorDecl {
|
||||
return null;
|
||||
}
|
||||
|
||||
public final ResourceLocation[] skins = new ResourceLocation[] {
|
||||
ResourceManager.pheo_airlock_door_tex,
|
||||
ResourceManager.pheo_airlock_door_clean_tex,
|
||||
ResourceManager.pheo_airlock_door_green_tex
|
||||
};
|
||||
|
||||
@Override public ResourceLocation[] getSEDNASkins() { return skins; }
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open)
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
if(z == 1) {
|
||||
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||
} else if(z == -2) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||
} else if(y == 3) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
}
|
||||
if(!open) return super.getBlockBound(x, y, z, open, forCollision);
|
||||
if(z == 1) return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||
else if(z == -2) return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||
else if(y == 3) return AxisAlignedBB.getBoundingBox(0, 0.5, 0, 1, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
};
|
||||
|
||||
@ -330,11 +322,8 @@ public abstract class DoorDecl {
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(forCollision && open) {
|
||||
if(z == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(1 - 0.125, 0, 1 - 0.1875, 1, 1, 1);
|
||||
} else {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.1875, 0.125, 1, 1);
|
||||
}
|
||||
if(z == 0) return AxisAlignedBB.getBoundingBox(1 - 0.125, 0, 1 - 0.1875, 1, 1, 1);
|
||||
else return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.1875, 0.125, 1, 1);
|
||||
} else {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 1 - 0.1875, 1, 1, 1);
|
||||
}
|
||||
@ -369,12 +358,9 @@ public abstract class DoorDecl {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open)
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.5, 1, 1, 1);
|
||||
if(y > 1)
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.25, 0.5, 1, 1, 1);
|
||||
else if(y == 0)
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.5, 1, forCollision ? 0 : 0.125, 1);
|
||||
if(!open) return AxisAlignedBB.getBoundingBox(0, 0, 0.5, 1, 1, 1);
|
||||
if(y > 1) return AxisAlignedBB.getBoundingBox(0, 0.25, 0.5, 1, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0.5, 1, forCollision ? 0 : 0.125, 1);
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
};
|
||||
|
||||
@ -407,13 +393,9 @@ public abstract class DoorDecl {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 1, 1);
|
||||
} else if(y > 1) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0.85, 0.75, 1, 1, 1);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, forCollision ? 0 : 0.15, 1);
|
||||
}
|
||||
if(!open) return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 1, 1);
|
||||
else if(y > 1) return AxisAlignedBB.getBoundingBox(0, 0.85, 0.75, 1, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, forCollision ? 0 : 0.15, 1);
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
};
|
||||
|
||||
@ -551,15 +533,10 @@ public abstract class DoorDecl {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
|
||||
if(!open)
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
if(z == 3) {
|
||||
return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||
} else if(z == -3) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||
} else if(y == 0) {
|
||||
return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
}
|
||||
if(!open) return super.getBlockBound(x, y, z, open, forCollision);
|
||||
if(z == 3) return AxisAlignedBB.getBoundingBox(0.4, 0, 0, 1, 1, 1);
|
||||
else if(z == -3) return AxisAlignedBB.getBoundingBox(0, 0, 0, 0.6, 1, 1);
|
||||
else if(y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, forCollision ? 0 : 0.0625, 1);
|
||||
return super.getBlockBound(x, y, z, open, forCollision);
|
||||
};
|
||||
|
||||
@ -592,9 +569,6 @@ public abstract class DoorDecl {
|
||||
return BobMathUtil.remap01_clamp(time, min, max);
|
||||
}
|
||||
|
||||
public boolean hasSkins() { return getSkinCount() > 0; }
|
||||
public int getSkinCount() { return 0; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ResourceLocation getTextureForPart(String partName) {
|
||||
return getTextureForPart(0, partName);
|
||||
@ -639,6 +613,26 @@ public abstract class DoorDecl {
|
||||
f[2] = z;
|
||||
return f;
|
||||
}
|
||||
|
||||
public ResourceLocation[] getSEDNASkins() { return null; }
|
||||
public boolean hasSkins() { return getSkinCount() > 0; }
|
||||
|
||||
public int getSkinCount() {
|
||||
ResourceLocation[] skins = this.getSEDNASkins();
|
||||
if(skins == null || skins.length <= 1) return 0;
|
||||
return skins.length;
|
||||
}
|
||||
|
||||
public ResourceLocation getCyclingSkins() {
|
||||
ResourceLocation[] skins = this.getSEDNASkins();
|
||||
int index = (int) ((Clock.get_ms() % (skins.length * 1000)) / 1000);
|
||||
return skins[index];
|
||||
}
|
||||
|
||||
public ResourceLocation getSkinFromIndex(int index) {
|
||||
ResourceLocation[] skins = this.getSEDNASkins();
|
||||
return skins[Math.abs(index) % skins.length];
|
||||
}
|
||||
|
||||
// keyframe animation system sneakily stitched into the door decl
|
||||
public IRenderDoors getSEDNARenderer() { return null; }
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Loading…
x
Reference in New Issue
Block a user