From 1b9bfcd4701fc12f1388d7608d04e75b8c4e979a Mon Sep 17 00:00:00 2001 From: Wolf Date: Sun, 21 Jun 2026 18:45:44 -0400 Subject: [PATCH 1/6] I need to use this folder again oof --- .../java/com/hbm/blocks/BlockDummyable.java | 44 +++++++++++++++++++ .../com/hbm/main/ModEventHandlerRenderer.java | 11 +++++ 2 files changed, 55 insertions(+) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index c7d7bd432..062781c0e 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -5,6 +5,8 @@ import com.hbm.handler.ThreeInts; import com.hbm.interfaces.ICopiable; import com.hbm.main.MainRegistry; import com.hbm.tileentity.IPersistentNBT; +import com.hbm.util.EntityDamageUtil; +import com.hbm.util.fauxpointtwelve.DirPos; import com.hbm.world.gen.nbt.INBTBlockTransformable; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -594,5 +596,47 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl return meta; } + public int[][] getAllDimensions() { + return new int[][] { getDimensions() }; +} +@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(); + + 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); + + facing = getDirModified(facing); + + double originX = mop.blockX - dX + facing.offsetX * o; + double originY = py - dY + (mop.sideHit == 1 ? 1 : 0); + double originZ = mop.blockZ - dZ + facing.offsetZ * o; + + float exp = 0.002F; + ICustomBlockHighlight.setup(); + boolean canPlace = checkRequirement(player.worldObj, mop.blockX, py + 1, mop.blockZ, facing, o); + int color = canPlace ? 0x008000 : 0x800000; + + for(int[] dims : getAllDimensions()) { + int[] rot = MultiblockHandlerXR.rotate(dims, facing); + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(-rot[4], -rot[1], -rot[2], rot[5] + 1, rot[0] + 1, rot[3] + 1); + RenderGlobal.drawOutlinedBoundingBox(aabb.expand(exp, exp, exp).getOffsetBoundingBox(originX, originY, originZ), color); + } + + ICustomBlockHighlight.cleanup(); + } +} } \ No newline at end of file diff --git a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java index f1a16b507..65272819c 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java +++ b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java @@ -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); From adc5437963de76675ae41b8aedbfb3c88103d56e Mon Sep 17 00:00:00 2001 From: Wolf Date: Sun, 21 Jun 2026 18:46:01 -0400 Subject: [PATCH 2/6] might have to undo, just need it free --- .../machine/fusion/MachineFusionPlasmaForge.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java index 5da87a630..1e61fe62e 100644 --- a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java +++ b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java @@ -31,7 +31,20 @@ 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 boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { return super.checkRequirement(world, x, y, z, dir, o) && From 1917eeb191d5773bef937cd0ca7c945a30b69448 Mon Sep 17 00:00:00 2001 From: Wolf Date: Tue, 21 Jul 2026 23:48:49 -0400 Subject: [PATCH 3/6] A rectangle is not always a cube, but a cube is a cube, its also a rectangle --- .../java/com/hbm/blocks/BlockDummyable.java | 183 ++++++++++++++---- .../fusion/MachineFusionPlasmaForge.java | 2 + 2 files changed, 146 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index 062781c0e..8f5051aaf 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -6,7 +6,7 @@ import com.hbm.interfaces.ICopiable; import com.hbm.main.MainRegistry; import com.hbm.tileentity.IPersistentNBT; import com.hbm.util.EntityDamageUtil; -import com.hbm.util.fauxpointtwelve.DirPos; +import com.hbm.util.fauxpointtwelve.BlockPos; import com.hbm.world.gen.nbt.INBTBlockTransformable; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; @@ -15,6 +15,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; @@ -34,10 +35,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 { @@ -596,47 +601,147 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl return meta; } + public int[][] getAllDimensions() { - return new int[][] { getDimensions() }; -} -@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; + return new int[][] { getDimensions() }; + } + + @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(); + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + int o = -getOffset(); + int pY = mop.blockY + getHeightOffset(); - 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 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); + + facing = getDirModified(facing); + + double originX = mop.blockX + facing.offsetX * o; + double originY = pY + (mop.sideHit == 1 ? 1 : 0); + double originZ = mop.blockZ + facing.offsetZ * o; + + //float exp = 0.002F; + //ICustomBlockHighlight.setup(); + boolean canPlace = checkRequirement(player.worldObj, mop.blockX, pY + 1, mop.blockZ, facing, o); + //int color = canPlace ? 0x008000 : 0x800000; + Tessellator tess = Tessellator.instance; + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_TEXTURE_2D); + //mc.renderEngine.bindTexture(EMPTY); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); + //GL11.glColor3f(1F, 1F, 1F); + GL11.glLineWidth(2.0F); + GL11.glDepthMask(false); + //tess.setTranslation(-dX, -dY, -dZ); + tess.startDrawing(GL11.GL_LINES); + tess.setBrightness(240); + + if (canPlace) { + tess.setColorRGBA(0, 255, 0, 255); + } else { + tess.setColorRGBA(255, 0, 0, 255); + } + /* + for(int[] dims : getAllDimensions()) { + int[] rot = MultiblockHandlerXR.rotate(dims, facing); + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(-rot[4], -rot[1], -rot[2], rot[5] + 1, rot[0] + 1, rot[3] + 1); + RenderGlobal.drawOutlinedBoundingBox(aabb.expand(exp, exp, exp).getOffsetBoundingBox(originX, originY, originZ), color); + } + */ + List blocks = new java.util.ArrayList<>(); + Set set = new java.util.HashSet<>(); + + for(int[] dims : getAllDimensions()) { + int[] rot = MultiblockHandlerXR.rotate(dims, facing); + for(int bx = -rot[4]; bx <= rot[5]; bx++) { + for(int by = -rot[1]; by <= rot[0]; by++) { + for(int bz = -rot[2]; bz <= rot[3]; 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); + } + } + + } + } + 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); } + } + } - facing = getDirModified(facing); - - double originX = mop.blockX - dX + facing.offsetX * o; - double originY = py - dY + (mop.sideHit == 1 ? 1 : 0); - double originZ = mop.blockZ - dZ + facing.offsetZ * o; - - float exp = 0.002F; - ICustomBlockHighlight.setup(); - boolean canPlace = checkRequirement(player.worldObj, mop.blockX, py + 1, mop.blockZ, facing, o); - int color = canPlace ? 0x008000 : 0x800000; - - for(int[] dims : getAllDimensions()) { - int[] rot = MultiblockHandlerXR.rotate(dims, facing); - AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(-rot[4], -rot[1], -rot[2], rot[5] + 1, rot[0] + 1, rot[3] + 1); - RenderGlobal.drawOutlinedBoundingBox(aabb.expand(exp, exp, exp).getOffsetBoundingBox(originX, originY, originZ), color); - } - - ICustomBlockHighlight.cleanup(); - } -} + 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(); + //ICustomBlockHighlight.cleanup(); + } + } } \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java index 1e61fe62e..7f06b7840 100644 --- a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java +++ b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionPlasmaForge.java @@ -31,6 +31,7 @@ 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[][] { @@ -45,6 +46,7 @@ public class MachineFusionPlasmaForge extends BlockDummyable { new int[] { 3, -2, 1, 1, 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) && From 512b24365414789d5ff7deee7b66815521d4b22f Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 22 Jul 2026 21:19:02 -0400 Subject: [PATCH 4/6] Why the phone be ringing when I like tacos --- .../java/com/hbm/blocks/BlockDummyable.java | 14 +++++++++++--- .../blocks/machine/MachineAnnihilator.java | 8 +++++++- .../hbm/blocks/machine/MachineBigAssTank.java | 13 ++++++++++++- .../machine/MachineCatalyticCracker.java | 11 ++++++++++- .../machine/MachineCatalyticReformer.java | 9 ++++++++- .../hbm/blocks/machine/MachineChungus.java | 10 +++++++++- .../com/hbm/blocks/machine/MachineCoker.java | 12 +++++++++++- .../hbm/blocks/machine/MachineCompressor.java | 9 ++++++++- .../blocks/machine/MachineElectrolyser.java | 19 ++++++++++++++++++- .../hbm/blocks/machine/MachineExcavator.java | 10 +++++++++- .../machine/MachineExposureChamber.java | 12 +++++++++++- .../blocks/machine/MachineFrackingTower.java | 15 ++++++++++++++- .../com/hbm/blocks/machine/MachineICF.java | 9 ++++++++- .../hbm/blocks/machine/MachinePumpjack.java | 11 ++++++++++- .../blocks/machine/MachineStrandCaster.java | 8 +++++++- .../com/hbm/blocks/machine/ReactorZirnox.java | 10 +++++++++- .../com/hbm/blocks/machine/SoyuzLauncher.java | 13 ++++++++++++- .../java/com/hbm/blocks/machine/Watz.java | 11 ++++++++++- .../machine/fusion/MachineFusionKlystron.java | 8 +++++++- .../fusion/MachineFusionKlystronCreative.java | 8 +++++++- .../machine/fusion/MachineFusionMHDT.java | 12 +++++++++++- .../hbm/blocks/machine/rbmk/RBMKConsole.java | 8 +++++++- .../blocks/machine/rbmk/RBMKCraneConsole.java | 8 +++++++- 23 files changed, 223 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index 8f5051aaf..524092c7b 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -665,10 +665,18 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl Set set = new java.util.HashSet<>(); for(int[] dims : getAllDimensions()) { + 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, worldOffY, 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]; bx <= rot[5]; bx++) { - for(int by = -rot[1]; by <= rot[0]; by++) { - for(int bz = -rot[2]; bz <= rot[3]; bz++) { + 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, diff --git a/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java b/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java index 38bb83680..1c00e165b 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java +++ b/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java @@ -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) && diff --git a/src/main/java/com/hbm/blocks/machine/MachineBigAssTank.java b/src/main/java/com/hbm/blocks/machine/MachineBigAssTank.java index aea632987..77df48aff 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineBigAssTank.java +++ b/src/main/java/com/hbm/blocks/machine/MachineBigAssTank.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachineCatalyticCracker.java b/src/main/java/com/hbm/blocks/machine/MachineCatalyticCracker.java index 9b7910686..282405fe7 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineCatalyticCracker.java +++ b/src/main/java/com/hbm/blocks/machine/MachineCatalyticCracker.java @@ -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) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineCatalyticReformer.java b/src/main/java/com/hbm/blocks/machine/MachineCatalyticReformer.java index b8401426a..e190051ed 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineCatalyticReformer.java +++ b/src/main/java/com/hbm/blocks/machine/MachineCatalyticReformer.java @@ -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) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineChungus.java b/src/main/java/com/hbm/blocks/machine/MachineChungus.java index 8972ca7ac..6614dbfe8 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineChungus.java +++ b/src/main/java/com/hbm/blocks/machine/MachineChungus.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachineCoker.java b/src/main/java/com/hbm/blocks/machine/MachineCoker.java index 695698016..4c26a4aa7 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineCoker.java +++ b/src/main/java/com/hbm/blocks/machine/MachineCoker.java @@ -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)) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineCompressor.java b/src/main/java/com/hbm/blocks/machine/MachineCompressor.java index f22bc3fc1..22cc0d0e8 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineCompressor.java +++ b/src/main/java/com/hbm/blocks/machine/MachineCompressor.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachineElectrolyser.java b/src/main/java/com/hbm/blocks/machine/MachineElectrolyser.java index ec787564a..0a4825728 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineElectrolyser.java +++ b/src/main/java/com/hbm/blocks/machine/MachineElectrolyser.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachineExcavator.java b/src/main/java/com/hbm/blocks/machine/MachineExcavator.java index c91d6bb16..06dfce2e8 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineExcavator.java +++ b/src/main/java/com/hbm/blocks/machine/MachineExcavator.java @@ -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; diff --git a/src/main/java/com/hbm/blocks/machine/MachineExposureChamber.java b/src/main/java/com/hbm/blocks/machine/MachineExposureChamber.java index e0d906181..e062201dc 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineExposureChamber.java +++ b/src/main/java/com/hbm/blocks/machine/MachineExposureChamber.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachineFrackingTower.java b/src/main/java/com/hbm/blocks/machine/MachineFrackingTower.java index 761aa10ed..d872fc7a9 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineFrackingTower.java +++ b/src/main/java/com/hbm/blocks/machine/MachineFrackingTower.java @@ -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) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineICF.java b/src/main/java/com/hbm/blocks/machine/MachineICF.java index 29bca9b90..6e39bd62e 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineICF.java +++ b/src/main/java/com/hbm/blocks/machine/MachineICF.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/MachinePumpjack.java b/src/main/java/com/hbm/blocks/machine/MachinePumpjack.java index 56f05147d..ad8af4b7b 100644 --- a/src/main/java/com/hbm/blocks/machine/MachinePumpjack.java +++ b/src/main/java/com/hbm/blocks/machine/MachinePumpjack.java @@ -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) && diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index 354e91136..10345bcb8 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -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(); diff --git a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java index 1316a02eb..5d892c5ea 100644 --- a/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java +++ b/src/main/java/com/hbm/blocks/machine/ReactorZirnox.java @@ -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) && diff --git a/src/main/java/com/hbm/blocks/machine/SoyuzLauncher.java b/src/main/java/com/hbm/blocks/machine/SoyuzLauncher.java index 598f9aef4..98106fada 100644 --- a/src/main/java/com/hbm/blocks/machine/SoyuzLauncher.java +++ b/src/main/java/com/hbm/blocks/machine/SoyuzLauncher.java @@ -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; diff --git a/src/main/java/com/hbm/blocks/machine/Watz.java b/src/main/java/com/hbm/blocks/machine/Watz.java index 41f6767ed..bedbd245e 100644 --- a/src/main/java/com/hbm/blocks/machine/Watz.java +++ b/src/main/java/com/hbm/blocks/machine/Watz.java @@ -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) && diff --git a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystron.java b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystron.java index 46f5abc0f..db8df5641 100644 --- a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystron.java +++ b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystron.java @@ -35,7 +35,13 @@ 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 boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { return super.checkRequirement(world, x, y, z, dir, o) && diff --git a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystronCreative.java b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystronCreative.java index 5b0b2edba..198f49f88 100644 --- a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystronCreative.java +++ b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionKlystronCreative.java @@ -28,7 +28,13 @@ 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 boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { return super.checkRequirement(world, x, y, z, dir, o) && diff --git a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionMHDT.java b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionMHDT.java index 2af2192b9..64dd13fec 100644 --- a/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionMHDT.java +++ b/src/main/java/com/hbm/blocks/machine/fusion/MachineFusionMHDT.java @@ -44,7 +44,17 @@ public class MachineFusionMHDT extends BlockDummyable implements ILookOverlay, I public int getOffset() { 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 boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { return super.checkRequirement(world, x, y, z, dir, o) && diff --git a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKConsole.java b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKConsole.java index de8789215..568c4f3ec 100644 --- a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKConsole.java +++ b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKConsole.java @@ -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); diff --git a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKCraneConsole.java b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKCraneConsole.java index 680856254..9468765bd 100644 --- a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKCraneConsole.java +++ b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKCraneConsole.java @@ -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); From c3cd832abc8cd95979699ff18d6f74477bc03467 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 22 Jul 2026 21:29:18 -0400 Subject: [PATCH 5/6] Meow Meow Meow Meow Meow Meow Meow Meow Meow Meow --- .../java/com/hbm/blocks/BlockDummyable.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index 524092c7b..595298e61 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -619,6 +619,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl 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); @@ -631,21 +632,15 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl double originY = pY + (mop.sideHit == 1 ? 1 : 0); double originZ = mop.blockZ + facing.offsetZ * o; - //float exp = 0.002F; - //ICustomBlockHighlight.setup(); boolean canPlace = checkRequirement(player.worldObj, mop.blockX, pY + 1, mop.blockZ, facing, o); - //int color = canPlace ? 0x008000 : 0x800000; Tessellator tess = Tessellator.instance; GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_TEXTURE_2D); - //mc.renderEngine.bindTexture(EMPTY); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); - //GL11.glColor3f(1F, 1F, 1F); GL11.glLineWidth(2.0F); GL11.glDepthMask(false); - //tess.setTranslation(-dX, -dY, -dZ); tess.startDrawing(GL11.GL_LINES); tess.setBrightness(240); @@ -654,21 +649,21 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl } else { tess.setColorRGBA(255, 0, 0, 255); } - /* - for(int[] dims : getAllDimensions()) { - int[] rot = MultiblockHandlerXR.rotate(dims, facing); - AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(-rot[4], -rot[1], -rot[2], rot[5] + 1, rot[0] + 1, rot[3] + 1); - RenderGlobal.drawOutlinedBoundingBox(aabb.expand(exp, exp, exp).getOffsetBoundingBox(originX, originY, originZ), color); - } - */ + + //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 List blocks = new java.util.ArrayList<>(); Set 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, worldOffY, worldOffZ; + 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; @@ -689,6 +684,8 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl } } + //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)); @@ -703,6 +700,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl 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); } @@ -749,7 +747,6 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPopMatrix(); - //ICustomBlockHighlight.cleanup(); } } } \ No newline at end of file From 0d1dff70ade199bef449a8d45fab90eb677274d9 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 22 Jul 2026 22:11:32 -0400 Subject: [PATCH 6/6] meow finale_real_finalfinal_real_lastone --- src/main/java/com/hbm/blocks/BlockDummyable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hbm/blocks/BlockDummyable.java b/src/main/java/com/hbm/blocks/BlockDummyable.java index 595298e61..e128f8e95 100644 --- a/src/main/java/com/hbm/blocks/BlockDummyable.java +++ b/src/main/java/com/hbm/blocks/BlockDummyable.java @@ -651,7 +651,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl } //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 XL multiblock has the getAllDimensions overridden in its own class. Each NEEDS it or it will show the incorect shape. List blocks = new java.util.ArrayList<>(); Set set = new java.util.HashSet<>();