From d8e87453cbc0187f623b366c28e94050cb312dfa Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 14 May 2023 14:29:11 +0200 Subject: [PATCH] fixed tain bounding boxes not properly initializing --- src/main/java/com/hbm/blocks/ModBlocks.java | 10 +- .../hbm/entity/train/EntityRailCarBase.java | 7 +- .../handler/nei/CMBFurnaceRecipeHandler.java | 132 ------------------ src/main/java/com/hbm/main/NEIConfig.java | 1 - .../entity/item/RenderTrainCargoTram.java | 1 - .../hbm/textures/models/machines/fan.png | Bin 719 -> 811 bytes 6 files changed, 7 insertions(+), 144 deletions(-) delete mode 100644 src/main/java/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 0a0df5800..3605f9a2f 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -910,7 +910,6 @@ public class ModBlocks { public static Block field_disturber; public static Block machine_rtg_grey; - public static Block machine_rtg_cyan; public static Block machine_amgen; public static Block machine_geo; public static Block machine_minirtg; @@ -1859,20 +1858,13 @@ public class ModBlocks { machine_shredder = new MachineShredder(Material.iron).setBlockName("machine_shredder").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_shredder_large = new MachineShredderLarge(Material.iron).setBlockName("machine_shredder_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":code"); - machine_combine_factory = new MachineCMBFactory(Material.iron).setBlockName("machine_combine_factory").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); + machine_combine_factory = new MachineCMBFactory(Material.iron).setBlockName("machine_combine_factory").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null); machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); teleanchor = new MachineTeleanchor().setBlockName("teleanchor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber"); machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg"); - //machine_rtg_red = new MachineRTG(Material.iron).setBlockName("machine_rtg_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - //machine_rtg_orange = new MachineRTG(Material.iron).setBlockName("machine_rtg_orange").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - //machine_rtg_yellow = new MachineRTG(Material.iron).setBlockName("machine_rtg_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - //machine_rtg_green = new MachineRTG(Material.iron).setBlockName("machine_rtg_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - machine_rtg_cyan = new MachineRTG(Material.iron).setBlockName("machine_rtg_cyan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - //machine_rtg_blue = new MachineRTG(Material.iron).setBlockName("machine_rtg_blue").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); - //machine_rtg_purple = new MachineRTG(Material.iron).setBlockName("machine_rtg_purple").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_amgen = new MachineAmgen(Material.iron).setBlockName("machine_amgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_geo = new MachineAmgen(Material.iron).setBlockName("machine_geo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_cell"); diff --git a/src/main/java/com/hbm/entity/train/EntityRailCarBase.java b/src/main/java/com/hbm/entity/train/EntityRailCarBase.java index 65c5b1cf4..f2a502e69 100644 --- a/src/main/java/com/hbm/entity/train/EntityRailCarBase.java +++ b/src/main/java/com/hbm/entity/train/EntityRailCarBase.java @@ -81,7 +81,12 @@ public abstract class EntityRailCarBase extends Entity { for(int i = 0; i < definitions.length; i++) { DummyConfig def = definitions[i]; BoundingBoxDummyEntity dummy = new BoundingBoxDummyEntity(worldObj, this, def.width, def.height); - dummy.setPosition(posX, posY, posZ); + Vec3 rot = Vec3.createVectorHelper(def.offset.xCoord, def.offset.yCoord, def.offset.zCoord); + rot.rotateAroundY((float) (-this.rotationYaw * Math.PI / 180)); + double x = posX + rot.xCoord; + double y = posY + rot.yCoord; + double z = posZ + rot.zCoord; + dummy.setPosition(x, y, z); worldObj.spawnEntityInWorld(dummy); this.dummies[i] = dummy; } diff --git a/src/main/java/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java b/src/main/java/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java deleted file mode 100644 index 5390eef46..000000000 --- a/src/main/java/com/hbm/handler/nei/CMBFurnaceRecipeHandler.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.hbm.handler.nei; - -import java.awt.Rectangle; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import com.hbm.inventory.gui.GUIMachineCMBFactory; -import com.hbm.inventory.recipes.MachineRecipes; -import com.hbm.lib.RefStrings; - -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; - -public class CMBFurnaceRecipeHandler extends TemplateRecipeHandler { - - public LinkedList transferRectsRec = new LinkedList(); - public LinkedList transferRectsGui = new LinkedList(); - public LinkedList> guiRec = new LinkedList>(); - public LinkedList> guiGui = new LinkedList>(); - - public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe - { - PositionedStack input1; - PositionedStack input2; - PositionedStack result; - - public SmeltingSet(ItemStack input1, ItemStack input2, ItemStack result) { - input1.stackSize = 1; - input2.stackSize = 1; - this.input1 = new PositionedStack(input1, 66, 6); - this.input2 = new PositionedStack(input2, 66, 42); - this.result = new PositionedStack(result, 129, 24); - } - - @Override - public List getIngredients() { - return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input1, input2})); - } - - @Override - public PositionedStack getResult() { - return result; - } - } - - @Override - public String getRecipeName() { - return "CMB Steel Furnace"; - } - - @Override - public String getGuiTexture() { - return RefStrings.MODID + ":textures/gui/nei/gui_nei_cmb.png"; - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - if ((outputId.equals("cmbsmelting")) && getClass() == CMBFurnaceRecipeHandler.class) { - Map recipes = MachineRecipes.instance().getCMBRecipes(); - for (Map.Entry recipe : recipes.entrySet()) { - this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue())); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - Map recipes = MachineRecipes.instance().getCMBRecipes(); - for (Map.Entry recipe : recipes.entrySet()) { - if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result)) - this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue())); - } - } - - @Override - public void loadUsageRecipes(String inputId, Object... ingredients) { - if ((inputId.equals("cmbsmelting")) && getClass() == CMBFurnaceRecipeHandler.class) { - loadCraftingRecipes("cmbsmelting", new Object[0]); - } else { - super.loadUsageRecipes(inputId, ingredients); - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - Map recipes = MachineRecipes.instance().getCMBRecipes(); - for (Map.Entry recipe : recipes.entrySet()) { - if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[0]) || NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[1])) - this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue())); - } - } - - @Override - public Class getGuiClass() { - //return GUITestDiFurnace.class; - return null; - } - - @Override - public void loadTransferRects() { - transferRectsGui = new LinkedList(); - guiGui = new LinkedList>(); - - transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6 + 18, 23, 24, 18), "cmbsmelting")); - transferRectsGui.add(new RecipeTransferRect(new Rectangle(74 + 6 + 18, 23, 24, 18), "cmbsmelting")); - guiGui.add(GUIMachineCMBFactory.class); - RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects); - RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui); - } - - @Override - public void drawExtras(int recipe) { - - drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 36, 86, 16, 18 * 3 - 2, 480, 7); - drawProgressBar(83 - (18 * 4) - 9 + 1 + 18, 6, 36 + 48, 86, 16, 18 * 3 - 2, 480, 7); - - drawProgressBar(83 - 3 + 16, 5 + 18, 100, 118, 24, 16, 48, 0); - } - - @Override - public TemplateRecipeHandler newInstance() { - return super.newInstance(); - } - -} diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index a1b32bf65..41d03f7bd 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -32,7 +32,6 @@ public class NEIConfig implements IConfigureNEI { registerHandler(new CentrifugeRecipeHandler()); registerHandler(new GasCentrifugeRecipeHandler()); registerHandler(new BreederRecipeHandler()); - registerHandler(new CMBFurnaceRecipeHandler()); registerHandler(new CyclotronRecipeHandler()); registerHandler(new AssemblerRecipeHandler()); registerHandler(new RefineryRecipeHandler()); diff --git a/src/main/java/com/hbm/render/entity/item/RenderTrainCargoTram.java b/src/main/java/com/hbm/render/entity/item/RenderTrainCargoTram.java index 5612b2a93..8e097ac2b 100644 --- a/src/main/java/com/hbm/render/entity/item/RenderTrainCargoTram.java +++ b/src/main/java/com/hbm/render/entity/item/RenderTrainCargoTram.java @@ -2,7 +2,6 @@ package com.hbm.render.entity.item; import org.lwjgl.opengl.GL11; -import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; import net.minecraft.client.renderer.entity.Render; diff --git a/src/main/resources/assets/hbm/textures/models/machines/fan.png b/src/main/resources/assets/hbm/textures/models/machines/fan.png index 003223c2f3e52f86f8a15732a73970e6b1d9299e..a2abda82d65b03a0e558df88393cdf5efefa35dd 100644 GIT binary patch delta 771 zcmV+e1N{8Y1*-;-G=JhrL_t(og~gY@PuoBg$3Nzm+=$jF9y(S+YS(5$>V_&Yc8p*n z1Kp4SF_j@h7A6KH#KOb|vl%K_*g7Dj%yi-pxX4yf8pWXN5bkO_wv)3{`dysZe)qZe z?%jJnt5&N?N~qm#TPE+%04yvl=o_|ek2LD_dI0#oZ!|d#1b?``zBZca^73+_$V?S6 zDx<={aY8>)U{Os$@!1y9%;;D0wYIjVljrR0Y-Hk<4(Y?gL+tv`f%Eh8W5Xr_d~pv= zVDOwYs#KXs*<4&)SOA{q$ws3g8;wS8;!JEG3L$V^cjS9ktyYuK;tl!xG8zrv_u1aw z&IKero>7KHHGhs*QN4I+`+xoL`1p8e5XW%<2!de9aBpwV7#0I2XDftA{qMT&(6d6o zv_bOj740y&!24DUfOpMip}{kOwr#Vtv;+)7>o^WK^*SrnD$evY;pHXW&CQ7b^|tVR zU$5g$z0QY91%Tk`iSFGUm7}A{0$~u=yNwME6Jdyy5`Phf8Y+aCY|^;1vxJL_0K5Sn zpRXYhJU$i%WdhmRA$R^Iyo&*oNuxG<^tY0f#ZL#iA4WI60w}Mglyo{Bs?{o;P6uUE z7#JNqspx$L%X&VJO7}x`dh$F^3L%F2Us9#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