Merge pull request #2751 from nuhyuh/master

New door textures but fixed
This commit is contained in:
HbmMods 2026-03-11 14:54:22 +01:00 committed by GitHub
commit 2049a05649
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 65 additions and 55 deletions

View File

@ -136,7 +136,7 @@ public class ResourceManager {
public static final IModelCustom epress_head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/epress_head.obj"));
public static final IModelCustom conveyor_press = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/conveyor_press.obj"));
public static final IModelCustom ammo_press = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/ammo_press.obj")).asVBO();
//Annihilator
public static final IModelCustom annihilator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/annihilator.obj")).asVBO();
@ -320,11 +320,13 @@ 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"));
//PheoDoors
public static final ResourceLocation pheo_fire_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door.png");
public static final ResourceLocation pheo_fire_door_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_black.png");
public static final ResourceLocation pheo_fire_door_orange_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_orange.png");
public static final ResourceLocation pheo_fire_door_yellow_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_yellow.png");
public static final ResourceLocation pheo_fire_door_trefoil_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/fire_door_trefoil.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");
@ -334,11 +336,14 @@ public class ResourceManager {
public static IModelCustomNamed pheo_blast_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/blast_door.obj")).asVBO();
public static final ResourceLocation pheo_containment_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door.png");
public static final ResourceLocation pheo_containment_door_trefoil_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door_trefoil.png");
public static final ResourceLocation pheo_containment_door_trefoil_yellow_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door_trefoil_yellow.png");
public static IModelCustomNamed pheo_containment_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/containment_door.obj")).asVBO();
public static final ResourceLocation pheo_seal_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/seal_door.png");
public static IModelCustomNamed pheo_seal_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/seal_door.obj")).asVBO();
public static final ResourceLocation pheo_secure_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door.png");
public static final ResourceLocation pheo_secure_door_grey_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door_grey.png");
public static final ResourceLocation pheo_secure_door_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door_black.png");
public static final ResourceLocation pheo_secure_door_yellow_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/secure_door_yellow.png");
public static IModelCustomNamed pheo_secure_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/secure_door.obj")).asVBO();
public static final ResourceLocation pheo_sliding_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/sliding_door.png");
public static IModelCustomNamed pheo_sliding_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/sliding_door.obj")).asVBO();
@ -573,7 +578,7 @@ public class ResourceManager {
public static final ResourceLocation conveyor_press_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/conveyor_press.png");
public static final ResourceLocation conveyor_press_belt_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/conveyor_press_belt.png");
public static final ResourceLocation ammo_press_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/ammo_press.png");
//Annihilator
public static final ResourceLocation annihilator_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/annihilator.png");
public static final ResourceLocation annihilator_belt_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/annihilator_belt.png");
@ -852,7 +857,7 @@ public class ResourceManager {
public static final ResourceLocation substation_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/substation.png");
public static final ResourceLocation wire_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/wire.png");
public static final ResourceLocation wire_greyscale_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/wire_greyscale.png");
//Pipes
public static final ResourceLocation pipe_anchor_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pipe_anchor.png");
public static final ResourceLocation fluid_pump_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/fluid_diode.png");

View File

@ -105,12 +105,12 @@ public abstract class DoorDecl {
};
public static final DoorDecl VAULT_DOOR = new DoorDecl() {
@Override
public IRenderDoors getSEDNARenderer() {
return RenderVaultDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation()
@ -121,13 +121,13 @@ public abstract class DoorDecl {
.addBus("SLIDE", new BusAnimationSequence().setPos(1, 0, 0).addPos(0, 0, 0, 4_000));
return null;
}
@Override public int getSkinCount() { return 7; }
@Override public int timeToOpen() { return 120; }
@Override public int[][] getDoorOpenRanges() { return new int[][] { {-1, 1, 0, 3, 3, 2} }; }
@Override public int[] getDimensions() { return new int[] { 4, 0, 0, 0, 2, 2 }; }
@Override public int[][] getExtraDimensions() { return new int[][] { {0, 0, 1, -1, 2, 2} }; };
@Override
@ -135,10 +135,10 @@ public abstract class DoorDecl {
if(!open || y == 0) return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);
else return super.getBlockBound(x, y, z, open, forCollision);
}
public Consumer<TileEntityDoorGeneric> onUpdate = (door) -> {
if(door.getWorldObj().isRemote) return;
if(door.state == door.STATE_OPENING) {
if(door.openTicks == 0) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultScrapeNew", 1.0F, 1.0F);
for(int i = 45; i <= 115; i += 10)
@ -149,22 +149,22 @@ public abstract class DoorDecl {
if(door.openTicks == i) door.getWorldObj().playSoundEffect(door.xCoord, door.yCoord, door.zCoord, "hbm:block.vaultThudNew", 1.0F, 1.0F);
}
};
@Override public Consumer<TileEntityDoorGeneric> onDoorUpdate() { return onUpdate; }
};
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 IRenderDoors getSEDNARenderer() {
return RenderFireDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -173,17 +173,19 @@ public abstract class DoorDecl {
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_fire_door_tex,
ResourceManager.pheo_fire_door_black_tex,
ResourceManager.pheo_fire_door_orange_tex,
ResourceManager.pheo_fire_door_yellow_tex,
ResourceManager.pheo_fire_door_trefoil_tex
};
return skins;
}
public int getSkinCount() { return 3; }
public int getSkinCount() { return 5; }
@Override public int timeToOpen() { return 160; }
@Override public int[][] getDoorOpenRanges() { return new int[][] { { -1, 0, 0, 3, 4, 1 } }; }
@ -201,18 +203,18 @@ public abstract class DoorDecl {
};
public static final DoorDecl SLIDE_DOOR = new DoorDecl() {
@Override public String getOpenSoundEnd() { return "hbm:door.sliding_door_opened"; }
@Override public String getCloseSoundEnd() { return "hbm:door.sliding_door_shut"; }
@Override public String getOpenSoundLoop() { return "hbm:door.sliding_door_opening"; }
@Override public String getSoundLoop2() { return "hbm:door.sliding_door_opening"; }
@Override public float getSoundVolume() { return 2; }
@Override
public IRenderDoors getSEDNARenderer() {
return RenderSlidingBlastDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation()
@ -245,12 +247,12 @@ public abstract class DoorDecl {
@Override public String getOpenSoundEnd() { return "hbm:door.sliding_seal_stop"; }
@Override public String getOpenSoundStart() { return "hbm:door.sliding_seal_open"; }
@Override public float getSoundVolume() { return 2; }
@Override
public IRenderDoors getSEDNARenderer() {
return RenderSealDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -277,12 +279,12 @@ public abstract class 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 IRenderDoors getSEDNARenderer() {
return RenderSecureDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -307,16 +309,18 @@ public abstract class DoorDecl {
}
public ResourceLocation[] skins;
@Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_secure_door_tex,
ResourceManager.pheo_secure_door_grey_tex
ResourceManager.pheo_secure_door_grey_tex,
ResourceManager.pheo_secure_door_black_tex,
ResourceManager.pheo_secure_door_yellow_tex
};
return skins;
}
public int getSkinCount() { return 2; }
public int getSkinCount() { return 4; }
};
public static final DoorDecl ROUND_AIRLOCK_DOOR = new DoorDecl() {
@ -324,12 +328,12 @@ public abstract class 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 IRenderDoors getSEDNARenderer() {
return RenderAirlockDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -338,7 +342,7 @@ public abstract class DoorDecl {
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_airlock_door_tex,
@ -347,7 +351,7 @@ public abstract class DoorDecl {
};
return skins;
}
public int getSkinCount() { return 3; }
@Override
@ -372,12 +376,12 @@ public abstract class DoorDecl {
@Override public String getOpenSoundLoop() { return "hbm:door.qe_sliding_opening"; };
@Override public float getSoundVolume() { return 2; }
@Override public int timeToOpen() { return 10; };
@Override
public IRenderDoors getSEDNARenderer() {
return RenderSlidingDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -405,12 +409,12 @@ public abstract class DoorDecl {
@Override public String getOpenSoundEnd() { return "hbm:door.wgh_stop"; };
@Override public String getOpenSoundLoop() { return "hbm:door.wgh_start"; };
@Override public float getSoundVolume() { return 2; }
@Override
public IRenderDoors getSEDNARenderer() {
return RenderContainmentDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -419,16 +423,17 @@ public abstract class DoorDecl {
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_containment_door_tex,
ResourceManager.pheo_containment_door_trefoil_tex
ResourceManager.pheo_containment_door_trefoil_tex,
ResourceManager.pheo_containment_door_trefoil_yellow_tex
};
return skins;
}
@Override public int getSkinCount() { return 2; }
@Override public int getSkinCount() { return 3; }
@Override public int timeToOpen() { return 160; };
@Override public int[][] getDoorOpenRanges() { return new int[][] { { -1, 0, 0, 3, 3, 1 } }; }
@ -452,12 +457,12 @@ public abstract class DoorDecl {
@Override public String getCloseSoundStart() { return null; };
@Override public String getCloseSoundEnd() { return "hbm:door.lever"; };
@Override public float getSoundVolume() { return 2; }
@Override
public IRenderDoors getSEDNARenderer() {
return RenderWaterDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation()
@ -470,7 +475,7 @@ public abstract class DoorDecl {
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_water_door_tex,
@ -478,7 +483,7 @@ public abstract class DoorDecl {
};
return skins;
}
@Override public int getSkinCount() { return 2; }
@Override
@ -540,7 +545,7 @@ public abstract class DoorDecl {
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 1, 0, 1, -3, 3, 0 }, { 0, 0, 1, -3, 3, 0 }, { -1, 0, 1, -3, 3, 0 } }; }
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
@Override public int getBlockOffset() { return 2; }
@Override public int[] getDimensions() { return new int[] { 0, 0, 2, 2, 2, 2 }; }
@Override @SideOnly(Side.CLIENT) public ResourceLocation getTextureForPart(String partName) { return ResourceManager.silo_hatch_tex; }
@ -594,7 +599,7 @@ public abstract class DoorDecl {
@Override public int[][] getDoorOpenRanges() { return new int[][] { { 2, 0, 1, -3, 3, 0 }, { 1, 0, 2, -5, 3, 0 }, { 0, 0, 2, -5, 3, 0 }, { -1, 0, 2, -5, 3, 0 }, { -2, 0, 1, -3, 3, 0 } }; }
@Override public float getDoorRangeOpenTime(int ticks, int idx) { return getNormTime(ticks, 20, 20); };
@Override public int getBlockOffset() { return 3; }
@Override public int[] getDimensions() { return new int[] { 0, 0, 3, 3, 3, 3 }; }
@Override @SideOnly(Side.CLIENT) public ResourceLocation getTextureForPart(String partName) { return ResourceManager.silo_hatch_large_tex; }
@ -608,12 +613,12 @@ public abstract class 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 IRenderDoors getSEDNARenderer() {
return RenderVehicleDoor.INSTANCE;
}
@Override
public BusAnimation getBusAnimation(byte state, byte skinIndex) {
if(state == TileEntityDoorGeneric.STATE_OPENING) return new BusAnimation().addBus("DOOR", new BusAnimationSequence().setPos(0, 0, 0).addPos(0, 1, 0, this.timeToOpen() * 50));
@ -643,7 +648,7 @@ public abstract class DoorDecl {
public abstract int[][] getDoorOpenRanges();
public abstract int[] getDimensions();
public int[][] getExtraDimensions() { return null; };
public int getBlockOffset() { return 0; }
public boolean remoteControllable() { return false; }
@ -708,29 +713,29 @@ public abstract class DoorDecl {
public ResourceLocation[] getSEDNASkins() { return null; }
public boolean hasSkins() { return getSkinCount() > 0; }
public int getSkinCount() { return 0; }
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; }
public BusAnimation getBusAnimation(byte state, byte skinIndex) { return null; }
public com.hbm.render.anim.HbmAnimations.Animation getSEDNAAnim(byte state, byte skinIndex) {
BusAnimation anim = this.getBusAnimation(state, skinIndex);
if(anim != null) return new com.hbm.render.anim.HbmAnimations.Animation("DOOR_ANIM", System.currentTimeMillis(), anim);
return null;
}
public Consumer<TileEntityDoorGeneric> onDoorUpdate() { return null; }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB