From 48b1fc796b7c47caad8bb00b6e767a7f49b41dfd Mon Sep 17 00:00:00 2001 From: Mary Hopson Date: Sun, 14 Dec 2025 15:44:19 -0500 Subject: [PATCH 1/3] Fix weirdness with TE bindings --- .../fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java index 764354f9..afb1dde5 100644 --- a/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java @@ -88,7 +88,6 @@ public class UtilitiesInExcess { @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { - GameRegistry.registerTileEntity(TileEntitySpike.class, "utilitiesinexcess:TileEntitySpike"); proxy.preInit(event); } @@ -103,6 +102,7 @@ public void init(FMLInitializationEvent event) { .bus() .register(new FMLEventHandler()); + GameRegistry.registerTileEntity(TileEntitySpike.class, "TileEntitySpikeUIE"); GameRegistry.registerTileEntity(TileEntityRedstoneClock.class, "TileEntityRedstoneClockUIE"); GameRegistry.registerTileEntity(TileEntityTrashCanItem.class, "TileEntityTrashCanItemUIE"); GameRegistry.registerTileEntity(TileEntityTrashCanFluid.class, "TileEntityTrashCanFluidUIE"); @@ -116,9 +116,6 @@ public void init(FMLInitializationEvent event) { GameRegistry.registerTileEntity(TileEntityRadicallyReducedChest.class, "TileEntityRadicallyReducedChestUIE"); GameRegistry.registerTileEntity(TileEntitySoundMuffler.class, "TileEntitySoundMufflerUIE"); GameRegistry.registerTileEntity(TileEntityRainMuffler.class, "TileEntityRainMufflerUIE"); - GameRegistry.registerTileEntity(TileEntityBlockUpdateDetector.class, "TileEntityBlockUpdateDetector"); - GameRegistry.registerTileEntity(TileEntityConveyor.class, "TileEntityConveyor"); - GameRegistry.registerTileEntity(TileEntityPortalUnderWorld.class, "TileEntityPortalUnderWorld"); GameRegistry.registerTileEntity(TileEntityBlockUpdateDetector.class, "TileEntityBlockUpdateDetectorUIE"); GameRegistry.registerTileEntity(TileEntityConveyor.class, "TileEntityConveyorUIE"); GameRegistry.registerTileEntity(TileEntityPortalUnderWorld.class, "TileEntityPortalUnderWorldUIE"); From 043ccf3aef75d4401669a77679b8f93297ed36e5 Mon Sep 17 00:00:00 2001 From: Mary Hopson Date: Sun, 14 Dec 2025 15:44:29 -0500 Subject: [PATCH 2/3] Switch to json model --- .../common/blocks/BlockSpike.java | 13 +- .../blockstates/diamond_spike.json | 5 + .../blockstates/gold_spike.json | 5 + .../blockstates/iron_spike.json | 5 + .../blockstates/wood_spike.json | 5 + .../models/blocks/diamond_spike.json | 6 + .../models/blocks/gold_spike.json | 6 + .../models/blocks/iron_spike.json | 6 + .../models/blocks/wood_spike.json | 166 ++++++++++++++++++ .../textures/blocks/models/diamond_spike.png | Bin 243 -> 1016 bytes .../textures/blocks/models/wood_spike.png | Bin 759 -> 533 bytes 11 files changed, 210 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/assets/utilitiesinexcess/blockstates/diamond_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/blockstates/gold_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/blockstates/iron_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/blockstates/wood_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/models/blocks/diamond_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/models/blocks/gold_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/models/blocks/iron_spike.json create mode 100644 src/main/resources/assets/utilitiesinexcess/models/blocks/wood_spike.json diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockSpike.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockSpike.java index 822d4fa1..923d29bf 100644 --- a/src/main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockSpike.java +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/common/blocks/BlockSpike.java @@ -1,7 +1,5 @@ package com.fouristhenumber.utilitiesinexcess.common.blocks; -import static com.fouristhenumber.utilitiesinexcess.UtilitiesInExcess.spikeRenderID; - import java.util.ArrayList; import java.util.List; @@ -21,6 +19,7 @@ import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntitySpike; import com.google.common.collect.Multimap; +import com.gtnewhorizon.gtnhlib.client.model.ModelISBRH; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -126,18 +125,18 @@ public boolean hasTileEntity(int meta) { } @Override - public boolean renderAsNormalBlock() { - return false; + public int getRenderType() { + return ModelISBRH.JSON_ISBRH_ID; } @Override - public boolean isOpaqueCube() { + public boolean renderAsNormalBlock() { return false; } @Override - public int getRenderType() { - return spikeRenderID; + public boolean isOpaqueCube() { + return false; } private final static IIcon[] icons = new IIcon[4]; diff --git a/src/main/resources/assets/utilitiesinexcess/blockstates/diamond_spike.json b/src/main/resources/assets/utilitiesinexcess/blockstates/diamond_spike.json new file mode 100644 index 00000000..c04b7bb6 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/blockstates/diamond_spike.json @@ -0,0 +1,5 @@ +{ + "variants": { + "meta=0": { "model": "utilitiesinexcess:blocks/diamond_spike"} + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/blockstates/gold_spike.json b/src/main/resources/assets/utilitiesinexcess/blockstates/gold_spike.json new file mode 100644 index 00000000..4a2dd8d0 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/blockstates/gold_spike.json @@ -0,0 +1,5 @@ +{ + "variants": { + "meta=0": { "model": "utilitiesinexcess:blocks/gold_spike"} + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/blockstates/iron_spike.json b/src/main/resources/assets/utilitiesinexcess/blockstates/iron_spike.json new file mode 100644 index 00000000..d2c2d4d9 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/blockstates/iron_spike.json @@ -0,0 +1,5 @@ +{ + "variants": { + "meta=0": { "model": "utilitiesinexcess:blocks/iron_spike"} + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/blockstates/wood_spike.json b/src/main/resources/assets/utilitiesinexcess/blockstates/wood_spike.json new file mode 100644 index 00000000..02db5b76 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/blockstates/wood_spike.json @@ -0,0 +1,5 @@ +{ + "variants": { + "meta=0": { "model": "utilitiesinexcess:blocks/wood_spike"} + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/models/blocks/diamond_spike.json b/src/main/resources/assets/utilitiesinexcess/models/blocks/diamond_spike.json new file mode 100644 index 00000000..389884a7 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/models/blocks/diamond_spike.json @@ -0,0 +1,6 @@ +{ + "parent": "utilitiesinexcess:blocks/wood_spike", + "textures": { + "0": "utilitiesinexcess:models/diamond_spike" + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/models/blocks/gold_spike.json b/src/main/resources/assets/utilitiesinexcess/models/blocks/gold_spike.json new file mode 100644 index 00000000..378b19f6 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/models/blocks/gold_spike.json @@ -0,0 +1,6 @@ +{ + "parent": "utilitiesinexcess:blocks/wood_spike", + "textures": { + "0": "utilitiesinexcess:models/gold_spike" + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/models/blocks/iron_spike.json b/src/main/resources/assets/utilitiesinexcess/models/blocks/iron_spike.json new file mode 100644 index 00000000..17173d72 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/models/blocks/iron_spike.json @@ -0,0 +1,6 @@ +{ + "parent": "utilitiesinexcess:blocks/wood_spike", + "textures": { + "0": "utilitiesinexcess:models/iron_spike" + } +} diff --git a/src/main/resources/assets/utilitiesinexcess/models/blocks/wood_spike.json b/src/main/resources/assets/utilitiesinexcess/models/blocks/wood_spike.json new file mode 100644 index 00000000..a865a138 --- /dev/null +++ b/src/main/resources/assets/utilitiesinexcess/models/blocks/wood_spike.json @@ -0,0 +1,166 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "utilitiesinexcess:models/wood_spike" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [4, 11, 8, 11.5], "texture": "#0"}, + "east": {"uv": [4, 11.5, 8, 12], "texture": "#0"}, + "south": {"uv": [0, 11, 4, 11.5], "texture": "#0"}, + "west": {"uv": [0, 11.5, 4, 12], "texture": "#0"}, + "up": {"uv": [8, 16, 4, 12], "texture": "#0"}, + "down": {"uv": [4, 12, 0, 16], "texture": "#0"} + } + }, + { + "from": [1, 2, 1], + "to": [7, 4, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 1]}, + "faces": { + "north": {"uv": [8.5, 12.5, 10, 13], "texture": "#0"}, + "east": {"uv": [8.5, 13.5, 10, 14], "texture": "#0"}, + "south": {"uv": [8.5, 13, 10, 13.5], "texture": "#0"}, + "west": {"uv": [8.5, 14, 10, 14.5], "texture": "#0"}, + "up": {"uv": [10, 16, 8.5, 14.5], "texture": "#0"} + } + }, + { + "from": [1, 2, 9], + "to": [7, 4, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 9]}, + "faces": { + "north": {"uv": [10.5, 12.5, 12, 13], "texture": "#0"}, + "east": {"uv": [10.5, 13.5, 12, 14], "texture": "#0"}, + "south": {"uv": [10.5, 13, 12, 13.5], "texture": "#0"}, + "west": {"uv": [10.5, 14, 12, 14.5], "texture": "#0"}, + "up": {"uv": [12, 16, 10.5, 14.5], "texture": "#0"} + } + }, + { + "from": [9, 2, 1], + "to": [15, 4, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 1]}, + "faces": { + "north": {"uv": [12.5, 12.5, 14, 13], "texture": "#0"}, + "east": {"uv": [12.5, 13.5, 14, 14], "texture": "#0"}, + "south": {"uv": [12.5, 13, 14, 13.5], "texture": "#0"}, + "west": {"uv": [12.5, 14, 14, 14.5], "texture": "#0"}, + "up": {"uv": [14, 16, 12.5, 14.5], "texture": "#0"} + } + }, + { + "from": [9, 2, 9], + "to": [15, 4, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 9]}, + "faces": { + "north": {"uv": [14.5, 12.5, 16, 13], "texture": "#0"}, + "east": {"uv": [14.5, 13.5, 16, 14], "texture": "#0"}, + "south": {"uv": [14.5, 13, 16, 13.5], "texture": "#0"}, + "west": {"uv": [14.5, 14, 16, 14.5], "texture": "#0"}, + "up": {"uv": [16, 16, 14.5, 14.5], "texture": "#0"} + } + }, + { + "from": [2, 4, 2], + "to": [6, 7, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [8.75, 8, 9.75, 8.75], "texture": "#0"}, + "east": {"uv": [8.75, 9.5, 9.75, 10.25], "texture": "#0"}, + "south": {"uv": [8.75, 8.75, 9.75, 9.5], "texture": "#0"}, + "west": {"uv": [8.75, 10.25, 9.75, 11], "texture": "#0"}, + "up": {"uv": [9.75, 12, 8.75, 11], "texture": "#0"} + } + }, + { + "from": [10, 4, 2], + "to": [14, 7, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 1]}, + "faces": { + "north": {"uv": [12.75, 8, 13.75, 8.75], "texture": "#0"}, + "east": {"uv": [12.75, 9.5, 13.75, 10.25], "texture": "#0"}, + "south": {"uv": [12.75, 8.75, 13.75, 9.5], "texture": "#0"}, + "west": {"uv": [12.75, 10.25, 13.75, 11], "texture": "#0"}, + "up": {"uv": [13.75, 12, 12.75, 11], "texture": "#0"} + } + }, + { + "from": [2, 4, 10], + "to": [6, 7, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 9]}, + "faces": { + "north": {"uv": [10.75, 8, 11.75, 8.75], "texture": "#0"}, + "east": {"uv": [10.75, 9.5, 11.75, 10.25], "texture": "#0"}, + "south": {"uv": [10.75, 8.75, 11.75, 9.5], "texture": "#0"}, + "west": {"uv": [10.75, 10.25, 11.75, 11], "texture": "#0"}, + "up": {"uv": [11.75, 12, 10.75, 11], "texture": "#0"} + } + }, + { + "from": [10, 4, 10], + "to": [14, 7, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 9]}, + "faces": { + "north": {"uv": [14.75, 8, 15.75, 8.75], "texture": "#0"}, + "east": {"uv": [14.75, 9.5, 15.75, 10.25], "texture": "#0"}, + "south": {"uv": [14.75, 8.75, 15.75, 9.5], "texture": "#0"}, + "west": {"uv": [14.75, 10.25, 15.75, 11], "texture": "#0"}, + "up": {"uv": [15.75, 12, 14.75, 11], "texture": "#0"} + } + }, + { + "from": [3, 7, 3], + "to": [5, 12, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 5, 1]}, + "faces": { + "north": {"uv": [9, 2, 9.5, 3.25], "texture": "#0"}, + "east": {"uv": [9, 4.5, 9.5, 5.75], "texture": "#0"}, + "south": {"uv": [9, 3.25, 9.5, 4.5], "texture": "#0"}, + "west": {"uv": [9, 5.75, 9.5, 7], "texture": "#0"}, + "up": {"uv": [9.5, 7.5, 9, 7], "texture": "#0"} + } + }, + { + "from": [3, 7, 11], + "to": [5, 12, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 5, 9]}, + "faces": { + "north": {"uv": [11, 2, 11.5, 3.25], "texture": "#0"}, + "east": {"uv": [11, 4.5, 11.5, 5.75], "texture": "#0"}, + "south": {"uv": [11, 3.25, 11.5, 4.5], "texture": "#0"}, + "west": {"uv": [11, 5.75, 11.5, 7], "texture": "#0"}, + "up": {"uv": [11.5, 7.5, 11, 7], "texture": "#0"} + } + }, + { + "from": [11, 7, 3], + "to": [13, 12, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 5, 1]}, + "faces": { + "north": {"uv": [13, 2, 13.5, 3.25], "texture": "#0"}, + "east": {"uv": [13, 4.5, 13.5, 5.75], "texture": "#0"}, + "south": {"uv": [13, 3.25, 13.5, 4.5], "texture": "#0"}, + "west": {"uv": [13, 5.75, 13.5, 7], "texture": "#0"}, + "up": {"uv": [13.5, 7.5, 13, 7], "texture": "#0"} + } + }, + { + "from": [11, 7, 11], + "to": [13, 12, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 5, 9]}, + "faces": { + "north": {"uv": [15, 2, 15.5, 3.25], "texture": "#0"}, + "east": {"uv": [15, 4.5, 15.5, 5.75], "texture": "#0"}, + "south": {"uv": [15, 3.25, 15.5, 4.5], "texture": "#0"}, + "west": {"uv": [15, 5.75, 15.5, 7], "texture": "#0"}, + "up": {"uv": [15.5, 7.5, 15, 7], "texture": "#0"} + } + } + ] +} diff --git a/src/main/resources/assets/utilitiesinexcess/textures/blocks/models/diamond_spike.png b/src/main/resources/assets/utilitiesinexcess/textures/blocks/models/diamond_spike.png index f58014979f0c5e51ddd0f1f05adc9fd350dfd357..39643a74db85abfeb35e0df288768e8cd7140f52 100644 GIT binary patch delta 982 zcmV;{11bFT0r&@yFni%AJyHQlS(HCjl);6i87- zg^=iJ`6p6b3MiDF5Q>CAX+S~>S}BA`n_?+8(QOD5ug5c{@Q?NG`cNXD zy_PahI$3+q?=KTI5;>sI1B{G4r!L@`^MfmZvWA68d*cTefoZa2mL$FLgLA;qIO5v*gWmYTIlwhR*92V?bWPAT z!5;a+IlwhR*92V?bWN~NesB(OP0%&Lm%ItSe{hjEqjSCSgDZft=6@&9HSh4ULF{?} zYxw@#jPV$JNq^)^)LZY0uK8i@0;3V1U49LK8-GoD;fGZKA-M79A0Pz5Xb;^3KdfCK zj=}dK2nj?(Iy>Np<2jr>+MdXZ=&ygU@@gDc_XR?1PoM){a&VE4FMnSJAo4s8WssA_bF=bVW=3aO z@niY?BTP!>~ct1s}$mDd~H@@dDsB(nrU zploq9hDb_OtwTq?&mv9N?3?>X(pq2O=DoX({i17LmK6zvVDd}>aA~7b^?Lx6UGH0M z^}BTdpsYn1!=)euU|~}BeOcMLytzK1g-P>@`hR{q{SX{b<<%HwIw@9Z_5Q3}y{O20 z^@6b|Kr8*u9U$_-AIgBKF}(fCdG0)YLLFsx%UsV>oxfmAHH4#f`kgzVsKzRv`Ma}C z%hsz_TK=c`-?Y~6+yTIT@$KknFIwBms2yZ zbFG=giaSrAFxPsum!FZosgQl}vOZ9qW!3gYv2x|$fBp9#W;&@(dEl|Ao%h@5Pb(xn z@RBTJVbc7Jo~A6)v^vkPy0>ATYNpGWMNhH>ljeV1C$!eruvy4Hc){&k&Hqvrj#e2T z?V-yrFIkpPAWidYIBJwXxBk5kb1&Y$l{ISKx!x)NA6kKg#@%d!TmS$707*qoM6N<$ Ef-(8#4FCWD delta 203 zcmeyt{+V%tK|RA-PZ!6KiaBp@L~|W75MaF!wuxi=V(#m2cX0m=oZ$4r`K-w~%lVC$ z9+u6}lx$!A`D>Z{y%@jag%JtAVzRwoud%FIKgDk9E%BPU^|LsL^vX_xv7``0rL$_vuP_AZS9R( zy5R%k8{IA5iJB2n5ziQNSX8yx%&xKVaGZ+Up)g%%(i-EwGc~SkMYB%dEUr(}3h-k+ zWyrih#+U(26|$MEyKndTR-C^Q-(4Ywr!yD>{8$qA*uSaY?VMHhQsvQwTy6);G=?e4 z=Nft~Qm^VV2J}fXJnb-k@TulS)}bZQOkkq~uk*# zZrZi#=`nV1y>az;&VfbU#tSkYhU{A5e8E4*_F>9&C-LbGD@%@EO?=PO%*99QRTI`)z0O+x{}fD<2J@dS$0i%RcqAln{dufx$^6KYLN*cIIbQvTjvw6d zrmR1(?fv`G`>U%D&70>my_{R;{LWiD>k}_(%ZnRpIBzTN`rorBd&7g%fiEwXeco_I z@`B9`XUVR#@|YbgORh?(Exdj{=IigQn7Ut4G95RWN*``H_BfwY>uy?;z@f;$8BhM_ zCIJIT@y}5mh2ucFW$h|;#cR5Z0*B6qC2zTqHSyIVA%T4who>vG=0$_T_LKbmtG=i5 wOH1!;ZkVIbz`*eTe|pREOdx{|6tT<Px%u}MThRCt{2n7xkLKoH0OL^Nb21eOoQ zt*=G*3V8ww9s#AG$Sb6z%nPJIJVJ^*K*TGcw9s-okPjjGD4piU8rHkq;&Hel^OKO) zUXPg_&&STT@XBH~D!`b0`_)1K%lV`LfX#M~G>Jn*oYa;7{C{N;q^FNI4bmh=cFYlV z4YFe%{DRGPUm5d-@cFmqr1EuWO~=FH;r_0?v0Co{0E524({qj=KmS~`@NzyWxWNwj z$*ZhOc`|%m`A|>w(H`^-R_h%e?(fRQlR=)I!#pACn#y>y-D9)eqh~r5rPCxnTZ~j* zLYo%3TJJFEn}2c~iZ6E4B*tdD$00u}MtN654OMcnG8r|5{PkR2IgKMPt68 zI`UH50nc2776HqBDVDjy0Lpl$`%-x+UIQ#wJ^) zbrB~)!nJA1jyZa!yYArsH8jJpe)d0X0RuPv8v_ zpT}zl$$#I$8!UVNQ}hu4@R+?+-f1^wkJ(G*zxg~I{foUO`afGAZ>i%49fYqJPm@@D zF!5e^Lx2uP?3(PmAIfq*DO|fiyptil2C!p{l=a=e2CDH?@A>tuX>21D3T Date: Sun, 14 Dec 2025 15:47:54 -0500 Subject: [PATCH 3/3] Delete old renderer --- .../utilitiesinexcess/UtilitiesInExcess.java | 4 - .../common/renderers/SpikeRenderer.java | 111 ------------------ 2 files changed, 115 deletions(-) delete mode 100644 src/main/java/com/fouristhenumber/utilitiesinexcess/common/renderers/SpikeRenderer.java diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java index afb1dde5..26f5b579 100644 --- a/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java +++ b/src/main/java/com/fouristhenumber/utilitiesinexcess/UtilitiesInExcess.java @@ -14,7 +14,6 @@ import com.fouristhenumber.utilitiesinexcess.common.recipe.RecipeLoader; import com.fouristhenumber.utilitiesinexcess.common.renderers.BlackoutCurtainsRenderer; import com.fouristhenumber.utilitiesinexcess.common.renderers.LapisAetheriusRenderer; -import com.fouristhenumber.utilitiesinexcess.common.renderers.SpikeRenderer; import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityBlockUpdateDetector; import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityConveyor; import com.fouristhenumber.utilitiesinexcess.common.tileentities.TileEntityDrum; @@ -79,7 +78,6 @@ public class UtilitiesInExcess { public static int lapisAetheriusRenderID; public static int blackoutCurtainsRenderID; - public static int spikeRenderID; @SidedProxy( clientSide = "com.fouristhenumber.utilitiesinexcess.ClientProxy", @@ -142,8 +140,6 @@ public void init(FMLInitializationEvent event) { RenderingRegistry.registerBlockHandler(new LapisAetheriusRenderer()); blackoutCurtainsRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlackoutCurtainsRenderer()); - spikeRenderID = RenderingRegistry.getNextAvailableRenderId(); - RenderingRegistry.registerBlockHandler(new SpikeRenderer()); GameRegistry.registerWorldGenerator(new WorldGenEnderLotus(), 10); diff --git a/src/main/java/com/fouristhenumber/utilitiesinexcess/common/renderers/SpikeRenderer.java b/src/main/java/com/fouristhenumber/utilitiesinexcess/common/renderers/SpikeRenderer.java deleted file mode 100644 index c40de898..00000000 --- a/src/main/java/com/fouristhenumber/utilitiesinexcess/common/renderers/SpikeRenderer.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.fouristhenumber.utilitiesinexcess.common.renderers; - -import static com.fouristhenumber.utilitiesinexcess.UtilitiesInExcess.spikeRenderID; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import com.fouristhenumber.utilitiesinexcess.utils.RenderableCube; -import com.gtnewhorizons.angelica.api.ThreadSafeISBRH; - -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; - -@ThreadSafeISBRH(perThread = false) -public class SpikeRenderer implements ISimpleBlockRenderingHandler { - - final static List cubes = new ArrayList(); - - static final int TEXTURE_SIZE = 64; - - @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, - RenderBlocks renderer) { - Tessellator t = Tessellator.instance; - IIcon icon = renderer.getBlockIcon(block); - for (RenderableCube c : cubes) { - c.draw(t, x, y, z, icon, TEXTURE_SIZE, true); - } - return true; - } - - @Override - public void renderInventoryBlock(Block block, int meta, int modelId, RenderBlocks renderer) { - Tessellator t = Tessellator.instance; - IIcon icon = renderer.getBlockIcon(block); - t.startDrawingQuads(); - for (RenderableCube c : cubes) { - c.draw(t, 0, 0, 0, icon, TEXTURE_SIZE, true); - } - t.draw(); - } - - static { - // base - cubes.add( - new RenderableCube( - 0, - 0, - 0, - 1F, - 0.0625F, - 1F, - new float[][] { { 16, 0, 31, 15 }, { 32, 0, 47, 15 }, { 0, 16, 15, 16 }, { 0, 16, 15, 16 }, - { 0, 16, 15, 16 }, { 0, 16, 15, 16 } })); - - // layer 2 plates - - float[][] layer2uv = new float[][] { { 6, 17, 11, 22 }, { 12, 17, 17, 22 }, { 0, 23, 5, 23 }, { 6, 23, 11, 23 }, - { 12, 23, 17, 23 }, { 18, 23, 23, 23 } }; - - cubes.add(new RenderableCube(0.0625F, 0.0625F, 0.0625F, 0.4375F, 0.125F, 0.4375F, layer2uv)); - - cubes.add(new RenderableCube(0.5625F, 0.0625F, 0.0625F, 0.9375F, 0.125F, 0.4375F, layer2uv)); - - cubes.add(new RenderableCube(0.0625F, 0.0625F, 0.5625F, 0.4375F, 0.125F, 0.9375F, layer2uv)); - - cubes.add(new RenderableCube(0.5625F, 0.0625F, 0.5625F, 0.9375F, 0.125F, 0.9375F, layer2uv)); - - // layer 3 plates - - float[][] layer3uv = new float[][] { { 28, 18, 31, 21 }, { 32, 18, 35, 21 }, { 24, 22, 27, 23 }, - { 28, 22, 31, 23 }, { 32, 22, 35, 23 }, { 36, 22, 39, 23 } }; - - cubes.add(new RenderableCube(0.125F, 0.125F, 0.125F, 0.375F, 0.25F, 0.375F, layer3uv)); - - cubes.add(new RenderableCube(0.625F, 0.125F, 0.125F, 0.875F, 0.25F, 0.375F, layer3uv)); - - cubes.add(new RenderableCube(0.125F, 0.125F, 0.625F, 0.375F, 0.25F, 0.875F, layer3uv)); - - cubes.add(new RenderableCube(0.625F, 0.125F, 0.625F, 0.875F, 0.25F, 0.875F, layer3uv)); - - // layer 4 plates - - float[][] layer4uv = new float[][] { { 2, 0, 3, 1 }, { 4, 0, 5, 1 }, { 0, 2, 1, 4 }, { 2, 2, 3, 4 }, - { 4, 2, 5, 4 }, { 6, 2, 7, 4 } }; - - cubes.add(new RenderableCube(0.1875F, 0.25F, 0.1875F, 0.3125F, 0.4375F, 0.3125F, layer4uv)); - - cubes.add(new RenderableCube(0.6875F, 0.25F, 0.1875F, 0.8125F, 0.4375F, 0.3125F, layer4uv)); - - cubes.add(new RenderableCube(0.1875F, 0.25F, 0.6875F, 0.3125F, 0.4375F, 0.8125F, layer4uv)); - - cubes.add(new RenderableCube(0.6875F, 0.25F, 0.6875F, 0.8125F, 0.4375F, 0.8125F, layer4uv)); - - } - - @Override - public boolean shouldRender3DInInventory(int modelId) { - return true; - } - - @Override - public int getRenderId() { - return spikeRenderID; - } -}