From 3fc90bca4446a86d4eaae770f9cb5e25802ae416 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 17 Jan 2021 22:09:22 +0100 Subject: [PATCH] some conveyor belt improvements, reworked orbital death ray --- .../java/assets/hbm/models/blocks/arrow.obj | 159 ++++++++++-------- .../hbm/textures/armor/fau_cassette.png | Bin 2862 -> 3607 bytes .../assets/hbm/textures/blocks/conveyor.png | Bin 0 -> 237 bytes .../hbm/textures/blocks/conveyor.png.mcmeta | 3 + .../assets/hbm/textures/blocks/crane_in.png | Bin 0 -> 246 bytes .../assets/hbm/textures/blocks/crane_out.png | Bin 0 -> 256 bytes .../assets/hbm/textures/blocks/crane_side.png | Bin 0 -> 177 bytes .../assets/hbm/textures/blocks/crane_top.png | Bin 0 -> 134 bytes .../textures/blocks/crate_entangled_side.png | Bin 0 -> 230 bytes .../textures/blocks/crate_entangled_top.png | Bin 0 -> 302 bytes src/main/java/com/hbm/blocks/ModBlocks.java | 2 +- .../com/hbm/blocks/network/BlockConveyor.java | 2 +- .../com/hbm/entity/item/EntityMovingItem.java | 17 +- .../hbm/entity/logic/EntityDeathBlast.java | 40 ++++- .../com/hbm/handler/EntityEffectHandler.java | 90 ++++++++++ src/main/java/com/hbm/main/ClientProxy.java | 38 ++--- .../java/com/hbm/main/ModEventHandler.java | 44 ++--- .../java/com/hbm/packet/ExtPropPacket.java | 76 +++++++++ .../java/com/hbm/packet/PacketDispatcher.java | 2 +- .../java/com/hbm/packet/RadSurveyPacket.java | 54 ------ .../com/hbm/render/block/RenderConveyor.java | 33 ++-- .../hbm/render/model/ModelArmorDigamma.java | 3 + 22 files changed, 357 insertions(+), 206 deletions(-) create mode 100644 src/main/java/assets/hbm/textures/blocks/conveyor.png create mode 100644 src/main/java/assets/hbm/textures/blocks/conveyor.png.mcmeta create mode 100644 src/main/java/assets/hbm/textures/blocks/crane_in.png create mode 100644 src/main/java/assets/hbm/textures/blocks/crane_out.png create mode 100644 src/main/java/assets/hbm/textures/blocks/crane_side.png create mode 100644 src/main/java/assets/hbm/textures/blocks/crane_top.png create mode 100644 src/main/java/assets/hbm/textures/blocks/crate_entangled_side.png create mode 100644 src/main/java/assets/hbm/textures/blocks/crate_entangled_top.png create mode 100644 src/main/java/com/hbm/handler/EntityEffectHandler.java create mode 100644 src/main/java/com/hbm/packet/ExtPropPacket.java delete mode 100644 src/main/java/com/hbm/packet/RadSurveyPacket.java diff --git a/src/main/java/assets/hbm/models/blocks/arrow.obj b/src/main/java/assets/hbm/models/blocks/arrow.obj index 52e9add4a..1652de2aa 100644 --- a/src/main/java/assets/hbm/models/blocks/arrow.obj +++ b/src/main/java/assets/hbm/models/blocks/arrow.obj @@ -1,80 +1,91 @@ -# Blender v2.76 (sub 0) OBJ File: '' +# Blender v2.79 (sub 0) OBJ File: '' # www.blender.org o Plane -v -0.250000 0.125000 -0.500000 -v 0.250000 0.125000 -0.500000 -v 0.500000 0.125000 0.000000 -v 0.000000 0.125000 0.500000 -v 0.000000 0.000000 0.500000 v -0.500000 0.000000 0.000000 -v 0.500000 0.000000 0.000000 -v 0.250000 0.000000 -0.500000 v -0.500000 0.125000 0.000000 -v -0.250000 0.000000 -0.500000 -v 0.250000 0.000000 0.000000 v -0.250000 0.125000 0.000000 -v -0.250000 0.000000 0.000000 +v 0.250000 0.000000 -0.500000 +v 0.250000 0.125000 -0.500000 v 0.250000 0.125000 0.000000 -vt 0.494975 0.819349 -vt 0.424264 0.819349 -vt 0.424264 0.638698 -vt 0.141422 1.000000 -vt 0.070711 1.000000 -vt 0.070711 0.638698 -vt 0.700000 0.510958 -vt 0.900000 0.255479 -vt 1.000000 0.638698 -vt 0.353554 1.000000 -vt 0.282843 1.000000 -vt 0.282843 0.638698 -vt 0.000000 1.000000 -vt 0.000000 0.638698 -vt 0.353554 0.819349 -vt 0.353554 0.638698 -vt 0.400000 0.255479 -vt 0.500000 0.638698 -vt 0.200000 0.510958 -vt 0.212132 1.000000 -vt 0.141422 0.638698 -vt 0.212132 0.638698 -vt 0.494975 0.638698 -vt 0.500000 0.255479 -vt 0.700000 0.000000 -vt 0.600000 0.638698 -vt 1.000000 0.127740 -vt 0.500000 0.127740 -vt 0.000000 0.255479 -vt 0.200000 0.000000 -vt 0.100000 0.638698 -vn 0.000000 0.000000 -1.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn -0.707100 0.000000 0.707100 -vn 0.707100 0.000000 0.707100 -vn 0.000000 -1.000000 0.000000 -vn -1.000000 0.000000 0.000000 -s off -f 6/1/1 9/2/1 12/3/1 -f 8/4/2 2/5/2 14/6/2 -f 14/7/3 12/8/3 4/9/3 -f 5/10/4 4/11/4 9/12/4 -f 7/5/5 3/13/5 4/14/5 -f 11/2/1 14/15/1 3/16/1 -f 11/17/6 5/18/6 13/19/6 -f 13/20/7 12/4/7 1/21/7 -f 10/22/1 1/12/1 2/11/1 -f 13/23/1 6/1/1 12/3/1 -f 11/21/2 8/4/2 14/6/2 -f 14/7/3 2/24/3 1/25/3 -f 4/9/3 3/26/3 14/7/3 -f 12/8/3 9/27/3 4/9/3 -f 14/7/3 1/25/3 12/8/3 -f 6/16/4 5/10/4 9/12/4 -f 5/6/5 7/5/5 4/14/5 -f 7/3/1 11/2/1 3/16/1 -f 11/17/6 7/28/6 5/18/6 -f 10/29/6 8/30/6 11/17/6 -f 5/18/6 6/31/6 13/19/6 -f 13/19/6 10/29/6 11/17/6 -f 10/22/7 13/20/7 1/21/7 -f 8/20/1 10/22/1 2/11/1 +v 0.000000 0.125000 0.500000 +v 0.000000 -0.000000 0.500000 +v 0.500000 0.000000 0.000000 +v 0.500000 0.125000 0.000000 +v 0.250000 0.000000 0.000000 +v -0.250000 0.000000 0.000000 +v -0.250000 0.125000 -0.500000 +v -0.250000 0.000000 -0.500000 +vt 0.333302 0.666510 +vt 0.000094 0.666510 +vt 0.000094 0.000094 +vt 0.176982 0.000077 +vt 0.353731 0.000077 +vt 0.353731 0.707075 +vt 0.250050 0.500000 +vt 0.749950 0.500000 +vt 0.500000 0.999900 +vt 0.999923 0.000077 +vt 0.999923 0.176827 +vt 0.000077 0.176827 +vt 0.000077 0.000077 +vt 0.176827 0.000077 +vt 0.176827 0.999923 +vt 0.000094 0.999906 +vt 0.000094 0.666698 +vt 0.666510 0.666698 +vt 0.749950 0.500000 +vt 0.500000 0.999900 +vt 0.250050 0.500000 +vt 0.176827 0.883979 +vt 0.000077 0.883979 +vt 0.000077 0.176982 +vt 0.000050 0.250025 +vt 0.000050 0.000050 +vt 0.999950 0.000050 +vt 0.333302 0.000094 +vt 0.176982 0.707075 +vt 0.250050 0.000100 +vt 0.749950 0.000100 +vt 0.000100 0.500000 +vt 0.999900 0.500000 +vt 0.000077 0.000077 +vt 0.000077 0.999923 +vt 0.666510 0.999906 +vt 0.999900 0.500000 +vt 0.250050 0.000100 +vt 0.749950 0.000100 +vt 0.000100 0.500000 +vt 0.176827 0.176982 +vt 0.999950 0.250025 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -0.7071 0.0000 0.7071 +vn 0.7071 0.0000 0.7071 +vn 0.0000 -1.0000 -0.0000 +vn -1.0000 0.0000 0.0000 +s 1 +f 1/1/1 2/2/1 3/3/1 +f 4/4/2 5/5/2 6/6/2 +f 6/7/3 3/8/3 7/9/3 +f 8/10/4 7/11/4 2/12/4 +f 9/13/5 10/14/5 7/15/5 +f 11/16/1 6/17/1 10/18/1 +f 11/19/6 8/20/6 12/21/6 +f 12/22/7 3/23/7 13/24/7 +f 14/25/1 13/26/1 5/27/1 +f 12/28/1 1/1/1 3/3/1 +f 11/29/2 4/4/2 6/6/2 +f 6/7/3 5/30/3 13/31/3 +f 7/9/3 10/32/3 6/7/3 +f 3/8/3 2/33/3 7/9/3 +f 6/7/3 13/31/3 3/8/3 +f 1/34/4 8/10/4 2/12/4 +f 8/35/5 9/13/5 7/15/5 +f 9/36/1 11/16/1 10/18/1 +f 11/19/6 9/37/6 8/20/6 +f 14/38/6 4/39/6 11/19/6 +f 8/20/6 1/40/6 12/21/6 +f 12/21/6 14/38/6 11/19/6 +f 14/41/7 12/22/7 13/24/7 +f 4/42/1 14/25/1 5/27/1 diff --git a/src/main/java/assets/hbm/textures/armor/fau_cassette.png b/src/main/java/assets/hbm/textures/armor/fau_cassette.png index 7cda0822cbb31c8aa6917d14ecaae6f6c9c93114..37df35c1e1069596c27b072f103062da7e78d546 100644 GIT binary patch delta 3606 zcmV+x4(ai(7MC25B!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00009a7bBm000id z000id0mpBsWB>pF7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%hhNHDpIvQUCxAh)G02 zRA@u(oB4B>)fI;!Az_iRVvDpL9oe&xeP2jOKo$XovX)I&7k`2RvWS3y5D5acN>v;c zH(Uy6JC&++NBc|b)M@QZ+v)hvoSx^r_q^OB-^2u&&LG^G&)ogK_dfUB^WOIx7|=_Q zZ>LX}|JKz>TU(o~S+hpw&YdeQEiK*hv`xBP3;hWO_p7QZgSl+kGK1OJ*w`&k+oa32 z(64Y_;r*_-IDfU&rluw-D=X`k56!QI{s!Q_R#=!?Dlm(Rin`@P^J}4>!HzxLzN`?|xT$@J07k1PQSE6(&uZ6pwLL1YdB!6~XGWf}25CO^|Wp#z}sD zzAe6_q{LLLJ{bWKOT`^boH)_i(g)F=GDJOXeT>r5Qh$rdQ%=1sCQL|08wczn57_bJ$D3#q`d>961=e4&DVfT9Q`F}N89FUiRi2@&uPVt< z_I-85hfIsIqmC=+i)fo^j96pGjy2&<5a}^v##rp`#LH3C_lghZ4A38mt%GGB@G~A z14o}2C~bWc5Wv_B`uH`? z-GN)RTQqt1#i9QdAG%o_3y&?>V{hYmpg7B| zwtuQY#U)a4*IFr84X7`4WLa7IJc}K1!0Q{=>eoeegLo( zvVk*rN!yv*c1o^7$|@>J7RyEeIMf3I-G4lDmQ=0XAmipQlp&SX$+!w_NRF0bdGHM5lmKyPh%_z&NThw?00M*y zFmWGG12DE|tTeV@p66Ch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L}{$H zSB&6aD_}qo>PTN+1bOHiSgZM3eOn{|EY%`2$H6rB46=002ovPDHLk FV1grXf_VS{ diff --git a/src/main/java/assets/hbm/textures/blocks/conveyor.png b/src/main/java/assets/hbm/textures/blocks/conveyor.png new file mode 100644 index 0000000000000000000000000000000000000000..3a84ab6209e893a668ffcee7abf01c6a7632a86c GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!3HFSYrjteQY^(zo*^7SP{WbZ0pu_7ba4!c zXnlLhmg|s%z|oKOi(F619K7_YQo4V#aRt{}+m7HU&o^Q@+k8^j{Nd_iVR5{-?eOfm zf6t0J+<%|AQ6%|Xo~%gm3@@gpUF+OU873T2S$d_Q?Qy2txtZ%;uUPde^})t_a#3ct zOXf5DusFIwuaimo#sN074F^ks3YQ-BltIMu!<>zuPj1UCKj?e8W^b&1)%(c>k<+?A`a5W)@VYZ^bJ~{h!^Ciz z0Fz?Nm1!jhMBlY`s_7`}Z;HftPAGPFJ@0vX<69c*5m! tV8yEmpQj}L;Xj&ElrY28P@UxgZ)m0=@1B(Vvw#j~@O1TaS?83{1OWJJWb*(3 literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/blocks/crane_out.png b/src/main/java/assets/hbm/textures/blocks/crane_out.png new file mode 100644 index 0000000000000000000000000000000000000000..157c24e4a77a597e37bc63ff76b26ae855a9eb91 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfPlGv$At+F-Jy_pG3C&a4U+rVlLQ$w9MIO(b^!y};n<>gTe~DWM4f Diiu>V literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/blocks/crane_side.png b/src/main/java/assets/hbm/textures/blocks/crane_side.png new file mode 100644 index 0000000000000000000000000000000000000000..7114de091b37adc35756e6e9762e5363a2ba0773 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf8bg=d#Wzp$P!wWI5;n literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/blocks/crane_top.png b/src/main/java/assets/hbm/textures/blocks/crane_top.png new file mode 100644 index 0000000000000000000000000000000000000000..de1c3261a7194b562bec9b5f6f38248c0200159d GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfIEGmC zCYKZx{5bExn9yh_BO~K+sp7!_Mm7*oD>6}jov0M4E+t`_aHYX9g+V8I0#iaFl aR))E^d6jnw`ltg9V(@hJb6Mw<&;$VAq#@`4 literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/blocks/crate_entangled_side.png b/src/main/java/assets/hbm/textures/blocks/crate_entangled_side.png new file mode 100644 index 0000000000000000000000000000000000000000..bd9e5fc2ed9fb65b37c6a951c3f32d0bbf944eaf GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfok}4gvHYI1$5*cU*zPoQ z#VbvNV;l|fjoE5FJl|`7cgX+V{Q9%;2Yp#lkrj7W_D08VZ85^25$@wjjlX3;eWIKWKoG#(Gi|Z aAJ~pg3_Q*~Ay)+GPzFy|KbLh*2~7aq)>6m- literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/blocks/crate_entangled_top.png b/src/main/java/assets/hbm/textures/blocks/crate_entangled_top.png new file mode 100644 index 0000000000000000000000000000000000000000..dc1866989d671954007b1d182626b6f1587663f9 GIT binary patch literal 302 zcmV+}0nz@6P)8*^A9!h?k zfK=KiA%VkZKidi^r5yfHnwt;~GbFAD?3{d<iw*R1C3o8Jx)CUc|%<(mi_@ zOamOEZL-aNf^^T%2g0;-C>8nJ`0Hh=^1xBO0ff$6`{arMw*UYD07*qoM6N<$f;~2R A;{X5v literal 0 HcmV?d00001 diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index b18ce42ba..7dd39cc37 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1286,7 +1286,7 @@ public class ModBlocks { gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid"); gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon"); fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon"); - conveyor = new BlockConveyor(Material.iron).setBlockName("conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_reiium"); + conveyor = new BlockConveyor(Material.iron).setBlockName("conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor"); chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain"); diff --git a/src/main/java/com/hbm/blocks/network/BlockConveyor.java b/src/main/java/com/hbm/blocks/network/BlockConveyor.java index 5a4ee956b..a1dbd97b8 100644 --- a/src/main/java/com/hbm/blocks/network/BlockConveyor.java +++ b/src/main/java/com/hbm/blocks/network/BlockConveyor.java @@ -61,7 +61,7 @@ public class BlockConveyor extends Block { @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { - return null; + return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y, z + 1); } @Override diff --git a/src/main/java/com/hbm/entity/item/EntityMovingItem.java b/src/main/java/com/hbm/entity/item/EntityMovingItem.java index b2d318bd4..ebe787a53 100644 --- a/src/main/java/com/hbm/entity/item/EntityMovingItem.java +++ b/src/main/java/com/hbm/entity/item/EntityMovingItem.java @@ -48,8 +48,8 @@ public class EntityMovingItem extends Entity { public boolean attackEntityFrom(DamageSource source, float amount) { if(!worldObj.isRemote) { - worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, this.getItemStack())); this.setDead(); + worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, this.getItemStack())); } return true; } @@ -80,7 +80,12 @@ public class EntityMovingItem extends Entity { if(worldObj.getBlock((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ)) != ModBlocks.conveyor) { this.setDead(); - worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, this.getItemStack())); + EntityItem item = new EntityItem(worldObj, posX, posY, posZ, this.getItemStack()); + item.motionX = this.motionX * 3; + item.motionY = 0.1; + item.motionZ = this.motionZ * 3; + item.velocityChanged = true; + worldObj.spawnEntityInWorld(item); return; } } @@ -104,9 +109,15 @@ public class EntityMovingItem extends Entity { motionX = -speed * dir.offsetX; motionY = -speed * dir.offsetY; motionZ = -speed * dir.offsetZ; + + this.velocityChanged = true; } + + this.lastTickPosX = this.prevPosX = this.posX; + this.lastTickPosY = this.prevPosY = this.posY; + this.lastTickPosZ = this.prevPosZ = this.posZ; - this.moveEntity(motionX, motionY, motionZ); + this.setPosition(posX + motionX, posY + motionY, posZ + motionZ); schedule--; } } diff --git a/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java b/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java index e9db9a631..e51134cb3 100644 --- a/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java +++ b/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java @@ -1,11 +1,17 @@ package com.hbm.entity.logic; -import com.hbm.explosion.ExplosionLarge; +import com.hbm.entity.projectile.EntityBulletBase; +import com.hbm.explosion.ExplosionNT; +import com.hbm.handler.BulletConfigSyncingUtil; +import com.hbm.packet.AuxParticlePacketNT; +import com.hbm.packet.PacketDispatcher; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class EntityDeathBlast extends Entity { @@ -31,8 +37,36 @@ public class EntityDeathBlast extends Entity { if(this.ticksExisted >= maxAge && !worldObj.isRemote) { this.setDead(); - - ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 25, true, true, true); + + /*new ExplosionNT(worldObj, null, posX, posY, posZ, 35).addAllAttrib(ExplosionNT.nukeAttribs).explode(); + new ExplosionNT(worldObj, null, posX + 10, posY, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode(); + new ExplosionNT(worldObj, null, posX - 10, posY, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode(); + new ExplosionNT(worldObj, null, posX, posY, posZ + 10, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode(); + new ExplosionNT(worldObj, null, posX, posY, posZ - 10, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode(); + + for(int k = 1; k < 6; k++) + new ExplosionNT(worldObj, null, posX, posY - k * 7, posZ, 20).addAllAttrib(ExplosionNT.nukeAttribs).explode();*/ + + worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(worldObj, 40, posX, posY, posZ).mute()); + + int count = 100; + for(int i = 0; i < count; i++) { + + Vec3 vec = Vec3.createVectorHelper(0.2, 0, 0); + vec.rotateAroundY((float)(2 * Math.PI * i / (float)count)); + + EntityBulletBase laser = new EntityBulletBase(worldObj, BulletConfigSyncingUtil.MASKMAN_BOLT); + laser.setPosition(posX, posY + 2, posZ); + laser.motionX = vec.xCoord; + laser.motionZ = vec.zCoord; + laser.motionY = -0.01; + worldObj.spawnEntityInWorld(laser); + } + + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "muke"); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 250)); + worldObj.playSoundEffect(posX, posY, posZ, "hbm:weapon.mukeExplosion", 25.0F, 0.9F); } } diff --git a/src/main/java/com/hbm/handler/EntityEffectHandler.java b/src/main/java/com/hbm/handler/EntityEffectHandler.java new file mode 100644 index 000000000..bc93d2745 --- /dev/null +++ b/src/main/java/com/hbm/handler/EntityEffectHandler.java @@ -0,0 +1,90 @@ +package com.hbm.handler; + +import com.hbm.config.RadiationConfig; +import com.hbm.extprop.HbmLivingProps; +import com.hbm.packet.AuxParticlePacketNT; +import com.hbm.packet.PacketDispatcher; +import com.hbm.packet.ExtPropPacket; +import com.hbm.saveddata.AuxSavedData; +import com.hbm.saveddata.RadiationSavedData; +import com.hbm.util.ContaminationUtil; + +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class EntityEffectHandler { + + public static void onUpdate(EntityLivingBase entity) { + + if(!entity.worldObj.isRemote && entity instanceof EntityPlayerMP) { + NBTTagCompound data = new NBTTagCompound(); + HbmLivingProps props = HbmLivingProps.getData(entity); + props.saveNBTData(data); + PacketDispatcher.wrapper.sendTo(new ExtPropPacket(data), (EntityPlayerMP) entity); + } + + if(HbmLivingProps.getRadiation(entity) > 0) + handleRadiation(entity); + + if(HbmLivingProps.getDigamma(entity) > 0) + handleDigamma(entity); + } + + private static void handleRadiation(EntityLivingBase entity) { + + World world = entity.worldObj; + + if(world.isRemote) + return; + + if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode) + return; + + RadiationSavedData data = RadiationSavedData.getData(world); + int ix = (int)MathHelper.floor_double(entity.posX); + int iy = (int)MathHelper.floor_double(entity.posY); + int iz = (int)MathHelper.floor_double(entity.posZ); + + if(world.getTotalWorldTime() % 20 == 0) { + + Chunk chunk = world.getChunkFromBlockCoords(ix, iz); + float rad = data.getRadNumFromCoord(chunk.xPosition, chunk.zPosition); + + if(world.provider.isHellWorld && RadiationConfig.hellRad > 0 && rad < RadiationConfig.hellRad) + rad = RadiationConfig.hellRad; + + if(rad > 0) { + ContaminationUtil.applyRadData(entity, rad); + } + + if(entity.worldObj.isRaining() && RadiationConfig.cont > 0 && AuxSavedData.getThunder(entity.worldObj) > 0 && entity.worldObj.canBlockSeeTheSky(ix, iy, iz)) { + + ContaminationUtil.applyRadData(entity, RadiationConfig.cont * 0.01F); + } + } + } + + private static void handleDigamma(EntityLivingBase entity) { + + if(!entity.worldObj.isRemote) { + + float digamma = HbmLivingProps.getDigamma(entity); + + int chance = Math.max(10 - (int)(digamma), 1); + + if(chance == 1 || entity.getRNG().nextInt(chance) == 0) { + + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "digammaDecay"); + data.setInteger("entity", entity.getEntityId()); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25)); + } + } + } +} diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index b91acc327..d3cb36366 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -12,7 +12,9 @@ import net.minecraft.client.particle.EntityReddustFX; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MovingObjectPosition; @@ -1051,29 +1053,25 @@ public class ClientProxy extends ServerProxy { player.attackedAtYaw = 0F; } - if("hadron".equals(type)) { + if("digammaDecay".equals(type)) { - /*for(int i = 0; i < 30; i++) { - - EntityFX fx = null; + Entity e = world.getEntityByID(data.getInteger("entity")); + + if(e instanceof EntityLivingBase) { - if(i % 3 == 0) { - fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.0F, 0.0F, 0.0F); - } - if(i % 3 == 1) { - fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F); - } - if(i % 3 == 2) { - fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 1F, 1F, 0.1F); - } + double ix = e.boundingBox.minX - 0.2 + (e.boundingBox.maxX - e.boundingBox.minX + 0.4) * rand.nextDouble(); + double iy = e.boundingBox.minY + (e.boundingBox.maxY - e.boundingBox.minY + 0.2) * rand.nextDouble(); + double iz = e.boundingBox.minZ - 0.2 + (e.boundingBox.maxZ - e.boundingBox.minZ + 0.4) * rand.nextDouble(); - if(fx != null) { - fx.motionX = rand.nextGaussian() * 0.1; - fx.motionY = rand.nextGaussian() * 0.1; - fx.motionZ = rand.nextGaussian() * 0.1; - Minecraft.getMinecraft().effectRenderer.addEffect(fx); - } - }*/ + + EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, 0, 0, 0, Blocks.soul_sand, 0); + ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e"); + + Minecraft.getMinecraft().effectRenderer.addEffect(fx); + } + } + + if("hadron".equals(type)) { Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z)); } diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 2e55db96b..fca62bd13 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -28,6 +28,7 @@ import com.hbm.entity.projectile.EntityMeteor; import com.hbm.extprop.HbmLivingProps; import com.hbm.extprop.HbmPlayerProps; import com.hbm.handler.BossSpawnHandler; +import com.hbm.handler.EntityEffectHandler; import com.hbm.handler.RadiationWorldHandler; import com.hbm.handler.HTTPHandler; import com.hbm.items.ModItems; @@ -39,7 +40,7 @@ import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.PlayerInformPacket; -import com.hbm.packet.RadSurveyPacket; +import com.hbm.packet.ExtPropPacket; import com.hbm.saveddata.AuxSavedData; import com.hbm.saveddata.RadiationSavedData; import com.hbm.util.ArmorUtil; @@ -91,6 +92,7 @@ import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingFallEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; @@ -222,6 +224,11 @@ public class ModEventHandler } } + @SubscribeEvent + public void onLivingUpdate(LivingUpdateEvent event) { + EntityEffectHandler.onUpdate(event.entityLiving); + } + @SubscribeEvent public void worldTick(WorldTickEvent event) { @@ -281,15 +288,6 @@ public class ModEventHandler data.worldObj = event.world; } - for(Object o : event.world.playerEntities) { - - if(o instanceof EntityPlayerMP) { - EntityPlayerMP player = (EntityPlayerMP)o; - //TODO: replace with packet that sends all to-sync data - PacketDispatcher.wrapper.sendTo(new RadSurveyPacket(HbmLivingProps.getRadiation(player)), player); - } - } - if(event.world.getTotalWorldTime() % 20 == 0 && event.phase == Phase.START) { data.updateSystem(); } @@ -297,6 +295,10 @@ public class ModEventHandler List oList = new ArrayList(); oList.addAll(event.world.loadedEntityList); + + /** + * REMOVE THIS V V V + */ for(Object e : oList) { if(e instanceof EntityLivingBase) { @@ -305,25 +307,6 @@ public class ModEventHandler if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode) continue; - - if(event.world.getTotalWorldTime() % 20 == 0) { - - Chunk chunk = entity.worldObj.getChunkFromBlockCoords((int)entity.posX, (int)entity.posZ); - float rad = data.getRadNumFromCoord(chunk.xPosition, chunk.zPosition); - - if(event.world.provider.isHellWorld && RadiationConfig.hellRad > 0 && rad < RadiationConfig.hellRad) - rad = RadiationConfig.hellRad; - - if(rad > 0) { - ContaminationUtil.applyRadData(entity, rad / 2); - } - - if(entity.worldObj.isRaining() && RadiationConfig.cont > 0 && AuxSavedData.getThunder(entity.worldObj) > 0 && - entity.worldObj.canBlockSeeTheSky(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY), MathHelper.floor_double(entity.posZ))) { - - ContaminationUtil.applyRadData(entity, RadiationConfig.cont * 0.005F); - } - } float eRad = HbmLivingProps.getRadiation(entity); @@ -445,6 +428,9 @@ public class ModEventHandler } } } + /** + * REMOVE THIS ^ ^ ^ + */ } } /// RADIATION STUFF END /// diff --git a/src/main/java/com/hbm/packet/ExtPropPacket.java b/src/main/java/com/hbm/packet/ExtPropPacket.java new file mode 100644 index 000000000..aaf18e370 --- /dev/null +++ b/src/main/java/com/hbm/packet/ExtPropPacket.java @@ -0,0 +1,76 @@ +package com.hbm.packet; + +import java.io.IOException; + +import com.hbm.extprop.HbmLivingProps; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import net.minecraft.client.Minecraft; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.PacketBuffer; + +public class ExtPropPacket implements IMessage { + + PacketBuffer buffer; + + public ExtPropPacket() { } + + public ExtPropPacket(NBTTagCompound nbt) { + + this.buffer = new PacketBuffer(Unpooled.buffer()); + + try { + buffer.writeNBTTagCompoundToBuffer(nbt); + + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void fromBytes(ByteBuf buf) { + + if (buffer == null) { + buffer = new PacketBuffer(Unpooled.buffer()); + } + buffer.writeBytes(buf); + } + + @Override + public void toBytes(ByteBuf buf) { + + if (buffer == null) { + buffer = new PacketBuffer(Unpooled.buffer()); + } + buf.writeBytes(buffer); + } + + public static class Handler implements IMessageHandler { + + @Override + @SideOnly(Side.CLIENT) + public IMessage onMessage(ExtPropPacket m, MessageContext ctx) { + + if(Minecraft.getMinecraft().theWorld == null) + return null; + + try { + + NBTTagCompound nbt = m.buffer.readNBTTagCompoundFromBuffer(); + HbmLivingProps props = HbmLivingProps.getData(Minecraft.getMinecraft().thePlayer); + props.loadNBTData(nbt); + + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + } +} diff --git a/src/main/java/com/hbm/packet/PacketDispatcher.java b/src/main/java/com/hbm/packet/PacketDispatcher.java index 24f4ef011..b60994331 100644 --- a/src/main/java/com/hbm/packet/PacketDispatcher.java +++ b/src/main/java/com/hbm/packet/PacketDispatcher.java @@ -70,7 +70,7 @@ public class PacketDispatcher { //Packet to send block break particles wrapper.registerMessage(ParticleBurstPacket.Handler.class, ParticleBurstPacket.class, i++, Side.CLIENT); //Packet to send chunk radiation info to individual players - wrapper.registerMessage(RadSurveyPacket.Handler.class, RadSurveyPacket.class, i++, Side.CLIENT); + wrapper.registerMessage(ExtPropPacket.Handler.class, ExtPropPacket.class, i++, Side.CLIENT); //Entity sound packet that keeps client and server separated wrapper.registerMessage(LoopedEntitySoundPacket.Handler.class, LoopedEntitySoundPacket.class, i++, Side.CLIENT); //Entity sound packet that keeps client and server separated diff --git a/src/main/java/com/hbm/packet/RadSurveyPacket.java b/src/main/java/com/hbm/packet/RadSurveyPacket.java deleted file mode 100644 index 932db6588..000000000 --- a/src/main/java/com/hbm/packet/RadSurveyPacket.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.hbm.packet; - -import com.hbm.extprop.HbmLivingProps; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import io.netty.buffer.ByteBuf; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; - -public class RadSurveyPacket implements IMessage { - - float rad; - - public RadSurveyPacket() - { - - } - - public RadSurveyPacket(float rad) - { - this.rad = rad; - } - - @Override - public void fromBytes(ByteBuf buf) { - - rad = buf.readFloat(); - } - - @Override - public void toBytes(ByteBuf buf) { - - buf.writeFloat(rad); - } - - public static class Handler implements IMessageHandler { - - @Override - @SideOnly(Side.CLIENT) - public IMessage onMessage(RadSurveyPacket m, MessageContext ctx) { - try { - - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - HbmLivingProps.setRadiation(player, m.rad); - - } catch (Exception x) { } - return null; - } - } -} diff --git a/src/main/java/com/hbm/render/block/RenderConveyor.java b/src/main/java/com/hbm/render/block/RenderConveyor.java index 58dc66c81..bdb915666 100644 --- a/src/main/java/com/hbm/render/block/RenderConveyor.java +++ b/src/main/java/com/hbm/render/block/RenderConveyor.java @@ -41,30 +41,23 @@ public class RenderConveyor implements ISimpleBlockRenderingHandler { public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { Tessellator tessellator = Tessellator.instance; - IIcon iicon = block.getIcon(0, world.getBlockMetadata(x, y, z)); + int meta = world.getBlockMetadata(x, y, z); tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); tessellator.setColorOpaque_F(1, 1, 1); - if (renderer.hasOverrideBlockTexture()) - { - iicon = renderer.overrideBlockTexture; - } - - float rotation = 0; - - if(world.getBlockMetadata(x, y, z) == 3) - rotation = 180F / 180F * (float)Math.PI; - - if(world.getBlockMetadata(x, y, z) == 4) - rotation = 90F / 180F * (float)Math.PI; - - if(world.getBlockMetadata(x, y, z) == 5) - rotation = 270F / 180F * (float)Math.PI; - - tessellator.addTranslation(x + 0.5F, y, z + 0.5F); - ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.arrow, iicon, tessellator, rotation, true); - tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F); + if(meta == 2) + renderer.uvRotateTop = 3; + if(meta == 3) + renderer.uvRotateTop = 0; + if(meta == 4) + renderer.uvRotateTop = 1; + if(meta == 5) + renderer.uvRotateTop = 2; + + renderer.setRenderBounds((double)0, 0.0D, (double)0, (double)1, 0.125D, (double)1); + renderer.renderStandardBlock(block, x, y, z); + renderer.uvRotateTop = 0; return true; } diff --git a/src/main/java/com/hbm/render/model/ModelArmorDigamma.java b/src/main/java/com/hbm/render/model/ModelArmorDigamma.java index d4e808b89..6410a0333 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorDigamma.java +++ b/src/main/java/com/hbm/render/model/ModelArmorDigamma.java @@ -6,6 +6,7 @@ import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; public class ModelArmorDigamma extends ModelArmorBase { @@ -43,6 +44,8 @@ public class ModelArmorDigamma extends ModelArmorBase { if(type == 1) { Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_chest); body.render(par7); + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_cassette); cassette.render(par7); Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_arm);