From f42775cfcff2b11aa33b3cd4fc6a10fab7ad55c6 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Thu, 23 Jul 2026 22:45:00 +0200 Subject: [PATCH] flaming debris --- changelog | 1 + src/main/java/com/hbm/blocks/ModBlocks.java | 2 +- .../blocks/generic/BlockForgottenBrick.java | 80 ++++++++++++++++++ .../sedna/factory/GunFactoryClient.java | 3 + .../weapon/sedna/factory/LegoClient.java | 9 ++ .../entity/projectile/RenderRBMKDebris.java | 12 +-- .../machine/pile/TileEntityPileCore.java | 29 +++++++ .../assets/hbm/textures/blocks/nr_planks.png | Bin 0 -> 839 bytes .../assets/hbm/textures/blocks/vacuum.png | Bin 134 -> 0 bytes .../assets/hbm/textures/blocks/vent.png | Bin 547 -> 0 bytes .../assets/hbm/textures/blocks/vent_side.png | Bin 607 -> 0 bytes 11 files changed, 129 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java create mode 100644 src/main/resources/assets/hbm/textures/blocks/nr_planks.png delete mode 100644 src/main/resources/assets/hbm/textures/blocks/vacuum.png delete mode 100644 src/main/resources/assets/hbm/textures/blocks/vent.png delete mode 100644 src/main/resources/assets/hbm/textures/blocks/vent_side.png diff --git a/changelog b/changelog index 7ec181e52..158b030c1 100644 --- a/changelog +++ b/changelog @@ -12,6 +12,7 @@ * Chicago pile control rods can either be fully withdrawn with redstone or fine tuned with RoR * Additionally, channels can be drilled by right clicking a pile addon device with the hand drill, the addon doesn't need to be removed beforehand * This is mainly for convenience when disassembling and reassembling the reactor, which requires all channels to be drilled again + * Piles that overheat will explode, throwing flaming graphite everywhere ## Changed * Updated all oil well GUI textures diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 507d6d814..5915da10a 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1510,7 +1510,7 @@ public class ModBlocks { reinforced_ducrete = new BlockNoSpawn(Material.rock).setBlockName("reinforced_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_ducrete"); lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone"); - brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten"); + brick_forgotten = new BlockForgottenBrick().setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten"); brick_forgotten_lock = new BlockForgottenLock(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock"); concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab); diff --git a/src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java b/src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java new file mode 100644 index 000000000..6ab602ed0 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockForgottenBrick.java @@ -0,0 +1,80 @@ +package com.hbm.blocks.generic; + +import java.util.List; + +import com.hbm.blocks.BlockMulti; +import com.hbm.lib.RefStrings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class BlockForgottenBrick extends BlockMulti { + + private IIcon iconTop; + private IIcon iconAlt; + private IIcon iconAltTop; + private IIcon iconStone; + private IIcon iconHole; + private IIcon iconEmpty; + private IIcon iconPlanks; + + public BlockForgottenBrick() { + super(Material.rock); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister reg) { + super.registerBlockIcons(reg); + this.iconTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_top"); + this.iconAlt = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw"); + this.iconAltTop = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_bw_top"); + this.iconStone = reg.registerIcon(RefStrings.MODID + ":playground/nullstone_demo_1_wip"); + this.iconHole = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_hole"); + this.iconEmpty = reg.registerIcon(RefStrings.MODID + ":brick_forgotten_hole_empty"); + this.iconPlanks = reg.registerIcon(RefStrings.MODID + ":nr_planks"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + + if(meta == 1) { + if(side == 0 || side == 1) return this.iconAltTop; + return this.iconAlt; + } + if(meta == 2) { + return this.iconStone; + } + if(meta == 3) { + if(side == 0 || side == 1) return this.iconTop; + return this.iconHole; + } + if(meta == 4) { + if(side == 0 || side == 1) return this.iconTop; + return this.iconEmpty; + } + if(meta == 5) { + return this.iconPlanks; + } + + if(side == 0 || side == 1) return this.iconTop; + return this.blockIcon; + } + + @Override public int getSubCount() { return 6; } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(int i = 0; i < getSubCount(); ++i) { + list.add(new ItemStack(item, 1, i)); + } + } +} diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java index 208243818..c225a3283 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java @@ -33,6 +33,7 @@ import com.hbm.items.weapon.sedna.BulletConfig; import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.main.ResourceManager; import com.hbm.render.item.weapon.sedna.*; +import com.hbm.tileentity.machine.pile.TileEntityPileCore; import com.hbm.tileentity.machine.storage.TileEntityBatterySocket; import net.minecraftforge.client.MinecraftForgeClient; @@ -250,6 +251,8 @@ public class GunFactoryClient { setRendererBulk(LegoClient.RENDER_FRAGMENTATION, ItemGrenadeFilling.fragmentation, ItemGrenadeFilling.pellets, ItemGrenadeFilling.pellets_heavy); ItemGrenadeFilling.laser.setRendererBeam(LegoClient.RENDER_LASER_RED); + TileEntityPileCore.pile_debris.setRenderer(LegoClient.RENDER_GRAPHITE); + //HUDS ((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO, LegoClient.HUD_COMPONENT_AMMO_SECOND); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java index bc46023ec..bb28f3dd1 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java @@ -12,6 +12,7 @@ import com.hbm.items.weapon.sedna.hud.HUDComponentDurabilityBar; import com.hbm.items.weapon.sedna.impl.ItemGunChargeThrower; import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; +import com.hbm.render.entity.projectile.RenderRBMKDebris; import com.hbm.render.item.weapon.sedna.ItemRenderFatMan; import com.hbm.render.tileentity.RenderArcFurnace; import com.hbm.render.util.BeamPronter; @@ -210,6 +211,14 @@ public class LegoClient { GL11.glPopMatrix(); } + public static BiConsumer RENDER_GRAPHITE = (bullet, interp) -> { + GL11.glScalef(2F, 2F, 2F); + GL11.glShadeModel(GL11.GL_SMOOTH); + Minecraft.getMinecraft().getTextureManager().bindTexture(RenderRBMKDebris.tex_graphite); + ResourceManager.deb_graphite.renderAll(); + GL11.glShadeModel(GL11.GL_FLAT); + }; + public static BiConsumer RENDER_GRENADE = (bullet, interp) -> { GL11.glScalef(0.25F, 0.25F, 0.25F); GL11.glRotated(90, 0, 0, 1); diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderRBMKDebris.java b/src/main/java/com/hbm/render/entity/projectile/RenderRBMKDebris.java index 383b7a77b..d774dffe5 100644 --- a/src/main/java/com/hbm/render/entity/projectile/RenderRBMKDebris.java +++ b/src/main/java/com/hbm/render/entity/projectile/RenderRBMKDebris.java @@ -14,12 +14,12 @@ import net.minecraft.util.ResourceLocation; public class RenderRBMKDebris extends Render { //for fallback only - private static final ResourceLocation tex_base = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_side.png"); - private static final ResourceLocation tex_element = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_fuel.png"); - private static final ResourceLocation tex_control = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png"); - private static final ResourceLocation tex_blank = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_side.png"); - private static final ResourceLocation tex_lid = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_cover_top.png"); - private static final ResourceLocation tex_graphite = new ResourceLocation(RefStrings.MODID + ":textures/blocks/block_graphite.png"); + public static final ResourceLocation tex_base = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_side.png"); + public static final ResourceLocation tex_element = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_fuel.png"); + public static final ResourceLocation tex_control = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_control.png"); + public static final ResourceLocation tex_blank = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_side.png"); + public static final ResourceLocation tex_lid = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank_cover_top.png"); + public static final ResourceLocation tex_graphite = new ResourceLocation(RefStrings.MODID + ":textures/blocks/block_graphite.png"); @Override public void doRender(Entity entity, double x, double y, double z, float f0, float f1) { diff --git a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileCore.java b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileCore.java index ae06015f2..cc4c137fb 100644 --- a/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileCore.java +++ b/src/main/java/com/hbm/tileentity/machine/pile/TileEntityPileCore.java @@ -3,27 +3,35 @@ package com.hbm.tileentity.machine.pile; import java.util.ArrayList; import java.util.List; import java.util.Random; +import java.util.function.BiConsumer; +import java.util.function.Consumer; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.machine.MachinePWRController; import com.hbm.blocks.machine.pile.BlockPile; +import com.hbm.entity.projectile.EntityBulletBaseMK4; import com.hbm.interfaces.NotableComments; import com.hbm.items.machine.ItemPileRodMK2; +import com.hbm.items.weapon.sedna.BulletConfig; +import com.hbm.main.MainRegistry; import com.hbm.main.NTMSounds; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.toclient.AuxParticlePacketNT; +import com.hbm.particle.helper.FlameCreator; import com.hbm.tileentity.TileEntityTickingBase; import com.hbm.util.EnumUtil; import com.hbm.util.fauxpointtwelve.DirPos; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import io.netty.buffer.ByteBuf; +import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.common.util.ForgeDirection; @NotableComments @@ -373,6 +381,12 @@ public class TileEntityPileCore extends TileEntityTickingBase { meltingDown = true; worldObj.newExplosion(null, avgX, yCoord + up, avgZ, 15F, true, true); meltingDown= false; + + for(int i = 0; i < 15; i++) { + double mY = worldObj.rand.nextDouble() * 0.5 + 1D; + EntityBulletBaseMK4 fragment = new EntityBulletBaseMK4(worldObj, null, pile_debris, 100F, 0.35F, avgX, yCoord + up + 1, avgZ, 0, mY, 0); + worldObj.spawnEntityInWorld(fragment); + } } } @@ -610,4 +624,19 @@ public class TileEntityPileCore extends TileEntityTickingBase { return MathHelper.clamp_double(total / size, 0D, 0.5D); } } + + public static BulletConfig pile_debris; + + public static BiConsumer LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> { + bullet.worldObj.newExplosion(bullet, bullet.posX, bullet.posY, bullet.posZ, 5F, true, false); + bullet.setDead(); + }; + + public static Consumer LAMBDA_FIRE = (bullet) -> { + if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) FlameCreator.composeEffectClient(bullet.worldObj, bullet.posX, bullet.posY - 0.125, bullet.posZ, FlameCreator.META_FIRE); + }; + + static { + pile_debris = new BulletConfig().setLife(200).setVel(1F).setGrav(0.1D).setOnUpdate(LAMBDA_FIRE).setOnImpact(LAMBDA_STANDARD_EXPLODE); + } } diff --git a/src/main/resources/assets/hbm/textures/blocks/nr_planks.png b/src/main/resources/assets/hbm/textures/blocks/nr_planks.png new file mode 100644 index 0000000000000000000000000000000000000000..eb891d6d575ca922693f02467bf19567a32f1ca5 GIT binary patch literal 839 zcmV-N1GxN&P)lwNGZ`YjkED3TGKRGx%?(Px9!vR+g$m?owtUKWm)8T&hm1H>2!+YI7lhU^Be$O*NLJS+qS8yiZo48%B9=w zBES56m-ES(`F#GLX^r*%3YKMYczVKWx5vr(8FgLr%ic3S-oAzFx&%SMU}J!GczS|m zS^V_tA8f3wFE$_wVerF`zjObiZ8S|IiXzIgLloFu{gbn z03cu8x=s=&=$?+IX}HS8G)?xNJVq&nloHSLaHPq@&u%atk7>ItlxZ^>Um)(?z1ajo zNUOEL7>&;GJdd(0@%=Vwni543p68LKDYorU*ELmDQB~!lgQ}_s!;o&bOP=Q(938T? zIpo=k=d@buJbL<);kr+!a~)IYwEZ?psl|7W4v%Q0#@>?`?C!h+z}DsvAq0-&FkBzt zE03Zmn8qPVSyD6=$7dt14K|T}$EU7qUVm+qi|GV_p5LLaYp&GLaBzIcdT)i^V1v4@ ziQ^czL*oH+mFUa$pmg6#u7Tp+zL0#8eUXBT(Ilbk@YVGzC{{pXUYWT$h R;SK-*002ovPDHLkV1mR1k=y_P literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/blocks/vacuum.png b/src/main/resources/assets/hbm/textures/blocks/vacuum.png deleted file mode 100644 index 3636b9ca4afdb4542ca35b42254cc85709427517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfIEGmC zCWnNC{5kKyn2?x|knrQ*U+Yvh10dK_@v$l8tdNipk55W8FY98q9w`GKo`!TaPEO8E aJPZs4PuRES1#o6otP#b9ebE?8coNppE1xktzIGNbdX)G&~GMM2VCq zNE|7O6Gs#_9g)^(|6pe(1+WA;!6V&bMsv=bbMF}$jYfeNRtVvs(lq7!&pW*LsP`Tb zVLYAi_TmkyimKwh$6AZ35<t;IQaK-leeIpqX`kQEs!BCJ-c`ohD* z!_j{9`+er~ImQSgf&!Ff34pa0fFwzdk{Dw)B?fiQp{m4jjQ5_wU_iUwJ^*A{2Ebym z;A#1U_n!5-!UvD8*K5kMtZfX3!+$n&w{C8308q8C0=3o>MNusc;Oy+|zXVlP0U#n9 zA`zk0YSo8>!2qDP@wfb4zf=_?W>1jkIdL3QRn?0YuCK2*x!CS?CtFo(S;s6i8jY=5 z_6m$KWLZY1)8X>+@)@8g3YyI(d7jrJ_s&BIng*e1>S(idKAukYf8q1(7rYO|jfkQw@LS-H lzz2U|$%s&tB~h#Z`~fDi0hpiaX>$Mo002ovPDHLkV1kbE`?UZ7 diff --git a/src/main/resources/assets/hbm/textures/blocks/vent_side.png b/src/main/resources/assets/hbm/textures/blocks/vent_side.png deleted file mode 100644 index 51f0e451f689a00b65b70d0af134d8f35a96a954..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 607 zcmV-l0-*hgP)?9w1Iy(TcXxL$x@TF2_nsKH zMz4Q-XSsYL%iUVw&Ff?C@9&w-X34UMV67#Dup@YQc*raEAqsU{<3xnM?^D8fJfx?N=W~n^L<9%WbsYfKT83fZ{pl%LmeKb;Wm%%CJUl#bb8`cL zF=icNa3KVobL4r>^Fm$bI6psUu~-05RTU>ECk(?tB%-PegGZy{hGC%Vx-^C{1`Wz$ zv3RjmV+>_c0^pp59*nh?EXz_t2!YXP^iLM7wRrCV5RtWzh@=7$VQ+5_5uvK8R9saR z)>`sBPiz=5TY;u&$nzZUJ#}3(o6VR^CIEQvQ|G2>==*-n#YWs2vr%#`*_uwL0E7?{ zNZxz$Jf|p%ja#-3j4{-8&3HWCvCf8twrwfPlBQ|W$u%g%xW2;C(Gj=5fAWfb=JRvQ}gM|XO_z+1R;cg4