From 867362e5d88b12789d2fc4bf34d2a07e510ace57 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 20 Mar 2018 18:33:54 +0100 Subject: [PATCH] Solinium functionality and items, env effect base --- assets/hbm/lang/de_DE.lang | 2 + assets/hbm/lang/en_US.lang | 2 + assets/hbm/textures/gui/soliniumSchematic.png | Bin 3026 -> 3577 bytes .../hbm/textures/items/biomass_compressed.png | Bin 0 -> 460 bytes assets/hbm/textures/items/nugget_solinium.png | Bin 0 -> 186 bytes .../items/shimmer_axe_original_hd.png | Bin 0 -> 457 bytes assets/hbm/textures/items/solinium_core.png | Bin 0 -> 332 bytes .../hbm/textures/items/solinium_igniter.png | Bin 0 -> 307 bytes .../textures/items/solinium_propellant.png | Bin 0 -> 276 bytes assets/hbm/textures/models/BlastSolinium.png | Bin 0 -> 94 bytes com/hbm/blocks/bomb/NukeFleija.java | 1 - com/hbm/blocks/bomb/NukeSolinium.java | 6 +- .../entity/effect/EntityCloudSolinium.java | 84 ++++++++++++++ com/hbm/entity/logic/EntityEnvirEffect.java | 49 +++++++++ .../entity/logic/EntityEnvirEffectRad.java | 15 +++ .../entity/logic/EntityNukeExplosionMK3.java | 33 +++++- com/hbm/explosion/ExplosionNukeGeneric.java | 16 +++ com/hbm/explosion/ExplosionSolinium.java | 103 ++++++++++++++++++ com/hbm/handler/GUIHandler.java | 4 +- .../container/ContainerNukeSolinium.java | 81 ++++++++++++++ com/hbm/inventory/gui/GUINukeSolinium.java | 94 ++++++++++++++++ com/hbm/items/ModItems.java | 19 ++++ com/hbm/items/bomb/ItemSolinium.java | 20 ++++ com/hbm/items/weapon/GunBaleFlare.java | 3 - com/hbm/items/weapon/GunDefabricator.java | 6 +- com/hbm/items/weapon/GunFatman.java | 4 +- com/hbm/items/weapon/GunMIRV.java | 3 - com/hbm/items/weapon/GunRpg.java | 3 - com/hbm/main/ClientProxy.java | 1 + com/hbm/main/MainRegistry.java | 2 + .../render/entity/RenderCloudSolinium.java | 50 +++++++++ .../bomb/TileEntityNukeSolinium.java | 24 ++-- .../machine/TileEntityMachineCentrifuge.java | 4 +- 33 files changed, 590 insertions(+), 39 deletions(-) create mode 100644 assets/hbm/textures/items/biomass_compressed.png create mode 100644 assets/hbm/textures/items/nugget_solinium.png create mode 100644 assets/hbm/textures/items/shimmer_axe_original_hd.png create mode 100644 assets/hbm/textures/items/solinium_core.png create mode 100644 assets/hbm/textures/items/solinium_igniter.png create mode 100644 assets/hbm/textures/items/solinium_propellant.png create mode 100644 assets/hbm/textures/models/BlastSolinium.png create mode 100644 com/hbm/entity/effect/EntityCloudSolinium.java create mode 100644 com/hbm/entity/logic/EntityEnvirEffect.java create mode 100644 com/hbm/entity/logic/EntityEnvirEffectRad.java create mode 100644 com/hbm/explosion/ExplosionSolinium.java create mode 100644 com/hbm/inventory/container/ContainerNukeSolinium.java create mode 100644 com/hbm/inventory/gui/GUINukeSolinium.java create mode 100644 com/hbm/items/bomb/ItemSolinium.java create mode 100644 com/hbm/render/entity/RenderCloudSolinium.java diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 703799b82..2d2938ebe 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -134,6 +134,8 @@ death.attack.blender=%1$s wurde in kleine, mundgerechte Stücke geschnitten. death.attack.meteorite=%1$s wurde von einem fallenden Stein aus dem Weltall erschlagen. death.attack.boxcar=%1$s wurde von einem fallenden Güterwagon zermatscht. Autsch! death.attack.broadcast=%1$s wurde das Gehirn geschmolzen. +death.attack.ams=%1$s wurde in tödlichen Teilchen gebadet, die von der Menschheit erst benannt werden müssen. +death.attack.amsCore=%1$s wurde vom Feuer einer Singularität verdampft. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 0eac93781..14cab97d6 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -134,6 +134,8 @@ death.attack.blender=%1$s was chopped in small, bite-sized pieces. death.attack.meteorite=%1$s was hit by a falling rock from outer space. death.attack.boxcar=%1$s was smushed by a falling boxcar. Oh well. death.attack.broadcast=%1$s got their brain melted. +death.attack.ams=%1$s was bathed in deadly particles that have yet to be named by human science. +death.attack.amsCore=%1$s was vaporized in the fire of a singularity. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword diff --git a/assets/hbm/textures/gui/soliniumSchematic.png b/assets/hbm/textures/gui/soliniumSchematic.png index a2b8a8bd159db4aa8a548923d86e04796453647f..532563dc29588c2d3d169f23f1d579613ddbe8a2 100644 GIT binary patch delta 3317 zcmXw)c{tR4_s2go%vj4v%-DuV#Y46h6edZF$iA01QVPtG~B8(-nG-mLde$VxM{ygVguj_oyd0+4I8O@YT)`SjJUp2g774mXu}s!iaFYP%=fnZGlK2V73HH}yL`v2)n#;6%+S$mjHqAi!l8{V1bh^VSD%yJm*gIe zeZ=~hgIJ=GE36Ue_W~dYRm)(x7#fmk`S9Vx{eyd#ft#%pB3N{CUoTP)R2y6U zR^tX|KJ9d#FD>K7CAy5xtevQ;swx|?7Ga?jtne_Yr0znBK55|Hr=~1M*^`LJ<5Xx8 z*)ri*sSmfA4)IO-2;NTk5zb?uqRZ&Z^}W%K;mtnMs^5!?MEspXoZKb$Derg23C5KL zF%EQVR!F{}s0y(4?m`qB%?5jYY<=14<7>M-6GO;q0PN^R$k``iuc_YeQ_!c)^|+03 znx4yv@;jjKw4{vav{VdjzqyhGHQubpFS3kvx7E7^nobK4Q}JD?9g;h{l_hn~PBW{P zDd1;zc~WFtrazAf{uCw^{J}gtDD%~3(OnvY zf&VF+L!CiPSdAn64Z_II|K#l4^9x;Jl&MpC)>t~@-dRlMpN}k>D zQBcI+XQ8PX7*V?2g^wYYvyV88{~|e@RUs~yNq`wvx1|?(-0KkKi;u6u0&9;(%y|Cm z11k+8-_i_hHW=1(DXH?2A-cNlvbq)c?=MCywyi=|eZ8|5-!Ehgeq5!#-Jkpxl21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+2r+D&l>SnFcZd-ss-K~pjE2jMC8(C{G> zjPD@?oO4W$K2XVL5xoN(qbH5T4w8rA>ZLA7HQVZMRA&-a-t{@L6owf+5aDIu zZ04WdU$ncjEM-zeKTt&*>b|zo&TQt#4 z@?F5;+-L-EB(8lN;1tD@1!fcE`R9f*HEBA*nhlUG+Q4Qm+jMboj5RI}6ni}402nSM z0wnHqB3xc>x$^pM-3$J+pAkrQh_Ng^m6XVwV7#-{CDTE?@{b^rg(KCvrgpWHzXRgr zK#Elq5(nNFd7+c%f~&44HSbyWEf)v`brB=wNU*P~OTBOg(PHZs!h44@=H;Q}w@#k0 zFUKh`by~MSv$pL|8Ju$2pp(;_#rDXRInw)ZVN+Q@cHqv0yCdt*O}amv51y_(|kkCfSJj_U8+zve9(!m7l6 z@WJxlqYTzsBQ%SUP2t_lbu-^n{to6-a0B}vYixlxHxhUyXoIz02$O$uKm6jRi0nvA zqQBQi{7*5;GkI)R*^}mKl?J8gJ^s^mqtJw?< zYItomy7(l-iz6|u5;Z6WVcACW*b6mw3P&F90Jk;CU;btcb=E*7EjQp)%7x|wrdO(N z2h{TU42JA){a6jT{L;CDx%ae^99zaAiDV!OVt3R=0SE5mfGn@WF1^~Le=>$Bpc zbBGWGlOo{uTy$t8)Sv8Ys5H!(X_Hx*{AF8PP#|*-c6`5&sKbaC&tD&J4x;;iSoQ>$xLzN(={~8c#3S<<-AVM_wzeej?;D%f X^OhT!#44qszPs#gooq^XdB^=14}S5B diff --git a/assets/hbm/textures/items/biomass_compressed.png b/assets/hbm/textures/items/biomass_compressed.png new file mode 100644 index 0000000000000000000000000000000000000000..2beb95ecba0a8f970231cdef412f54ac2e907066 GIT binary patch literal 460 zcmV;-0W@m*B_R;7JklIVxIkb(#4A&z31bmm6Z6i-o8~A(m9;uLb^KD|xMW;2@2I#J}aCKMoA#~UKA0s)eyhWUIBK(99l}hFP_M?_B zUWj-ha{K38_>AawEZ;f@;)O`_p)R@|uZ_1|2n^WjF%qp~%H=Yrr$0z<4c1yFlL-LU zTC%MB4+hU8D5WTsO6=@Fp686mWBUCOiv?s^m&Jm$u{IzA93NkDb!Eu1E{~6Y+1vB+ zJV+A5;bGO?fz~m3o^x~4AxR9=>6AtzrdF%c?~h0l!*Dp{{{A;gDL2G)V1(Tz#Kzrz z0W@m)1-z)`J3JB~CqKUk!IJv-Uq|AFOF`X^#S1BlFS=jdCR;Vki_l94&4+s7&f>qZ zg#lZuuTqM$vpTg}mFw$Hk+;^mxVxD+Z{kD8=7=YMkHc_Jdr8Lt00005dr6b0autG22-AcWYvFjiey7`k0Zl50M`u5ZmEf)C@Q6t0Dw4-FV0KsA{;Y?_+Ic7b;ED&birOVHj5J6GA{KRsBXp7jf)s%&e5gDWwnu0es(YU3=^> zrBtn2dYmLlCvK7L!t=b+#OV-GYg-rDF2vWN8rv$UlxkFt9k%~|C;{N-^AG1$(RipRuqNRzyj++J-;1x0N^-I*@j|) z^+EN?tgyLIv%=0%8Z-tq8_b3pgE2E1#(@GR!njbt1Q;g@7zyJ>0VB>zeb{oMfPpZL zdVIZSMF9g^sZr)zsO|8bE1eJaJg)>!@90aRI$>*~T48IWtgtPh8nCUPYOpP#0AnA^ zvaFhXZ4_WxW3KC#M6@cZHLmLp{%my3H7)rEG2T94<7Qkd00000NkvXXu0mjf+^)uw literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/solinium_core.png b/assets/hbm/textures/items/solinium_core.png new file mode 100644 index 0000000000000000000000000000000000000000..1415985e50e720dc2902d57f556974ab636fa1e8 GIT binary patch literal 332 zcmV-S0ki&zP)tC0 z77_8wurY@J@;%Q@cF#a@R!ZULbi()V0U+Y0 zX+*LGE2U5r1=_Ynk|fCU9LLWulw~P4le@0tsH&=1Yt8eE?!FL{vn)g3_i)Z3ga9ce zy!Uu$Fo)~91^|Q*0084SF2ckb3;@o#1w0G`thHj*Ai}rcBNzZa;xJ9qCcIXniz5+n znx>FaUj2J7`RW2Xm%>^ry!Q+E>H5Y+V+?DpU+?@|^$%g)pkeX7Cn5j<002ovPDHLk FV1nn|eFgvk literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/solinium_propellant.png b/assets/hbm/textures/items/solinium_propellant.png new file mode 100644 index 0000000000000000000000000000000000000000..4de9ef12e6b794b90650202865813f2ca67f733e GIT binary patch literal 276 zcmV+v0qg#WP)+!qmh40f6gj*9hk(P)cb4%d)W7vqreILbl|xnAYOTD5dnWZbP0l+XkKY8@6n literal 0 HcmV?d00001 diff --git a/com/hbm/blocks/bomb/NukeFleija.java b/com/hbm/blocks/bomb/NukeFleija.java index e9c7e207c..d25765ae1 100644 --- a/com/hbm/blocks/bomb/NukeFleija.java +++ b/com/hbm/blocks/bomb/NukeFleija.java @@ -140,7 +140,6 @@ public class NukeFleija extends BlockContainer implements IBomb { { if (!world.isRemote) { - tetn.clearSlots(); //world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); diff --git a/com/hbm/blocks/bomb/NukeSolinium.java b/com/hbm/blocks/bomb/NukeSolinium.java index 6462a3bbf..fc4beede9 100644 --- a/com/hbm/blocks/bomb/NukeSolinium.java +++ b/com/hbm/blocks/bomb/NukeSolinium.java @@ -6,6 +6,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.effect.EntityCloudSolinium; import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; @@ -136,8 +137,6 @@ public class NukeSolinium extends BlockContainer implements IBomb { { if (!world.isRemote) { - TileEntityNukeSolinium entityn = (TileEntityNukeSolinium) world.getTileEntity(x, y, z); - entityn.clearSlots(); world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world); @@ -148,10 +147,11 @@ public class NukeSolinium extends BlockContainer implements IBomb { entity.speed = MainRegistry.blastSpeed; entity.coefficient = 1.0F; entity.waste = false; + entity.extType = 1; world.spawnEntityInWorld(entity); - EntityCloudFleija cloud = new EntityCloudFleija(world, r); + EntityCloudSolinium cloud = new EntityCloudSolinium(world, r); cloud.posX = x; cloud.posY = y; cloud.posZ = z; diff --git a/com/hbm/entity/effect/EntityCloudSolinium.java b/com/hbm/entity/effect/EntityCloudSolinium.java new file mode 100644 index 000000000..3771aadb4 --- /dev/null +++ b/com/hbm/entity/effect/EntityCloudSolinium.java @@ -0,0 +1,84 @@ +package com.hbm.entity.effect; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.Entity; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityCloudSolinium extends Entity { + + public int maxAge = 100; + public int age; + public float scale = 0; + + public EntityCloudSolinium(World p_i1582_1_) { + super(p_i1582_1_); + this.setSize(1, 4); + this.ignoreFrustumCheck = true; + this.isImmuneToFire = true; + this.age = 0; + scale = 0; + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(16, Integer.valueOf(0)); + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } + + public EntityCloudSolinium(World p_i1582_1_, int maxAge) { + super(p_i1582_1_); + this.setSize(20, 40); + this.isImmuneToFire = true; + this.setMaxAge(maxAge); + } + + @Override + public void onUpdate() { + this.age++; + this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, this.posX, this.posY + 200, this.posZ)); + + if(this.age >= this.getMaxAge()) + { + this.age = 0; + this.setDead(); + } + + this.scale++; + } + + @Override + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { + age = p_70037_1_.getShort("age"); + scale = p_70037_1_.getShort("scale"); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { + p_70014_1_.setShort("age", (short)age); + p_70014_1_.setShort("scale", (short)scale); + + } + + public void setMaxAge(int i) { + this.dataWatcher.updateObject(16, Integer.valueOf(i)); + } + + public int getMaxAge() { + return this.dataWatcher.getWatchableObjectInt(16); + } +} diff --git a/com/hbm/entity/logic/EntityEnvirEffect.java b/com/hbm/entity/logic/EntityEnvirEffect.java new file mode 100644 index 000000000..75c912a32 --- /dev/null +++ b/com/hbm/entity/logic/EntityEnvirEffect.java @@ -0,0 +1,49 @@ +package com.hbm.entity.logic; + +import net.minecraft.entity.Entity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public abstract class EntityEnvirEffect extends Entity { + + public int maxAge = 100; + public int blockRadius = 7; + public int entityRadius = 7; + public int chance = 10; + public boolean hasBlockEffect = true; + public boolean hasEntityEffect = true; + + public EntityEnvirEffect(World p_i1582_1_) { + super(p_i1582_1_); + } + + @Override + protected void entityInit() { + + } + + @Override + protected void readEntityFromNBT(NBTTagCompound nbt) { + this.ticksExisted = nbt.getInteger("lifetime"); + this.maxAge = nbt.getInteger("lifecap"); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbt) { + nbt.setInteger("lifetime", this.ticksExisted); + nbt.setInteger("lifecap", this.maxAge); + } + + public void onUpdate() { + + if(hasBlockEffect && rand.nextInt(chance) == 0) + applyBlockEffect(); + + if(hasEntityEffect && rand.nextInt(chance) == 0) + applyEntityEffect(); + } + + private void applyBlockEffect() { }; + private void applyEntityEffect() { }; + +} diff --git a/com/hbm/entity/logic/EntityEnvirEffectRad.java b/com/hbm/entity/logic/EntityEnvirEffectRad.java new file mode 100644 index 000000000..f67bcaf6a --- /dev/null +++ b/com/hbm/entity/logic/EntityEnvirEffectRad.java @@ -0,0 +1,15 @@ +package com.hbm.entity.logic; + +import net.minecraft.world.World; + +public class EntityEnvirEffectRad extends EntityEnvirEffect { + + public EntityEnvirEffectRad(World p_i1582_1_) { + super(p_i1582_1_); + } + + public void randomizeAge(int min, int max) { + this.maxAge = min + rand.nextInt(max - min); + } + +} diff --git a/com/hbm/entity/logic/EntityNukeExplosionMK3.java b/com/hbm/entity/logic/EntityNukeExplosionMK3.java index 532258587..1b8bc4bd0 100644 --- a/com/hbm/entity/logic/EntityNukeExplosionMK3.java +++ b/com/hbm/entity/logic/EntityNukeExplosionMK3.java @@ -4,6 +4,7 @@ import com.hbm.entity.effect.EntityFalloutRain; import com.hbm.explosion.ExplosionFleija; import com.hbm.explosion.ExplosionNukeAdvanced; import com.hbm.explosion.ExplosionNukeGeneric; +import com.hbm.explosion.ExplosionSolinium; import com.hbm.main.MainRegistry; import net.minecraft.entity.Entity; @@ -18,12 +19,15 @@ public class EntityNukeExplosionMK3 extends Entity { public ExplosionNukeAdvanced wst; public ExplosionNukeAdvanced vap; public ExplosionFleija expl; + public ExplosionSolinium sol; public int speed = 1; public float coefficient = 1; public float coefficient2 = 1; public boolean did = false; public boolean did2 = false; public boolean waste = true; + //Extended Type + public int extType = 0; @Override protected void readEntityFromNBT(NBTTagCompound nbt) { @@ -35,6 +39,7 @@ public class EntityNukeExplosionMK3 extends Entity { did = nbt.getBoolean("did"); did2 = nbt.getBoolean("did2"); waste = nbt.getBoolean("waste"); + extType = nbt.getInteger("extType"); long time = nbt.getLong("milliTime"); @@ -50,8 +55,15 @@ public class EntityNukeExplosionMK3 extends Entity { vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); vap.readFromNbt(nbt, "vap_"); } else { - expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); - expl.readFromNbt(nbt, "expl_"); + + if(extType == 0) { + expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + expl.readFromNbt(nbt, "expl_"); + } + if(extType == 1) { + sol = new ExplosionSolinium((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + sol.readFromNbt(nbt, "sol_"); + } } this.did = true; @@ -68,6 +80,7 @@ public class EntityNukeExplosionMK3 extends Entity { nbt.setBoolean("did", did); nbt.setBoolean("did2", did2); nbt.setBoolean("waste", waste); + nbt.setInteger("extType", extType); nbt.setLong("milliTime", System.currentTimeMillis()); @@ -79,6 +92,8 @@ public class EntityNukeExplosionMK3 extends Entity { vap.saveToNbt(nbt, "vap_"); if(expl != null) expl.saveToNbt(nbt, "expl_"); + if(sol != null) + sol.saveToNbt(nbt, "sol_"); } @@ -98,7 +113,10 @@ public class EntityNukeExplosionMK3 extends Entity { wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2); vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); } else { - expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + if(extType == 0) + expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + if(extType == 1) + sol = new ExplosionSolinium((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); } this.did = true; @@ -121,9 +139,12 @@ public class EntityNukeExplosionMK3 extends Entity { this.setDead(); } } else { - if(expl.update()) { - this.setDead(); - } + if(extType == 0) + if(expl.update()) + this.setDead(); + if(extType == 1) + if(sol.update()) + this.setDead(); } } diff --git a/com/hbm/explosion/ExplosionNukeGeneric.java b/com/hbm/explosion/ExplosionNukeGeneric.java index dd6faebf9..fb0a37a6c 100644 --- a/com/hbm/explosion/ExplosionNukeGeneric.java +++ b/com/hbm/explosion/ExplosionNukeGeneric.java @@ -628,4 +628,20 @@ public class ExplosionNukeGeneric { world.setBlock(x, y, z, ModBlocks.block_electrical_scrap); } } + + public static void solinium(World world, int x, int y, int z) { + if (!world.isRemote) { + Block b = world.getBlock(x,y,z); + Material m = b.getMaterial(); + + if(b == Blocks.grass || b == Blocks.mycelium || b == ModBlocks.waste_earth || b == ModBlocks.waste_mycelium) { + world.setBlock(x, y, z, Blocks.dirt); + return; + } + + if(m == Material.cactus || m == Material.coral || m == Material.leaves || m == Material.plants || m == Material.sponge || m == Material.vine || m == Material.gourd || m == Material.wood) { + world.setBlockToAir(x, y, z); + } + } + } } diff --git a/com/hbm/explosion/ExplosionSolinium.java b/com/hbm/explosion/ExplosionSolinium.java new file mode 100644 index 000000000..a3219c297 --- /dev/null +++ b/com/hbm/explosion/ExplosionSolinium.java @@ -0,0 +1,103 @@ +package com.hbm.explosion; + +import com.hbm.blocks.generic.DecoBlockAlt; + +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class ExplosionSolinium +{ + public int posX; + public int posY; + public int posZ; + public int lastposX = 0; + public int lastposZ = 0; + public int radius; + public int radius2; + public World worldObj; + private int n = 1; + private int nlimit; + private int shell; + private int leg; + private int element; + public float explosionCoefficient = 1.0F; + public float explosionCoefficient2 = 1.0F; + + public void saveToNbt(NBTTagCompound nbt, String name) { + nbt.setInteger(name + "posX", posX); + nbt.setInteger(name + "posY", posY); + nbt.setInteger(name + "posZ", posZ); + nbt.setInteger(name + "lastposX", lastposX); + nbt.setInteger(name + "lastposZ", lastposZ); + nbt.setInteger(name + "radius", radius); + nbt.setInteger(name + "radius2", radius2); + nbt.setInteger(name + "n", n); + nbt.setInteger(name + "nlimit", nlimit); + nbt.setInteger(name + "shell", shell); + nbt.setInteger(name + "leg", leg); + nbt.setInteger(name + "element", element); + nbt.setFloat(name + "explosionCoefficient", explosionCoefficient); + nbt.setFloat(name + "explosionCoefficient2", explosionCoefficient2); + } + + public void readFromNbt(NBTTagCompound nbt, String name) { + posX = nbt.getInteger(name + "posX"); + posY = nbt.getInteger(name + "posY"); + posZ = nbt.getInteger(name + "posZ"); + lastposX = nbt.getInteger(name + "lastposX"); + lastposZ = nbt.getInteger(name + "lastposZ"); + radius = nbt.getInteger(name + "radius"); + radius2 = nbt.getInteger(name + "radius2"); + n = nbt.getInteger(name + "n"); + nlimit = nbt.getInteger(name + "nlimit"); + shell = nbt.getInteger(name + "shell"); + leg = nbt.getInteger(name + "leg"); + element = nbt.getInteger(name + "element"); + explosionCoefficient = nbt.getFloat(name + "explosionCoefficient"); + explosionCoefficient2 = nbt.getFloat(name + "explosionCoefficient2"); + } + + public ExplosionSolinium(int x, int y, int z, World world, int rad, float coefficient, float coefficient2) + { + this.posX = x; + this.posY = y; + this.posZ = z; + + this.worldObj = world; + + this.radius = rad; + this.radius2 = this.radius * this.radius; + + this.explosionCoefficient = coefficient; + this.explosionCoefficient2 = coefficient2; + + this.nlimit = this.radius2 * 4; + } + + public boolean update() + { + breakColumn(this.lastposX, this.lastposZ); + this.shell = (int) Math.floor((Math.sqrt(n) + 1) / 2); + int shell2 = this.shell * 2; + this.leg = (int) Math.floor((this.n - (shell2 - 1) * (shell2 - 1)) / shell2); + this.element = (this.n - (shell2 - 1) * (shell2 - 1)) - shell2 * this.leg - this.shell + 1; + this.lastposX = this.leg == 0 ? this.shell : this.leg == 1 ? -this.element : this.leg == 2 ? -this.shell : this.element; + this.lastposZ = this.leg == 0 ? this.element : this.leg == 1 ? this.shell : this.leg == 2 ? -this.element : -this.shell; + this.n++; + return this.n > this.nlimit; + } + + private void breakColumn(int x, int z) + { + int dist = this.radius2 - (x * x + z * z); + if (dist > 0) + { + dist = (int) Math.sqrt(dist); + for (int y = (int)(dist / this.explosionCoefficient2); y > -dist / this.explosionCoefficient; y--) + { + ExplosionNukeGeneric.solinium(this.worldObj, this.posX + x, this.posY + y, this.posZ + z); + } + } + } +} diff --git a/com/hbm/handler/GUIHandler.java b/com/hbm/handler/GUIHandler.java index 9e2253255..f4b581f36 100644 --- a/com/hbm/handler/GUIHandler.java +++ b/com/hbm/handler/GUIHandler.java @@ -604,7 +604,7 @@ public class GUIHandler implements IGuiHandler { { if(entity instanceof TileEntityNukeSolinium) { - //return new ContainerNukeSolinium(player.inventory, (TileEntityNukeSolinium) entity); + return new ContainerNukeSolinium(player.inventory, (TileEntityNukeSolinium) entity); } return null; } @@ -1145,7 +1145,7 @@ public class GUIHandler implements IGuiHandler { { if(entity instanceof TileEntityNukeSolinium) { - //return new GUINukeSolinium(player.inventory, (TileEntityNukeSolinium) entity); + return new GUINukeSolinium(player.inventory, (TileEntityNukeSolinium) entity); } return null; } diff --git a/com/hbm/inventory/container/ContainerNukeSolinium.java b/com/hbm/inventory/container/ContainerNukeSolinium.java new file mode 100644 index 000000000..f7f79f5db --- /dev/null +++ b/com/hbm/inventory/container/ContainerNukeSolinium.java @@ -0,0 +1,81 @@ +package com.hbm.inventory.container; + +import com.hbm.tileentity.bomb.TileEntityNukeFleija; +import com.hbm.tileentity.bomb.TileEntityNukeSolinium; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerNukeSolinium extends Container { + +private TileEntityNukeSolinium nukeSol; + + public ContainerNukeSolinium(InventoryPlayer invPlayer, TileEntityNukeSolinium tedf) { + + nukeSol = tedf; + + this.addSlotToContainer(new Slot(tedf, 0, 26, 18)); + this.addSlotToContainer(new Slot(tedf, 1, 53, 18)); + this.addSlotToContainer(new Slot(tedf, 2, 107, 18)); + this.addSlotToContainer(new Slot(tedf, 3, 134, 18)); + this.addSlotToContainer(new Slot(tedf, 4, 80, 36)); + this.addSlotToContainer(new Slot(tedf, 5, 26, 54)); + this.addSlotToContainer(new Slot(tedf, 6, 53, 54)); + this.addSlotToContainer(new Slot(tedf, 7, 107, 54)); + this.addSlotToContainer(new Slot(tedf, 8, 134, 54)); + + for(int i = 0; i < 3; i++) + { + for(int j = 0; j < 9; j++) + { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); + } + } + + for(int i = 0; i < 9; i++) + { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) + { + ItemStack var3 = null; + Slot var4 = (Slot) this.inventorySlots.get(par2); + + if (var4 != null && var4.getHasStack()) + { + ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 <= 10) { + if (!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true)) + { + return null; + } + } else { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack) null); + } + else + { + var4.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return nukeSol.isUseableByPlayer(player); + } +} diff --git a/com/hbm/inventory/gui/GUINukeSolinium.java b/com/hbm/inventory/gui/GUINukeSolinium.java new file mode 100644 index 000000000..392cd11a1 --- /dev/null +++ b/com/hbm/inventory/gui/GUINukeSolinium.java @@ -0,0 +1,94 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerNukeFleija; +import com.hbm.inventory.container.ContainerNukeSolinium; +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.bomb.TileEntityNukeFleija; +import com.hbm.tileentity.bomb.TileEntityNukeSolinium; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUINukeSolinium extends GuiContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/soliniumSchematic.png"); + private TileEntityNukeSolinium testNuke; + + public GUINukeSolinium(InventoryPlayer invPlayer, TileEntityNukeSolinium tedf) { + super(new ContainerNukeSolinium(invPlayer, tedf)); + testNuke = tedf; + + this.xSize = 176; + this.ySize = 222; + } + + @Override + protected void drawGuiContainerForegroundLayer( int i, int j) { + String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName()); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + if(this.testNuke.slots[0] != null && this.testNuke.slots[0].getItem() == ModItems.solinium_igniter) + { + drawTexturedModalRect(guiLeft + 24, guiTop + 84, 0, 222, 22, 14); + } + + if(this.testNuke.slots[1] != null && this.testNuke.slots[1].getItem() == ModItems.solinium_propellant) + { + drawTexturedModalRect(guiLeft + 46, guiTop + 84, 22, 222, 18, 14); + } + + if(this.testNuke.slots[2] != null && this.testNuke.slots[2].getItem() == ModItems.solinium_propellant) + { + drawTexturedModalRect(guiLeft + 76, guiTop + 84, 52, 222, 18, 14); + } + + if(this.testNuke.slots[3] != null && this.testNuke.slots[3].getItem() == ModItems.solinium_igniter) + { + drawTexturedModalRect(guiLeft + 94, guiTop + 84, 70, 222, 22, 14); + } + + if(this.testNuke.slots[4] != null && this.testNuke.slots[4].getItem() == ModItems.solinium_core) + { + drawTexturedModalRect(guiLeft + 64, guiTop + 84, 40, 222, 12, 28); + } + + if(this.testNuke.slots[5] != null && this.testNuke.slots[5].getItem() == ModItems.solinium_igniter) + { + drawTexturedModalRect(guiLeft + 24, guiTop + 98, 0, 236, 22, 14); + } + + if(this.testNuke.slots[6] != null && this.testNuke.slots[6].getItem() == ModItems.solinium_propellant) + { + drawTexturedModalRect(guiLeft + 46, guiTop + 98, 22, 236, 18, 14); + } + + if(this.testNuke.slots[7] != null && this.testNuke.slots[7].getItem() == ModItems.solinium_propellant) + { + drawTexturedModalRect(guiLeft + 76, guiTop + 98, 52, 236, 18, 14); + } + + if(this.testNuke.slots[8] != null && this.testNuke.slots[8].getItem() == ModItems.solinium_igniter) + { + drawTexturedModalRect(guiLeft + 94, guiTop + 98, 70, 236, 22, 14); + } + + if(this.testNuke.isReady()) { + drawTexturedModalRect(guiLeft + 134, guiTop + 90, 176, 0, 16, 16); + } + } +} diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index d08238d95..f17d7a811 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -75,6 +75,8 @@ public class ModItems { public static Item nugget_les; public static Item ingot_magnetized_tungsten; public static Item ingot_combine_steel; + public static Item ingot_solinium; + public static Item nugget_solinium; public static Item ingot_australium; public static Item ingot_weidanium; @@ -806,6 +808,10 @@ public class ModItems { public static Item fleija_propellant; public static Item fleija_core; + public static Item solinium_igniter; + public static Item solinium_propellant; + public static Item solinium_core; + public static Item battery_generic; public static Item battery_advanced; public static Item battery_lithium; @@ -1259,6 +1265,8 @@ public class ModItems { plate_polymer = new Item().setUnlocalizedName("plate_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_polymer"); plate_dineutronium = new Item().setUnlocalizedName("plate_dineutronium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_dineutronium"); plate_desh = new Item().setUnlocalizedName("plate_desh").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":plate_desh"); + ingot_solinium = new Item().setUnlocalizedName("ingot_solinium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_solinium"); + nugget_solinium = new Item().setUnlocalizedName("nugget_solinium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_solinium"); ingot_dura_steel = new ItemCustomLore().setUnlocalizedName("ingot_dura_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_dura_steel"); ingot_polymer = new ItemCustomLore().setUnlocalizedName("ingot_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_polymer"); @@ -1917,6 +1925,10 @@ public class ModItems { fleija_propellant = new ItemFleija().setUnlocalizedName("fleija_propellant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":fleija_propellant"); fleija_core = new ItemFleija().setUnlocalizedName("fleija_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":fleija_core"); + solinium_igniter = new ItemSolinium().setUnlocalizedName("solinium_igniter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_igniter"); + solinium_propellant = new ItemSolinium().setUnlocalizedName("solinium_propellant").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_propellant"); + solinium_core = new ItemSolinium().setUnlocalizedName("solinium_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":solinium_core"); + battery_generic = new ItemBattery(50).setUnlocalizedName("battery_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_generic"); battery_advanced = new ItemBattery(200).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_advanced"); battery_lithium = new ItemBattery(2500).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":battery_lithium"); @@ -2368,6 +2380,7 @@ public class ModItems { GameRegistry.registerItem(ingot_schrabidium, ingot_schrabidium.getUnlocalizedName()); GameRegistry.registerItem(ingot_magnetized_tungsten, ingot_magnetized_tungsten.getUnlocalizedName()); GameRegistry.registerItem(ingot_combine_steel, ingot_combine_steel.getUnlocalizedName()); + GameRegistry.registerItem(ingot_solinium, ingot_solinium.getUnlocalizedName()); GameRegistry.registerItem(ingot_uranium_fuel, ingot_uranium_fuel.getUnlocalizedName()); GameRegistry.registerItem(ingot_plutonium_fuel, ingot_plutonium_fuel.getUnlocalizedName()); GameRegistry.registerItem(ingot_mox_fuel, ingot_mox_fuel.getUnlocalizedName()); @@ -2487,6 +2500,7 @@ public class ModItems { GameRegistry.registerItem(nugget_lead, nugget_lead.getUnlocalizedName()); GameRegistry.registerItem(nugget_beryllium, nugget_beryllium.getUnlocalizedName()); GameRegistry.registerItem(nugget_schrabidium, nugget_schrabidium.getUnlocalizedName()); + GameRegistry.registerItem(nugget_solinium, nugget_solinium.getUnlocalizedName()); GameRegistry.registerItem(nugget_uranium_fuel, nugget_uranium_fuel.getUnlocalizedName()); GameRegistry.registerItem(nugget_plutonium_fuel, nugget_plutonium_fuel.getUnlocalizedName()); GameRegistry.registerItem(nugget_mox_fuel, nugget_mox_fuel.getUnlocalizedName()); @@ -3357,6 +3371,11 @@ public class ModItems { GameRegistry.registerItem(fleija_propellant, fleija_propellant.getUnlocalizedName()); GameRegistry.registerItem(fleija_core, fleija_core.getUnlocalizedName()); + //Solinium + GameRegistry.registerItem(solinium_igniter, solinium_igniter.getUnlocalizedName()); + GameRegistry.registerItem(solinium_propellant, solinium_propellant.getUnlocalizedName()); + GameRegistry.registerItem(solinium_core, solinium_core.getUnlocalizedName()); + //Conventional Armor GameRegistry.registerItem(goggles, goggles.getUnlocalizedName()); GameRegistry.registerItem(gas_mask, gas_mask.getUnlocalizedName()); diff --git a/com/hbm/items/bomb/ItemSolinium.java b/com/hbm/items/bomb/ItemSolinium.java new file mode 100644 index 000000000..3a29dcaa1 --- /dev/null +++ b/com/hbm/items/bomb/ItemSolinium.java @@ -0,0 +1,20 @@ +package com.hbm.items.bomb; + +import java.util.List; + +import com.hbm.items.ModItems; +import com.hbm.items.special.ItemRadioactive; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; + +public class ItemSolinium extends ItemRadioactive { + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) + { + list.add("Used in:"); + list.add("Solinium Bomb"); + } +} diff --git a/com/hbm/items/weapon/GunBaleFlare.java b/com/hbm/items/weapon/GunBaleFlare.java index d9b26c1df..232cdde63 100644 --- a/com/hbm/items/weapon/GunBaleFlare.java +++ b/com/hbm/items/weapon/GunBaleFlare.java @@ -43,9 +43,6 @@ public class GunBaleFlare extends Item { ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) { - return; - } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode diff --git a/com/hbm/items/weapon/GunDefabricator.java b/com/hbm/items/weapon/GunDefabricator.java index 50a4bfbfa..6c5be0c34 100644 --- a/com/hbm/items/weapon/GunDefabricator.java +++ b/com/hbm/items/weapon/GunDefabricator.java @@ -6,6 +6,7 @@ import java.util.Random; import com.google.common.collect.Multimap; import com.hbm.entity.projectile.EntityBullet; import com.hbm.items.ModItems; +import com.hbm.main.MainRegistry; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -81,7 +82,10 @@ public class GunDefabricator extends Item { @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - list.add("BAD WOLF"); + if(MainRegistry.polaroidID == 11) + list.add("Did you set your alarm for volcano day?"); + else + list.add("BAD WOLF"); list.add(""); list.add("Ammo: Defabricator Energy Cell"); list.add("Damage: 40 - 120"); diff --git a/com/hbm/items/weapon/GunFatman.java b/com/hbm/items/weapon/GunFatman.java index 166d1403a..ecc9d5a9f 100644 --- a/com/hbm/items/weapon/GunFatman.java +++ b/com/hbm/items/weapon/GunFatman.java @@ -43,9 +43,9 @@ public class GunFatman extends Item { ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) { + /*if (event.isCanceled()) { return; - } + }*/ j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode diff --git a/com/hbm/items/weapon/GunMIRV.java b/com/hbm/items/weapon/GunMIRV.java index 1cfde6795..4cbd65ae7 100644 --- a/com/hbm/items/weapon/GunMIRV.java +++ b/com/hbm/items/weapon/GunMIRV.java @@ -44,9 +44,6 @@ public class GunMIRV extends Item { ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) { - return; - } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode diff --git a/com/hbm/items/weapon/GunRpg.java b/com/hbm/items/weapon/GunRpg.java index da5243c14..92897ff5f 100644 --- a/com/hbm/items/weapon/GunRpg.java +++ b/com/hbm/items/weapon/GunRpg.java @@ -43,9 +43,6 @@ public class GunRpg extends Item { ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) { - return; - } j = event.charge; boolean flag = p_77615_3_.capabilities.isCreativeMode diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 87d9ccdfa..22443b183 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -135,6 +135,7 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudBig.class, new RenderBigNuke()); RenderingRegistry.registerEntityRenderingHandler(EntityCloudFleija.class, new RenderCloudFleija()); RenderingRegistry.registerEntityRenderingHandler(EntityCloudFleijaRainbow.class, new RenderCloudRainbow()); + RenderingRegistry.registerEntityRenderingHandler(EntityCloudSolinium.class, new RenderCloudSolinium()); RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudNoShroom.class, new RenderNoCloud()); RenderingRegistry.registerEntityRenderingHandler(EntityFalloutRain.class, new RenderFallout()); RenderingRegistry.registerEntityRenderingHandler(EntityBlackHole.class, new RenderBlackHole()); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 325bc5fab..aac1a351a 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -51,6 +51,7 @@ import com.hbm.creativetabs.PartsTab; import com.hbm.entity.effect.EntityBlackHole; import com.hbm.entity.effect.EntityCloudFleija; import com.hbm.entity.effect.EntityCloudFleijaRainbow; +import com.hbm.entity.effect.EntityCloudSolinium; import com.hbm.entity.effect.EntityEMPBlast; import com.hbm.entity.effect.EntityFalloutRain; import com.hbm.entity.effect.EntityNukeCloudBig; @@ -683,6 +684,7 @@ public class MainRegistry EntityRegistry.registerModEntity(EntityAAShell.class, "entity_aa_shell", 92, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityRocketHoming.class, "entity_stinger", 93, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMissileMicro.class, "entity_missile_taint", 94, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityCloudSolinium.class, "entity_cloud_rainbow", 95, this, 1000, 1, true); EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00); EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72); diff --git a/com/hbm/render/entity/RenderCloudSolinium.java b/com/hbm/render/entity/RenderCloudSolinium.java new file mode 100644 index 000000000..d5a5e253f --- /dev/null +++ b/com/hbm/render/entity/RenderCloudSolinium.java @@ -0,0 +1,50 @@ +package com.hbm.render.entity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.entity.effect.EntityCloudSolinium; +import com.hbm.lib.RefStrings; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; + +public class RenderCloudSolinium extends Render { + + private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Sphere.obj"); + private IModelCustom blastModel; + private ResourceLocation blastTexture; + public float scale = 0; + public float ring = 0; + + public RenderCloudSolinium() { + blastModel = AdvancedModelLoader.loadModel(objTesterModelRL); + blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BlastSolinium.png"); + scale = 0; + } + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + render((EntityCloudSolinium)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + } + + public void render(EntityCloudSolinium cloud, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + + GL11.glScalef(cloud.age, cloud.age, cloud.age); + + bindTexture(blastTexture); + blastModel.renderAll(); + GL11.glPopMatrix(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return null; + } +} diff --git a/com/hbm/tileentity/bomb/TileEntityNukeSolinium.java b/com/hbm/tileentity/bomb/TileEntityNukeSolinium.java index 70d76e294..39414114c 100644 --- a/com/hbm/tileentity/bomb/TileEntityNukeSolinium.java +++ b/com/hbm/tileentity/bomb/TileEntityNukeSolinium.java @@ -19,7 +19,7 @@ public class TileEntityNukeSolinium extends TileEntity implements ISidedInventor private String customName; public TileEntityNukeSolinium() { - slots = new ItemStack[11]; + slots = new ItemStack[9]; } @Override @@ -171,18 +171,16 @@ public class TileEntityNukeSolinium extends TileEntity implements ISidedInventor public boolean isReady() { - if(slots[0] != null && slots[1] != null && slots[2] != null && slots[3] != null && slots[4] != null && slots[5] != null && slots[6] != null && slots[7] != null && slots[8] != null && slots[9] != null && slots[10] != null) - if(slots[0].getItem() == ModItems.fleija_igniter && - slots[1].getItem() == ModItems.fleija_igniter && - slots[2].getItem() == ModItems.fleija_propellant && - slots[3].getItem() == ModItems.fleija_propellant && - slots[4].getItem() == ModItems.fleija_propellant && - slots[5].getItem() == ModItems.fleija_core && - slots[6].getItem() == ModItems.fleija_core && - slots[7].getItem() == ModItems.fleija_core && - slots[8].getItem() == ModItems.fleija_core && - slots[9].getItem() == ModItems.fleija_core && - slots[10].getItem() == ModItems.fleija_core) + if(slots[0] != null && slots[1] != null && slots[2] != null && slots[3] != null && slots[4] != null && slots[5] != null && slots[6] != null && slots[7] != null && slots[8] != null) + if(slots[0].getItem() == ModItems.solinium_igniter && + slots[1].getItem() == ModItems.solinium_propellant && + slots[2].getItem() == ModItems.solinium_propellant && + slots[3].getItem() == ModItems.solinium_igniter && + slots[4].getItem() == ModItems.solinium_core && + slots[5].getItem() == ModItems.solinium_igniter && + slots[6].getItem() == ModItems.solinium_propellant && + slots[7].getItem() == ModItems.solinium_propellant && + slots[8].getItem() == ModItems.solinium_igniter) { return true; } diff --git a/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java b/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java index d1ae01117..ea4444b4a 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java +++ b/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java @@ -27,7 +27,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv public int dualCookTime; public long power; public int soundCycle = 0; - public static final int maxPower = 1000000; + public static final int maxPower = 100000; public static final int processingSpeed = 500; private static final int[] slots_top = new int[] {0}; @@ -302,7 +302,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv if(hasPower() && isProcessing()) { - this.power -= 2500; + this.power -= 500; if(this.power < 0) {