diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index c006878ad..a4d55f383 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -13,6 +13,7 @@ import com.hbm.blocks.machine.rbmk.*; import com.hbm.blocks.network.*; import com.hbm.blocks.rail.RailNarrowCurve; import com.hbm.blocks.rail.RailNarrowStraight; +import com.hbm.blocks.rail.RailStandardBuffer; import com.hbm.blocks.rail.RailStandardCurve; import com.hbm.blocks.rail.RailStandardStraight; import com.hbm.blocks.siege.*; @@ -1100,6 +1101,7 @@ public class ModBlocks { public static Block rail_narrow_curve; public static Block rail_large_straight; public static Block rail_large_curve; + public static Block rail_large_buffer; public static Block statue_elb; public static Block statue_elb_g; @@ -2129,6 +2131,7 @@ public class ModBlocks { rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo"); rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":block_steel"); rail_large_curve = new RailStandardCurve().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":block_steel"); + rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":block_steel"); crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate"); crate_weapon = new BlockCrate(Material.wood).setBlockName("crate_weapon").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_weapon"); @@ -3359,6 +3362,7 @@ public class ModBlocks { register(rail_narrow_curve); register(rail_large_straight); register(rail_large_curve); + register(rail_large_buffer); //Crate GameRegistry.registerBlock(crate, crate.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/rail/IRailNTM.java b/src/main/java/com/hbm/blocks/rail/IRailNTM.java index 4fd66886a..782dc15e6 100644 --- a/src/main/java/com/hbm/blocks/rail/IRailNTM.java +++ b/src/main/java/com/hbm/blocks/rail/IRailNTM.java @@ -19,7 +19,7 @@ public interface IRailNTM { * Motion ends up being *-1 if the train is going in reverse, still pointing forwards despite the speed being negative. * Also features a double[] wrapper with size 1 which holds the speed value that overshoots the rail. * */ - public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info); + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context); /** Returns that rail's gauge. Trains will derail if the gauge does not match. */ public TrackGauge getGauge(World world, int x, int y, int z); @@ -41,4 +41,22 @@ public interface IRailNTM { public RailContext dist(double d) { this.overshoot = d; return this; } public RailContext pos(BlockPos d) { this.pos = d; return this; } } + + /** A wrapper for additional information like stopping on rails and what type of check we're doing */ + public static class MoveContext { + public RailCheckType type; + public boolean collision = false; //if a buffer stop or similar applies + public double overshoot; //how much of the travel distance was cut shor + + public MoveContext(RailCheckType type) { + this.type = type; + } + } + + public static enum RailCheckType { + CORE, + FRONT, + BACK, + OTHER + } } diff --git a/src/main/java/com/hbm/blocks/rail/RailNarrowCurve.java b/src/main/java/com/hbm/blocks/rail/RailNarrowCurve.java index 1fc4c01ae..ac317b65d 100644 --- a/src/main/java/com/hbm/blocks/rail/RailNarrowCurve.java +++ b/src/main/java/com/hbm/blocks/rail/RailNarrowCurve.java @@ -38,7 +38,7 @@ public class RailNarrowCurve extends BlockDummyable implements IRailNTM { } @Override - public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) { + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) { return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info); } diff --git a/src/main/java/com/hbm/blocks/rail/RailNarrowStraight.java b/src/main/java/com/hbm/blocks/rail/RailNarrowStraight.java index 4d51dfe07..624087974 100644 --- a/src/main/java/com/hbm/blocks/rail/RailNarrowStraight.java +++ b/src/main/java/com/hbm/blocks/rail/RailNarrowStraight.java @@ -59,7 +59,7 @@ public class RailNarrowStraight extends BlockDummyable implements IRailNTM { } @Override - public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) { + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) { return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info); } diff --git a/src/main/java/com/hbm/blocks/rail/RailStandardBuffer.java b/src/main/java/com/hbm/blocks/rail/RailStandardBuffer.java new file mode 100644 index 000000000..52bee4310 --- /dev/null +++ b/src/main/java/com/hbm/blocks/rail/RailStandardBuffer.java @@ -0,0 +1,57 @@ +package com.hbm.blocks.rail; + +import com.hbm.blocks.BlockDummyable; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class RailStandardBuffer extends BlockDummyable implements IRailNTM { + + public RailStandardBuffer() { + super(Material.iron); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return null; + } + + @Override + public int getRenderType() { + return 0; + } + + @Override + public int[] getDimensions() { + return new int[] {0, 0, 2, 2, 1, 0}; + } + + @Override + public int getOffset() { + return 2; + } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F); + } + + // TBI + @Override + public Vec3 getSnappingPos(World world, int x, int y, int z, double trainX, double trainY, double trainZ) { + return null; + } + + @Override + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) { + return null; + } + + @Override + public TrackGauge getGauge(World world, int x, int y, int z) { + return TrackGauge.STANDARD; + } +} diff --git a/src/main/java/com/hbm/blocks/rail/RailStandardCurve.java b/src/main/java/com/hbm/blocks/rail/RailStandardCurve.java index 7028571ce..712b395bf 100644 --- a/src/main/java/com/hbm/blocks/rail/RailStandardCurve.java +++ b/src/main/java/com/hbm/blocks/rail/RailStandardCurve.java @@ -35,7 +35,7 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM { } @Override - public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) { + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) { return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info); } diff --git a/src/main/java/com/hbm/blocks/rail/RailStandardStraight.java b/src/main/java/com/hbm/blocks/rail/RailStandardStraight.java index 903e01e1b..72c4be7b5 100644 --- a/src/main/java/com/hbm/blocks/rail/RailStandardStraight.java +++ b/src/main/java/com/hbm/blocks/rail/RailStandardStraight.java @@ -4,6 +4,7 @@ import com.hbm.blocks.BlockDummyable; import com.hbm.lib.Library; import com.hbm.util.fauxpointtwelve.BlockPos; +import cpw.mods.fml.client.registry.RenderingRegistry; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -24,9 +25,11 @@ public class RailStandardStraight extends BlockDummyable implements IRailNTM { return null; } + public static int renderID = RenderingRegistry.getNextAvailableRenderId(); + @Override public int getRenderType() { - return 0; + return renderID; } @Override @@ -56,7 +59,7 @@ public class RailStandardStraight extends BlockDummyable implements IRailNTM { } @Override - public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) { + public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) { return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info); } diff --git a/src/main/java/com/hbm/entity/train/EntityRailCarBase.java b/src/main/java/com/hbm/entity/train/EntityRailCarBase.java index bfab8bcc1..885532850 100644 --- a/src/main/java/com/hbm/entity/train/EntityRailCarBase.java +++ b/src/main/java/com/hbm/entity/train/EntityRailCarBase.java @@ -7,6 +7,8 @@ import java.util.Set; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.rail.IRailNTM; +import com.hbm.blocks.rail.IRailNTM.MoveContext; +import com.hbm.blocks.rail.IRailNTM.RailCheckType; import com.hbm.blocks.rail.IRailNTM.RailContext; import com.hbm.blocks.rail.IRailNTM.TrackGauge; import com.hbm.items.ModItems; @@ -18,7 +20,6 @@ import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; @@ -152,8 +153,8 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { } BlockPos anchor = this.getCurentAnchorPos(); - Vec3 frontPos = getRelPosAlongRail(anchor, this.getLengthSpan()); - Vec3 backPos = getRelPosAlongRail(anchor, -this.getLengthSpan()); + Vec3 frontPos = getRelPosAlongRail(anchor, this.getLengthSpan(), new MoveContext(RailCheckType.FRONT)); + Vec3 backPos = getRelPosAlongRail(anchor, -this.getLengthSpan(), new MoveContext(RailCheckType.BACK)); this.lastRenderX = this.renderX; this.lastRenderY = this.renderY; @@ -215,11 +216,11 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { } } - public Vec3 getRelPosAlongRail(BlockPos anchor, double distanceToCover) { - return getRelPosAlongRail(anchor, distanceToCover, this.getGauge(), this.worldObj, Vec3.createVectorHelper(posX, posY, posZ), this.rotationYaw); + public Vec3 getRelPosAlongRail(BlockPos anchor, double distanceToCover, MoveContext context) { + return getRelPosAlongRail(anchor, distanceToCover, this.getGauge(), this.worldObj, Vec3.createVectorHelper(posX, posY, posZ), this.rotationYaw, context); } - public static Vec3 getRelPosAlongRail(BlockPos anchor, double distanceToCover, TrackGauge gauge, World worldObj, Vec3 next, float yaw) { + public static Vec3 getRelPosAlongRail(BlockPos anchor, double distanceToCover, TrackGauge gauge, World worldObj, Vec3 next, float yaw, MoveContext context) { if(distanceToCover < 0) { distanceToCover *= -1; @@ -248,7 +249,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { IRailNTM rail = (IRailNTM) block; if(it == 1) { - next = rail.getTravelLocation(worldObj, x, y, z, next.xCoord, next.yCoord, next.zCoord, rot.xCoord, rot.yCoord, rot.zCoord, 0, new RailContext()); + next = rail.getTravelLocation(worldObj, x, y, z, next.xCoord, next.yCoord, next.zCoord, rot.xCoord, rot.yCoord, rot.zCoord, 0, new RailContext(), context); } boolean flip = distanceToCover < 0; @@ -256,7 +257,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { if(rail.getGauge(worldObj, x, y, z) == gauge) { RailContext info = new RailContext(); Vec3 prev = next; - next = rail.getTravelLocation(worldObj, x, y, z, prev.xCoord, prev.yCoord, prev.zCoord, rot.xCoord, rot.yCoord, rot.zCoord, distanceToCover, info); + next = rail.getTravelLocation(worldObj, x, y, z, prev.xCoord, prev.yCoord, prev.zCoord, rot.xCoord, rot.yCoord, rot.zCoord, distanceToCover, info, context); distanceToCover = info.overshoot; anchor = info.pos; @@ -292,6 +293,18 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { } } + //TODO: rethink this entire concept + /* + * first, figure out which train is the "front" when moving + * if the train is not in motion, reuse the contract ("combine") function we have now + * move the first wagon until either it finishes or bumps into a buffer + * if it derails, continue using the velocity + * then take the second wagon and move it towards the first wagon's collision point, assuming it didn't derail + * continue with all further wagons + * + * step 3 may also do collision checks for other trains, which is good because that's an issue we would have to solve sooner or later + */ + /* Move carts together with links */ for(LogicalTrainUnit ltu : ltus) ltu.combineWagons(); @@ -306,10 +319,12 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { public abstract TrackGauge getGauge(); /** Returns the length between the core and one of the bogies */ public abstract double getLengthSpan(); + /** Returns the length between the core and the collision points */ + public abstract double getCollisionSpan(); /** Returns a collision box, usually smaller than the entity's AABB for rendering, which is used for colliding trains */ - public AxisAlignedBB getCollisionBox() { + /*public AxisAlignedBB getCollisionBox() { return this.boundingBox; - } + }*/ /** Returns a collision box used for block collisions when derailed */ /*@Override public AxisAlignedBB getBoundingBox() { return this.boundingBox; @@ -555,7 +570,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { BlockPos anchor = new BlockPos(next.posX, next.posY, next.posZ); Vec3 trainPos = Vec3.createVectorHelper(next.posX, next.posY, next.posZ); float yaw = EntityRailCarBase.generateYaw(prevLoc, nextLoc); - Vec3 newPos = EntityRailCarBase.getRelPosAlongRail(anchor, len, next.getGauge(), next.worldObj, trainPos, yaw); + Vec3 newPos = EntityRailCarBase.getRelPosAlongRail(anchor, len, next.getGauge(), next.worldObj, trainPos, yaw, new MoveContext(RailCheckType.CORE)); next.setPosition(newPos.xCoord, newPos.yCoord, newPos.zCoord); } @@ -589,7 +604,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { for(EntityRailCarBase train : this.trains) { BlockPos anchor = train.getCurentAnchorPos(); - Vec3 corePos = train.getRelPosAlongRail(anchor, totalSpeed); + Vec3 corePos = train.getRelPosAlongRail(anchor, totalSpeed, new MoveContext(RailCheckType.CORE)); if(corePos == null) { train.derail(); @@ -598,8 +613,8 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay { } else { train.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord); anchor = train.getCurentAnchorPos(); //reset origin to new position - Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan()); - Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan()); + Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan(), new MoveContext(RailCheckType.FRONT)); + Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan(), new MoveContext(RailCheckType.BACK)); if(frontPos == null || backPos == null) { train.derail(); diff --git a/src/main/java/com/hbm/entity/train/TrainCargoTram.java b/src/main/java/com/hbm/entity/train/TrainCargoTram.java index af8bbe587..3b64d7679 100644 --- a/src/main/java/com/hbm/entity/train/TrainCargoTram.java +++ b/src/main/java/com/hbm/entity/train/TrainCargoTram.java @@ -18,7 +18,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Vec3; @@ -52,11 +51,12 @@ public class TrainCargoTram extends EntityRailCarElectric implements IGUIProvide @Override public TrackGauge getGauge() { return TrackGauge.STANDARD; } @Override public double getLengthSpan() { return 1.5; } + @Override public double getCollisionSpan() { return 2.5; } @Override public Vec3 getRiderSeatPosition() { return Vec3.createVectorHelper(0.375, 2.375, 0.5); } @Override public boolean shouldRiderSit() { return false; } @Override public int getSizeInventory() { return 29; } @Override public String getInventoryName() { return this.hasCustomInventoryName() ? this.getEntityName() : "container.trainTram"; } - @Override public AxisAlignedBB getCollisionBox() { return AxisAlignedBB.getBoundingBox(renderX, renderY, renderZ, renderX, renderY + 1, renderZ).expand(4, 0, 4); } + //@Override public AxisAlignedBB getCollisionBox() { return AxisAlignedBB.getBoundingBox(renderX, renderY, renderZ, renderX, renderY + 1, renderZ).expand(4, 0, 4); } @Override public double getCouplingDist(TrainCoupling coupling) { return coupling != null ? 2.75 : 0; } @Override public int getMaxPower() { return this.getPowerConsumption() * 100; } diff --git a/src/main/java/com/hbm/entity/train/TrainCargoTramTrailer.java b/src/main/java/com/hbm/entity/train/TrainCargoTramTrailer.java index 05d465476..ffeea5245 100644 --- a/src/main/java/com/hbm/entity/train/TrainCargoTramTrailer.java +++ b/src/main/java/com/hbm/entity/train/TrainCargoTramTrailer.java @@ -19,7 +19,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Vec3; @@ -46,9 +45,10 @@ public class TrainCargoTramTrailer extends EntityRailCarCargo implements IGUIPro @Override public double getMaxRailSpeed() { return 1; } @Override public TrackGauge getGauge() { return TrackGauge.STANDARD; } @Override public double getLengthSpan() { return 1.5; } + @Override public double getCollisionSpan() { return 2.5; } @Override public int getSizeInventory() { return 45; } @Override public String getInventoryName() { return this.hasCustomInventoryName() ? this.getEntityName() : "container.trainTramTrailer"; } - @Override public AxisAlignedBB getCollisionBox() { return AxisAlignedBB.getBoundingBox(renderX, renderY, renderZ, renderX, renderY + 1, renderZ).expand(4, 0, 4); } + //@Override public AxisAlignedBB getCollisionBox() { return AxisAlignedBB.getBoundingBox(renderX, renderY, renderZ, renderX, renderY + 1, renderZ).expand(4, 0, 4); } @Override public double getCouplingDist(TrainCoupling coupling) { return coupling != null ? 2.75 : 0; } @Override public double getCurrentSpeed() { return 0; } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 791bcf915..317ecb9e8 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -552,6 +552,7 @@ public class ModItems { public static Item tank_steel; public static Item motor; public static Item motor_desh; + public static Item motor_bismuth; public static Item centrifuge_element; //public static Item centrifuge_tower; public static Item reactor_core; @@ -2928,6 +2929,7 @@ public class ModItems { tank_steel = new Item().setUnlocalizedName("tank_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":tank_steel"); motor = new Item().setUnlocalizedName("motor").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor"); motor_desh = new Item().setUnlocalizedName("motor_desh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor_desh"); + motor_bismuth = new Item().setUnlocalizedName("motor_bismuth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":motor_bismuth"); centrifuge_element = new Item().setUnlocalizedName("centrifuge_element").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_element"); //centrifuge_tower = new Item().setUnlocalizedName("centrifuge_tower").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":centrifuge_tower"); reactor_core = new Item().setUnlocalizedName("reactor_core").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":reactor_core"); @@ -5985,6 +5987,7 @@ public class ModItems { GameRegistry.registerItem(tank_steel, tank_steel.getUnlocalizedName()); GameRegistry.registerItem(motor, motor.getUnlocalizedName()); GameRegistry.registerItem(motor_desh, motor_desh.getUnlocalizedName()); + GameRegistry.registerItem(motor_bismuth, motor_bismuth.getUnlocalizedName()); GameRegistry.registerItem(centrifuge_element, centrifuge_element.getUnlocalizedName()); //GameRegistry.registerItem(centrifuge_tower, centrifuge_tower.getUnlocalizedName()); //GameRegistry.registerItem(magnet_dee, magnet_dee.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/special/ItemTrain.java b/src/main/java/com/hbm/items/special/ItemTrain.java index d8353bcd2..62695488a 100644 --- a/src/main/java/com/hbm/items/special/ItemTrain.java +++ b/src/main/java/com/hbm/items/special/ItemTrain.java @@ -3,6 +3,8 @@ package com.hbm.items.special; import java.util.List; import com.hbm.blocks.rail.IRailNTM; +import com.hbm.blocks.rail.IRailNTM.MoveContext; +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; @@ -78,10 +80,10 @@ public class ItemTrain extends ItemEnumMulti { train.setPosition(x + fx, y + fy, z + fz); BlockPos anchor = train.getCurentAnchorPos(); train.rotationYaw = entity.rotationYaw; - Vec3 corePos = train.getRelPosAlongRail(anchor, 0); + Vec3 corePos = train.getRelPosAlongRail(anchor, 0, new MoveContext(RailCheckType.CORE)); train.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord); - Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan()); - Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan()); + Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan(), new MoveContext(RailCheckType.FRONT)); + Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan(), new MoveContext(RailCheckType.BACK)); train.rotationYaw = train.generateYaw(frontPos, backPos); world.spawnEntityInWorld(train); } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index a757432e5..bd9794aed 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -786,6 +786,7 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerBlockHandler(new RenderNarrowStraightRail()); RenderingRegistry.registerBlockHandler(new RenderNarrowCurveRail()); + RenderingRegistry.registerBlockHandler(new RenderStandardStraightRail()); RenderingRegistry.registerBlockHandler(new RenderBlockRotated(ModBlocks.charge_dynamite.getRenderType(), ResourceManager.charge_dynamite)); RenderingRegistry.registerBlockHandler(new RenderBlockRotated(ModBlocks.charge_c4.getRenderType(), ResourceManager.charge_c4)); diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 1b8d0b48a..3fb520d1a 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -189,6 +189,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(ModItems.motor, 2), new Object[] { " R ", "ICI", "ITI", 'R', ModItems.wire_red_copper, 'T', ModItems.coil_copper_torus, 'I', IRON.plate(), 'C', ModItems.coil_copper }); addRecipeAuto(new ItemStack(ModItems.motor, 2), new Object[] { " R ", "ICI", " T ", 'R', ModItems.wire_red_copper, 'T', ModItems.coil_copper_torus, 'I', STEEL.plate(), 'C', ModItems.coil_copper }); addRecipeAuto(new ItemStack(ModItems.motor_desh, 1), new Object[] { "PCP", "DMD", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', ModItems.coil_gold_torus, 'D', DESH.ingot(), 'M', ModItems.motor }); + addRecipeAuto(new ItemStack(ModItems.motor_bismuth, 1), new Object[] { "BCB", "SBS", "BCB", 'B', BI.nugget(), 'C', ModBlocks.hadron_coil_alloy, 'S', STEEL.plateCast(), 'B', DURA.ingot() }); //addRecipeAuto(new ItemStack(ModItems.centrifuge_element, 1), new Object[] { " T ", "WTW", "RMR", 'R', ModItems.wire_red_copper, 'T', ModItems.tank_steel, 'M', ModItems.motor, 'W', ModItems.coil_tungsten }); //addRecipeAuto(new ItemStack(ModItems.centrifuge_tower, 1), new Object[] { "LL", "EE", "EE", 'E', ModItems.centrifuge_element, 'L', KEY_BLUE }); //addRecipeAuto(new ItemStack(ModItems.reactor_core, 1), new Object[] { "LNL", "N N", "LNL", 'N', getReflector(), 'L', PB.plate() }); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 30f1e2c2e..44716fec9 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -1331,6 +1331,7 @@ public class ResourceManager { public static final IModelCustom splitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/splitter.obj")); public static final IModelCustom rail_narrow_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow.obj")); public static final IModelCustom rail_narrow_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow_bend.obj")); + public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj")); public static final IModelCustom charge_dynamite = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_dynamite.obj")); public static final IModelCustom charge_c4 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_c4.obj")); diff --git a/src/main/java/com/hbm/render/block/RenderStandardStraightRail.java b/src/main/java/com/hbm/render/block/RenderStandardStraightRail.java new file mode 100644 index 000000000..1343795ca --- /dev/null +++ b/src/main/java/com/hbm/render/block/RenderStandardStraightRail.java @@ -0,0 +1,65 @@ +package com.hbm.render.block; + +import org.lwjgl.opengl.GL11; + +import com.hbm.blocks.rail.RailStandardStraight; +import com.hbm.main.ResourceManager; +import com.hbm.render.util.ObjUtil; + +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.client.model.obj.WavefrontObject; + +public class RenderStandardStraightRail implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + + GL11.glPushMatrix(); + Tessellator tessellator = Tessellator.instance; + + GL11.glTranslated(0, -0.0625, 0); + tessellator.startDrawingQuads(); + ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, 0, false); + tessellator.draw(); + + GL11.glPopMatrix(); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + + int meta = world.getBlockMetadata(x, y, z); + if(meta < 12) return true; + + Tessellator tessellator = Tessellator.instance; + + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + tessellator.setColorOpaque_F(1, 1, 1); + + float rotation = 0; + + if(meta == 12) rotation = 90F / 180F * (float) Math.PI; + if(meta == 14) rotation = 180F / 180F * (float) Math.PI; + if(meta == 13) rotation = 270F / 180F * (float) Math.PI; + + tessellator.addTranslation(x + 0.5F, y, z + 0.5F); + ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight, block.getIcon(1, 0), tessellator, rotation, true); + tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F); + + return true; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return RailStandardStraight.renderID; + } +} diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index f17622a7a..7a5a8049b 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -2242,6 +2242,7 @@ item.mold_base.name=Blanke Gussform item.mold.name=Gussform item.morning_glory.name=Zaunwinde item.motor.name=Motor +item.motor_bismuth.name=Bismuth-Motor item.motor_desh.name=Desh-Motor item.mp_c_1.name=Stufe 1 Zielsucher-Schaltkreis item.mp_c_2.name=Stufe 2 Zielsucher-Schaltkreis diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 5091ddb4b..94cfb0809 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2913,6 +2913,7 @@ item.mold_base.name=Blank Foundry Mold item.mold.name=Foundry Mold item.morning_glory.name=Morning Glory item.motor.name=Motor +item.motor_bismuth.name=Bismuth Motor item.motor_desh.name=Desh Motor item.mp_c_1.name=Tier 1 Missile Targeting Circuit item.mp_c_2.name=Tier 2 Missile Targeting Circuit diff --git a/src/main/resources/assets/hbm/models/blocks/rail_standard.obj b/src/main/resources/assets/hbm/models/blocks/rail_standard.obj new file mode 100644 index 000000000..292011e56 --- /dev/null +++ b/src/main/resources/assets/hbm/models/blocks/rail_standard.obj @@ -0,0 +1,698 @@ +# Blender v2.79 (sub 0) OBJ File: 'rail_standard.blend' +# www.blender.org +o Plane +v 0.750000 0.062500 2.500000 +v 0.750000 0.062500 -2.500000 +v -0.750000 0.062500 2.500000 +v -0.750000 0.062500 -2.500000 +v 0.750000 0.187500 2.500000 +v 0.750000 0.187500 -2.500000 +v -0.750000 0.187500 2.500000 +v -0.750000 0.187500 -2.500000 +v 0.812500 0.062500 2.500000 +v 0.812500 0.062500 -2.500000 +v 0.812500 0.187500 2.500000 +v 0.812500 0.187500 -2.500000 +v -0.812500 0.062500 2.500000 +v -0.812500 0.062500 -2.500000 +v -0.812500 0.187500 2.500000 +v -0.812500 0.187500 -2.500000 +v -1.000000 0.000000 -0.250000 +v 1.000000 0.000000 -0.250000 +v -1.000000 0.000000 0.250000 +v 1.000000 0.000000 0.250000 +v 1.000000 0.062500 -0.250000 +v -1.000000 0.062500 -0.250000 +v 1.000000 0.062500 0.250000 +v -1.000000 0.062500 0.250000 +v -1.000000 0.000000 2.250000 +v 1.000000 0.000000 2.250000 +v -1.000000 0.000000 2.500000 +v 1.000000 0.000000 2.500000 +v 1.000000 0.062500 2.250000 +v -1.000000 0.062500 2.250000 +v 1.000000 0.062500 2.500000 +v -1.000000 0.062500 2.500000 +v -1.000000 0.000000 1.000000 +v 1.000000 0.000000 1.000000 +v -1.000000 0.000000 1.500000 +v 1.000000 0.000000 1.500000 +v 1.000000 0.062500 1.000000 +v -1.000000 0.062500 1.000000 +v 1.000000 0.062500 1.500000 +v -1.000000 0.062500 1.500000 +v -1.000000 0.000000 -2.500000 +v 1.000000 0.000000 -2.500000 +v -1.000000 0.000000 -2.250000 +v 1.000000 0.000000 -2.250000 +v 1.000000 0.062500 -2.500000 +v -1.000000 0.062500 -2.500000 +v 1.000000 0.062500 -2.250000 +v -1.000000 0.062500 -2.250000 +v -1.000000 0.000000 -1.500000 +v 1.000000 0.000000 -1.500000 +v -1.000000 0.000000 -1.000000 +v 1.000000 0.000000 -1.000000 +v 1.000000 0.062500 -1.500000 +v -1.000000 0.062500 -1.500000 +v 1.000000 0.062500 -1.000000 +v -1.000000 0.062500 -1.000000 +v 0.625000 0.062500 0.062500 +v 0.937500 0.062500 0.062500 +v 0.625000 0.062500 -0.062500 +v 0.937500 0.062500 -0.062500 +v 0.625000 0.125000 -0.062500 +v 0.625000 0.125000 0.062500 +v 0.937500 0.125000 0.062500 +v 0.937500 0.125000 -0.062500 +v -0.937500 0.062500 0.062500 +v -0.625000 0.062500 0.062500 +v -0.937500 0.062500 -0.062500 +v -0.625000 0.062500 -0.062500 +v -0.937500 0.125000 -0.062500 +v -0.937500 0.125000 0.062500 +v -0.625000 0.125000 0.062500 +v -0.625000 0.125000 -0.062500 +v 0.625000 0.062500 -1.187500 +v 0.937500 0.062500 -1.187500 +v 0.625000 0.062500 -1.312500 +v 0.937500 0.062500 -1.312500 +v 0.625000 0.125000 -1.312500 +v 0.625000 0.125000 -1.187500 +v 0.937500 0.125000 -1.187500 +v 0.937500 0.125000 -1.312500 +v -0.937500 0.062500 -1.187500 +v -0.625000 0.062500 -1.187500 +v -0.937500 0.062500 -1.312500 +v -0.625000 0.062500 -1.312500 +v -0.937500 0.125000 -1.312500 +v -0.937500 0.125000 -1.187500 +v -0.625000 0.125000 -1.187500 +v -0.625000 0.125000 -1.312500 +v 0.625000 0.062500 2.500000 +v 0.937500 0.062500 2.500000 +v 0.625000 0.062500 2.437500 +v 0.937500 0.062500 2.437500 +v 0.625000 0.125000 2.437500 +v 0.625000 0.125000 2.500000 +v 0.937500 0.125000 2.500000 +v 0.937500 0.125000 2.437500 +v -0.937500 0.062500 2.500000 +v -0.625000 0.062500 2.500000 +v -0.937500 0.062500 2.437500 +v -0.625000 0.062500 2.437500 +v -0.937500 0.125000 2.437500 +v -0.937500 0.125000 2.500000 +v -0.625000 0.125000 2.500000 +v -0.625000 0.125000 2.437500 +v 0.625000 0.062500 1.312500 +v 0.937500 0.062500 1.312500 +v 0.625000 0.062500 1.187500 +v 0.937500 0.062500 1.187500 +v 0.625000 0.125000 1.187500 +v 0.625000 0.125000 1.312500 +v 0.937500 0.125000 1.312500 +v 0.937500 0.125000 1.187500 +v -0.937500 0.062500 1.312500 +v -0.625000 0.062500 1.312500 +v -0.937500 0.062500 1.187500 +v -0.625000 0.062500 1.187500 +v -0.937500 0.125000 1.187500 +v -0.937500 0.125000 1.312500 +v -0.625000 0.125000 1.312500 +v -0.625000 0.125000 1.187500 +v 0.625000 0.062500 -2.437500 +v 0.937500 0.062500 -2.437500 +v 0.625000 0.062500 -2.500000 +v 0.937500 0.062500 -2.500000 +v 0.625000 0.125000 -2.500000 +v 0.625000 0.125000 -2.437500 +v 0.937500 0.125000 -2.437500 +v 0.937500 0.125000 -2.500000 +v -0.937500 0.062500 -2.437500 +v -0.625000 0.062500 -2.437500 +v -0.937500 0.062500 -2.500000 +v -0.625000 0.062500 -2.500000 +v -0.937500 0.125000 -2.500000 +v -0.937500 0.125000 -2.437500 +v -0.625000 0.125000 -2.437500 +v -0.625000 0.125000 -2.500000 +vt 0.750000 1.000000 +vt 0.781249 0.000000 +vt 0.781250 1.000000 +vt 0.875000 1.000000 +vt 0.843750 0.000000 +vt 0.875000 0.000000 +vt 0.781250 1.000000 +vt 0.812499 0.000000 +vt 0.812500 1.000000 +vt 0.468750 0.550000 +vt 0.453125 0.575000 +vt 0.453125 0.550000 +vt 0.968750 0.000000 +vt 0.953125 1.000000 +vt 0.953125 0.000000 +vt 1.000000 0.000000 +vt 0.984375 1.000000 +vt 0.984375 0.000000 +vt 0.531250 0.575000 +vt 0.546875 0.550000 +vt 0.546875 0.575000 +vt 0.843750 1.000000 +vt 0.812500 0.000000 +vt 0.843750 0.000000 +vt 0.656249 0.550000 +vt 0.640624 0.525000 +vt 0.656249 0.525000 +vt 0.656249 0.550000 +vt 0.671874 0.575000 +vt 0.656249 0.575000 +vt 0.953125 1.000000 +vt 0.937500 0.000000 +vt 0.953125 0.000000 +vt 0.984375 1.000000 +vt 0.968750 0.000000 +vt 0.984375 0.000000 +vt 0.375000 0.000000 +vt 0.499999 0.400000 +vt 0.375000 0.400000 +vt 0.250000 0.400000 +vt 0.375000 0.000000 +vt 0.375000 0.400000 +vt 0.593749 0.500000 +vt 0.609374 0.400000 +vt 0.609374 0.500000 +vt 0.359375 0.800000 +vt 0.375000 0.400000 +vt 0.375000 0.800000 +vt 0.562499 0.500000 +vt 0.578124 0.400000 +vt 0.578124 0.500000 +vt 0.312500 0.400000 +vt 0.296875 0.800000 +vt 0.296875 0.400000 +vt 0.187500 0.800000 +vt 0.125000 0.400000 +vt 0.187500 0.400000 +vt 0.062500 0.400000 +vt 0.000000 0.800000 +vt 0.000000 0.400000 +vt 0.406250 0.575000 +vt 0.421875 0.525000 +vt 0.421875 0.575000 +vt 0.390625 0.400000 +vt 0.375000 0.800000 +vt 0.375000 0.400000 +vt 0.421875 0.575000 +vt 0.437500 0.525000 +vt 0.437500 0.575000 +vt 0.218750 0.400000 +vt 0.203125 0.800000 +vt 0.203125 0.400000 +vt 0.125000 0.000000 +vt 0.250000 0.400000 +vt 0.125000 0.400000 +vt 0.624999 0.000000 +vt 0.500000 0.400000 +vt 0.499999 0.000000 +vt 0.609374 0.500000 +vt 0.624999 0.400000 +vt 0.624999 0.500000 +vt 0.250000 0.800000 +vt 0.265625 0.400000 +vt 0.265625 0.800000 +vt 0.578124 0.500000 +vt 0.593749 0.400000 +vt 0.593749 0.500000 +vt 0.281250 0.400000 +vt 0.265625 0.800000 +vt 0.265625 0.400000 +vt 0.125000 0.800000 +vt 0.062500 0.400000 +vt 0.125000 0.400000 +vt 0.937500 0.000000 +vt 0.875000 0.400000 +vt 0.875000 0.000000 +vt 0.390625 0.575000 +vt 0.406250 0.525000 +vt 0.406250 0.575000 +vt 0.203125 0.400000 +vt 0.187500 0.800000 +vt 0.187500 0.400000 +vt 0.437500 0.575000 +vt 0.453125 0.525000 +vt 0.453125 0.575000 +vt 0.359374 0.400000 +vt 0.343750 0.800000 +vt 0.343749 0.400000 +vt 0.749999 0.400000 +vt 0.624999 0.000000 +vt 0.749999 0.000000 +vt 0.000000 0.400000 +vt 0.125000 0.000000 +vt 0.125000 0.400000 +vt 0.624999 0.500000 +vt 0.640624 0.400000 +vt 0.640624 0.500000 +vt 0.250000 0.400000 +vt 0.234375 0.800000 +vt 0.234375 0.400000 +vt 0.312500 0.500000 +vt 0.328125 0.400000 +vt 0.328125 0.500000 +vt 0.296875 0.400000 +vt 0.281250 0.800000 +vt 0.281250 0.400000 +vt 0.453125 0.462500 +vt 0.484375 0.525000 +vt 0.453125 0.525000 +vt 0.468750 0.550000 +vt 0.453125 0.525000 +vt 0.468750 0.525000 +vt 0.703124 0.550000 +vt 0.687499 0.525000 +vt 0.703124 0.525000 +vt 0.531249 0.462500 +vt 0.515625 0.400000 +vt 0.531249 0.400000 +vt 0.640624 0.400000 +vt 0.656249 0.462500 +vt 0.640624 0.462500 +vt 0.421875 0.462500 +vt 0.453125 0.525000 +vt 0.421875 0.525000 +vt 0.687499 0.550000 +vt 0.671874 0.525000 +vt 0.687499 0.525000 +vt 0.484375 0.550000 +vt 0.468750 0.525000 +vt 0.484375 0.525000 +vt 0.515625 0.525000 +vt 0.500000 0.462500 +vt 0.515625 0.462500 +vt 0.546874 0.400000 +vt 0.562499 0.462500 +vt 0.546874 0.462500 +vt 0.421875 0.525000 +vt 0.390625 0.462500 +vt 0.421875 0.462500 +vt 0.484375 0.575000 +vt 0.468750 0.550000 +vt 0.484375 0.550000 +vt 0.531250 0.575000 +vt 0.515625 0.550000 +vt 0.531250 0.550000 +vt 0.656249 0.400000 +vt 0.671874 0.462500 +vt 0.656249 0.462500 +vt 0.531249 0.462500 +vt 0.546874 0.525000 +vt 0.531249 0.525000 +vt 0.484375 0.462500 +vt 0.453125 0.400000 +vt 0.484375 0.400000 +vt 0.671874 0.550000 +vt 0.656249 0.525000 +vt 0.671874 0.525000 +vt 0.546874 0.550000 +vt 0.531249 0.525000 +vt 0.546874 0.525000 +vt 0.593749 0.500000 +vt 0.609374 0.562500 +vt 0.593749 0.562500 +vt 0.546874 0.462500 +vt 0.562499 0.525000 +vt 0.546874 0.525000 +vt 0.624999 0.562500 +vt 0.609374 0.500000 +vt 0.624999 0.500000 +vt 0.578124 0.575000 +vt 0.562499 0.562500 +vt 0.578124 0.562500 +vt 0.624999 0.575000 +vt 0.609374 0.562500 +vt 0.624999 0.562500 +vt 0.531249 0.400000 +vt 0.546874 0.462500 +vt 0.531249 0.462500 +vt 0.703124 0.400000 +vt 0.718749 0.462500 +vt 0.703124 0.462500 +vt 0.640624 0.562500 +vt 0.624999 0.500000 +vt 0.640624 0.500000 +vt 0.328125 0.575000 +vt 0.312500 0.562500 +vt 0.328125 0.562500 +vt 0.656249 0.562500 +vt 0.640624 0.550000 +vt 0.656249 0.550000 +vt 0.671874 0.400000 +vt 0.687499 0.462500 +vt 0.671874 0.462500 +vt 0.687499 0.462500 +vt 0.703124 0.525000 +vt 0.687499 0.525000 +vt 0.453125 0.462500 +vt 0.421875 0.400000 +vt 0.453125 0.400000 +vt 0.500000 0.575000 +vt 0.484375 0.550000 +vt 0.500000 0.550000 +vt 0.515625 0.575000 +vt 0.500000 0.550000 +vt 0.515625 0.550000 +vt 0.640624 0.462500 +vt 0.656249 0.525000 +vt 0.640624 0.525000 +vt 0.312500 0.500000 +vt 0.328125 0.562500 +vt 0.312500 0.562500 +vt 0.421875 0.462500 +vt 0.390625 0.400000 +vt 0.421875 0.400000 +vt 0.687499 0.575000 +vt 0.671874 0.550000 +vt 0.687499 0.550000 +vt 0.515625 0.550000 +vt 0.500000 0.525000 +vt 0.515625 0.525000 +vt 0.656249 0.462500 +vt 0.671874 0.525000 +vt 0.656249 0.525000 +vt 0.671874 0.462500 +vt 0.687499 0.525000 +vt 0.671874 0.525000 +vt 0.578124 0.562500 +vt 0.562499 0.500000 +vt 0.578124 0.500000 +vt 0.609374 0.575000 +vt 0.593749 0.562500 +vt 0.609374 0.562500 +vt 0.640624 0.575000 +vt 0.624999 0.562500 +vt 0.640624 0.562500 +vt 0.703124 0.462500 +vt 0.718749 0.525000 +vt 0.703124 0.525000 +vt 0.515625 0.462500 +vt 0.531249 0.525000 +vt 0.515625 0.525000 +vt 0.593749 0.562500 +vt 0.578124 0.500000 +vt 0.593749 0.500000 +vt 0.593749 0.575000 +vt 0.578124 0.562500 +vt 0.593749 0.562500 +vt 0.703124 0.562500 +vt 0.687499 0.550000 +vt 0.703124 0.550000 +vt 0.687499 0.400000 +vt 0.703124 0.462500 +vt 0.687499 0.462500 +vt 0.500000 0.400000 +vt 0.515625 0.462500 +vt 0.500000 0.462500 +vt 0.749999 0.000000 +vt 0.843750 1.000000 +vt 0.781250 0.000000 +vt 0.468750 0.575000 +vt 0.968750 1.000000 +vt 1.000000 1.000000 +vt 0.531250 0.550000 +vt 0.812500 1.000000 +vt 0.640624 0.550000 +vt 0.671874 0.550000 +vt 0.937500 1.000000 +vt 0.968750 1.000000 +vt 0.499999 0.000000 +vt 0.250000 0.000000 +vt 0.593749 0.400000 +vt 0.359375 0.400000 +vt 0.562499 0.400000 +vt 0.312500 0.800000 +vt 0.125000 0.800000 +vt 0.062500 0.800000 +vt 0.406250 0.525000 +vt 0.390625 0.800000 +vt 0.421875 0.525000 +vt 0.218750 0.800000 +vt 0.250000 0.000000 +vt 0.624999 0.400000 +vt 0.609374 0.400000 +vt 0.250000 0.400000 +vt 0.578124 0.400000 +vt 0.281250 0.800000 +vt 0.062500 0.800000 +vt 0.937500 0.400000 +vt 0.390625 0.525000 +vt 0.203125 0.800000 +vt 0.437500 0.525000 +vt 0.359375 0.800000 +vt 0.624999 0.400000 +vt 0.000000 0.000000 +vt 0.624999 0.400000 +vt 0.250000 0.800000 +vt 0.312500 0.400000 +vt 0.296875 0.800000 +vt 0.484375 0.462500 +vt 0.453125 0.550000 +vt 0.687499 0.550000 +vt 0.515625 0.462500 +vt 0.656249 0.400000 +vt 0.453125 0.462500 +vt 0.671874 0.550000 +vt 0.468750 0.550000 +vt 0.500000 0.525000 +vt 0.562499 0.400000 +vt 0.390625 0.525000 +vt 0.468750 0.575000 +vt 0.515625 0.575000 +vt 0.671874 0.400000 +vt 0.546874 0.462500 +vt 0.453125 0.462500 +vt 0.656249 0.550000 +vt 0.531249 0.550000 +vt 0.609374 0.500000 +vt 0.562499 0.462500 +vt 0.609374 0.562500 +vt 0.562499 0.575000 +vt 0.609374 0.575000 +vt 0.546874 0.400000 +vt 0.718749 0.400000 +vt 0.624999 0.562500 +vt 0.312500 0.575000 +vt 0.640624 0.562500 +vt 0.687499 0.400000 +vt 0.703124 0.462500 +vt 0.421875 0.462500 +vt 0.484375 0.575000 +vt 0.500000 0.575000 +vt 0.656249 0.462500 +vt 0.328125 0.500000 +vt 0.390625 0.462500 +vt 0.671874 0.575000 +vt 0.500000 0.550000 +vt 0.671874 0.462500 +vt 0.687499 0.462500 +vt 0.562499 0.562500 +vt 0.593749 0.575000 +vt 0.624999 0.575000 +vt 0.718749 0.462500 +vt 0.531249 0.462500 +vt 0.578124 0.562500 +vt 0.578124 0.575000 +vt 0.687499 0.562500 +vt 0.703124 0.400000 +vt 0.515625 0.400000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +s off +f 8/1/1 3/2/1 4/3/1 +f 1/4/2 6/5/2 2/6/2 +f 12/7/1 9/8/1 10/9/1 +f 12/10/3 2/11/3 6/12/3 +f 11/13/4 6/14/4 5/15/4 +f 10/16/5 1/17/5 2/18/5 +f 9/19/6 5/20/6 1/21/6 +f 13/22/2 16/23/2 14/24/2 +f 4/25/3 16/26/3 8/27/3 +f 7/28/6 13/29/6 3/30/6 +f 8/31/4 15/32/4 7/33/4 +f 3/34/5 14/35/5 4/36/5 +f 18/37/5 19/38/5 17/39/5 +f 24/40/4 21/41/4 22/42/4 +f 24/43/2 17/44/2 19/45/2 +f 22/46/3 18/47/3 17/48/3 +f 21/49/1 20/50/1 18/51/1 +f 23/52/6 19/53/6 20/54/6 +f 26/55/5 27/56/5 25/57/5 +f 32/58/4 29/59/4 30/60/4 +f 32/61/2 25/62/2 27/63/2 +f 30/64/3 26/65/3 25/66/3 +f 29/67/1 28/68/1 26/69/1 +f 31/70/6 27/71/6 28/72/6 +f 34/73/5 35/74/5 33/75/5 +f 40/76/4 37/77/4 38/78/4 +f 40/79/2 33/80/2 35/81/2 +f 38/82/3 34/83/3 33/84/3 +f 37/85/1 36/86/1 34/87/1 +f 39/88/6 35/89/6 36/90/6 +f 42/91/5 43/92/5 41/93/5 +f 48/94/4 45/95/4 46/96/4 +f 48/97/2 41/98/2 43/99/2 +f 46/100/3 42/101/3 41/102/3 +f 45/103/1 44/104/1 42/105/1 +f 47/106/6 43/107/6 44/108/6 +f 50/109/5 51/110/5 49/111/5 +f 56/112/4 53/113/4 54/114/4 +f 56/115/2 49/116/2 51/117/2 +f 54/118/3 50/119/3 49/120/3 +f 53/121/1 52/122/1 50/123/1 +f 55/124/6 51/125/6 52/126/6 +f 63/127/4 61/128/4 62/129/4 +f 60/130/1 63/131/1 58/132/1 +f 57/133/2 61/134/2 59/135/2 +f 59/136/3 64/137/3 60/138/3 +f 58/139/6 62/140/6 57/141/6 +f 71/142/4 69/143/4 70/144/4 +f 68/145/1 71/146/1 66/147/1 +f 65/148/2 69/149/2 67/150/2 +f 67/151/3 72/152/3 68/153/3 +f 66/154/6 70/155/6 65/156/6 +f 79/157/4 77/158/4 78/159/4 +f 76/160/1 79/161/1 74/162/1 +f 73/163/2 77/164/2 75/165/2 +f 75/166/3 80/167/3 76/168/3 +f 74/169/6 78/170/6 73/171/6 +f 87/172/4 85/173/4 86/174/4 +f 84/175/1 87/176/1 82/177/1 +f 81/178/2 85/179/2 83/180/2 +f 83/181/3 88/182/3 84/183/3 +f 82/184/6 86/185/6 81/186/6 +f 95/187/4 93/188/4 94/189/4 +f 92/190/1 95/191/1 90/192/1 +f 89/193/2 93/194/2 91/195/2 +f 91/196/3 96/197/3 92/198/3 +f 90/199/6 94/200/6 89/201/6 +f 103/202/4 101/203/4 102/204/4 +f 100/205/1 103/206/1 98/207/1 +f 97/208/2 101/209/2 99/210/2 +f 99/211/3 104/212/3 100/213/3 +f 98/214/6 102/215/6 97/216/6 +f 111/217/4 109/218/4 110/219/4 +f 108/220/1 111/221/1 106/222/1 +f 105/223/2 109/224/2 107/225/2 +f 107/226/3 112/227/3 108/228/3 +f 106/229/6 110/230/6 105/231/6 +f 119/232/4 117/233/4 118/234/4 +f 116/235/1 119/236/1 114/237/1 +f 113/238/2 117/239/2 115/240/2 +f 115/241/3 120/242/3 116/243/3 +f 114/244/6 118/245/6 113/246/6 +f 127/247/4 125/248/4 126/249/4 +f 124/250/1 127/251/1 122/252/1 +f 121/253/2 125/254/2 123/255/2 +f 123/256/3 128/257/3 124/258/3 +f 122/259/6 126/260/6 121/261/6 +f 135/262/4 133/263/4 134/264/4 +f 132/265/1 135/266/1 130/267/1 +f 129/268/2 133/269/2 131/270/2 +f 131/271/3 136/272/3 132/273/3 +f 130/274/6 134/275/6 129/276/6 +f 8/1/1 7/277/1 3/2/1 +f 1/4/2 5/278/2 6/5/2 +f 12/7/1 11/279/1 9/8/1 +f 12/10/3 10/280/3 2/11/3 +f 11/13/4 12/281/4 6/14/4 +f 10/16/5 9/282/5 1/17/5 +f 9/19/6 11/283/6 5/20/6 +f 13/22/2 15/284/2 16/23/2 +f 4/25/3 14/285/3 16/26/3 +f 7/28/6 15/286/6 13/29/6 +f 8/31/4 16/287/4 15/32/4 +f 3/34/5 13/288/5 14/35/5 +f 18/37/5 20/289/5 19/38/5 +f 24/40/4 23/290/4 21/41/4 +f 24/43/2 22/291/2 17/44/2 +f 22/46/3 21/292/3 18/47/3 +f 21/49/1 23/293/1 20/50/1 +f 23/52/6 24/294/6 19/53/6 +f 26/55/5 28/295/5 27/56/5 +f 32/58/4 31/296/4 29/59/4 +f 32/61/2 30/297/2 25/62/2 +f 30/64/3 29/298/3 26/65/3 +f 29/67/1 31/299/1 28/68/1 +f 31/70/6 32/300/6 27/71/6 +f 34/73/5 36/301/5 35/74/5 +f 40/76/4 39/302/4 37/77/4 +f 40/79/2 38/303/2 33/80/2 +f 38/82/3 37/304/3 34/83/3 +f 37/85/1 39/305/1 36/86/1 +f 39/88/6 40/306/6 35/89/6 +f 42/91/5 44/307/5 43/92/5 +f 48/94/4 47/308/4 45/95/4 +f 48/97/2 46/309/2 41/98/2 +f 46/100/3 45/310/3 42/101/3 +f 45/103/1 47/311/1 44/104/1 +f 47/106/6 48/312/6 43/107/6 +f 50/109/5 52/313/5 51/110/5 +f 56/112/4 55/314/4 53/113/4 +f 56/115/2 54/315/2 49/116/2 +f 54/118/3 53/316/3 50/119/3 +f 53/121/1 55/317/1 52/122/1 +f 55/124/6 56/318/6 51/125/6 +f 63/127/4 64/319/4 61/128/4 +f 60/130/1 64/320/1 63/131/1 +f 57/133/2 62/321/2 61/134/2 +f 59/136/3 61/322/3 64/137/3 +f 58/139/6 63/323/6 62/140/6 +f 71/142/4 72/324/4 69/143/4 +f 68/145/1 72/325/1 71/146/1 +f 65/148/2 70/326/2 69/149/2 +f 67/151/3 69/327/3 72/152/3 +f 66/154/6 71/328/6 70/155/6 +f 79/157/4 80/329/4 77/158/4 +f 76/160/1 80/330/1 79/161/1 +f 73/163/2 78/331/2 77/164/2 +f 75/166/3 77/332/3 80/167/3 +f 74/169/6 79/333/6 78/170/6 +f 87/172/4 88/334/4 85/173/4 +f 84/175/1 88/335/1 87/176/1 +f 81/178/2 86/336/2 85/179/2 +f 83/181/3 85/337/3 88/182/3 +f 82/184/6 87/338/6 86/185/6 +f 95/187/4 96/339/4 93/188/4 +f 92/190/1 96/340/1 95/191/1 +f 89/193/2 94/341/2 93/194/2 +f 91/196/3 93/342/3 96/197/3 +f 90/199/6 95/343/6 94/200/6 +f 103/202/4 104/344/4 101/203/4 +f 100/205/1 104/345/1 103/206/1 +f 97/208/2 102/346/2 101/209/2 +f 99/211/3 101/347/3 104/212/3 +f 98/214/6 103/348/6 102/215/6 +f 111/217/4 112/349/4 109/218/4 +f 108/220/1 112/350/1 111/221/1 +f 105/223/2 110/351/2 109/224/2 +f 107/226/3 109/352/3 112/227/3 +f 106/229/6 111/353/6 110/230/6 +f 119/232/4 120/354/4 117/233/4 +f 116/235/1 120/355/1 119/236/1 +f 113/238/2 118/356/2 117/239/2 +f 115/241/3 117/357/3 120/242/3 +f 114/244/6 119/358/6 118/245/6 +f 127/247/4 128/359/4 125/248/4 +f 124/250/1 128/360/1 127/251/1 +f 121/253/2 126/361/2 125/254/2 +f 123/256/3 125/362/3 128/257/3 +f 122/259/6 127/363/6 126/260/6 +f 135/262/4 136/364/4 133/263/4 +f 132/265/1 136/365/1 135/266/1 +f 129/268/2 134/366/2 133/269/2 +f 131/271/3 133/367/3 136/272/3 +f 130/274/6 135/368/6 134/275/6 diff --git a/src/main/resources/assets/hbm/textures/items/motor_bismuth.png b/src/main/resources/assets/hbm/textures/items/motor_bismuth.png new file mode 100644 index 000000000..404e935e1 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/motor_bismuth.png differ