some train stuff

This commit is contained in:
Bob 2023-07-02 18:59:47 +02:00
parent d45f0098d5
commit 843efd575e
11 changed files with 7746 additions and 4 deletions

View File

@ -4,6 +4,9 @@
* Glyphid meat
* Dropped by glyphids (duh)
* Can be grilled
* Glyphid eggs
* Dropped from glyphid spawners
* Currently unused
* Fluid valves
* come in manual and restone variants
* Smokestack
@ -24,8 +27,11 @@
* Compressors now have a base comsumption of 2,500 HE/t instwad of 10,000
* On 528 mode, gas shale now only contains 50mB of petroleum instead of 250mB
* Xenon-mercury plasma has been changed into helium-4-oxygen plasma
* This means that current xenon-mercury setups will no longer work
## Fixed
* Fixed player extprops like the HUD or backpack toggles not saving
* Fixed desync caused by teleporting between dimensions, switching toggles for HUD or backpack
* Fixed potential issue causing the plasma heater to overfill
* Fixed potential issue causing the plasma heater to overfill
* Fixed back connector of the compressor not working properly
* Fixed a dupe regarind one of the conveyor blocks, not telling you which, though

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4641
mod_build_number=4648
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\

View File

@ -220,6 +220,7 @@ public class EntityMappings {
addEntity(BoundingBoxDummyEntity.class, "entity_ntm_bounding_dummy", 250, false);
addEntity(TrainCargoTram.class, "entity_ntm_cargo_tram", 250, false);
addEntity(TrainCargoTramTrailer.class, "entity_ntm_cargo_tram_trailer", 250, false);
addEntity(TrainTunnelBore.class, "entity_ntm_tunnel_bore", 250, false);
addMob(EntityCreeperNuclear.class, "entity_mob_nuclear_creeper", 0x204131, 0x75CE00);
addMob(EntityCreeperTainted.class, "entity_mob_tainted_creeper", 0x813b9b, 0xd71fdd);

View File

@ -0,0 +1,54 @@
package com.hbm.entity.train;
import com.hbm.blocks.rail.IRailNTM.TrackGauge;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class TrainTunnelBore extends EntityRailCarRidable {
public TrainTunnelBore(World world) {
super(world);
this.setSize(6F, 4F);
}
@Override public double getPoweredAcceleration() { return 0.01; }
@Override public double getPassivBrake() { return 0.95; }
@Override public boolean shouldUseEngineBrake(EntityPlayer player) { return Math.abs(this.engineSpeed) < 0.1; }
@Override public double getMaxPoweredSpeed() { return 0.5; }
@Override public double getMaxRailSpeed() { return 1; }
@Override public TrackGauge getGauge() { return TrackGauge.STANDARD; }
@Override public double getLengthSpan() { return 2.5; }
@Override public double getCollisionSpan() { return 4.5; }
@Override public Vec3 getRiderSeatPosition() { return Vec3.createVectorHelper(0.0, 2.375, -2.375); }
@Override public boolean shouldRiderSit() { return true; }
@Override public int getSizeInventory() { return 0; }
@Override public String getInventoryName() { return this.hasCustomInventoryName() ? this.getEntityName() : "container.trainTunnelBore"; }
@Override public double getCouplingDist(TrainCoupling coupling) { return coupling != null ? 2.75 : 0; }
@Override public boolean canAccelerate() { return true; }
@Override public Vec3[] getPassengerSeats() { return new Vec3[0]; }
@Override
public DummyConfig[] getDummies() {
return new DummyConfig[] {
new DummyConfig(2F, 3F, Vec3.createVectorHelper(0, 0, 2.5)),
new DummyConfig(2F, 3F, Vec3.createVectorHelper(0, 0, 1.25)),
new DummyConfig(2F, 3F, Vec3.createVectorHelper(0, 0, 0)),
new DummyConfig(2F, 3F, Vec3.createVectorHelper(0, 0, -1.25)),
new DummyConfig(2F, 3F, Vec3.createVectorHelper(0, 0, -2.5))
};
}
@Override
public boolean attackEntityFrom(DamageSource source, float amount) {
if(!this.worldObj.isRemote && !this.isDead) {
this.setDead();
}
return true;
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.blocks.rail.IRailNTM.RailCheckType;
import com.hbm.entity.train.EntityRailCarBase;
import com.hbm.entity.train.TrainCargoTram;
import com.hbm.entity.train.TrainCargoTramTrailer;
import com.hbm.entity.train.TrainTunnelBore;
import com.hbm.items.ItemEnumMulti;
import com.hbm.util.EnumUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
@ -44,7 +45,8 @@ public class ItemTrain extends ItemEnumMulti {
// Engine Gauge Max Speed Accel. Eng. Brake Parking Brake
CARGO_TRAM(TrainCargoTram.class, "Electric", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes"),
CARGO_TRAM_TRAILER(TrainCargoTramTrailer.class, null, "Standard Gauge", "Yes", null, null, "No");
CARGO_TRAM_TRAILER(TrainCargoTramTrailer.class, null, "Standard Gauge", "Yes", null, null, "No"),
TUNNEL_BORE(TrainTunnelBore.class, "NONE", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes");
public Class<? extends EntityRailCarBase> train;
public String engine;

View File

@ -693,6 +693,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerEntityRenderingHandler(BoundingBoxDummyEntity.class, new RenderEmpty());
RenderingRegistry.registerEntityRenderingHandler(TrainCargoTram.class, new RenderTrainCargoTram());
RenderingRegistry.registerEntityRenderingHandler(TrainCargoTramTrailer.class, new RenderTrainCargoTramTrailer());
RenderingRegistry.registerEntityRenderingHandler(TrainTunnelBore.class, new RenderTunnelBore());
//items
RenderingRegistry.registerEntityRenderingHandler(EntityMovingItem.class, new RenderMovingItem());
RenderingRegistry.registerEntityRenderingHandler(EntityMovingPackage.class, new RenderMovingPackage());

View File

@ -1035,6 +1035,7 @@ public class ResourceManager {
public static final IModelCustom cart_powder = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/cart_powder.obj"));
public static final IModelCustom train_cargo_tram = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/tram.obj"));
public static final IModelCustom train_cargo_tram_trailer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/tram_trailer.obj"));
public static final IModelCustom tunnel_bore = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/vehicles/tunnel_bore.obj"));
////Texture Entities

View File

@ -0,0 +1,60 @@
package com.hbm.render.entity.item;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.train.EntityRailCarBase;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderTunnelBore extends Render {
@Override
public void doRender(Entity entity, double x, double y, double z, float swing, float interp) {
GL11.glPushMatrix();
EntityRailCarBase train = (EntityRailCarBase) entity;
double iX = train.prevPosX + (train.posX - train.prevPosX) * interp;
double iY = train.prevPosY + (train.posY - train.prevPosY) * interp;
double iZ = train.prevPosZ + (train.posZ - train.prevPosZ) * interp;
double rX = train.lastRenderX + (train.renderX - train.lastRenderX) * interp;
double rY = train.lastRenderY + (train.renderY - train.lastRenderY) * interp;
double rZ = train.lastRenderZ + (train.renderZ - train.lastRenderZ) * interp;
x -= iX - rX;
y -= iY - rY;
z -= iZ - rZ;
GL11.glTranslated(x, y - 0.0625D, z);
float yaw = entity.rotationYaw;
float prevYaw = entity.prevRotationYaw;
if(yaw - prevYaw > 180) yaw -= 360;
if(prevYaw - yaw > 180) prevYaw -= 360;
float yawInterp = prevYaw + (yaw - prevYaw) * interp - 720;
GL11.glRotated(-yawInterp, 0, 1, 0);
float pitch = entity.rotationPitch;
float prevPitch = entity.prevRotationPitch;
float pitchInterp = prevPitch + (pitch - prevPitch) * interp;
GL11.glRotated(-pitchInterp, 1, 0, 0);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.universal);
ResourceManager.tunnel_bore.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return ResourceManager.universal;
}
}

View File

@ -173,7 +173,7 @@ public class TileEntityMachineCompressor extends TileEntityMachineBase implement
return new DirPos[] {
new DirPos(xCoord + rot.offsetX * 2, yCoord, zCoord + rot.offsetZ * 2, rot),
new DirPos(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite()),
new DirPos(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, dir),
new DirPos(xCoord - dir.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2, dir.getOpposite()),
};
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B