This commit is contained in:
Boblet 2026-01-23 14:50:29 +01:00
parent b4d0122cfc
commit 492703ab23
15 changed files with 4938 additions and 51 deletions

View File

@ -14,6 +14,7 @@
* Rebranded canned horse slime
* Now with extra bone marrow
* Updated the deuterium tower's model
* Increased the energy requirement for welding osmiridium
# Fixed
* Potentially fixed yet another issue regarding crates

View File

@ -80,7 +80,7 @@ public class ArcWelderRecipes extends SerializableRecipe {
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_CMB.id), 1_200, 10_000_000L, new FluidStack(Fluids.REFORMGAS, 1_000),
new OreDictStack(CMB.plateCast(), 2)));
//pre-DFC
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 20_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.plate_welded, 1, Mats.MAT_OSMIRIDIUM.id), 6_000, 1_000_000_000L, new FluidStack(Fluids.REFORMGAS, 16_000),
new OreDictStack(OSMIRIDIUM.plateCast(), 2)));
//Missile Parts

View File

@ -337,7 +337,12 @@ public class ResourceManager {
//Doors
public static AnimatedModel transition_seal = ColladaLoader.load(new ResourceLocation(RefStrings.MODID, "models/doors/seal.dae"), true);
public static Animation transition_seal_anim = ColladaLoader.loadAnim(24040, new ResourceLocation(RefStrings.MODID, "models/doors/seal.dae"));
public static final IModelCustomNamed fire_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/doors/fire_door.obj")).asVBO();
//PheoDoors
public static final ResourceLocation pheo_fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door.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 IModelCustomNamed pheo_airlock_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/airlock_door.obj")).asVBO();
//Secure Access Door
public static final ResourceLocation secure_access_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/secure_access_door.png");
@ -814,7 +819,6 @@ public class ResourceManager {
//Doors
public static final ResourceLocation transition_seal_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/transition_seal.png");
public static final ResourceLocation fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/doors/fire_door.png");
//Skeleton
public static final ResourceLocation skeleton_holder_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/skeleton.png");

View File

@ -135,7 +135,7 @@ public class BusAnimationSequence {
continue;
}
if(millis >= endTime) {
if(millis >= endTime || currentFrame.duration == 0) {
transform[i] = currentFrame.value;
continue;
}

View File

@ -615,6 +615,20 @@ public class ItemRenderLibrary {
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() {
bindTexture(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.large_vehicle_door), new ItemRenderBase(){
public void renderInventory() {
@ -706,13 +720,13 @@ public class ItemRenderLibrary {
renderers.put(Item.getItemFromBlock(ModBlocks.round_airlock_door), new ItemRenderBase(){
public void renderInventory() {
GL11.glTranslated(0, -4, 0);
GL11.glTranslated(0, -3.75, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
bindTexture(ResourceManager.round_airlock_door_tex);
bindTexture(ResourceManager.pheo_airlock_door_tex);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.round_airlock_door.renderAll();
ResourceManager.pheo_airlock_door.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
});

View File

@ -37,7 +37,7 @@ public class RenderDoorGeneric extends TileEntitySpecialRenderer {
DoorDecl door = te.getDoorType();
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z+0.5);
GL11.glTranslated(x + 0.5, y, z + 0.5);
switch(te.getBlockMetadata() - BlockDummyable.offset) {
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
@ -50,6 +50,7 @@ public class RenderDoorGeneric extends TileEntitySpecialRenderer {
if(sednaRenderer != null) {
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
sednaRenderer.render(te, buf);
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -2,9 +2,39 @@ package com.hbm.render.tileentity.door;
import java.nio.DoubleBuffer;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.Animation;
import com.hbm.tileentity.TileEntityDoorGeneric;
import com.hbm.util.Clock;
public interface IRenderDoors {
public void render(TileEntityDoorGeneric door, DoubleBuffer buf);
public static double[] getRelevantTransformation(String bus, Animation anim) {
if(anim != null) {
BusAnimation buses = anim.animation;
int millis = (int)(Clock.get_ms() - anim.startMillis);
BusAnimationSequence seq = buses.getBus(bus);
if(seq != null) {
double[] trans = seq.getTransformation(millis);
if(trans != null)
return trans;
}
}
return new double[] {
0, 0, 0, // position
0, 0, 0, // rotation
1, 1, 1, // scale
0, 0, 0, // offset
0, 1, 2, // XYZ order
};
}
}

View File

@ -0,0 +1,56 @@
package com.hbm.render.tileentity.door;
import java.nio.DoubleBuffer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.TileEntityDoorGeneric;
import net.minecraft.client.Minecraft;
import net.minecraft.util.MathHelper;
public class RenderAirlockDoor implements IRenderDoors {
public static final RenderAirlockDoor INSTANCE = new RenderAirlockDoor();
@Override
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.pheo_airlock_door_tex);
double maxOpen = 1.5;
double open = 0;
if(door.state == door.STATE_OPEN) open = maxOpen;
if(door.currentAnimation != null) {
open = IRenderDoors.getRelevantTransformation("DOOR", door.currentAnimation)[1] * maxOpen;
}
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glTranslated(0, 0, 0.5);
ResourceManager.pheo_airlock_door.renderPart("Frame");
GL11.glEnable(GL11.GL_CLIP_PLANE0);
buf.put(new double[] { 0.0, 0.0, 1, 1.999 }); buf.rewind();
GL11.glClipPlane(GL11.GL_CLIP_PLANE0, buf);
GL11.glEnable(GL11.GL_CLIP_PLANE1);
buf.put(new double[] { 0.0, 0.0, -1, 1.999 }); buf.rewind();
GL11.glClipPlane(GL11.GL_CLIP_PLANE1, buf);
GL11.glPushMatrix();
GL11.glTranslated(0, 0, MathHelper.clamp_double(open, 0, maxOpen));
ResourceManager.pheo_airlock_door.renderPart("Left");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0, 0, -MathHelper.clamp_double(open, 0, maxOpen));
ResourceManager.pheo_airlock_door.renderPart("Right");
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_CLIP_PLANE0);
GL11.glDisable(GL11.GL_CLIP_PLANE1);
}
}

View File

@ -0,0 +1,36 @@
package com.hbm.render.tileentity.door;
import java.nio.DoubleBuffer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.TileEntityDoorGeneric;
import net.minecraft.client.Minecraft;
import net.minecraft.util.MathHelper;
public class RenderFireDoor implements IRenderDoors {
public static final RenderFireDoor INSTANCE = new RenderFireDoor();
@Override
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.pheo_fire_door_tex);
double maxRaise = 2.75;
double raise = 0;
if(door.state == door.STATE_OPEN) raise = maxRaise;
if(door.currentAnimation != null) {
raise = IRenderDoors.getRelevantTransformation("DOOR", door.currentAnimation)[1] * maxRaise;
}
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(-0.5, 0, 0);
ResourceManager.pheo_fire_door.renderPart("Frame");
GL11.glTranslated(0, MathHelper.clamp_double(raise, 0, maxRaise), 0);
ResourceManager.pheo_fire_door.renderPart("Door");
}
}

View File

@ -4,8 +4,12 @@ import com.hbm.animloader.AnimatedModel;
import com.hbm.animloader.Animation;
import com.hbm.lib.Library;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.loader.IModelCustomNamed;
import com.hbm.render.tileentity.door.IRenderDoors;
import com.hbm.render.tileentity.door.RenderAirlockDoor;
import com.hbm.render.tileentity.door.RenderFireDoor;
import com.hbm.util.BobMathUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -99,26 +103,24 @@ public abstract class DoorDecl {
public static final DoorDecl FIRE_DOOR = new DoorDecl() {
@Override public String getOpenSoundEnd() { return "hbm:door.wghStop"; }
@Override public String getOpenSoundLoop() { return "hbm:door.wghStart"; }
@Override public String getSoundLoop2() { return "hbm:door.alarm6"; }
@Override public float getSoundVolume() { return 2; }
@Override
public String getOpenSoundEnd() {
return "hbm:door.wghStop";
}
@Override
public String getOpenSoundLoop() {
return "hbm:door.wghStart";
}
@Override
public String getSoundLoop2() {
return "hbm:door.alarm6";
}
@Override
public float getSoundVolume() {
return 2;
public IRenderDoors getSEDNARenderer() {
return RenderFireDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
if(state == TileEntityDoorGeneric.STATE_CLOSING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 1, 0).addPos(0, 0, 0, this.timeToOpen() * 50));
return null;
}
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public void getTranslation(String partName, float openTicks, boolean child, float[] trans) {
@ -129,12 +131,14 @@ public abstract class DoorDecl {
}
}
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public void doOffsetTransform() {
GL11.glTranslated(0, 0, 0.5);
}
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public double[][] getClippingPlanes() {
@ -173,17 +177,14 @@ public abstract class DoorDecl {
}
}
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public ResourceLocation getTextureForPart(int skinIndex, String partName) {
return ResourceManager.fire_door_tex;
}
public ResourceLocation getTextureForPart(int skinIndex, String partName) { return null; }
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public IModelCustomNamed getModel() {
return ResourceManager.fire_door;
}
public IModelCustomNamed getModel() { return null; }
};
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
@ -467,18 +468,20 @@ public abstract class DoorDecl {
public static final DoorDecl ROUND_AIRLOCK_DOOR = new DoorDecl() {
@Override public String getOpenSoundEnd() { return "hbm:door.garage_stop"; }
@Override public String getOpenSoundLoop() { return "hbm:door.garage_move"; }
@Override public float getSoundVolume() { return 2; }
@Override
public String getOpenSoundEnd() {
return "hbm:door.garage_stop";
public IRenderDoors getSEDNARenderer() {
return RenderAirlockDoor.INSTANCE;
}
@Override
public String getOpenSoundLoop() {
return "hbm:door.garage_move";
}
public float getSoundVolume() {
return 2;
public BusAnimation getBusAnimation(byte state) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
if(state == TileEntityDoorGeneric.STATE_CLOSING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 1, 0).addPos(0, 0, 0, this.timeToOpen() * 50));
return null;
}
@Override
@ -536,22 +539,19 @@ public abstract class DoorDecl {
return new int[] { 3, 0, 0, 0, 2, 1 };
};
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public ResourceLocation getTextureForPart(String partName) {
return ResourceManager.round_airlock_door_tex;
}
public ResourceLocation getTextureForPart(String partName) { return null; }
@Deprecated
@Override
public ResourceLocation getTextureForPart(int skinIndex, String partName) {
return ResourceManager.round_airlock_door_tex;
}
public ResourceLocation getTextureForPart(int skinIndex, String partName) { return null; }
@Deprecated
@Override
@SideOnly(Side.CLIENT)
public IModelCustomNamed getModel() {
return ResourceManager.round_airlock_door;
}
public IModelCustomNamed getModel() { return null; }
};
public static final DoorDecl QE_SLIDING = new DoorDecl() {
@ -1213,5 +1213,11 @@ public abstract class DoorDecl {
// keyframe animation system sneakily stitched into the door decl
public IRenderDoors getSEDNARenderer() { return null; }
public com.hbm.render.anim.HbmAnimations.Animation getSEDNAAnim(byte state) { return null; }
public BusAnimation getBusAnimation(byte state) { return null; }
public com.hbm.render.anim.HbmAnimations.Animation getSEDNAAnim(byte state) {
BusAnimation anim = this.getBusAnimation(state);
if(anim != null) return new com.hbm.render.anim.HbmAnimations.Animation("DOOR_ANIM", System.currentTimeMillis(), anim);
return null;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB