mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Merge branch 'HbmMods:master' into deimos
This commit is contained in:
commit
a0b9acd011
34
changelog
34
changelog
@ -1,7 +1,41 @@
|
||||
## Added
|
||||
* New Chicago Pile
|
||||
* Assembled multiblock, similar to the PWR
|
||||
* Requires new chicago pile graphite bricks
|
||||
* Assembled with a hand drill out of a box made from graphite bricks, at least 5x5x5, and at most 15x15x15 blocks large
|
||||
* Drilling the assembled reactor will add channels at the selected locations
|
||||
* Drilling along the reactor's orientation will add a fuel channel
|
||||
* Drilling perpendicular to fuel channels will add a ventilation channel
|
||||
* Drilling vertically will add a control rod channel
|
||||
* Fuel insertion is now done with a dedicated fuel loader which can be operated by hand or automated with hopper IO and redstone
|
||||
* Ventilation channels need chicago pile vents which are powered with compressed air at 1 PU
|
||||
* Chicago pile control rods can either be fully withdrawn with redstone or fine tuned with RoR
|
||||
* Additionally, channels can be drilled by right clicking a pile addon device with the hand drill, the addon doesn't need to be removed beforehand
|
||||
* This is mainly for convenience when disassembling and reassembling the reactor, which requires all channels to be drilled again
|
||||
* Piles that overheat will explode, throwing flaming graphite everywhere
|
||||
|
||||
## Changed
|
||||
* Updated all oil well GUI textures
|
||||
* There's now only two upgrade slots instead of three
|
||||
* All legacy pixel gauges have been replaced with smooth ones (watz, ZIRNOX, CCGT) making them more accurate
|
||||
* Updated the diesel generator's GUI
|
||||
* The diesel gen now also has an in-GUI button for turning it on and off like the industrial combustion engine
|
||||
* MS-ESv1.1 `split` instruction now supports variable substitution
|
||||
* Multiblocks now display a wireframe preview of how much space they take up
|
||||
* This preview is green if it can be placed and red if it can not
|
||||
* On some machines, this preview might not be perfect, but the check on whether it can be placed should always be accurate
|
||||
* This makes it easier to anticipate how much space a machine takes up, as well as lining up large parts like fusion reactor components which were notoriously hard to place down right
|
||||
* Updated the small pylon model
|
||||
* The small pylon now has a steel variant
|
||||
* Items in the battery socket which previously didn't show up in the socket's model are now rendered
|
||||
* Reduced the cost for the heavy stirling engine
|
||||
|
||||
## Fixed
|
||||
* Fixed held block being placed when not sneaking when opening the cable diode's GUI
|
||||
* Fixed an issue where the diesel generator's fuel capacity is the original 4,000mB instead of the intended new 16,000mB
|
||||
* This means that explosive barrels and universal barrels can now be loaded into the diesel generator
|
||||
* Fixed RoR terminal's `set` command not working
|
||||
* Fixed a longstanding issue where the transparent part of beams from tile entity models would often have incorrect render order, sometimes rendering things behind them invisible
|
||||
* This also fixes the same phenomenon for other types of beams, such as those from hitscan laser and tesla weapons
|
||||
* Fixed some issues regarding the new crane structure
|
||||
* Fixed skeletonizer ashes floating over the floor after landing
|
||||
@ -5,6 +5,9 @@ import com.hbm.handler.ThreeInts;
|
||||
import com.hbm.interfaces.ICopiable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.util.Clock;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -13,6 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -32,10 +36,14 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class BlockDummyable extends BlockContainer implements ICustomBlockHighlight, ICopiable, INBTBlockTransformable {
|
||||
|
||||
@ -595,4 +603,272 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
|
||||
return meta;
|
||||
}
|
||||
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] { getDimensions() };
|
||||
}
|
||||
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[0][0];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void drawPlacementHighlight(EntityPlayer player, float interp) {
|
||||
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(player, 5.0D);
|
||||
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
double dX = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double) interp;
|
||||
double dY = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double) interp;
|
||||
double dZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) interp;
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
int o = -getOffset();
|
||||
int pY = mop.blockY + getHeightOffset();
|
||||
|
||||
// Orientation
|
||||
ForgeDirection facing = ForgeDirection.NORTH;
|
||||
if(i == 0) facing = ForgeDirection.getOrientation(2);
|
||||
if(i == 1) facing = ForgeDirection.getOrientation(5);
|
||||
if(i == 2) facing = ForgeDirection.getOrientation(3);
|
||||
if(i == 3) facing = ForgeDirection.getOrientation(4);
|
||||
|
||||
ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit);
|
||||
facing = getDirModified(facing);
|
||||
|
||||
double originX = mop.blockX + facing.offsetX * o + sideHit.offsetX;
|
||||
double originY = pY + sideHit.offsetY;
|
||||
double originZ = mop.blockZ + facing.offsetZ * o + sideHit.offsetZ;
|
||||
|
||||
boolean canPlace = checkRequirement(player.worldObj, mop.blockX + sideHit.offsetX, pY + sideHit.offsetY, mop.blockZ + sideHit.offsetZ, facing, o);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
GL11.glLineWidth(2.0F);
|
||||
GL11.glDepthMask(false);
|
||||
tess.startDrawing(GL11.GL_LINES);
|
||||
tess.setBrightness(240);
|
||||
|
||||
double timer = (Clock.get_ms() % (1000D * Math.PI)) / 250D;
|
||||
double sine = Math.sin(timer);
|
||||
int color = (int) (255 * (sine * 0.25 + 0.75));
|
||||
|
||||
if(canPlace) {
|
||||
tess.setColorRGBA(0, color, 0, 255);
|
||||
} else {
|
||||
tess.setColorRGBA(color, 0, 0, 255);
|
||||
}
|
||||
|
||||
// Gets the list of different dimensions that each XLmultiblock has,
|
||||
// and generates the list of blocks that needs to be highlighted.
|
||||
// Each XL multiblock has the getAllDimensions overridden in its own
|
||||
// class. Each NEEDS it or it will show the incorect shape.
|
||||
List<BlockPos> blocks = new java.util.ArrayList<>();
|
||||
Set<BlockPos> set = new java.util.HashSet<>();
|
||||
|
||||
for(int[] dims : getAllDimensions()) {
|
||||
// Some of the multiblocks have offsets for the placements, so
|
||||
// this allows for the ones that dont need it to have a bunch of
|
||||
// 0s at the end.
|
||||
int offFwd = dims.length > 6 ? dims[6] : 0;
|
||||
int offUp = dims.length > 7 ? dims[7] : 0;
|
||||
int offLat = dims.length > 8 ? dims[8] : 0;
|
||||
int worldOffX;
|
||||
int worldOffY;
|
||||
int worldOffZ;
|
||||
|
||||
worldOffY = offUp;
|
||||
worldOffX = facing.offsetX * offFwd + facing.getRotation(ForgeDirection.UP).offsetX * offLat;
|
||||
worldOffZ = facing.offsetZ * offFwd + facing.getRotation(ForgeDirection.UP).offsetZ * offLat;
|
||||
|
||||
int[] rot = MultiblockHandlerXR.rotate(dims, facing);
|
||||
for(int bx = -rot[4] + worldOffX; bx <= rot[5] + worldOffX; bx++) {
|
||||
for(int by = -rot[1] + worldOffY; by <= rot[0] + worldOffY; by++) {
|
||||
for(int bz = -rot[2] + worldOffZ; bz <= rot[3] + worldOffZ; bz++) {
|
||||
BlockPos bp = new BlockPos(MathHelper.floor_double(originX) + bx, MathHelper.floor_double(originY) + by, MathHelper.floor_double(originZ) + bz);
|
||||
blocks.add(bp);
|
||||
set.add(bp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// This looks for the blocks nearby and draws lines between the
|
||||
// vertexes to make different shaped boxes.
|
||||
// Most of this was taken from Mellow (Thanks mellow) -Wolf
|
||||
for(BlockPos pos : blocks) {
|
||||
boolean px = set.contains(pos.add(1, 0, 0));
|
||||
boolean nx = set.contains(pos.add(-1, 0, 0));
|
||||
boolean ppy = set.contains(pos.add(0, 1, 0));
|
||||
boolean ny = set.contains(pos.add(0, -1, 0));
|
||||
boolean ppz = set.contains(pos.add(0, 0, 1));
|
||||
boolean nz = set.contains(pos.add(0, 0, -1));
|
||||
|
||||
double minX = pos.getX() - dX;
|
||||
double maxX = pos.getX() + 1 - dX;
|
||||
double minY = pos.getY() - dY;
|
||||
double maxY = pos.getY() + 1 - dY;
|
||||
double minZ = pos.getZ() - dZ;
|
||||
double maxZ = pos.getZ() + 1 - dZ;
|
||||
|
||||
if(!ppy) {
|
||||
if(!nx) {
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
}
|
||||
if(!ppz) {
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
}
|
||||
if(!px) {
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
}
|
||||
if(!nz) {
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
}
|
||||
}
|
||||
if(!ny) {
|
||||
if(!nx) {
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
}
|
||||
if(!ppz) {
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
}
|
||||
if(!px) {
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
}
|
||||
if(!nz) {
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
if(!nz) {
|
||||
if(!nx) {
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
}
|
||||
if(!ppy) {
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
}
|
||||
if(!px) {
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
}
|
||||
if(!ny) {
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
if(!ppz) {
|
||||
if(!nx) {
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
}
|
||||
if(!ppy) {
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
}
|
||||
if(!px) {
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
}
|
||||
if(!ny) {
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
}
|
||||
}
|
||||
if(!nx) {
|
||||
if(!nz) {
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
}
|
||||
if(!ppy) {
|
||||
tess.addVertex(minX, maxY, minZ);
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
}
|
||||
if(!ppz) {
|
||||
tess.addVertex(minX, maxY, maxZ);
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
}
|
||||
if(!ny) {
|
||||
tess.addVertex(minX, minY, maxZ);
|
||||
tess.addVertex(minX, minY, minZ);
|
||||
}
|
||||
}
|
||||
if(!px) {
|
||||
if(!nz) {
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
}
|
||||
if(!ppy) {
|
||||
tess.addVertex(maxX, maxY, minZ);
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
}
|
||||
if(!ppz) {
|
||||
tess.addVertex(maxX, maxY, maxZ);
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
}
|
||||
if(!ny) {
|
||||
tess.addVertex(maxX, minY, maxZ);
|
||||
tess.addVertex(maxX, minY, minZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tess.setColorRGBA(0, 0, color, 255);
|
||||
|
||||
// boo-yeah
|
||||
for(double[] extra : this.getAABBExtras()) {
|
||||
ForgeDirection rot = facing.getRotation(ForgeDirection.UP);
|
||||
double cX = MathHelper.floor_double(originX) - dX + 0.5;
|
||||
double cY = MathHelper.floor_double(originY) - dY;
|
||||
double cZ = MathHelper.floor_double(originZ) - dZ + 0.5;
|
||||
|
||||
double upr = extra[0];
|
||||
double lwr = extra[1];
|
||||
double fwd = extra[2];
|
||||
double bwd = extra[3];
|
||||
double lft = extra[4];
|
||||
double rgt = extra[5];
|
||||
|
||||
double x0 = cX + fwd * facing.offsetX + lft * rot.offsetX;
|
||||
double x1 = cX + bwd * facing.offsetX + rgt * rot.offsetX;
|
||||
double y0 = cY + lwr;
|
||||
double y1 = cY + upr;
|
||||
double z0 = cZ + fwd * facing.offsetZ + lft * rot.offsetZ;
|
||||
double z1 = cZ + bwd * facing.offsetZ + rgt * rot.offsetZ;
|
||||
|
||||
tess.addVertex(x0, y0, z0); tess.addVertex(x0, y0, z1);
|
||||
tess.addVertex(x1, y0, z0); tess.addVertex(x1, y0, z1);
|
||||
tess.addVertex(x0, y0, z0); tess.addVertex(x1, y0, z0);
|
||||
tess.addVertex(x0, y0, z1); tess.addVertex(x1, y0, z1);
|
||||
|
||||
tess.addVertex(x0, y1, z0); tess.addVertex(x0, y1, z1);
|
||||
tess.addVertex(x1, y1, z0); tess.addVertex(x1, y1, z1);
|
||||
tess.addVertex(x0, y1, z0); tess.addVertex(x1, y1, z0);
|
||||
tess.addVertex(x0, y1, z1); tess.addVertex(x1, y1, z1);
|
||||
|
||||
tess.addVertex(x0, y0, z0); tess.addVertex(x0, y1, z0);
|
||||
tess.addVertex(x1, y0, z0); tess.addVertex(x1, y1, z0);
|
||||
tess.addVertex(x0, y0, z1); tess.addVertex(x0, y1, z1);
|
||||
tess.addVertex(x1, y0, z1); tess.addVertex(x1, y1, z1);
|
||||
}
|
||||
|
||||
tess.draw();
|
||||
tess.setTranslation(0, 0, 0);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, OpenGlHelper.lastBrightnessX, OpenGlHelper.lastBrightnessY);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -745,6 +745,7 @@ public class ModBlocks {
|
||||
public static Block red_connector;
|
||||
public static Block red_connector_super;
|
||||
public static Block red_pylon;
|
||||
public static Block red_pylon_steel;
|
||||
public static Block red_pylon_medium_wood;
|
||||
public static Block red_pylon_medium_wood_transformer;
|
||||
public static Block red_pylon_medium_steel;
|
||||
@ -1020,6 +1021,8 @@ public class ModBlocks {
|
||||
public static Block machine_radgen;
|
||||
|
||||
public static Block machine_satlinker;
|
||||
public static Block machine_satlink;
|
||||
|
||||
public static Block machine_keyforge;
|
||||
|
||||
public static Block machine_armor_table;
|
||||
@ -1510,8 +1513,8 @@ public class ModBlocks {
|
||||
reinforced_ducrete = new BlockNoSpawn(Material.rock).setBlockName("reinforced_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_ducrete");
|
||||
|
||||
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
||||
brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_forgotten_lock = new BlockForgottenLock(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock");
|
||||
brick_forgotten = new BlockForgottenBrick().setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_forgotten_lock = new BlockForgottenLock().setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock");
|
||||
|
||||
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
@ -1854,6 +1857,7 @@ public class ModBlocks {
|
||||
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_connector_super = new ConnectorRedWireSuper(Material.iron).setBlockName("red_connector_super").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_steel = new PylonRedWire(Material.iron).setBlockName("red_pylon_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_wood_transformer = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
red_pylon_medium_steel = new PylonMedium(Material.iron).setBlockName("red_pylon_medium_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||
@ -1900,7 +1904,7 @@ public class ModBlocks {
|
||||
crane_splitter = new CraneSplitter().setBlockName("crane_splitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":crane_side");
|
||||
crane_partitioner = new CranePartitioner().setBlockName("crane_partitioner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":crane_partitioner_side");
|
||||
fan = new MachineFan().setBlockName("fan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
piston_inserter = new PistonInserter().setBlockName("piston_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
piston_inserter = new PistonInserter().setBlockName("piston_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
drone_waypoint = new DroneWaypoint().setBlockName("drone_waypoint").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":drone_waypoint");
|
||||
drone_crate = new DroneCrate().setBlockName("drone_crate").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -1936,6 +1940,7 @@ public class ModBlocks {
|
||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_satlink = new MachineSatLink().setBlockName("machine_satlink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
machine_armor_table = new BlockArmorTable(Material.iron).setBlockName("machine_armor_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab);
|
||||
machine_weapon_table = new BlockWeaponTable().setBlockName("machine_weapon_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab);
|
||||
@ -3130,6 +3135,7 @@ public class ModBlocks {
|
||||
register(red_connector);
|
||||
register(red_connector_super);
|
||||
register(red_pylon);
|
||||
register(red_pylon_steel);
|
||||
register(red_pylon_medium_wood);
|
||||
register(red_pylon_medium_wood_transformer);
|
||||
register(red_pylon_medium_steel);
|
||||
@ -3289,6 +3295,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
|
||||
register(machine_satlink);
|
||||
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_armor_table, machine_armor_table.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_weapon_table, machine_weapon_table.getUnlocalizedName());
|
||||
|
||||
112
src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java
Normal file
112
src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java
Normal file
@ -0,0 +1,112 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockForgottenBrick extends BlockMulti {
|
||||
|
||||
private IIcon iconTop;
|
||||
private IIcon iconAlt;
|
||||
private IIcon iconAltTop;
|
||||
private IIcon iconStone;
|
||||
private IIcon iconHole;
|
||||
private IIcon iconEmpty;
|
||||
private IIcon iconPlanks;
|
||||
private IIcon iconBricks;
|
||||
|
||||
public static final int META_DEFAULT = 0;
|
||||
public static final int META_BW = 1;
|
||||
public static final int META_NULLSTONE = 2;
|
||||
public static final int META_HOLE = 3;
|
||||
public static final int META_HOLE_EMPTY = 4;
|
||||
public static final int META_NULLROOM_WOOD = 5;
|
||||
public static final int META_NULLROOM_STONE = 6;
|
||||
|
||||
public BlockForgottenBrick() {
|
||||
super(Material.rock);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
this.iconTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_top");
|
||||
this.iconAlt = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw");
|
||||
this.iconAltTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw_top");
|
||||
this.iconStone = reg.registerIcon(RefStrings.MODID + ":playground/nullstone_demo_1_wip");
|
||||
this.iconHole = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_hole");
|
||||
this.iconEmpty = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_hole_empty");
|
||||
this.iconPlanks = reg.registerIcon(RefStrings.MODID + ":nr_planks");
|
||||
this.iconBricks = reg.registerIcon(RefStrings.MODID + ":nr_stone");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(meta == META_BW) {
|
||||
if(side == 0 || side == 1) return this.iconAltTop;
|
||||
return this.iconAlt;
|
||||
}
|
||||
if(meta == META_NULLSTONE) {
|
||||
return this.iconStone;
|
||||
}
|
||||
if(meta == META_HOLE) {
|
||||
if(side == 0 || side == 1) return this.iconTop;
|
||||
return this.iconHole;
|
||||
}
|
||||
if(meta == META_HOLE_EMPTY) {
|
||||
if(side == 0 || side == 1) return this.iconTop;
|
||||
return this.iconEmpty;
|
||||
}
|
||||
if(meta == META_NULLROOM_WOOD) {
|
||||
return this.iconPlanks;
|
||||
}
|
||||
if(meta == META_NULLROOM_STONE) {
|
||||
return this.iconBricks;
|
||||
}
|
||||
|
||||
if(side == 0 || side == 1) return this.iconTop;
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(meta == META_HOLE) {
|
||||
if(player.getHeldItem() == null) {
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = new ItemStack(ModItems.coal_eternal);
|
||||
world.setBlockMetadataWithNotify(x, y, z, META_HOLE_EMPTY, 3);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public int getSubCount() { return 7; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < getSubCount(); ++i) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,22 +1,83 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.BlockPillar;
|
||||
import com.hbm.items.ModItems;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockForgottenLock extends BlockPillar {
|
||||
public class BlockForgottenLock extends BlockMulti {
|
||||
|
||||
public BlockForgottenLock(Material mat, String top) {
|
||||
super(mat, top);
|
||||
private IIcon iconTop;
|
||||
private IIcon iconAlt;
|
||||
private IIcon iconAltTop;
|
||||
private IIcon iconStone;
|
||||
private IIcon iconStoneTop;
|
||||
|
||||
public static final int META_DEFAULT = 0;
|
||||
public static final int META_BW = 1;
|
||||
public static final int META_NULLSTONE = 2;
|
||||
public static final int META_THE_BLOCK_THAT_FUCKING_KILLS_YOU = 3;
|
||||
|
||||
public BlockForgottenLock() {
|
||||
super(Material.rock);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
this.iconTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_top");
|
||||
this.iconAlt = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw_lock");
|
||||
this.iconStone = reg.registerIcon(RefStrings.MODID + ":playground/nullstone_demo_2_wip");
|
||||
this.iconStoneTop = reg.registerIcon(RefStrings.MODID + ":playground/nullstone_demo_1_wip");
|
||||
this.iconAltTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw_top");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(meta == META_BW) {
|
||||
if(side == 0 || side == 1) return this.iconAltTop;
|
||||
return this.iconAlt;
|
||||
}
|
||||
|
||||
if(meta == META_NULLSTONE) {
|
||||
if(side == 0 || side == 1) return this.iconStoneTop;
|
||||
return this.iconStone;
|
||||
}
|
||||
|
||||
if(side == 0 || side == 1) return this.iconTop;
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
/*
|
||||
* A red herring is something that misleads or distracts from a relevant or important question.[1]
|
||||
* It may be either a logical fallacy or a literary device that leads readers or audiences toward a
|
||||
* false conclusion. A red herring may be used intentionally, as in mystery fiction or as part of
|
||||
* rhetorical strategies (e.g., in politics), or may be used in argumentation inadvertently.[2]
|
||||
*
|
||||
* The expression was popularized in 1807 by the English polemicist William Cobbett, who told a
|
||||
* story of having used a strong-smelling smoked herring to divert and distract hounds from
|
||||
* chasing a rabbit.[3]
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
@ -49,4 +110,14 @@ public class BlockForgottenLock extends BlockPillar {
|
||||
world.setBlock(x - dir.offsetX * d + rot.offsetX * w, y + h, z - dir.offsetZ * d + rot.offsetZ * w, b);
|
||||
}
|
||||
}
|
||||
|
||||
@Override public int getSubCount() { return 3; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < getSubCount(); ++i) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,13 @@ public class MachineAnnihilator extends BlockDummyable {
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {2, 0, 4, 4, 1, 1}; }
|
||||
@Override public int getOffset() { return 4; }
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {2, 0, 4, 4, 1, 1},
|
||||
new int[] {8, -2, 1, 1, 1, 1, -3, 0, 0}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
@ -43,7 +43,18 @@ public class MachineBigAssTank extends BlockDummyable implements IPersistentInfo
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {5, 0, 4, 4, 4, 4}; }
|
||||
@Override public int getOffset() { return 6; }
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {5, 0, 4, 4, 4, 4},
|
||||
new int[] {4, 0, 5, -4, 2, 2},
|
||||
new int[] {4, 0, -4, 5, 2, 2},
|
||||
new int[] {4, 0, 2, 2, 5, -4},
|
||||
new int[] {4, 0, 2, 2, -4, 5},
|
||||
new int[] {3, 0, 6, -5, 0, 0},
|
||||
new int[] {3, 0, -5, 6, 0, 0}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -49,7 +49,16 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {0, 0, 3, 3, 2, 3},
|
||||
new int[]{8, -1, 3, -1, 2, 0},
|
||||
new int[]{13, 0, 0, 3, 2, 1},
|
||||
new int[]{14, -13, -1, 2, 1, 0},
|
||||
new int[]{3, -1, 2, 3, -1, 3}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
|
||||
@ -68,7 +68,14 @@ public class MachineCatalyticReformer extends BlockDummyable implements IPersist
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {2, 0, 1, 1, 2, 2},
|
||||
new int[] {3, -3, 1, 0, -1, 2},
|
||||
new int[] {6, -3, 1, 1, 2, 0},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
|
||||
@ -89,7 +89,15 @@ public class MachineChungus extends BlockDummyable implements ITooltipProvider,
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 3, 0, 0, 3, 2, 2 },
|
||||
new int[] { 4, -4, 0, 3, 1, 1 },
|
||||
new int[] { 3, 0, 6, -1, 1, 1 },
|
||||
new int[] { 2, 0, 10, -7, 1, 1 },
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -43,7 +43,17 @@ public class MachineCoker extends BlockDummyable implements ITooltipProvider {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {22, 0, 1, 1, 1, 1},
|
||||
new int[] {5, 0, 2, 2, 2, 2, 0, 1, 0},
|
||||
new int[] {0, 1, 0, 0, 0, 0, 2, 1, 2},
|
||||
new int[] {0, 1, 0, 0, 0, 0, 2, 1, -2},
|
||||
new int[] {0, 1, 0, 0, 0, 0, -2, 1, 2},
|
||||
new int[] {0, 1, 0, 0, 0, 0, -2, 1, -2},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
if(super.checkRequirement(world, x, y, z, dir, o)) {
|
||||
|
||||
@ -34,7 +34,14 @@ public class MachineCompressor extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {2, 0, 1, 2, 1, 1},
|
||||
new int[] {3, -3, 1, 1, 1, 1},
|
||||
new int[] {8, -4, 0, 0, 1, 1}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
|
||||
@ -59,7 +59,7 @@ public class MachineDiesel extends BlockMachineBase implements ITooltipProvider
|
||||
|
||||
if(efficiency != null) {
|
||||
int eff = (int)(efficiency * 100);
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + grade.getGrade() + ": " + EnumChatFormatting.RED + "" + eff + "%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + grade.getLocalizedName() + ": " + EnumChatFormatting.RED + "" + eff + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,24 @@ public class MachineElectrolyser extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {0, 0, 5, 5, 1, 3},
|
||||
new int[] {2, -1, 5, 5, 1, 1},
|
||||
new int[] {3, -3, 5, 5, 0, 0},
|
||||
new int[] {3, -1, 4, -4, -3, 3},
|
||||
new int[] {3, -1, 2, -2, -3, 3},
|
||||
new int[] {3, -1, 0, 0, -3, 3},
|
||||
new int[] {3, -1, -2, 2, -3, 3},
|
||||
new int[] {3, -1, -4, 4, -3, 3},
|
||||
new int[] {0, 0, 0, 0, -1, 2, 4, 3, 0},
|
||||
new int[] {0, 0, 0, 0, -1, 2, 2, 3, 0},
|
||||
new int[] {0, 0, 0, 0, -1, 2, 0, 3, 0},
|
||||
new int[] {0, 0, 0, 0, -1, 2, -2, 3, 0},
|
||||
new int[] {0, 0, 0, 0, -1, 2, -4, 3, 0},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, -1);
|
||||
|
||||
@ -44,7 +44,15 @@ public class MachineExcavator extends BlockDummyable {
|
||||
public int getHeightOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {3, 0, 3, 3, 3, 3},
|
||||
new int[] {-1, 3, 3, -2, 3, -2},
|
||||
new int[] {-1, 3, 3, -2, -2, 3},
|
||||
new int[] {-1, 3, -2, 3, 3, 3},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
x += dir.offsetX * o;
|
||||
|
||||
@ -32,7 +32,17 @@ public class MachineExposureChamber extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
getDimensions(),
|
||||
new int[] {3, 0, 0, 0, -3, 8},
|
||||
new int[] {0, 0, 1, -1, -3, 6, 0, 2, 0},
|
||||
new int[] {0, 0, -1, 1, -3, 6, 0, 2, 0},
|
||||
new int[] {3, 0, 1, -1, 0, 1, 0, 0, -7},
|
||||
new int[] {3, 0, -1, 1, 0, 1, 0, 0, -7},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -46,7 +46,20 @@ public class MachineFrackingTower extends BlockDummyable implements IPersistentI
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {3, 0, 0, 0, 0, 0},
|
||||
new int[] {1, 0, 3, 3, 3, 3, 0, 2, 0},
|
||||
new int[] {-1, 2, 0, 1, 0, 1, -2, 2, -2},
|
||||
new int[] {-1, 2, 0, 1, 0, 1, 3, 2, -2},
|
||||
new int[] {-1, 2, 0, 1, 0, 1, -2, 2, 3},
|
||||
new int[] {-1, 2, 0, 1, 0, 1, 3, 2, 3},
|
||||
new int[] {10, -4, 2, 2, 2, 2},
|
||||
new int[] {24, -9, 1, 1, 1, 1},
|
||||
new int[] {1, 0, -2, 3, 1, 1, 0, 15, 0},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
|
||||
@ -33,7 +33,14 @@ public class MachineICF extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {5, 0, 1, 1, 8, 8},
|
||||
new int[] {1, 1, -1, 2, 8, 8, 0, 3, 0},
|
||||
new int[] {1, 1, 2, -1, 8, 8, 0, 3, 0},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -47,7 +47,16 @@ public class MachinePumpjack extends BlockDummyable implements IPersistentInfoPr
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {3, 0, 0, 0, 0, 6},
|
||||
new int[] {0, 0, -1, 1, -2, 4},
|
||||
new int[] {0, 0, 1, -1, -1, 5},
|
||||
new int[] {0, 0, -1, 1, 1, 1, 0, 0, -3},
|
||||
new int[] {0, 0, 1, -1, 2, 2, 0, 0, -3},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
84
src/main/java/com/hbm/blocks/machine/MachineSatLink.java
Normal file
84
src/main/java/com/hbm/blocks/machine/MachineSatLink.java
Normal file
@ -0,0 +1,84 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.items.ISatChip;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatLink;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class MachineSatLink extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public MachineSatLink() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineSatLink();
|
||||
if(meta >= 6) return new TileEntityProxyCombo();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {6, 0, 1, 0, 1, 0}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(!world.isRemote && !player.isSneaking()) {
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ISatChip) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return false;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineSatLink)) return false;
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) te;
|
||||
|
||||
link.freq = ISatChip.getFreqS(player.getHeldItem());
|
||||
player.addChatComponentMessage(new ChatComponentText("Set frequency to " + link.freq).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
world.playSoundAtEntity(player, NTMSounds.TECH_BLEEP, 1F, 1F);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(te instanceof TileEntityMachineSatLink)) return;
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("Freq: " + link.freq);
|
||||
text.add("Connected: " + (link.connected ? (EnumChatFormatting.GREEN + "Yes") : (EnumChatFormatting.RED + "No")));
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,13 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 0, 0, 6, 0, 1, 0 },
|
||||
new int[] { 2, 0, 1, 0, 1, 0 }
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineStrandCaster();
|
||||
|
||||
@ -78,6 +78,6 @@ public class MachineTurbofan extends BlockDummyable implements ITooltipProvider
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.AERO.getGrade() + ": " + EnumChatFormatting.RED + "100%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.AERO.getLocalizedName() + ": " + EnumChatFormatting.RED + "100%");
|
||||
}
|
||||
}
|
||||
@ -62,7 +62,15 @@ public class ReactorZirnox extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {1, 0, 2, 2, 2, 2,},
|
||||
new int[] {4, -2, 1, 1, 1, 1},
|
||||
new int[] {4, -2, 0, 0, 2, -2},
|
||||
new int[] {4, -2, 0, 0, -2, 2}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
@ -168,7 +168,18 @@ public class SoyuzLauncher extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 0, 1, 6, 6, 6, 6 },
|
||||
new int[] { -2, 4, -3, 6, -3, 6 },
|
||||
new int[] { -2, 4, 6, -3, -3, 6 },
|
||||
new int[] { -2, 4, 6, -3, 6, -3 },
|
||||
new int[] { -2, 4, -3, 6, 6, -3 },
|
||||
new int[] { 0, 4, 1, 1, -6, 8 },
|
||||
new int[] { 0, 4, 2, 2, 9, -5 },
|
||||
};
|
||||
}
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
|
||||
@ -53,7 +53,16 @@ public class Watz extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {2, 0, 3, 3, 1, 1},
|
||||
new int[] {2, 0, 2, 2, 2, -2},
|
||||
new int[] {2, 0, 2, 2, -2, 2},
|
||||
new int[] {2, 0, 1, 1, 3, -3},
|
||||
new int[] {2, 0, 1, 1, -3, 3},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
@ -45,7 +45,6 @@ public class BlockPASource extends BlockDummyable implements ITooltipProvider {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 4, y, z + rot.offsetZ * 4);
|
||||
this.makeExtra(world, x + dir.offsetX, y, z + dir.offsetZ);
|
||||
this.makeExtra(world, x + dir.offsetX + rot.offsetX * 2, y, z + dir.offsetZ + rot.offsetZ * 2);
|
||||
@ -53,6 +52,10 @@ public class BlockPASource extends BlockDummyable implements ITooltipProvider {
|
||||
this.makeExtra(world, x - dir.offsetX, y, z - dir.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX + rot.offsetX * 2, y, z - dir.offsetZ + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - dir.offsetX - rot.offsetX * 2, y, z - dir.offsetZ - rot.offsetZ * 2);
|
||||
|
||||
this.makeExtra(world, x, y - 1, z);
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y - 1, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 2, y - 1, z - rot.offsetZ * 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -44,6 +44,13 @@ public class MachineFusionBoiler extends BlockDummyable implements ILookOverlay,
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -4.5, -4.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o);
|
||||
|
||||
@ -37,6 +37,13 @@ public class MachineFusionBreeder extends BlockDummyable implements ITooltipProv
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -2.5, -2.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
|
||||
@ -35,6 +35,13 @@ public class MachineFusionCollector extends BlockDummyable implements ITooltipPr
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -2.5, -2.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o);
|
||||
|
||||
@ -34,6 +34,14 @@ public class MachineFusionCoupler extends BlockDummyable implements ITooltipProv
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, 1, -1, 1.5, 1.5},
|
||||
{1.5, 3.5, 1, -1, -1.5, -1.5}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
addStandardInfo(stack, player, list, ext);
|
||||
|
||||
@ -35,6 +35,20 @@ public class MachineFusionKlystron extends BlockDummyable implements ITooltipPro
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
|
||||
@Override public int getOffset() { return 3; }
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 3, 0, 4, 3, 2, 2 },
|
||||
new int[] { 4, -3, 4, 3, 1, 1 },
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -4.5, -4.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
@ -28,6 +28,20 @@ public class MachineFusionKlystronCreative extends BlockDummyable implements ITo
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
|
||||
@Override public int getOffset() { return 3; }
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 3, 0, 4, 3, 2, 2 },
|
||||
new int[] { 4, -3, 4, 3, 1, 1 },
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -4.5, -4.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
@ -45,6 +45,25 @@ public class MachineFusionMHDT extends BlockDummyable implements ILookOverlay, I
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 2, 0, 6, 7, 2, 2 },
|
||||
new int[] { 3, -2, 6, 2, 1, 1 },
|
||||
new int[] { 3, -2, -6, 7, 1, 1 },
|
||||
new int[] { 3, -2, -3, 5, 2, 2 },
|
||||
new int[] { 4, -3, -3, 5, 1, 1 },
|
||||
new int[] { 1, 0, 0, 1, 3, 3, 3, 0, 0 },
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, -6.5, -6.5, 1, -1}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
@ -32,6 +32,29 @@ public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
@Override public int[] getDimensions() { return new int[] { 2, 0, 2, 2, 5, 5 }; }
|
||||
@Override public int getOffset() { return 5; }
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 2, 0, 2, 2, 5, 5 },
|
||||
new int[] { 4, -3, 0, 0, 4, 4 },
|
||||
new int[] { 2, 0, 3, -2, 4, 4 },
|
||||
new int[] { 2, 0, -2, 3, 4, 4 },
|
||||
new int[] { 2, 0, 4, -3, 3, 3 },
|
||||
new int[] { 2, 0, -3, 4, 3, 3 },
|
||||
new int[] { 2, 0, 5, -4, 2, 2 },
|
||||
new int[] { 2, 0, -4, 5, 2, 2 },
|
||||
new int[] { 3, -2, 1, 1, 5, 5 }
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{1.5, 3.5, 1, -1, 5.5, 5.5},
|
||||
{1.5, 3.5, 1, -1, -5.5, -5.5}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||
|
||||
@ -98,6 +98,27 @@ public class MachineFusionTorus extends BlockDummyable implements ITooltipProvid
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] { 4, 0, 7, 7, 3, 3 },
|
||||
new int[] { 4, 0, 6, 6, 4, 4 },
|
||||
new int[] { 4, 0, 5, 5, 5, 5 },
|
||||
new int[] { 4, 0, 4, 4, 6, 6 },
|
||||
new int[] { 4, 0, 3, 3, 7, 7 },
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[][] getAABBExtras() {
|
||||
return new double[][] {
|
||||
{3.5, 1.5, 7.5, 7.5, 1, -1},
|
||||
{3.5, 1.5, -7.5, -7.5, 1, -1},
|
||||
{3.5, 1.5, 1, -1, 7.5, 7.5},
|
||||
{3.5, 1.5, 1, -1, -7.5, -7.5},
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
|
||||
@ -98,6 +98,7 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable, IL
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
|
||||
if(!TileEntityPileCore.meltingDown) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityPileBaseMK2) {
|
||||
@ -112,6 +113,7 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable, IL
|
||||
world.removeTileEntity(x, y, z);
|
||||
world.setBlock(x, y, z, ModBlocks.pile_brick);
|
||||
}
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@ -151,6 +153,15 @@ public class BlockPile extends BlockContainer implements IBlockCT, IToolable, IL
|
||||
if(meta == META_AIR_IN) text.add("Air Inlet");
|
||||
if(meta == META_AIR_OUT) text.add("Air Outlet");
|
||||
if(meta == META_CONTROL) text.add("Control Rod Channel");
|
||||
|
||||
if(meta == META_CORE) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileEntityPileCore) {
|
||||
TileEntityPileCore core = (TileEntityPileCore) tile;
|
||||
text.add("Max Temp: " + (int) Math.round(core.highestHeat) + " / " + core.MAX_HEAT + "°C");
|
||||
}
|
||||
}
|
||||
|
||||
if(!text.isEmpty()) ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.blocks.machine.pile;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockFlammable;
|
||||
import com.hbm.blocks.machine.MachinePWRController;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileBaseMK2;
|
||||
@ -10,7 +11,6 @@ import com.hbm.tileentity.machine.pile.TileEntityPileCore.PileOrientation;
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -18,13 +18,13 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPileBrick extends Block implements IToolable {
|
||||
public class BlockPileBrick extends BlockFlammable implements IToolable {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT) protected IIcon iconSide;
|
||||
|
||||
public BlockPileBrick() {
|
||||
super(Material.rock);
|
||||
super(Material.rock, 30, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -127,7 +127,7 @@ public class BlockPileBrick extends Block implements IToolable {
|
||||
world.setBlock(iX, iY, iZ, ModBlocks.pile_block, BlockPile.META_CORE, 3);
|
||||
TileEntityPileCore core = (TileEntityPileCore) world.getTileEntity(iX, iY, iZ);
|
||||
core.orientation = PileOrientation.getOrientation(dir);
|
||||
core.setupSize(posHeight + negHeight + 1, left + right + 1, depth + 1);
|
||||
core.setupSize(posHeight, negHeight, left, right, depth + 1);
|
||||
} else {
|
||||
int edgeCount = 0;
|
||||
if(h == -negHeight || h == posHeight) edgeCount++;
|
||||
|
||||
@ -6,14 +6,18 @@ import java.util.List;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileControl;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileCore;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileLoader;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileVent;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@ -28,7 +32,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPileDevice extends BlockContainer implements IBlockMulti, ILookOverlay, ITooltipProvider {
|
||||
public class BlockPileDevice extends BlockContainer implements IBlockMulti, ILookOverlay, ITooltipProvider, IToolable {
|
||||
|
||||
public static final int ITEM_META_LOADER = 0;
|
||||
public static final int ITEM_META_VENT = 1;
|
||||
@ -79,6 +83,8 @@ public class BlockPileDevice extends BlockContainer implements IBlockMulti, ILoo
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(player.isSneaking()) return false;
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
meta -= meta % 4;
|
||||
|
||||
@ -151,20 +157,24 @@ public class BlockPileDevice extends BlockContainer implements IBlockMulti, ILoo
|
||||
List<String> text = new ArrayList();
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
/*if(tile instanceof TileEntityPileDeviceBase) {
|
||||
TileEntityPileDeviceBase device = (TileEntityPileDeviceBase) tile;
|
||||
text.add("#" + (device.chanNum + 1));
|
||||
}*/
|
||||
|
||||
if(tile instanceof TileEntityPileLoader) {
|
||||
TileEntityPileLoader device = (TileEntityPileLoader) tile;
|
||||
text.add("Index: " + device.chanNum);
|
||||
text.add("Temp: " + (int) Math.round(device.channelTemp) + " / " + TileEntityPileCore.MAX_HEAT + "°C");
|
||||
if(device.syncStack != null) text.add("Loading: " + device.syncStack.getDisplayName());
|
||||
}
|
||||
|
||||
if(tile instanceof TileEntityPileVent) {
|
||||
TileEntityPileVent device = (TileEntityPileVent) tile;
|
||||
text.add("Index: " + device.chanNum);
|
||||
if(device.channelStack != null) {
|
||||
text.add("Last rod: " + device.channelStack.getDisplayName());
|
||||
if(device.channelDepletion > 0) text.add("Depletion: " + (int) Math.round(device.channelDepletion) + "%");
|
||||
}
|
||||
}
|
||||
|
||||
if(tile instanceof TileEntityPileControl) {
|
||||
TileEntityPileControl device = (TileEntityPileControl) tile;
|
||||
text.add("Index: " + device.chanNum);
|
||||
text.add("Extraction level: " + (int) + (device.level * 100) + "%");
|
||||
}
|
||||
|
||||
@ -184,4 +194,27 @@ public class BlockPileDevice extends BlockContainer implements IBlockMulti, ILoo
|
||||
if(meta == ITEM_META_CONTROL) return this.getUnlocalizedName() + ".control";
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(meta >= BLOCK_META_CONTROL) {
|
||||
y -= 1;
|
||||
side = 1;
|
||||
} else {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta % 4 + 2);
|
||||
x -= dir.offsetX;
|
||||
z -= dir.offsetZ;
|
||||
side = dir.ordinal();
|
||||
}
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
if(b == ModBlocks.pile_block) {
|
||||
return ((BlockPile) b).onScrew(world, player, x, y, z, side, fX, fY, fZ, tool);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,13 @@ public class RBMKConsole extends BlockDummyable implements IToolable {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {3, 0, 0, 0, 2, 2},
|
||||
new int[] {0, 0, 0, 1, 2, 2},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -38,7 +38,13 @@ public class RBMKCraneConsole extends BlockDummyable implements IToolable {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[][] getAllDimensions() {
|
||||
return new int[][] {
|
||||
new int[] {1, 0, 0, 0, 1, 1},
|
||||
new int[] {0, 0, 0, 1, 1, 1},
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylon;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -10,15 +14,17 @@ import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PylonRedWire extends PylonBase {
|
||||
public class PylonRedWire extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public PylonRedWire(Material material) {
|
||||
super(material);
|
||||
public PylonRedWire(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPylon();
|
||||
|
||||
if(meta >= 12) return new TileEntityPylon();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -26,4 +32,34 @@ public class PylonRedWire extends PylonBase {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "25m");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 0, 0, 0, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityPylonBase) ((TileEntityPylonBase)te).disconnectAll();
|
||||
super.breakBlock(world, x, y, z, b, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
TileEntityPylonBase te = (TileEntityPylonBase) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
return te.setColor(player.getHeldItem());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ public class StructureConfig {
|
||||
public static int radioSpawnWeight = 30;
|
||||
public static int forestChemSpawnWeight = 30;
|
||||
public static int forestPostSpawnWeight = 30;
|
||||
public static int towerBaseSpawnWeight = 30;
|
||||
|
||||
public static int spireSpawnWeight = 2;
|
||||
public static int craneSpawnWeight = 20;
|
||||
@ -115,6 +116,7 @@ public class StructureConfig {
|
||||
oceanNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.38_oceanNullWeight", "Null spawn weight for ocean biomes", 35);
|
||||
craneSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.39_craneSpawnWeight", "Spawn weight for crane structure.", 20);
|
||||
broadcastingTowerSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.40_broadcastingTowerSpawnWeight", "Spawn weight for broadcasting tower structure.", 25);
|
||||
towerBaseSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.41_towerBaseSpawnWeight", "Spawn weight for tower base.", 30);
|
||||
|
||||
|
||||
structureMinChunks = CommonConfig.setDef(structureMinChunks, 4);
|
||||
|
||||
@ -39,6 +39,7 @@ public class FuelHandler implements IFuelHandler {
|
||||
if(fuel.getItem() == Item.getItemFromBlock(ModBlocks.block_coke)) return single * 160;
|
||||
if(fuel.getItem() == ModItems.book_guide) return single;
|
||||
if(fuel.getItem() == ModItems.coal_infernal) return 4800;
|
||||
if(fuel.getItem() == ModItems.coal_eternal) return single * 16;
|
||||
if(fuel.getItem() == ModItems.crystal_coal) return 6400;
|
||||
if(fuel.getItem() == ModItems.powder_sawdust) return single / 2;
|
||||
|
||||
|
||||
@ -128,11 +128,8 @@ public class MultiblockHandlerXR {
|
||||
|
||||
public static int[] rotate(int[] dim, ForgeDirection dir) {
|
||||
|
||||
if(dim == null)
|
||||
return null;
|
||||
|
||||
if(dir == ForgeDirection.SOUTH)
|
||||
return dim;
|
||||
if(dim == null) return null;
|
||||
if(dir == ForgeDirection.SOUTH) return dim;
|
||||
|
||||
if(dir == ForgeDirection.NORTH) {
|
||||
// U D N S W E
|
||||
@ -152,4 +149,26 @@ public class MultiblockHandlerXR {
|
||||
return dim;
|
||||
}
|
||||
|
||||
public static double[] rotateDouble(double[] dim, ForgeDirection dir) {
|
||||
|
||||
if(dim == null) return null;
|
||||
if(dir == ForgeDirection.SOUTH) return dim;
|
||||
|
||||
if(dir == ForgeDirection.NORTH) {
|
||||
// U D N S W E
|
||||
return new double[] { dim[0], dim[1], dim[3], dim[2], dim[5], dim[4] };
|
||||
}
|
||||
|
||||
if(dir == ForgeDirection.EAST) {
|
||||
// U D N S W E
|
||||
return new double[] { dim[0], dim[1], dim[5], dim[4], dim[2], dim[3] };
|
||||
}
|
||||
|
||||
if(dir == ForgeDirection.WEST) {
|
||||
// U D N S W E
|
||||
return new double[] { dim[0], dim[1], dim[4], dim[5], dim[3], dim[2] };
|
||||
}
|
||||
|
||||
return dim;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,23 +17,19 @@ public class ContainerMachineDiesel extends Container {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 1, 44, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 8, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 4, 8, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 17, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 1, 17, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 141, 71));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 35, 71));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 121 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 179));
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,30 +38,23 @@ public class ContainerMachineDiesel extends Container {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
if(!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
} else if(!this.mergeItemStack(var5, 0, 1, false)) {
|
||||
if(!this.mergeItemStack(var5, 2, 3, false))
|
||||
if(!this.mergeItemStack(var5, 4, 5, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,21 +17,21 @@ public class ContainerMachineKeyForge extends Container {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 36));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,21 +17,21 @@ public class ContainerMachineSatLinker extends Container {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 36));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -18,23 +18,23 @@ public class ContainerSatDock extends Container {
|
||||
tileSatelliteDock = tesd;
|
||||
|
||||
//Storage
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 0, 62, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 1, 80, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 2, 98, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 3, 116, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 4, 134, 17));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 5, 62, 35));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 6, 80, 35));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 7, 98, 35));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 8, 116, 35));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 9, 134, 35));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 10, 62, 53));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 11, 80, 53));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 12, 98, 53));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 13, 116, 53));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 14, 134, 53));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 0, 71, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 1, 71 + 18, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 2, 71 + 18 * 2, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 3, 71 + 18 * 3, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 4, 71 + 18 * 4, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 5, 71, 36));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 6, 71 + 18, 36));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 7, 71 + 18 * 2, 36));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 8, 71 + 18 * 3, 36));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 9, 71 + 18 * 4, 36));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 10, 71, 54));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 11, 71 + 18, 54));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 12, 71 + 18 * 2, 54));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 13, 71 + 18 * 3, 54));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tesd, 14, 71 + 18 * 4, 54));
|
||||
//Chip
|
||||
this.addSlotToContainer(new Slot(tesd, 15, 26, 35) {
|
||||
this.addSlotToContainer(new Slot(tesd, 15, 26, 36) {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack.getItem() instanceof ItemSatChip;
|
||||
@ -43,12 +43,12 @@ public class ContainerSatDock extends Container {
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,23 +19,23 @@ public class ContainerSoyuzCapsule extends Container {
|
||||
{
|
||||
for(int j = 0; j < 6; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 6, 8 + j * 18 + 18 * 2, 17 + i * 18));
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 6, 26 + j * 18 + 18 * 2, 18 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 18, 8, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 18, 17, 36));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,29 +17,29 @@ public class ContainerSoyuzLauncher extends Container {
|
||||
nukeBoy = tedf;
|
||||
|
||||
//Soyuz
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 62, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 98, 80));
|
||||
//Designator
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 62, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 80));
|
||||
//Satellite
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 98, 26));
|
||||
//Landing module
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 80, 26));
|
||||
//Kerosene IN
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 8, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 152, 98));
|
||||
//Kerosene OUT
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 8, 108));
|
||||
//Peroxide IN
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 26, 90));
|
||||
//Peroxide OUT
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 26, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 152, 116));
|
||||
//Oxyden IN
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 170, 98));
|
||||
//Oxyden OUT
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 170, 116));
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 8, 44, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 8, 134, 98));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 6; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 6 + 9, 62 + j * 18, 72 + i * 18));
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 6 + 9, 44 - i * 18, 26 + j * 18));
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,13 +47,13 @@ public class ContainerSoyuzLauncher extends Container {
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 17 + j * 18, 162 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 17 + i * 18, 220));
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,8 +68,8 @@ public class ContainerSoyuzLauncher extends Container {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 27) {
|
||||
if (!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true))
|
||||
if (par2 < 27) {
|
||||
if (!this.mergeItemStack(var5, 27, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ public class Fluids {
|
||||
public static FluidType CONCRETE;
|
||||
public static FluidType DHC;
|
||||
|
||||
/* Lagacy names for compatibility purposes */
|
||||
/* Legacy names for compatibility purposes */
|
||||
@Deprecated public static FluidType ACID; //JAOPCA uses this, apparently
|
||||
|
||||
public static final HashBiMap<String, FluidType> renameMapping = HashBiMap.create();
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@ -25,11 +26,11 @@ public class FT_Combustible extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.GOLD + "[Combustible]");
|
||||
info.add(EnumChatFormatting.GOLD + "[" + I18nUtil.resolveKey("hbmfluid.trait.combustible") + "]");
|
||||
|
||||
if(combustionEnergy > 0) {
|
||||
info.add(EnumChatFormatting.GOLD + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(combustionEnergy) + "HE " + EnumChatFormatting.GOLD + "per bucket");
|
||||
info.add(EnumChatFormatting.GOLD + "Fuel grade: " + EnumChatFormatting.RED + this.fuelGrade.getGrade());
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("hbmfluid.trait.provides") + " " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(combustionEnergy) + "HE " + EnumChatFormatting.GOLD + I18nUtil.resolveKey("hbmfluid.trait.perBucket"));
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("hbmfluid.trait.fuelGrade") + ": " + EnumChatFormatting.RED + this.fuelGrade.getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,11 +43,11 @@ public class FT_Combustible extends FluidTrait {
|
||||
}
|
||||
|
||||
public static enum FuelGrade {
|
||||
LOW("Low"), //heating and industrial oil < star engine, iGen
|
||||
MEDIUM("Medium"), //petroil < diesel generator
|
||||
HIGH("High"), //diesel, gasoline < HP engine
|
||||
AERO("Aviation"), //kerosene and other light aviation fuels < turbofan
|
||||
GAS("Gaseous"); //fuel gasses like NG, PG and syngas < gas turbine
|
||||
LOW("low"), //heating and industrial oil < star engine, iGen
|
||||
MEDIUM("medium"), //petroil < diesel generator
|
||||
HIGH("high"), //diesel, gasoline < HP engine
|
||||
AERO("aviation"), //kerosene and other light aviation fuels < turbofan
|
||||
GAS("gaseous"); //fuel gasses like NG, PG and syngas < gas turbine
|
||||
|
||||
private String grade;
|
||||
|
||||
@ -54,8 +55,8 @@ public class FT_Combustible extends FluidTrait {
|
||||
this.grade = grade;
|
||||
}
|
||||
|
||||
public String getGrade() {
|
||||
return this.grade;
|
||||
public String getLocalizedName() {
|
||||
return I18nUtil.resolveKey("hbmfluid.trait.fuel." + this.grade);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@ -42,26 +43,30 @@ public class FT_Coolable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.RED + "Thermal capacity: " + heatEnergy + " TU per " + amountReq + "mB");
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hbmfluid.trait.thermalCapacity") + ": " + heatEnergy + " " + I18nUtil.resolveKey("hbmfluid.trait.perTU") + " " + amountReq + "mB");
|
||||
for(CoolingType type : CoolingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + type.name + "] " + EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + type.getLocalizedName() + "] " + EnumChatFormatting.AQUA + I18nUtil.resolveKey("hbmfluid.trait.efficiency") + ": " + ((int) (eff * 100D)) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static enum CoolingType {
|
||||
TURBINE("Turbine Steam"),
|
||||
HEATEXCHANGER("Coolable");
|
||||
TURBINE("steam"),
|
||||
HEATEXCHANGER("coolable");
|
||||
|
||||
public String name;
|
||||
private String name;
|
||||
|
||||
private CoolingType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getLocalizedName() {
|
||||
return I18nUtil.resolveKey("hbmfluid.trait." + this.name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,8 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Corrosive extends FluidTrait {
|
||||
@ -31,9 +33,9 @@ public class FT_Corrosive extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
|
||||
if(isHighlyCorrosive())
|
||||
info.add(EnumChatFormatting.GOLD + "[Strongly Corrosive]");
|
||||
info.add(EnumChatFormatting.GOLD + "[" + I18nUtil.resolveKey("hbmfluid.trait.corrosiveStrong") + "]");
|
||||
else
|
||||
info.add(EnumChatFormatting.YELLOW + "[Corrosive]");
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + I18nUtil.resolveKey("hbmfluid.trait.corrosive") + "]");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@ -28,10 +29,10 @@ public class FT_Flammable extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.YELLOW + "[Flammable]");
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + I18nUtil.resolveKey("hbmfluid.trait.flammable") + "]");
|
||||
|
||||
if(energy > 0)
|
||||
info.add(EnumChatFormatting.YELLOW + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(energy) + "TU " + EnumChatFormatting.YELLOW + "per bucket");
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hbmfluid.trait.provides") + " " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(energy) + "TU " + EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hbmfluid.trait.perBucket"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,6 +5,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@ -42,13 +43,13 @@ public class FT_Heatable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.RED + "Thermal capacity: " + this.getFirstStep().heatReq + " TU per " + this.getFirstStep().amountReq + "mB");
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hbmfluid.trait.thermalCapacity") + ": " + this.getFirstStep().heatReq + " " + I18nUtil.resolveKey("hbmfluid.trait.perTU") + " " + this.getFirstStep().amountReq + "mB");
|
||||
for(HeatingType type : HeatingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + type.name + "] " + EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + type.getLocalizedName() + "] " + EnumChatFormatting.AQUA + I18nUtil.resolveKey("hbmfluid.trait.efficiency") + ": " + ((int) (eff * 100D)) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,17 +69,21 @@ public class FT_Heatable extends FluidTrait {
|
||||
}
|
||||
|
||||
public static enum HeatingType {
|
||||
BOILER("Boilable"),
|
||||
HEATEXCHANGER("Heatable"),
|
||||
PWR("PWR Coolant"),
|
||||
ICF("ICF Coolant"),
|
||||
PA("Particle Accelerator Coolant");
|
||||
BOILER("boilable"),
|
||||
HEATEXCHANGER("heatable"),
|
||||
PWR("coolantPWR"),
|
||||
ICF("coolantICF"),
|
||||
PA("coolantPA");
|
||||
|
||||
public String name;
|
||||
private String name;
|
||||
|
||||
private HeatingType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getLocalizedName() {
|
||||
return I18nUtil.resolveKey("hbmfluid.trait." + this.name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,8 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_PWRModerator extends FluidTrait {
|
||||
@ -22,13 +24,13 @@ public class FT_PWRModerator extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[PWR Flux Multiplier]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.pwrFluxMultiplier") + "]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
int mult = (int) (multiplier * 100 - 100);
|
||||
info.add(EnumChatFormatting.BLUE + "Core flux " + (mult >= 0 ? "+" : "") + mult + "%");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.trait.pwrFluxCore") + " " + (mult >= 0 ? "+" : "") + mult + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,6 +4,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@ -25,9 +26,9 @@ public class FT_Pheromone extends FluidTrait{
|
||||
public void addInfo(List<String> info) {
|
||||
|
||||
if(type == 1) {
|
||||
info.add(EnumChatFormatting.AQUA + "[Glyphid Pheromones]");
|
||||
info.add(EnumChatFormatting.AQUA + "[" + I18nUtil.resolveKey("hbmfluid.trait.glyphidPheromones") + "]");
|
||||
} else {
|
||||
info.add(EnumChatFormatting.BLUE + "[Modified Pheromones]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.modifiedPheromones") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
@ -11,9 +12,11 @@ import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class FT_Polluting extends FluidTrait {
|
||||
|
||||
@ -33,20 +36,20 @@ public class FT_Polluting extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.GOLD + "[Polluting]");
|
||||
info.add(EnumChatFormatting.GOLD + "[" + I18nUtil.resolveKey("hbmfluid.trait.polluting") + "]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
|
||||
if(!this.releaseMap.isEmpty()) {
|
||||
info.add(EnumChatFormatting.GREEN + "When spilled:");
|
||||
for(Entry<PollutionType, Float> entry : releaseMap.entrySet()) info.add(EnumChatFormatting.GREEN + " - " + entry.getValue() + " " + entry.getKey() + " per mB");
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("hbmfluid.trait.spilled") + ":");
|
||||
for(Entry<PollutionType, Float> entry : releaseMap.entrySet()) info.add(EnumChatFormatting.GREEN + " - " + entry.getValue() + " " + StatCollector.translateToLocal("pollution.trait." + entry.getKey().name().toLowerCase(Locale.US)) + " " + I18nUtil.resolveKey("hbmfluid.trait.perMB"));
|
||||
}
|
||||
|
||||
if(!this.burnMap.isEmpty()) {
|
||||
info.add(EnumChatFormatting.RED + "When burned:");
|
||||
for(Entry<PollutionType, Float> entry : burnMap.entrySet()) info.add(EnumChatFormatting.RED + " - " + entry.getValue() + " " + entry.getKey() + " per mB");
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hbmfluid.trait.burned") + ":");
|
||||
for(Entry<PollutionType, Float> entry : burnMap.entrySet()) info.add(EnumChatFormatting.RED + " - " + entry.getValue() + " " + StatCollector.translateToLocal("pollution.trait." + entry.getKey().name().toLowerCase(Locale.US)) + " " + I18nUtil.resolveKey("hbmfluid.trait.perMB"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ public class FT_Toxin extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Toxin]");
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[" + I18nUtil.resolveKey("hbmfluid.trait.toxin") + "]");
|
||||
|
||||
for(ToxinEntry entry : entries) {
|
||||
entry.addInfo(info);
|
||||
@ -101,7 +101,7 @@ public class FT_Toxin extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (requires hazmat suit)" : "") + ": " + EnumChatFormatting.YELLOW + String.format(Locale.US, "%,.1f", amount * 20 / delay) + " DPS");
|
||||
info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (" + I18nUtil.resolveKey("hbmfluid.trait.hazmat") + ")" : "") + ": " + EnumChatFormatting.YELLOW + String.format(Locale.US, "%,.1f", amount * 20 / delay) + " " + I18nUtil.resolveKey("hbmfluid.trait.perDamage"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ public class FT_Toxin extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (requires hazmat suit)" + EnumChatFormatting.YELLOW : "") + ":");
|
||||
info.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(clazz.lang) + (fullBody ? EnumChatFormatting.RED + " (" + I18nUtil.resolveKey("hbmfluid.trait.hazmat") + ")" + EnumChatFormatting.YELLOW : "") + ":");
|
||||
|
||||
for(PotionEffect eff : effects) {
|
||||
info.add(EnumChatFormatting.YELLOW + " - " + I18nUtil.resolveKey(eff.getEffectName()) + (eff.getAmplifier() > 0 ? " " + StatCollector.translateToLocal("potion.potency." + eff.getAmplifier()).trim() : "") + " " + StringUtils.ticksToElapsedTime(eff.getDuration()));
|
||||
|
||||
@ -7,6 +7,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
@ -32,7 +33,7 @@ public class FT_VentRadiation extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + "[Radioactive]");
|
||||
info.add(EnumChatFormatting.YELLOW + "[" + I18nUtil.resolveKey("hbmfluid.trait.radioactive") + "]");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,37 +2,38 @@ package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FluidTraitSimple {
|
||||
|
||||
public static class FT_Gaseous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.gaseous") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
/** gaseous at room temperature, for cryogenic hydrogen for example */
|
||||
public static class FT_Gaseous_ART extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous at Room Temperature]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.gaseousRoom") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Liquid extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Liquid]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.liquid") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
/** to viscous to be sprayed/turned into a mist */
|
||||
public static class FT_Viscous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Viscous]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.viscous") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Plasma extends FluidTrait {
|
||||
@Deprecated public static class FT_Plasma extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Plasma]");
|
||||
}
|
||||
@ -40,25 +41,25 @@ public class FluidTraitSimple {
|
||||
|
||||
public static class FT_Amat extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Antimatter]");
|
||||
info.add(EnumChatFormatting.DARK_RED + "[" + I18nUtil.resolveKey("hbmfluid.trait.antimatter") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_LeadContainer extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Requires hazardous material tank to hold]");
|
||||
info.add(EnumChatFormatting.DARK_RED + "[" + I18nUtil.resolveKey("hbmfluid.trait.leadContainer") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Delicious extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_GREEN + "[Delicious]");
|
||||
info.add(EnumChatFormatting.DARK_GREEN + "[" + I18nUtil.resolveKey("hbmfluid.trait.delicious") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Unsiphonable extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Ignored by siphon]");
|
||||
info.add(EnumChatFormatting.BLUE + "[" + I18nUtil.resolveKey("hbmfluid.trait.unsiphonable") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ public class GUICalculator extends GuiScreen {
|
||||
if (!inputField.textboxKeyTyped(p_73869_1_, p_73869_2_))
|
||||
super.keyTyped(p_73869_1_, p_73869_2_);
|
||||
|
||||
String input = inputField.getText().replaceAll("[^\\d+\\-*/^!.()\\sA-Za-z]+", "");
|
||||
String input = inputField.getText().replaceAll("[^\\d+\\-*/%^!.()\\sA-Za-z]+", "");
|
||||
|
||||
if (p_73869_1_ == 13 || p_73869_1_ == 10) { // when pressing enter (CR or LF)
|
||||
if (selectedHist != -1) {
|
||||
|
||||
@ -4,16 +4,20 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineDiesel;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.NBTControlPacket;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIDiesel.png");
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/generators/gui_diesel.png");
|
||||
private TileEntityMachineDiesel diesel;
|
||||
|
||||
public GUIMachineDiesel(InventoryPlayer invPlayer, TileEntityMachineDiesel tedf) {
|
||||
@ -21,35 +25,43 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
diesel = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
this.ySize = 203;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
diesel.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diesel.power, diesel.powerCap);
|
||||
diesel.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 35, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 141, guiTop + 69 - 52, 16, 52, diesel.power, diesel.powerCap);
|
||||
|
||||
String[] text = new String[] { "Fuel consumption rate:",
|
||||
" 1 mB/t",
|
||||
" 20 mB/s",
|
||||
"(Consumption rate is constant)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 8, guiTop + 36, 16, 16, guiLeft, guiTop + 36 + 16, text);
|
||||
|
||||
if(!diesel.hasAcceptableFuel()) {
|
||||
|
||||
String[] text2 = new String[] { "Error: The currently set fuel type",
|
||||
"is not supported by this engine!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 16 + 32, text2);
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 8, guiTop + 36 + 32, 16, 16, guiLeft, guiTop + 36 + 16 + 32, text2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 89 <= x && guiLeft + 89 + 16 > x && guiTop + 61 < y && guiTop + 61 + 14 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean("turnOn", true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, diesel.xCoord, diesel.yCoord, diesel.zCoord));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diesel.hasCustomInventoryName() ? this.diesel.getInventoryName() : I18n.format(this.diesel.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@ -61,19 +73,17 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
|
||||
if(diesel.power > 0) {
|
||||
int i = (int) diesel.getPowerScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 152, guiTop + 69 - i, 176, 52 - i, 16, i);
|
||||
drawTexturedModalRect(guiLeft + 141, guiTop + 69 - i, 176, 52 - i, 16, i);
|
||||
}
|
||||
|
||||
if(diesel.tank.getFill() > 0 && diesel.hasAcceptableFuel())
|
||||
{
|
||||
drawTexturedModalRect(guiLeft + 43 + 18 * 4, guiTop + 34, 208, 0, 18, 18);
|
||||
}
|
||||
if(diesel.isOn) drawTexturedModalRect(guiLeft + 79, guiTop + 61, 192, 16, 35, 14);
|
||||
if(diesel.wasOn) drawTexturedModalRect(guiLeft + 89, guiTop + 42, 192, 0, 16, 16);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 8, guiTop + 36, 16, 16, 2);
|
||||
|
||||
if(!diesel.hasAcceptableFuel())
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
|
||||
this.drawInfoPanel(guiLeft - 8, guiTop + 36 + 32, 16, 16, 6);
|
||||
|
||||
diesel.tank.renderTank(guiLeft + 80, guiTop + 69, this.zLevel, 16, 52);
|
||||
diesel.tank.renderTank(guiLeft + 35, guiTop + 69, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.inventory.container.ContainerMachineKeyForge;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineKeyForge;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
@ -13,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineKeyForge extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_keyforge.png");
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_keyforge.png");
|
||||
private TileEntityMachineKeyForge siren;
|
||||
|
||||
public GUIMachineKeyForge(InventoryPlayer invPlayer, TileEntityMachineKeyForge tedf) {
|
||||
@ -21,26 +22,25 @@ public class GUIMachineKeyForge extends GuiInfoContainer {
|
||||
siren = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
String[] text = new String[] { "The first slot will copy the key/lock's",
|
||||
"pin configuration and paste it to the second slot." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
String[] keyText = I18nUtil.resolveKeyArray("desc.gui.keyforge.key");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28, 16, 16, guiLeft - 8, guiTop + 36 + 16, keyText);
|
||||
|
||||
String[] text1 = new String[] { "The third slot will randomize the",
|
||||
"key/lock's pin configuration."};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
String[] randomText = I18nUtil.resolveKeyArray("desc.gui.keyforge.random");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, randomText);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.siren.hasCustomInventoryName() ? this.siren.getInventoryName() : I18n.format(this.siren.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ public class GUIMachineKeyForge extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
this.drawInfoPanel(guiLeft + 12, guiTop + 28, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft + 12, guiTop + 28 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,11 +36,12 @@ public class GUIMachineOilWell extends GuiInfoContainer {
|
||||
derrick.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 54, guiTop + 45, 6, 32);
|
||||
}
|
||||
|
||||
String[] upgradeText = new String[4];
|
||||
String[] upgradeText = new String[5];
|
||||
upgradeText[0] = I18nUtil.resolveKey("desc.gui.upgrade");
|
||||
upgradeText[1] = I18nUtil.resolveKey("desc.gui.upgrade.speed");
|
||||
upgradeText[2] = I18nUtil.resolveKey("desc.gui.upgrade.power");
|
||||
upgradeText[3] = I18nUtil.resolveKey("desc.gui.upgrade.afterburner");
|
||||
upgradeText[4] = I18nUtil.resolveKey("desc.gui.upgrade.overdrive");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 160, guiTop + 21, 8, 8, mouseX, mouseY, upgradeText);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 22, 16, 34, derrick.power, derrick.getMaxPower());
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.inventory.container.ContainerMachineSatLinker;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatLinker;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
@ -13,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineSatLinker extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_linker.png");
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_sat_linker.png");
|
||||
private TileEntityMachineSatLinker siren;
|
||||
|
||||
public GUIMachineSatLinker(InventoryPlayer invPlayer, TileEntityMachineSatLinker tedf) {
|
||||
@ -21,25 +22,24 @@ public class GUIMachineSatLinker extends GuiInfoContainer {
|
||||
siren = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
String[] text = new String[] { "The first slot will copy the satellite/chip's",
|
||||
"frequency and paste it to the second slot." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
String[] chipText = I18nUtil.resolveKeyArray("desc.gui.satlinker.chip");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28, 16, 16, guiLeft - 8, guiTop + 36 + 16, chipText);
|
||||
|
||||
String[] text1 = new String[] { "The third slot will randomize the",
|
||||
"satellite/chip's frequency."};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
String[] randomText = I18nUtil.resolveKeyArray("desc.gui.satlinker.random");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 12, guiTop + 28 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, randomText);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.siren.hasCustomInventoryName() ? this.siren.getInventoryName() : I18n.format(this.siren.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class GUIMachineSatLinker extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
this.drawInfoPanel(guiLeft + 12, guiTop + 28, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft + 12, guiTop + 28 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.inventory.gui;
|
||||
import com.hbm.inventory.container.ContainerSatDock;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatDock;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@ -11,7 +13,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GUISatDock extends GuiInfoContainer {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_dock.png");
|
||||
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_sat_dock.png");
|
||||
private final TileEntityMachineSatDock tileSatelliteDock;
|
||||
|
||||
public GUISatDock(InventoryPlayer invPlayer, TileEntityMachineSatDock tesd) {
|
||||
@ -19,24 +21,22 @@ public class GUISatDock extends GuiInfoContainer {
|
||||
tileSatelliteDock = tesd;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
String[] text = new String[] { "Requires linked miner sat chip.",
|
||||
"Cargo ship will land periodically to",
|
||||
"deliver resources." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
String[] text = I18nUtil.resolveKeyArray("desc.gui.satdock.desc");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 7, guiTop + 36, 16, 16, guiLeft - 7, guiTop + 36 + 16, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.tileSatelliteDock.hasCustomInventoryName() ? this.tileSatelliteDock.getInventoryName() : I18n.format(this.tileSatelliteDock.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x404040);
|
||||
this.fontRendererObj.drawString(name, 115 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x404040);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 0x404040);
|
||||
}
|
||||
|
||||
@ -46,6 +46,6 @@ public class GUISatDock extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 7, guiTop + 36, 16, 16, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUISoyuzCapsule extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_soyuz_capsule.png");
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_soyuz_capsule.png");
|
||||
private TileEntitySoyuzCapsule diFurnace;
|
||||
|
||||
public GUISoyuzCapsule(InventoryPlayer invPlayer, TileEntitySoyuzCapsule tedf) {
|
||||
@ -22,14 +22,14 @@ public class GUISoyuzCapsule extends GuiContainer {
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(name, 115 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0x7daf71);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toserver.AuxButtonPacket;
|
||||
import com.hbm.tileentity.machine.TileEntitySoyuzLauncher;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -16,49 +17,50 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUISoyuzLauncher extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_soyuz.png");
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_soyuz.png");
|
||||
private TileEntitySoyuzLauncher launcher;
|
||||
|
||||
public GUISoyuzLauncher(InventoryPlayer invPlayer, TileEntitySoyuzLauncher tedf) {
|
||||
super(new ContainerSoyuzLauncher(invPlayer, tedf));
|
||||
launcher = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
this.xSize = 194;
|
||||
this.ySize = 244;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 36, 16, 52);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 36, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 49, guiTop + 72, 6, 34, launcher.power, launcher.maxPower);
|
||||
launcher.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 44, 16, 52);
|
||||
launcher.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 170, guiTop + 44, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 44, 16, 52, launcher.power, launcher.maxPower);
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 43, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"The Soyuz goes here"} );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 43, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"Designator only for CARGO MODE"} );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"The payload for SATELLITE MODE"} );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"The orbital module for special payloads"} );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 88, guiTop + 17, 18, 18, mouseX, mouseY, new String[]{"SATELLITE MODE"} );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 88, guiTop + 35, 18, 18, mouseX, mouseY, new String[]{"CARGO MODE"} );
|
||||
String[] descText = I18nUtil.resolveKeyArray("desc.gui.soyuz.desc");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 53, 16, 16, guiLeft - 8, guiTop + 53 + 16, descText);
|
||||
|
||||
String[] cargoText = I18nUtil.resolveKeyArray("desc.gui.soyuz.cargo");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 79, guiTop + 52, 18, 18, mouseX, mouseY, cargoText );
|
||||
String[] satelliteText = I18nUtil.resolveKeyArray("desc.gui.soyuz.satellite");
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 97, guiTop + 52, 18, 18, mouseX, mouseY, satelliteText );
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
|
||||
if(guiLeft + 97 <= x && guiLeft + 97 + 18 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 35 < y && guiTop + 35 + 18 >= y) {
|
||||
if(guiLeft + 79 <= x && guiLeft + 79 + 18 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 1, 0));
|
||||
}
|
||||
|
||||
if(guiLeft + 151 <= x && guiLeft + 151 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
|
||||
if(guiLeft + 88 <= x && guiLeft + 88 + 18 > x && guiTop + 97 < y && guiTop + 97 + 18 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(launcher.xCoord, launcher.yCoord, launcher.zCoord, 0, 1));
|
||||
@ -69,8 +71,8 @@ public class GUISoyuzLauncher extends GuiInfoContainer {
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.launcher.hasCustomInventoryName() ? this.launcher.getInventoryName() : I18n.format(this.launcher.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 17, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
String secs = "" + launcher.countdown / 20;
|
||||
String cents = "" + (launcher.countdown % 20) * 5;
|
||||
@ -79,9 +81,9 @@ public class GUISoyuzLauncher extends GuiInfoContainer {
|
||||
if(cents.length() == 1)
|
||||
cents += "0";
|
||||
|
||||
float scale = 0.5F;
|
||||
float scale = 1;
|
||||
GL11.glScalef(scale, scale, 1);
|
||||
this.fontRendererObj.drawString(secs + ":" + cents, (int)(153.5F / scale), (int)(37.5F / scale), 0xff0000);
|
||||
this.fontRendererObj.drawString(secs + ":" + cents, (int)(85 / scale), (int)(121 / scale), 0xff0000);
|
||||
GL11.glScalef(1/scale, 1/scale, 1);
|
||||
}
|
||||
|
||||
@ -91,47 +93,49 @@ public class GUISoyuzLauncher extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int)launcher.getPowerScaled(34);
|
||||
drawTexturedModalRect(guiLeft + 49, guiTop + 106 - i, 194, 52 - i, 6, i);
|
||||
int i = (int)launcher.getPowerScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 134, guiTop + 96 - i, 194, 52 - i, 16, i);
|
||||
|
||||
drawTexturedModalRect(guiLeft + 61, guiTop + 17, 176 + (launcher.hasRocket() ? 18 : 0), 0, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 97, guiTop + 79, 210 + (launcher.hasRocket() ? 18 : 0), 8, 18, 18);
|
||||
int j = launcher.designator();
|
||||
|
||||
if(j > 0)
|
||||
drawTexturedModalRect(guiLeft + 61, guiTop + 35, 176 + (j - 1) * 18, 0, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 79, guiTop + 79, 210 + (j - 1) * 18, 8, 18, 18);
|
||||
|
||||
int k = launcher.mode;
|
||||
drawTexturedModalRect(guiLeft + 88, guiTop + 17 + k * 18, 176, 18 + k * 18, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 97 - k * 18, guiTop + 52, 228 - k * 18, 26, 18, 18);
|
||||
|
||||
int l = launcher.orbital();
|
||||
|
||||
if(l > 0)
|
||||
drawTexturedModalRect(guiLeft + 115, guiTop + 35, 176 + (l - 1) * 18, 0, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 79, guiTop + 25, 210 + (l - 1) * 18, 8, 18, 18);
|
||||
|
||||
int m = launcher.satellite();
|
||||
|
||||
if(m > 0)
|
||||
drawTexturedModalRect(guiLeft + 115, guiTop + 17, 176 + (m - 1) * 18, 0, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 97, guiTop + 25, 210 + (m - 1) * 18, 8, 18, 18);
|
||||
|
||||
if(launcher.starting)
|
||||
drawTexturedModalRect(guiLeft + 151, guiTop + 17, 176, 54, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 88, guiTop + 97, 210, 44, 18, 18);
|
||||
|
||||
if(launcher.hasFuel())
|
||||
drawTexturedModalRect(guiLeft + 13, guiTop + 23, 212, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 157, guiTop + 31, 210, 0, 6, 8);
|
||||
else
|
||||
drawTexturedModalRect(guiLeft + 13, guiTop + 23, 218, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 157, guiTop + 31, 216, 0, 6, 8);
|
||||
|
||||
if(launcher.hasOxy())
|
||||
drawTexturedModalRect(guiLeft + 31, guiTop + 23, 212, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 175, guiTop + 31, 210, 0, 6, 8);
|
||||
else
|
||||
drawTexturedModalRect(guiLeft + 31, guiTop + 23, 218, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 175, guiTop + 31, 216, 0, 6, 8);
|
||||
|
||||
if(launcher.hasPower())
|
||||
drawTexturedModalRect(guiLeft + 49, guiTop + 59, 212, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 139, guiTop + 31, 210, 0, 6, 8);
|
||||
else
|
||||
drawTexturedModalRect(guiLeft + 49, guiTop + 59, 218, 0, 6, 8);
|
||||
drawTexturedModalRect(guiLeft + 139, guiTop + 31, 216, 0, 6, 8);
|
||||
|
||||
launcher.tanks[0].renderTank(guiLeft + 8, guiTop + 88, this.zLevel, 16, 52);
|
||||
launcher.tanks[1].renderTank(guiLeft + 26, guiTop + 88, this.zLevel, 16, 52);
|
||||
launcher.tanks[0].renderTank(guiLeft + 152, guiTop + 96, this.zLevel, 16, 52);
|
||||
launcher.tanks[1].renderTank(guiLeft + 170, guiTop + 96, this.zLevel, 16, 52);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 53, 16, 16, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ import com.hbm.items.machine.ItemBatterySC.EnumBatterySC;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
import com.hbm.items.machine.ItemDrillbit.EnumDrillType;
|
||||
import com.hbm.items.machine.ItemPACoil.EnumCoilType;
|
||||
import com.hbm.items.machine.ItemPileRodMK2.EnumPileRod;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.items.weapon.ItemAmmoHIMARS;
|
||||
import com.hbm.items.weapon.grenade.ItemGrenadeFuze.EnumGrenadeFuze;
|
||||
@ -160,6 +161,21 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
this.register(new GenericRecipe("ass.protoreactor").setup(200, 100).outputItems(new ItemStack(ModItems.dysfunctional_reactor, 1))
|
||||
.inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(PB.plateCast(), 4), new ComparableStack(ModItems.rod_quad_empty, 10), new OreDictStack(KEY_BROWN, 3)));
|
||||
|
||||
// pile rods
|
||||
String autoPileRod = "autoswitch.pilerod";
|
||||
this.register(new GenericRecipe("ass.pilepabe").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RA226BE.ordinal()))
|
||||
.inputItems(new ComparableStack(ModItems.billet_ra226be, 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilepobe").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PO210BE.ordinal()))
|
||||
.inputItems(new ComparableStack(ModItems.billet_po210be, 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilezr").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 3, EnumPileRod.ZR.ordinal()))
|
||||
.inputItems(new OreDictStack(ZR.billet(), 1)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilenu").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.NU.ordinal()))
|
||||
.inputItems(new OreDictStack(U.billet(), 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilepu239").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PU239.ordinal()))
|
||||
.inputItems(new OreDictStack(PU239.billet(), 3)).setGroup(autoPileRod, INSTANCE));
|
||||
this.register(new GenericRecipe("ass.pilergp").setup(40, 200).outputItems(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RGP.ordinal()))
|
||||
.inputItems(new OreDictStack(PURG.billet(), 3)).setGroup(autoPileRod, INSTANCE));
|
||||
|
||||
// powders
|
||||
String autoCyclotron = "autoswitch.cyclotron";
|
||||
this.register(new GenericRecipe("ass.partlith").setup(40, 100).outputItems(new ItemStack(ModItems.part_lithium, 8))
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
|
||||
import com.hbm.items.machine.ItemPileRodMK2.EnumPileRod;
|
||||
import com.hbm.items.machine.ItemWatzPellet.EnumWatzType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -60,21 +61,23 @@ public class PUREXRecipes extends GenericRecipes<PUREXRecipe> {
|
||||
|
||||
//CP-1
|
||||
String autoPile = "autoswitch.pile";
|
||||
this.register((PUREXRecipe) new PUREXRecipe("purex.pilepu").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)
|
||||
.inputItems(new ComparableStack(ModItems.pile_rod_plutonium))
|
||||
this.register((PUREXRecipe) new PUREXRecipe("purex.pilepu239").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)
|
||||
.inputItems(new ComparableStack(ModItems.pile_rod, 1, EnumPileRod.PU239))
|
||||
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 100))
|
||||
.outputItems(new ItemStack(ModItems.billet_pu239, 2),
|
||||
new ItemStack(ModItems.billet_uranium, 1))
|
||||
.setIconToFirstIngredient());
|
||||
this.register((PUREXRecipe) new PUREXRecipe("purex.pilergp").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)
|
||||
.inputItems(new ComparableStack(ModItems.pile_rod, 1, EnumPileRod.RGP))
|
||||
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 100))
|
||||
.outputItems(new ItemStack(ModItems.billet_pu_mix, 2),
|
||||
new ItemStack(ModItems.billet_uranium, 1),
|
||||
new ItemStack(ModItems.plate_iron, 2))
|
||||
new ItemStack(ModItems.billet_uranium, 1))
|
||||
.setIconToFirstIngredient());
|
||||
|
||||
this.register((PUREXRecipe) new PUREXRecipe("purex.pilepu239").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)
|
||||
.inputItems(new ComparableStack(ModItems.pile_rod_pu239))
|
||||
this.register((PUREXRecipe) new PUREXRecipe("purex.pilewaste").setup(40, pilePower).setNameWrapper("purex.recycle").setGroup(autoPile, this)
|
||||
.inputItems(new ComparableStack(ModItems.pile_rod, 1, EnumPileRod.WASTE))
|
||||
.inputFluids(new FluidStack(Fluids.SULFURIC_ACID, 100))
|
||||
.outputItems(new ItemStack(ModItems.billet_pu239, 1),
|
||||
new ItemStack(ModItems.billet_pu_mix, 1),
|
||||
new ItemStack(ModItems.billet_uranium, 1),
|
||||
new ItemStack(ModItems.plate_iron, 2))
|
||||
.outputItems(new ItemStack(ModItems.billet_nuclear_waste, 2),
|
||||
new ItemStack(ModItems.billet_polonium, 1))
|
||||
.setIconToFirstIngredient());
|
||||
|
||||
// ZIRNOX
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.food.ItemFlask.EnumInfusion;
|
||||
import com.hbm.items.machine.ItemBatterySC.EnumBatterySC;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
import com.hbm.items.machine.ItemPileRodMK2.EnumPileRod;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -333,8 +334,8 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
new AStack[] {
|
||||
new OreDictStack(STEEL.plate(), 16),
|
||||
new OreDictStack(BE.ingot(), 6),
|
||||
new OreDictStack(CU.ingot(), 8),
|
||||
new ComparableStack(ModItems.coil_gold, 16),
|
||||
new OreDictStack(CU.ingot(), 4),
|
||||
new ComparableStack(ModItems.coil_gold, 8),
|
||||
new ComparableStack(ModItems.gear_large, 1, 1)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.machine_stirling_steel))).setTier(2));
|
||||
|
||||
@ -698,8 +699,8 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 16)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_beryllium, 6)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_copper, 8)),
|
||||
new AnvilOutput(new ItemStack(ModItems.coil_gold, 16)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_copper, 4)),
|
||||
new AnvilOutput(new ItemStack(ModItems.coil_gold, 8)),
|
||||
new AnvilOutput(new ItemStack(ModItems.gear_large,1, 1)),
|
||||
|
||||
}
|
||||
@ -725,8 +726,8 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 16)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_beryllium, 6)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_copper, 8)),
|
||||
new AnvilOutput(new ItemStack(ModItems.coil_gold, 16)),
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_copper, 4)),
|
||||
new AnvilOutput(new ItemStack(ModItems.coil_gold, 8)),
|
||||
|
||||
}
|
||||
).setTier(2));
|
||||
@ -846,30 +847,28 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
).setTier(1));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_uranium), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_uranium, 3)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||
new ComparableStack(ModItems.billet_ra226be, 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RA226BE.ordinal())),
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_source), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_ra226be, 3)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||
new ComparableStack(ModItems.billet_po210be, 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PO210BE.ordinal())),
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_boron), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)),
|
||||
new AnvilOutput(new ItemStack(Items.stick, 2))
|
||||
new OreDictStack(ZR.billet(), 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.ZR.ordinal())),
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_detector), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.motor, 1)),
|
||||
new AnvilOutput(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE))
|
||||
new OreDictStack(U.billet(), 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.NU.ordinal())),
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_lithium), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.lithium, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.cell_empty, 1))
|
||||
new OreDictStack(PU239.billet(), 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.PU239.ordinal())),
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new OreDictStack(PURG.billet(), 3), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.pile_rod, 1, EnumPileRod.RGP.ordinal())),
|
||||
}).setTier(2));
|
||||
|
||||
//RBMK
|
||||
@ -968,20 +967,6 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.BASIC.ordinal()), 0.5F),
|
||||
}).setTier(4));
|
||||
|
||||
} else {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_plutonium), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_nuclear_waste, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 1))
|
||||
}).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.pile_rod_pu239), new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_pu239, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.billet_nuclear_waste, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||
}).setTier(2));
|
||||
}
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
|
||||
@ -30,6 +30,7 @@ public class ItemPoolsPile {
|
||||
public static final String POOL_PILE_OF_GARBAGE = "POOL_PILE_OF_GARBAGE";
|
||||
public static final String POOL_PILE_MECHANICAL = "POOL_PILE_MECHANICAL";
|
||||
public static final String POOL_PILE_GEAR = "POOL_PILE_GEAR";
|
||||
public static final String POOL_PILE_SUPPLIES = "POOL_PILE_SUPPLIES";
|
||||
|
||||
|
||||
public static void init() {
|
||||
@ -173,5 +174,17 @@ public class ItemPoolsPile {
|
||||
weighted(ModItems.taurun_boots, 0, 1, 1, 20)
|
||||
};
|
||||
}};
|
||||
|
||||
new ItemPool(POOL_PILE_SUPPLIES) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ModItems.syringe_metal_stimpak, 0, 3, 5, 30),
|
||||
weighted(ModItems.syringe_metal_psycho, 0, 3, 5, 30),
|
||||
weighted(ModItems.syringe_antidote, 0, 1, 2, 30),
|
||||
weighted(ModItems.ammo_container, 0, 2, 3, 40)
|
||||
};
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,6 +105,7 @@ public class ModItems {
|
||||
public static Item powder_lignite;
|
||||
public static Item briquette;
|
||||
public static Item coal_infernal;
|
||||
public static Item coal_eternal;
|
||||
public static Item cinnebar;
|
||||
public static Item powder_ash;
|
||||
public static Item powder_limestone;
|
||||
@ -2338,6 +2339,7 @@ public class ModItems {
|
||||
briquette = new ItemEnumMulti(EnumBriquetteType.class, true, true).setUnlocalizedName("briquette").setCreativeTab(MainRegistry.partsTab);
|
||||
powder_lignite = new Item().setUnlocalizedName("powder_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lignite");
|
||||
coal_infernal = new Item().setUnlocalizedName("coal_infernal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coal_infernal");
|
||||
coal_eternal = new Item().setUnlocalizedName("coal_eternal").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":coal_eternal");
|
||||
cinnebar = new Item().setUnlocalizedName("cinnebar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cinnebar");
|
||||
powder_ash = new ItemEnumMulti(EnumAshType.class, true, true).setUnlocalizedName("powder_ash").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_ash");
|
||||
powder_limestone = new Item().setUnlocalizedName("powder_limestone").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_limestone");
|
||||
@ -4406,6 +4408,8 @@ public class ModItems {
|
||||
BucketHandler.INSTANCE.buckets.put(ModBlocks.schrabidic_block, ModItems.bucket_schrabidic_acid);
|
||||
BucketHandler.INSTANCE.buckets.put(ModBlocks.sulfuric_acid_block, ModItems.bucket_sulfuric_acid);
|
||||
MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
|
||||
coal_eternal.setContainerItem(coal_eternal);
|
||||
}
|
||||
|
||||
private static void registerItem() {
|
||||
@ -4605,6 +4609,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(coke, coke.getUnlocalizedName());
|
||||
GameRegistry.registerItem(lignite, lignite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(coal_infernal, coal_infernal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(coal_eternal, coal_eternal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(briquette, briquette.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sulfur, sulfur.getUnlocalizedName());
|
||||
GameRegistry.registerItem(niter, niter.getUnlocalizedName());
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemPileRodMK2 extends ItemEnumMulti {
|
||||
|
||||
@ -29,18 +35,19 @@ public class ItemPileRodMK2 extends ItemEnumMulti {
|
||||
}
|
||||
|
||||
public static enum EnumPileRod {
|
||||
RA226BE(1D),
|
||||
PO210BE(1D),
|
||||
ZR( 0D, 0D, 0D),
|
||||
NU( 1D, 1_000D, 1D),
|
||||
RGP( 1D, 1_000D, 1D),
|
||||
PU239( 1D, 1_000D, 1D),
|
||||
WASTE( 1D, 1_000D, 1D);
|
||||
/* 0 */ RA226BE(1D),
|
||||
/* 1 */ PO210BE(1D),
|
||||
/* 2 */ ZR( 0D, 0D, 0D, 2),
|
||||
/* 3 */ NU( 1D, 25_000D, 0.25D, 4),
|
||||
/* 4 */ PU239( 1D, 500D, 0.5D, 5),
|
||||
/* 5 */ RGP( 1D, 1_000D, 0.5D, 6),
|
||||
/* 6 */ WASTE( 1D, 0D, 1.5D, 6);
|
||||
|
||||
public double reactionMult = 1.0D;
|
||||
public double life = 1_000D;
|
||||
public double heatMult = 1.0D;
|
||||
public double heatMult = 0.0D;
|
||||
public double neutronSource = 0D;
|
||||
public int turnsInto;
|
||||
|
||||
private EnumPileRod(double neutronSource) {
|
||||
this.neutronSource = neutronSource;
|
||||
@ -49,10 +56,26 @@ public class ItemPileRodMK2 extends ItemEnumMulti {
|
||||
this.heatMult = 0;
|
||||
}
|
||||
|
||||
private EnumPileRod(double reaction, double life, double heat) {
|
||||
private EnumPileRod(double reaction, double life, double heat, int turnsInto) {
|
||||
this.reactionMult = reaction;
|
||||
this.life = life;
|
||||
this.heatMult = heat;
|
||||
this.turnsInto = turnsInto;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, stack.getItemDamage());
|
||||
|
||||
if(rod.life > 0) {
|
||||
list.add("Lifetime: " + (int) Math.round(rod.life));
|
||||
double depletion = getDepletionPercent(stack);
|
||||
if(depletion > 0) list.add("Depletion: " + (int) Math.round(depletion) + "%");
|
||||
}
|
||||
|
||||
for(String loc : I18nUtil.autoBreak(Minecraft.getMinecraft().fontRenderer, I18nUtil.resolveKey(this.getUnlocalizedName(stack) + ".desc"), 225)) {
|
||||
list.add(EnumChatFormatting.YELLOW + loc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,6 +92,14 @@ public class ItemPileRodMK2 extends ItemEnumMulti {
|
||||
return getDepletion(stack) / life;
|
||||
}
|
||||
|
||||
public static double getDepletionPercent(ItemStack stack) {
|
||||
if(stack == null) return 0D;
|
||||
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, stack.getItemDamage());
|
||||
double life = rod.life;
|
||||
if(life <= 0) return 0D;
|
||||
return (getDepletion(stack) / life) * 100;
|
||||
}
|
||||
|
||||
public static double getDepletion(ItemStack stack) {
|
||||
if(!stack.hasTagCompound()) return 0D;
|
||||
return stack.stackTagCompound.getDouble(KEY_NBT_DEPLETION);
|
||||
@ -87,4 +118,22 @@ public class ItemPileRodMK2 extends ItemEnumMulti {
|
||||
}
|
||||
return outFlux;
|
||||
}
|
||||
|
||||
public static double getHeatPerNeutron(ItemStack stack) {
|
||||
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, stack.getItemDamage());
|
||||
return rod.heatMult;
|
||||
}
|
||||
|
||||
public static ItemStack react(ItemStack stack, double inFlux) {
|
||||
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, stack.getItemDamage());
|
||||
if(rod.life <= 0) return stack;
|
||||
double dep = getDepletion(stack) + inFlux;
|
||||
|
||||
if(dep < rod.life) {
|
||||
setDepletion(stack, dep);
|
||||
return stack;
|
||||
} else {
|
||||
return new ItemStack(stack.getItem(), 1, rod.turnsInto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class ItemPistons extends ItemEnumMulti {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
for(int i = 0; i < type.eff.length; i++) {
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.values()[i].getGrade() + ": " + EnumChatFormatting.RED + "" + (int)(type.eff[i] * 100) + "%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.values()[i].getLocalizedName() + ": " + EnumChatFormatting.RED + "" + (int)(type.eff[i] * 100) + "%");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@ -34,9 +35,9 @@ public class ItemPollutionDetector extends Item {
|
||||
heavymetal = ((int) (heavymetal * 100)) / 100F;
|
||||
//fallout = ((int) (fallout * 100)) / 100F;
|
||||
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Soot: " + soot).color(EnumChatFormatting.YELLOW).flush(), 100, 4000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Poison: " + poison).color(EnumChatFormatting.YELLOW).flush(), 101, 4000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Heavy metal: " + heavymetal).color(EnumChatFormatting.YELLOW).flush(), 102, 4000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start(I18nUtil.resolveKey("pollution.soot") + ": " + soot).color(EnumChatFormatting.YELLOW).flush(), 100, 4000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start(I18nUtil.resolveKey("pollution.poison") + ": " + poison).color(EnumChatFormatting.YELLOW).flush(), 101, 4000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start(I18nUtil.resolveKey("pollution.heavymetal") + ": " + heavymetal).color(EnumChatFormatting.YELLOW).flush(), 102, 4000), (EntityPlayerMP) entity);
|
||||
//PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Fallout: " + fallout).color(EnumChatFormatting.YELLOW).flush(), 103, 4000), (EntityPlayerMP) entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@ import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.weapon.sedna.*;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileCore;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
|
||||
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@ -250,6 +251,8 @@ public class GunFactoryClient {
|
||||
setRendererBulk(LegoClient.RENDER_FRAGMENTATION, ItemGrenadeFilling.fragmentation, ItemGrenadeFilling.pellets, ItemGrenadeFilling.pellets_heavy);
|
||||
ItemGrenadeFilling.laser.setRendererBeam(LegoClient.RENDER_LASER_RED);
|
||||
|
||||
TileEntityPileCore.pile_debris.setRenderer(LegoClient.RENDER_GRAPHITE);
|
||||
|
||||
//HUDS
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO, LegoClient.HUD_COMPONENT_AMMO_SECOND);
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.items.weapon.sedna.hud.HUDComponentDurabilityBar;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunChargeThrower;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.entity.projectile.RenderRBMKDebris;
|
||||
import com.hbm.render.item.weapon.sedna.ItemRenderFatMan;
|
||||
import com.hbm.render.tileentity.RenderArcFurnace;
|
||||
import com.hbm.render.util.BeamPronter;
|
||||
@ -210,6 +211,14 @@ public class LegoClient {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_GRAPHITE = (bullet, interp) -> {
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(RenderRBMKDebris.tex_graphite);
|
||||
ResourceManager.deb_graphite.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_GRENADE = (bullet, interp) -> {
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
|
||||
@ -301,6 +301,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarNT.class, new RenderRadar());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarLarge.class, new RenderRadarLarge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadarScreen.class, new RenderRadarScreen());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSatLink.class, new RenderSatLink());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityReactorResearch.class, new RenderSmallReactor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTesla.class, new RenderTesla());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBarrel.class, new RenderFluidBarrel());
|
||||
|
||||
@ -134,7 +134,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.gas_empty, 2), new Object[] { "S ", "AA", "AA", 'A', STEEL.plate(), 'S', CU.plate() });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.block_waste_painted, 1), new Object[] { KEY_YELLOW, ModBlocks.block_waste });
|
||||
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_aluminium, 1), new Object[] { "###", "###", "###", '#', AL.wireFine() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_copper, 1), new Object[] { "###", "###", "###", '#', CU.wireFine() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_tungsten, 1), new Object[] { "###", "###", "###", '#', W.wireFine() });
|
||||
@ -242,7 +241,8 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_cable_gauge), new Object[] { ModBlocks.red_wire_coated, STEEL.ingot(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_connector, 4), new Object[] { "C", "I", "S", 'C', ModItems.coil_copper, 'I', ModItems.plate_polymer, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_connector_super, 2), new Object[] { "CCC", "III", " S ", 'C', ModItems.coil_copper, 'I', ModItems.plate_polymer, 'S', ANY_RESISTANTALLOY.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon, 4), new Object[] { "CWC", "PWP", " T ", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'P', ModItems.plate_polymer, 'T', ModBlocks.red_wire_coated });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon, 4), new Object[] { "CWC", "PWP", " S ", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'P', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_steel, 4), new Object[] { "CWC", "PWP", " S ", 'C', ModItems.coil_copper, 'W', STEEL.pipe(), 'P', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_medium_wood, 2), new Object[] { "CCW", "IIW", " S", 'C', ModItems.coil_copper, 'W', KEY_PLANKS, 'I', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.red_pylon_medium_wood_transformer, 1), new Object[] { ModBlocks.red_pylon_medium_wood, ModItems.plate_polymer, ModItems.coil_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_pylon_medium_steel, 2), new Object[] { "CCW", "IIW", " S", 'C', ModItems.coil_copper, 'W', STEEL.pipe(), 'I', ModItems.plate_polymer, 'S', KEY_COBBLESTONE });
|
||||
@ -299,7 +299,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.furnace_iron), new Object[] { "III", "IFI", "BBB", 'I', IRON.ingot(), 'F', Blocks.furnace, 'B', Blocks.stonebrick });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_mixer), new Object[] { "PIP", "GCG", "PMP", 'P', STEEL.plate(), 'I', DURA.ingot(), 'G', KEY_ANYPANE, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'M', ModItems.motor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fan), new Object[] { "BPB", "PRP", "BPB", 'B', STEEL.bolt(), 'P', IRON.plate(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.piston_inserter), new Object[] { "ITI", "TPT", "ITI", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', IRON.plate(), 'T', STEEL.bolt() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_muffler, 16), new Object[] { "III", "IWI", "III", 'I', ANY_RUBBER.ingot(), 'W', Blocks.wool });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_template, 1), new Object[] { "WIW", "PCP", "WIW", 'W', CU.wireFine(), 'I', IRON.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG), 'P', ModItems.plate_polymer });
|
||||
@ -312,6 +311,10 @@ public class CraftingManager {
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.arc_electrode, EnumElectrodeType.DESH), new Object[] { "C", "T", "C", 'C', DESH.ingot(), 'T', W.ingot() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.arc_electrode, EnumElectrodeType.SATURNITE), new Object[] { "C", "T", "C", 'C', BIGMT.ingot(), 'T', NB.ingot() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pile_device, 1, 0), new Object[] { " A ", "CBS", 'A', AL.plate(), 'C', STEEL.plateCast(), 'B', B.ingot(), 'S', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pile_device, 1, 1), new Object[] { " M ", "ACA", " S ", 'M', ModItems.motor, 'A', AL.plate(), 'C', CU.shell(), 'S', STEEL.plateCast() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.pile_device, 1, 2), new Object[] { " B ", "SBS", "SBS", 'B', B.ingot(), 'S', STEEL.plate() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator, 1), new Object[] { "C", "S", 'S', STEEL.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), });
|
||||
addShapelessAuto(new ItemStack(ModItems.detonator_multi, 1), new Object[] { ModItems.detonator, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addShapelessAuto(new ItemStack(ModItems.detonator_laser, 1), new Object[] { ModItems.rangefinder, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), RUBBER.ingot(), GOLD.wireDense() });
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ICustomBlockHighlight;
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
@ -414,6 +415,16 @@ public class ModEventHandlerRenderer {
|
||||
public void onDrawHighlight(DrawBlockHighlightEvent event) {
|
||||
|
||||
EntityPlayer player = MainRegistry.proxy.me();
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemBlock) {
|
||||
Block b = Block.getBlockFromItem(player.getHeldItem().getItem());
|
||||
if(b instanceof BlockDummyable) {
|
||||
((BlockDummyable) b).drawPlacementHighlight(player, event.partialTicks);
|
||||
event.setCanceled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_drill) {
|
||||
XFactoryDrill.drawBlockHighlight(player, player.getHeldItem(), event.partialTicks);
|
||||
event.setCanceled(true);
|
||||
|
||||
@ -25,6 +25,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -92,6 +93,10 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.conveyor_double));
|
||||
API.hideItem(new ItemStack(ModBlocks.conveyor_triple));
|
||||
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten, 1, OreDictionary.WILDCARD_VALUE));
|
||||
API.hideItem(new ItemStack(ModBlocks.brick_forgotten_lock, 1, OreDictionary.WILDCARD_VALUE));
|
||||
API.hideItem(new ItemStack(ModItems.coal_eternal));
|
||||
|
||||
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
||||
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
int x = mop.blockX;
|
||||
|
||||
@ -272,6 +272,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom radar = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom radar_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar_large.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom radar_screen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/radar_screen.obj")).noSmooth().asVBO();
|
||||
public static final IModelCustom satlink = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/satlink.obj")).noSmooth().asVBO();
|
||||
|
||||
//Forcefield
|
||||
public static final IModelCustom forcefield_top = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/forcefield_top.obj"));
|
||||
@ -407,6 +408,7 @@ public class ResourceManager {
|
||||
//Network
|
||||
public static final IModelCustom connector = new HFRWavefrontObject("models/network/connector.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom connector_super = new HFRWavefrontObject("models/network/connector_super.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom pylon = new HFRWavefrontObject("models/network/pylon.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom pylon_medium = new HFRWavefrontObject("models/network/pylon_medium.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom pylon_large = new HFRWavefrontObject("models/network/pylon_large.obj").noSmooth().asVBO();
|
||||
public static final IModelCustom substation = new HFRWavefrontObject("models/network/substation.obj").asVBO();
|
||||
@ -746,6 +748,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation radar_dish_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_dish.png");
|
||||
public static final ResourceLocation radar_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_large.png");
|
||||
public static final ResourceLocation radar_screen_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radar_screen.png");
|
||||
public static final ResourceLocation satlink_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/satlink.png");
|
||||
|
||||
//Forcefield
|
||||
public static final ResourceLocation forcefield_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/forcefield_base.png");
|
||||
@ -859,6 +862,8 @@ public class ResourceManager {
|
||||
//Electricity
|
||||
public static final ResourceLocation connector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector.png");
|
||||
public static final ResourceLocation connector_super_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/connector_super.png");
|
||||
public static final ResourceLocation pylon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon.png");
|
||||
public static final ResourceLocation pylon_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_steel.png");
|
||||
public static final ResourceLocation pylon_medium_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium.png");
|
||||
public static final ResourceLocation pylon_medium_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_medium_steel.png");
|
||||
public static final ResourceLocation pylon_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/pylon_large.png");
|
||||
|
||||
@ -82,6 +82,7 @@ public class StructureManager {
|
||||
public static final NBTStructure forest_chem = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/forest_chem.nbt"));
|
||||
public static final NBTStructure plane1 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_1.nbt"));
|
||||
public static final NBTStructure plane2 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_2.nbt"));
|
||||
public static final NBTStructure tower_base = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/tower_base.nbt"));
|
||||
|
||||
public static final NBTStructure factory = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/factory.nbt"));
|
||||
public static final NBTStructure crane = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crane_mod.nbt"));
|
||||
|
||||
@ -72,14 +72,15 @@ public class ParticleAshes extends EntityFXRotating {
|
||||
float pZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) interp - interpPosZ);
|
||||
|
||||
Vec3NT vec = new Vec3NT(particleScale, 0, particleScale).rotateAroundYDeg(this.rotationPitch);
|
||||
double yOff = 0.09;
|
||||
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMaxV());
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY - yOff, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMaxV());
|
||||
vec.rotateAroundYDeg(90);
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMinV());
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY - yOff, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMinV());
|
||||
vec.rotateAroundYDeg(90);
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMinV());
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY - yOff, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMinV());
|
||||
vec.rotateAroundYDeg(90);
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMaxV());
|
||||
tess.addVertexWithUV(pX + vec.xCoord, pY - yOff, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMaxV());
|
||||
} else {
|
||||
renderParticleRotated(tess, interp, sX, sY, sZ, dX, dZ, this.particleScale);
|
||||
}
|
||||
|
||||
@ -218,6 +218,10 @@ public class QMAWLoader implements IResourceManagerReloadListener {
|
||||
}
|
||||
}
|
||||
|
||||
if(json.has("noindex") && json.get("noindex").getAsBoolean()) {
|
||||
qmaw.noIndex();
|
||||
}
|
||||
|
||||
if(!qmaw.contents.isEmpty()) {
|
||||
QMAWLoader.qmaw.put(name, qmaw);
|
||||
}
|
||||
|
||||
@ -9,6 +9,9 @@ public class QuickManualAndWiki {
|
||||
public String name;
|
||||
public ItemStack icon;
|
||||
|
||||
/** Removes this manual from the calculator search feature */
|
||||
public boolean noIndex = false;
|
||||
|
||||
public HashMap<String, String> title = new HashMap();
|
||||
public HashMap<String, String> contents = new HashMap();
|
||||
|
||||
@ -30,4 +33,9 @@ public class QuickManualAndWiki {
|
||||
this.contents.put(lang, contents);
|
||||
return this;
|
||||
}
|
||||
|
||||
public QuickManualAndWiki noIndex() {
|
||||
this.noIndex = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,12 +14,12 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class RenderRBMKDebris extends Render {
|
||||
|
||||
//for fallback only
|
||||
private static final ResourceLocation tex_base = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_side.png");
|
||||
private static final ResourceLocation tex_element = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_fuel.png");
|
||||
private static final ResourceLocation tex_control = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png");
|
||||
private static final ResourceLocation tex_blank = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_side.png");
|
||||
private static final ResourceLocation tex_lid = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_cover_top.png");
|
||||
private static final ResourceLocation tex_graphite = new ResourceLocation(RefStrings.MODID + ":textures/blocks/block_graphite.png");
|
||||
public static final ResourceLocation tex_base = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_side.png");
|
||||
public static final ResourceLocation tex_element = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_fuel.png");
|
||||
public static final ResourceLocation tex_control = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png");
|
||||
public static final ResourceLocation tex_blank = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_side.png");
|
||||
public static final ResourceLocation tex_lid = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_cover_top.png");
|
||||
public static final ResourceLocation tex_graphite = new ResourceLocation(RefStrings.MODID + ":textures/blocks/block_graphite.png");
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double x, double y, double z, float f0, float f1) {
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
//This File was created with the Minecraft-SMP Modelling Toolbox 2.3.0.0
|
||||
// Copyright (C) 2017 Minecraft-SMP.de
|
||||
// This file is for Flan's Flying Mod Version 4.0.x+
|
||||
|
||||
// Model: Pylon
|
||||
// Model Creator:
|
||||
// Created on:13.06.2017 - 11:17:46
|
||||
// Last changed on: 13.06.2017 - 11:17:46
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelPylon extends ModelBase {
|
||||
|
||||
public ModelRenderer[] pylonModel;
|
||||
|
||||
public ModelPylon() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 128;
|
||||
|
||||
this.pylonModel = new ModelRenderer[4];
|
||||
this.pylonModel[0] = new ModelRenderer(this, 0, 96); // Box 0
|
||||
this.pylonModel[1] = new ModelRenderer(this, 1, 1); // Box 1
|
||||
this.pylonModel[2] = new ModelRenderer(this, 24, 1); // Box 2
|
||||
this.pylonModel[3] = new ModelRenderer(this, 25, 17); // Box 3
|
||||
|
||||
this.pylonModel[0].addBox(0F, 0F, 0F, 16, 16, 16, 0F); // Box 0
|
||||
this.pylonModel[0].setRotationPoint(-8F, -6F, -8F);
|
||||
|
||||
this.pylonModel[1].addBox(0F, 0F, 0F, 4, 73, 4, 0F); // Box 1
|
||||
this.pylonModel[1].setRotationPoint(-2F, -79F, -2F);
|
||||
|
||||
this.pylonModel[2].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 2
|
||||
this.pylonModel[2].setRotationPoint(-3F, -74F, -3F);
|
||||
|
||||
this.pylonModel[3].addBox(0F, 0F, 0F, 6, 2, 6, 0F); // Box 3
|
||||
this.pylonModel[3].setRotationPoint(-3F, -78F, -3F);
|
||||
|
||||
|
||||
for (ModelRenderer modelRenderer : this.pylonModel) {
|
||||
modelRenderer.setTextureSize(this.textureWidth, this.textureHeight);
|
||||
modelRenderer.mirror = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
this.pylonModel[i].render(scaleFactor);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderAll(float scaleFactor) {
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
this.pylonModel[i].render(scaleFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,9 @@ import com.hbm.render.util.BeamPronter.EnumWaveType;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -29,6 +32,8 @@ public class RenderBatterySocket extends TileEntitySpecialRenderer implements II
|
||||
|
||||
private static ResourceLocation blorbo = new ResourceLocation(RefStrings.MODID, "textures/models/horse/sunburst.png");
|
||||
|
||||
public static EntityItem dummy;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
@ -78,6 +83,34 @@ public class RenderBatterySocket extends TileEntitySpecialRenderer implements II
|
||||
Random rand = new Random(tile.getWorldObj().getTotalWorldTime() / 5);
|
||||
rand.nextBoolean();
|
||||
|
||||
for(int i = -1; i <= 1; i += 2) for(int j = -1; j <= 1; j += 2) if(rand.nextInt(4) == 0) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 0);
|
||||
BeamPronter.prontBeam(Vec3.createVectorHelper(0.4375 * i, 1.1875, 0.4375 * j), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 15, 0.0625F, 3, 0.025F);
|
||||
BeamPronter.prontBeam(Vec3.createVectorHelper(0.4375 * i, 1.1875, 0.4375 * j), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 1, 0, 3, 0.025F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
} else {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.5, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
GL11.glRotated((socket.getWorldObj().getTotalWorldTime() % 360 + interp) * 2.5D, 0, -1, 0);
|
||||
|
||||
if(dummy == null || dummy.worldObj != tile.getWorldObj()) {
|
||||
dummy = new EntityItem(tile.getWorldObj(), 0, 0, 0, render);
|
||||
}
|
||||
dummy.setEntityItemStack(render);
|
||||
dummy.hoverStart = 0.0F;
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(dummy, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Random rand = new Random(tile.getWorldObj().getTotalWorldTime() / 5);
|
||||
rand.nextBoolean();
|
||||
|
||||
for(int i = -1; i <= 1; i += 2) for(int j = -1; j <= 1; j += 2) if(rand.nextInt(4) == 0) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 0);
|
||||
|
||||
@ -29,7 +29,7 @@ public class RenderLPW2 extends TileEntitySpecialRenderer {
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
long time = te.getWorldObj().getTotalWorldTime();
|
||||
long time = te.getWorldObj().getTotalWorldTime() % 1000000;
|
||||
|
||||
double swayTimer = ((time + interp) / 3D) % (Math.PI * 4);
|
||||
double sway = (Math.sin(swayTimer) + Math.sin(swayTimer * 2) + Math.sin(swayTimer * 4) + 2.23255D) * 0.5;
|
||||
|
||||
@ -2,38 +2,77 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelPylon;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylon;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderPylon extends RenderPylonBase {
|
||||
public class RenderPylon extends RenderPylonBase implements IItemRendererProvider {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":" + "textures/models/ModelPylon.png");
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
private ModelPylon pylon;
|
||||
TileEntityPylon pylon = (TileEntityPylon)tile;
|
||||
|
||||
public RenderPylon() {
|
||||
this.pylon = new ModelPylon();
|
||||
if(tile.getBlockType() == ModBlocks.red_pylon)
|
||||
bindTexture(ResourceManager.pylon_tex);
|
||||
else
|
||||
bindTexture(ResourceManager.pylon_steel_tex);
|
||||
|
||||
if(tile.getBlockType() == ModBlocks.red_pylon )
|
||||
ResourceManager.pylon.renderPart("Pylon");
|
||||
else
|
||||
ResourceManager.pylon.renderPart("Pylon_steel");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
this.renderLinesGeneric(pylon, x, y, z);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||
TileEntityPylon pyl = (TileEntityPylon)te;
|
||||
public Item[] getItemsForRenderer() {
|
||||
return new Item[] {
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon),
|
||||
Item.getItemFromBlock(ModBlocks.red_pylon_steel),
|
||||
};
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.red_pylon);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F - ((1F / 16F) * 14F), (float) z + 0.5F);
|
||||
GL11.glRotatef(180, 0F, 0F, 1F);
|
||||
bindTexture(texture);
|
||||
this.pylon.renderAll(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(2.9, 2.9, 2.9);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack stack) {
|
||||
GL11.glScaled(1, 1, 1);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
this.renderLinesGeneric(pyl, x, y, z);
|
||||
GL11.glPopMatrix();
|
||||
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon))
|
||||
bindTexture(ResourceManager.pylon_tex);
|
||||
else
|
||||
bindTexture(ResourceManager.pylon_steel_tex);
|
||||
|
||||
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.red_pylon) )
|
||||
ResourceManager.pylon.renderPart("Pylon");
|
||||
else
|
||||
ResourceManager.pylon.renderPart("Pylon_steel");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
77
src/main/java/com/hbm/render/tileentity/RenderSatLink.java
Normal file
77
src/main/java/com/hbm/render/tileentity/RenderSatLink.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSatLink;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RenderSatLink extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
|
||||
TileEntityMachineSatLink link = (TileEntityMachineSatLink) tile;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
GL11.glTranslated((dir.offsetX + rot.offsetX) * 0.5, 0, (dir.offsetZ + rot.offsetZ) * 0.5);
|
||||
|
||||
float r = link.prevRot + (link.rot - link.prevRot) * interp;
|
||||
float l = link.prevLift + (link.lift - link.prevLift) * interp;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.satlink_tex);
|
||||
ResourceManager.satlink.renderPart("Base");
|
||||
GL11.glRotated(r, 0, 1, 0);
|
||||
ResourceManager.satlink.renderPart("Rotor");
|
||||
GL11.glTranslated(0, 7.375, 0);
|
||||
GL11.glRotated(l, 0, 0, 1);
|
||||
GL11.glTranslated(0, -7.375, 0);
|
||||
ResourceManager.satlink.renderPart("Dish");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_satlink);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.satlink_tex);
|
||||
ResourceManager.satlink.renderPart("Base");
|
||||
GL11.glRotated(15, 0, 1, 0);
|
||||
ResourceManager.satlink.renderPart("Rotor");
|
||||
GL11.glTranslated(0, 7.375, 0);
|
||||
GL11.glRotated(-45, 0, 0, 1);
|
||||
GL11.glTranslated(0, -7.375, 0);
|
||||
ResourceManager.satlink.renderPart("Dish");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -133,6 +133,7 @@ public class TileMappings {
|
||||
put(TileEntityMachineRadarScreen.class, "tileentity_radar_screen");
|
||||
put(TileEntityBroadcaster.class, "tileentity_pink_cloud_broadcaster");
|
||||
put(TileEntityMachineSatLinker.class, "tileentity_satlinker");
|
||||
put(TileEntityMachineSatLink.class, "tileentity_satlink");
|
||||
put(TileEntityReactorResearch.class, "tileentity_small_reactor");
|
||||
put(TileEntityVaultDoorMigration.class, "tileentity_vault_door");
|
||||
put(TileEntityRadiobox.class, "tileentity_radio_broadcaster");
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.container.ContainerMachineDiesel;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -28,10 +29,8 @@ import com.hbm.util.CompatEnergyControl;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import api.hbm.energymk2.IEnergyProviderMK2;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -40,8 +39,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidStandardTransceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC, IFluidCopiable {
|
||||
public class TileEntityMachineDiesel extends TileEntityMachinePolluting implements IEnergyProviderMK2, IFluidStandardTransceiverMK2, IControlReceiver, IConfigurableMachine, IGUIProvider, IInfoProviderEC, IFluidCopiable {
|
||||
|
||||
public boolean isOn = false;
|
||||
public long power;
|
||||
public long powerCap = maxPower;
|
||||
public FluidTank tank;
|
||||
@ -50,8 +50,8 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
private AudioWrapper audio;
|
||||
|
||||
/* CONFIGURABLE CONSTANTS */
|
||||
public static long maxPower = 50000;
|
||||
public static int fluidCap = 16000;
|
||||
public static long maxPower = 50_000;
|
||||
public static int fuelCap = 16_000;
|
||||
public static HashMap<FuelGrade, Double> fuelEfficiency = new HashMap();
|
||||
static {
|
||||
fuelEfficiency.put(FuelGrade.MEDIUM, 0.5D);
|
||||
@ -63,9 +63,45 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
private static final int[] slots_bottom = new int[] { 1, 2 };
|
||||
private static final int[] slots_side = new int[] { 2 };
|
||||
|
||||
@Override
|
||||
public String getConfigName() {
|
||||
return "dieselgen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readIfPresent(JsonObject obj) {
|
||||
maxPower = IConfigurableMachine.grab(obj, "L:powerCap", maxPower);
|
||||
fuelCap = IConfigurableMachine.grab(obj, "I:fuelCap", fuelCap);
|
||||
|
||||
if(obj.has("D[:efficiency")) {
|
||||
JsonArray array = obj.get("D[:efficiency").getAsJsonArray();
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
fuelEfficiency.put(grade, array.get(grade.ordinal()).getAsDouble());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeConfig(JsonWriter writer) throws IOException {
|
||||
writer.name("L:powerCap").value(maxPower);
|
||||
writer.name("I:fuelCap").value(fuelCap);
|
||||
|
||||
String info = "Fuel grades in order: ";
|
||||
for(FuelGrade grade : FuelGrade.values()) info += grade.name() + " ";
|
||||
info = info.trim();
|
||||
writer.name("INFO").value(info);
|
||||
|
||||
writer.name("D[:efficiency").beginArray().setIndent("");
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
double d = fuelEfficiency.containsKey(grade) ? fuelEfficiency.get(grade) : 0.0D;
|
||||
writer.value(d);
|
||||
}
|
||||
writer.endArray().setIndent(" ");
|
||||
}
|
||||
|
||||
public TileEntityMachineDiesel() {
|
||||
super(5, 100);
|
||||
tank = new FluidTank(Fluids.DIESEL, 4_000);
|
||||
super(4, 100);
|
||||
tank = new FluidTank(Fluids.DIESEL, fuelCap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,6 +120,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.power = nbt.getLong("powerTime");
|
||||
this.powerCap = nbt.getLong("powerCap");
|
||||
tank.readFromNBT(nbt, "fuel");
|
||||
@ -93,6 +130,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
nbt.setLong("powerTime", power);
|
||||
nbt.setLong("powerCap", powerCap);
|
||||
tank.writeToNBT(nbt, "fuel");
|
||||
@ -110,9 +148,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
return false;
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / powerCap;
|
||||
}
|
||||
public long getPowerScaled(long i) { return (power * i) / powerCap; }
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
@ -121,28 +157,17 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
|
||||
this.wasOn = false;
|
||||
|
||||
tank.setType(3, slots);
|
||||
tank.loadTank(0, 1, slots);
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
this.tryProvide(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
this.sendSmoke(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
this.trySubscribe(tank.getTankType(), worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
|
||||
}
|
||||
|
||||
//Tank Management
|
||||
FluidType last = tank.getTankType();
|
||||
if(tank.setType(3, 4, slots)) this.unsubscribeToAllAround(last, this);
|
||||
tank.loadTank(0, 1, slots);
|
||||
|
||||
this.subscribeToAllAround(tank.getTankType(), this);
|
||||
|
||||
FluidType type = tank.getTankType();
|
||||
if(type == Fluids.NITAN)
|
||||
powerCap = maxPower * 10;
|
||||
else
|
||||
powerCap = maxPower;
|
||||
|
||||
// Battery Item
|
||||
power = Library.chargeItemsFromTE(slots, 2, power, powerCap);
|
||||
|
||||
generate();
|
||||
if(isOn) generate();
|
||||
|
||||
this.networkPackNT(50);
|
||||
} else {
|
||||
@ -196,6 +221,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
super.serialize(buf);
|
||||
buf.writeInt((int) power);
|
||||
buf.writeInt((int) powerCap);
|
||||
buf.writeBoolean(isOn);
|
||||
buf.writeBoolean(wasOn);
|
||||
tank.serialize(buf);
|
||||
}
|
||||
@ -205,17 +231,13 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
super.deserialize(buf);
|
||||
this.power = buf.readInt();
|
||||
this.powerCap = buf.readInt();
|
||||
this.isOn = buf.readBoolean();
|
||||
this.wasOn = buf.readBoolean();
|
||||
tank.deserialize(buf);
|
||||
}
|
||||
|
||||
public boolean hasAcceptableFuel() {
|
||||
return getHEFromFuel() > 0;
|
||||
}
|
||||
|
||||
public long getHEFromFuel() {
|
||||
return getHEFromFuel(tank.getTankType());
|
||||
}
|
||||
public boolean hasAcceptableFuel() { return getHEFromFuel() > 0; }
|
||||
public long getHEFromFuel() { return getHEFromFuel(tank.getTankType()); }
|
||||
|
||||
public static long getHEFromFuel(FluidType type) {
|
||||
|
||||
@ -234,16 +256,15 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
|
||||
public void generate() {
|
||||
|
||||
if(!this.isOn) return;
|
||||
if(this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) return;
|
||||
|
||||
if(hasAcceptableFuel()) {
|
||||
if (tank.getFill() > 0) {
|
||||
if(!hasAcceptableFuel()) return;
|
||||
if(tank.getFill() <= 0) return;
|
||||
|
||||
this.wasOn = true;
|
||||
|
||||
tank.setFill(tank.getFill() - 1);
|
||||
if(tank.getFill() < 0)
|
||||
tank.setFill(0);
|
||||
|
||||
if(tank.getFill() < 0) tank.setFill(0);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
super.pollute(tank.getTankType(), FluidReleaseType.BURN, 5F);
|
||||
@ -255,7 +276,16 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
power = powerCap;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return player.getDistance(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 25;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("turnOn")) this.isOn = !this.isOn;
|
||||
this.markChanged();
|
||||
}
|
||||
|
||||
@Override public long getPower() { return power; }
|
||||
@ -265,57 +295,9 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {tank}; }
|
||||
@Override public FluidTank[] getAllTanks() { return new FluidTank[] { tank }; }
|
||||
|
||||
@Override
|
||||
public String getConfigName() {
|
||||
return "dieselgen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readIfPresent(JsonObject obj) {
|
||||
maxPower = IConfigurableMachine.grab(obj, "L:powerCap", maxPower);
|
||||
fluidCap = IConfigurableMachine.grab(obj, "I:fuelCap", fluidCap);
|
||||
|
||||
if(obj.has("D[:efficiency")) {
|
||||
JsonArray array = obj.get("D[:efficiency").getAsJsonArray();
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
fuelEfficiency.put(grade, array.get(grade.ordinal()).getAsDouble());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeConfig(JsonWriter writer) throws IOException {
|
||||
writer.name("L:powerCap").value(maxPower);
|
||||
writer.name("I:fuelCap").value(fluidCap);
|
||||
|
||||
String info = "Fuel grades in order: ";
|
||||
for(FuelGrade grade : FuelGrade.values()) info += grade.name() + " ";
|
||||
info = info.trim();
|
||||
writer.name("INFO").value(info);
|
||||
|
||||
writer.name("D[:efficiency").beginArray().setIndent("");
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
double d = fuelEfficiency.containsKey(grade) ? fuelEfficiency.get(grade) : 0.0D;
|
||||
writer.value(d);
|
||||
}
|
||||
writer.endArray().setIndent(" ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineDiesel(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineDiesel(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return this.getSmokeTanks();
|
||||
}
|
||||
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerMachineDiesel(player.inventory, this); }
|
||||
@Override public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIMachineDiesel(player.inventory, this); }
|
||||
@Override public FluidTank[] getSendingTanks() { return this.getSmokeTanks(); }
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
|
||||
@ -0,0 +1,120 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineSatLink extends TileEntityTickingBase implements IRORValueProvider, IRORInteractive {
|
||||
|
||||
public boolean connected;
|
||||
public int freq;
|
||||
|
||||
public float rot = INACTIVE_ROT;
|
||||
public float prevRot = INACTIVE_ROT;
|
||||
public float lift = INACTIVE_LIFT;
|
||||
public float prevLift = INACTIVE_LIFT;
|
||||
|
||||
public static final float SPEED = 0.25F;
|
||||
public static final float ACTIVE_ROT = -15F;
|
||||
public static final float ACTIVE_LIFT = -45F;
|
||||
public static final float INACTIVE_ROT = 0F;
|
||||
public static final float INACTIVE_LIFT = -85F;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.connected = false;
|
||||
|
||||
if(worldObj.getHeightValue(xCoord, zCoord) <= yCoord) {
|
||||
|
||||
SatelliteSavedData dat = SatelliteSavedData.getData(worldObj);
|
||||
this.connected = dat.isFreqTaken(freq);
|
||||
}
|
||||
|
||||
this.networkPackNT(150);
|
||||
|
||||
} else {
|
||||
|
||||
this.prevRot = this.rot;
|
||||
this.prevLift = this.lift;
|
||||
|
||||
float targetR = this.connected ? ACTIVE_ROT : INACTIVE_ROT;
|
||||
float targetL = this.connected ? ACTIVE_LIFT : INACTIVE_LIFT;
|
||||
|
||||
if(Math.abs(rot - targetR) <= SPEED) rot = targetR;
|
||||
else if(rot < targetR) rot += SPEED;
|
||||
else if(rot > targetR) rot -= SPEED;
|
||||
|
||||
if(Math.abs(lift - targetL) <= SPEED) lift = targetL;
|
||||
else if(lift < targetL) lift += SPEED;
|
||||
else if(lift > targetL) lift -= SPEED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeBoolean(connected);
|
||||
buf.writeInt(freq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.connected = buf.readBoolean();
|
||||
this.freq = buf.readInt();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 10,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "connected",
|
||||
PREFIX_VALUE + "freq",
|
||||
PREFIX_VALUE + "rx",
|
||||
PREFIX_FUNCTION + "setfreq" + NAME_SEPARATOR + "freq",
|
||||
PREFIX_FUNCTION + "tx" + NAME_SEPARATOR + "payload"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String runRORFunction(String name, String[] params) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -655,6 +655,8 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
PREFIX_VALUE + "rods",
|
||||
PREFIX_VALUE + "coreheat",
|
||||
PREFIX_VALUE + "hullheat",
|
||||
PREFIX_VALUE + "coldbuf",
|
||||
PREFIX_VALUE + "hotbuf",
|
||||
PREFIX_VALUE + "flux",
|
||||
PREFIX_VALUE + "depletion",
|
||||
PREFIX_FUNCTION + "setrods" + NAME_SEPARATOR + "percent",
|
||||
@ -671,6 +673,8 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
if((PREFIX_VALUE + "rods").equals(name)) return "" + (int) (100 - this.rodLevel); // why the fuck did i invert this again?
|
||||
if((PREFIX_VALUE + "coreheat").equals(name)) return "" + this.coreHeat;
|
||||
if((PREFIX_VALUE + "hullheat").equals(name)) return "" + this.hullHeat;
|
||||
if((PREFIX_VALUE + "coldbuf").equals(name)) return "" + this.tanks[0].getFill();
|
||||
if((PREFIX_VALUE + "hotbuf").equals(name)) return "" + this.tanks[1].getFill();
|
||||
if((PREFIX_VALUE + "flux").equals(name)) return "" + (int) this.flux;
|
||||
if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (this.progress * 100 / this.processTime);
|
||||
return null;
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -31,7 +32,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPADetector extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityPADetector extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||
|
||||
public static final long usage = 100_000;
|
||||
|
||||
@ -186,6 +187,22 @@ public class TileEntityPADetector extends TileEntityCooledBase implements IGUIPr
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "temperature",
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "temperature").equals(name)) return "" + (int) this.temperature;
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getExitPos(Particle particle) {
|
||||
return null;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user