mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
flaming debris
This commit is contained in:
parent
11668d2412
commit
f42775cfcf
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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<EntityBulletBaseMK4, Float> 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<EntityBulletBaseMK4, Float> RENDER_GRENADE = (bullet, interp) -> {
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
bullet.worldObj.newExplosion(bullet, bullet.posX, bullet.posY, bullet.posZ, 5F, true, false);
|
||||
bullet.setDead();
|
||||
};
|
||||
|
||||
public static Consumer<Entity> 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);
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/blocks/nr_planks.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/nr_planks.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 839 B |
Binary file not shown.
|
Before Width: | Height: | Size: 134 B |
Binary file not shown.
|
Before Width: | Height: | Size: 547 B |
Binary file not shown.
|
Before Width: | Height: | Size: 607 B |
Loading…
x
Reference in New Issue
Block a user