From eb98f5a844664224c36d59fda9694ff78210d4f7 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 13 Jun 2017 01:14:17 +0200 Subject: [PATCH] Cyber Crab, electricity pylon --- assets/hbm/textures/entity/Crab.png | Bin 0 -> 602 bytes .../items/wire_red_copper - Kopie.png | Bin 250 -> 0 bytes .../hbm/textures/items/wiring_red_copper.png | Bin 0 -> 273 bytes com/hbm/blocks/ModBlocks.java | 4 + com/hbm/blocks/machine/PylonRedWire.java | 21 ++ com/hbm/entity/mob/EntityCyberCrab.java | 195 ++++++++++++++++++ com/hbm/items/ModItems.java | 8 + com/hbm/items/tool/ItemWiring.java | 16 ++ com/hbm/lib/Library.java | 26 +++ com/hbm/main/ClientProxy.java | 3 + com/hbm/main/MainRegistry.java | 4 + com/hbm/render/entity/RenderCyberCrab.java | 43 ++++ com/hbm/render/entity/RenderMiniMIRV.java | 4 +- com/hbm/render/model/ModelCrab.java | 182 ++++++++++++++++ .../tileentity/TileEntityPylonRedWire.java | 164 +++++++++++++++ 15 files changed, 668 insertions(+), 2 deletions(-) create mode 100755 assets/hbm/textures/entity/Crab.png delete mode 100644 assets/hbm/textures/items/wire_red_copper - Kopie.png create mode 100644 assets/hbm/textures/items/wiring_red_copper.png create mode 100644 com/hbm/blocks/machine/PylonRedWire.java create mode 100644 com/hbm/entity/mob/EntityCyberCrab.java create mode 100644 com/hbm/items/tool/ItemWiring.java create mode 100644 com/hbm/render/entity/RenderCyberCrab.java create mode 100755 com/hbm/render/model/ModelCrab.java create mode 100644 com/hbm/tileentity/TileEntityPylonRedWire.java diff --git a/assets/hbm/textures/entity/Crab.png b/assets/hbm/textures/entity/Crab.png new file mode 100755 index 0000000000000000000000000000000000000000..6d75c19663fa0661e43ec8f6e81ada512cb223a2 GIT binary patch literal 602 zcmV-g0;TPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0n155K~!i%?UzB0 z!Y~X)IRQfIo;@dEU$O3*eUCQ>nPV~f)&CjSBtw#xR*do_i^j1N+c6Cs8X4U0_XlJc zhDoTN(f9q6-ugiNm}WEVUQ}iCeL4l7>-AdfpTq_g3rxvl)1@1a<2daFp(>lN<1zTe z4x}0cwIr|->|Rv81SgN=eE}f;P;8fE^X>v*P3__Lf~fN}rrUb>4J6V_ZnxV^q~|gX zk3UI2rrGBc>jEXIE=hGutgATH*bU#JIz8yn##B!&UV37e%jE&#Fpzs~!S{SV7yHAn z>$<#HZSq0|;4rX80Tev0tDHo{mv1;OBxW=Uk{rNrL~)xY2rB}$f40nPijHm3uy;bWuG_(1f6;V@8gPv^Xt zJn;GJo?beiO)LR>&(_@2uaHmbEe)Nup*o;B3DtEhU8KfeKD!mbZV(fiC5ic1p;;2y z?N)$BqtURW{#MrF*D76G@vIrsrug3uADc)mz5uU&OzlqTR{*x~kx)G$om$whTe8pF zutEEPsh$FbSlg|zF;Vru@I_U^O4=tb9mM-KiZ~p80CB?v@!76uR{#J207*qoM6N<$ of&c&j7<5HgbWLw$Wo!UcWn*Y=WiL*3Yh`jTP(yNIVjpW;%W~BZcmMzZ literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/wire_red_copper - Kopie.png b/assets/hbm/textures/items/wire_red_copper - Kopie.png deleted file mode 100644 index b1c1ff47a6d5ead8846ced56e5e086703eaba6a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33 zJ=4@yqg0@pY)==*5DWjM=MM5VC;5D|We*R1hof;stGbWgmyl@Q5niEv1KX8<&N7~CsLgv-|cD3 z4qe-@sNqgj*Q2W$ydQcbmkA!crtE3dwD$O$8h4j~&=66 uoteab = new ArrayList(); + public List connected = new ArrayList(); + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + int[] conX = nbt.getIntArray("conX"); + int[] conY = nbt.getIntArray("conY"); + int[] conZ = nbt.getIntArray("conZ"); + if(conX.length == conY.length && conY.length == conZ.length) + { + int[][] con = new int[conX.length][3]; + + for(int i = 0; i < conX.length; i++) { + con[i][0] = conX[i]; + con[i][1] = conY[i]; + con[i][2] = conZ[i]; + } + + this.connected = this.convertArrayToList(con); + } else { + throw new RuntimeException(this.getClass() + " failed to read connected electricity poles from NBT!"); + } + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + int[] conX = new int[this.connected.size()]; + int[] conY = new int[this.connected.size()]; + int[] conZ = new int[this.connected.size()]; + + for(int i = 0; i < this.connected.size(); i++) { + conX[i] = this.connected.get(i).xCoord; + conY[i] = this.connected.get(i).yCoord; + conZ[i] = this.connected.get(i).zCoord; + } + + nbt.setIntArray("conX", conX); + nbt.setIntArray("conY", conY); + nbt.setIntArray("conZ", conZ); + } + + public List convertArrayToList(int[][] array) { + + List list = new ArrayList(); + + for(int i = 0; i < array.length; i++) { + TileEntity te = worldObj.getTileEntity(array[i][0], array[i][1], array[i][2]); + if(te != null && te instanceof TileEntityPylonRedWire) + list.add((TileEntityPylonRedWire)te); + } + + return list; + } + + public int[][] convertListToArray(List list) { + + int[][] array = new int[list.size()][3]; + + for(int i = 0; i < list.size(); i++) { + TileEntity te = list.get(i); + array[i][0] = te.xCoord; + array[i][1] = te.yCoord; + array[i][2] = te.zCoord; + } + + return array; + } + + /*@Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() + { + return 65536.0D; + }*/ + + /*Princess cards she sends me with her regards, + Oh, bar-room eyes shine vacancy + To see her you gotta look hard + Wounded deep in battle, I stand stuffed like some soldier undaunted + To her cheshire smile I'll stand on file + She's all I ever wanted + You let your blue walls stand in the way of these facts, honey + Get your carpet baggers off my back + Girl give me time to cover my tracks + You said, "Here's your mirror and your ball and jacks" + But they're not what I came for + Oh I came for so much more + And I know you that too + And I know you know that's true + + I came for you + I came for you + I came for you + For you + I came for you + + Crawl into my ambulance + Your pulse is getting weak + Reveal yourself all to me now + While you've got the strength to speak + 'Cause they're waiting for you at Bellevue + With their oxygen masks + But I could give it all to you now + If only you could ask + Don't call for your surgeon + Even he says it's late + It's not your lungs this time + But your heart holds your fate + Don't give me my money back + Don't want it anymore + It's not that nursery mouth I came back for + It's not the way you're stretched out on the floor + I've broken all your windows + And I've rammed through all your doors + Who am I to ask you to fight my wars + And you should know that's true + You should know that too + + I came for you + I came for you + I came for you + For you + I came for you + + Don't call for your surgeon + Even he says it's late + It's not your lungs this time + But your heart holds your fate + Don't give me my money back + Don't want it anymore + It's not that nursery mouth I came back for + It's not the way you're stretched out on the floor + I've broken all your windows + And I've rammed through all your doors + Who am I to ask you to fight my wars + You should know that's true + You should know that too + + I came for you + I came for you + I came for you + For you + I came for you*/ + +}