flop exclusive
@ -2263,6 +2263,7 @@ tile.dfc_stabilizer.name=DFC-Stabilisator
|
||||
tile.drill_pipe.name=Bohrgestänge
|
||||
tile.dummy_block.name=Dummyblock
|
||||
tile.dummy_port.name=Dummyblock (Stromanschluss)
|
||||
tile.dungeon_chain.name=Metallkette
|
||||
tile.emp_bomb.name=EMP-Ladung
|
||||
tile.factory_advanced_conductor.name=Fortgeschrittener Fabriksstromanschluss
|
||||
tile.factory_advanced_core.name=Fortgeschrittene Fabrikkernkomponente
|
||||
@ -2273,6 +2274,10 @@ tile.factory_titanium_core.name=Einfache Fabrikkernkomponente
|
||||
tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke
|
||||
tile.factory_titanium_hull.name=Einfache Fabrikshülle
|
||||
tile.fence_metal.name=Maschendrahtzaun
|
||||
tile.fireworks.name=Feuerwerksbatterie
|
||||
tile.fireworks.charges=Ladungen: %s
|
||||
tile.fireworks.message=Nachricht: %s
|
||||
tile.fireworks.color=Farbe: %s
|
||||
tile.flame_war.name=Flamewar aus der Box
|
||||
tile.float_bomb.name=Schwebebombe
|
||||
tile.fluid_duct.name=Universelles Flüssigkeitsrohr
|
||||
|
||||
@ -2263,6 +2263,7 @@ tile.dfc_stabilizer.name=DFC Stabilizer
|
||||
tile.drill_pipe.name=Drill Pipe
|
||||
tile.dummy_block.name=Dummy Block
|
||||
tile.dummy_port.name=Dummy Block (Electricity Port)
|
||||
tile.dungeon_chain.name=Metal Chain
|
||||
tile.emp_bomb.name=EMP Device
|
||||
tile.factory_advanced_conductor.name=Advanced Factory Electricity Port
|
||||
tile.factory_advanced_core.name=Advanced Factory Core Component
|
||||
@ -2273,6 +2274,10 @@ tile.factory_titanium_core.name=Basic Factory Core Component
|
||||
tile.factory_titanium_furnace.name=Basic Factory Access Hatch
|
||||
tile.factory_titanium_hull.name=Basic Factory Casing
|
||||
tile.fence_metal.name=Chainlink Fence
|
||||
tile.fireworks.name=Firework Battery
|
||||
tile.fireworks.charges=Charges Loaded: %s
|
||||
tile.fireworks.message=Message: %s
|
||||
tile.fireworks.color=Color: %s
|
||||
tile.flame_war.name=Flame War in a Box
|
||||
tile.float_bomb.name=Levitation Bomb
|
||||
tile.fluid_duct.name=Universal Fluid Duct
|
||||
|
||||
@ -138,6 +138,7 @@
|
||||
"weapon.sauergun": {"category": "player", "sounds": ["weapon/sauergun1", "weapon/sauergun2", "weapon/sauergun3"]},
|
||||
"weapon.whack": {"category": "player", "sounds": [{"name": "weapon/whack", "stream": false}]},
|
||||
"weapon.chainsaw": {"category": "player", "sounds": [{"name": "weapon/chainsaw", "stream": false}]},
|
||||
"weapon.rocketFlame": {"category": "block", "sounds": [{"name": "weapon/rocketFlame", "stream": false}]},
|
||||
|
||||
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
|
||||
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},
|
||||
|
||||
|
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 193 B |
BIN
src/main/java/assets/hbm/textures/blocks/fireworks_bottom.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/main/java/assets/hbm/textures/blocks/fireworks_side.png
Normal file
|
After Width: | Height: | Size: 705 B |
|
After Width: | Height: | Size: 670 B |
BIN
src/main/java/assets/hbm/textures/blocks/fireworks_top.png
Normal file
|
After Width: | Height: | Size: 299 B |
@ -312,6 +312,8 @@ public class ModBlocks {
|
||||
public static Block taint_barrel;
|
||||
public static Block crashed_balefire;
|
||||
public static Block rejuvinator;
|
||||
public static Block fireworks;
|
||||
|
||||
public static Block mine_ap;
|
||||
public static Block mine_he;
|
||||
public static Block mine_shrap;
|
||||
@ -510,6 +512,8 @@ public class ModBlocks {
|
||||
public static Block fluid_duct;
|
||||
|
||||
public static Block conveyor;
|
||||
|
||||
public static Block chain;
|
||||
|
||||
public static Block barrel_plastic;
|
||||
public static Block barrel_corroded;
|
||||
@ -1182,6 +1186,7 @@ public class ModBlocks {
|
||||
taint_barrel = new RedBarrel(Material.iron).setBlockName("taint_barrel").setCreativeTab(MainRegistry.nukeTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":barrel_taint");
|
||||
crashed_balefire = new BlockCrashedBomb(Material.iron).setBlockName("crashed_bomb").setCreativeTab(MainRegistry.nukeTab).setBlockUnbreakable().setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":crashed_balefire");
|
||||
rejuvinator = new BombRejuvinator(Material.iron).setBlockName("rejuvinator").setCreativeTab(MainRegistry.nukeTab).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":inserter_side");
|
||||
fireworks = new BlockFireworks(Material.iron).setBlockName("fireworks").setCreativeTab(MainRegistry.nukeTab).setResistance(5.0F);
|
||||
mine_ap = new Landmine(Material.iron).setBlockName("mine_ap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_ap");
|
||||
mine_he = new Landmine(Material.iron).setBlockName("mine_he").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_he");
|
||||
mine_shrap = new Landmine(Material.iron).setBlockName("mine_shrap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_shrap");
|
||||
@ -1282,6 +1287,8 @@ public class ModBlocks {
|
||||
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");
|
||||
|
||||
chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain");
|
||||
|
||||
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
|
||||
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
|
||||
@ -1881,6 +1888,7 @@ public class ModBlocks {
|
||||
//Generic Bombs
|
||||
GameRegistry.registerBlock(bomb_multi, bomb_multi.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crashed_balefire, crashed_balefire.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fireworks, fireworks.getUnlocalizedName());
|
||||
//GameRegistry.registerBlock(bomb_multi_large, bomb_multi_large.getUnlocalizedName());
|
||||
|
||||
//Turrets
|
||||
@ -2045,6 +2053,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(conveyor, conveyor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(barrel_plastic, ItemBlockLore.class, barrel_plastic.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(barrel_corroded, ItemBlockLore.class, barrel_corroded.getUnlocalizedName());
|
||||
|
||||
98
src/main/java/com/hbm/blocks/bomb/BlockFireworks.java
Normal file
@ -0,0 +1,98 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.bomb.TileEntityFireworks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFireworks extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockFireworks(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":fireworks_top");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":fireworks_bottom");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":fireworks_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityFireworks();
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float fx, float fy, float fz) {
|
||||
|
||||
if(world.isRemote)
|
||||
return true;
|
||||
|
||||
TileEntityFireworks te = (TileEntityFireworks)world.getTileEntity(x, y, z);
|
||||
|
||||
if(player.getHeldItem() != null) {
|
||||
|
||||
if(player.getHeldItem().getItem() == Items.gunpowder) {
|
||||
te.charges += player.getHeldItem().stackSize * 3;
|
||||
te.markDirty();
|
||||
player.getHeldItem().stackSize = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.getHeldItem().getItem() == ModItems.sulfur) {
|
||||
te.charges += player.getHeldItem().stackSize;
|
||||
te.markDirty();
|
||||
player.getHeldItem().stackSize = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.getHeldItem().getItem() instanceof ItemDye) {
|
||||
te.color = ItemDye.field_150922_c[player.getHeldItem().getItemDamage()];
|
||||
te.markDirty();
|
||||
player.getHeldItem().stackSize--;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.getHeldItem().getItem() == Items.name_tag) {
|
||||
te.message = player.getHeldItem().getDisplayName();
|
||||
te.markDirty();
|
||||
player.getHeldItem().stackSize--;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".name").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".charges", te.charges).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".color", Integer.toHexString(te.color)).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".message", te.message).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -10,6 +10,7 @@ import com.hbm.entity.mob.EntityTaintedCreeper;
|
||||
import com.hbm.entity.mob.EntityTeslaCrab;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -87,10 +88,12 @@ public class BlockTaint extends Block/*Container*/ {
|
||||
{
|
||||
return MapColor.purpleColor;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334077;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -80,10 +81,12 @@ public class BarbedWire extends Block {
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
public int getRenderType()
|
||||
{
|
||||
return 334083;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
public boolean renderAsNormalBlock()
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -18,10 +19,12 @@ public class BlockCanCrate extends Block {
|
||||
public BlockCanCrate(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334085;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
205
src/main/java/com/hbm/blocks/generic/BlockChain.java
Normal file
@ -0,0 +1,205 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import static net.minecraftforge.common.util.ForgeDirection.EAST;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.NORTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockChain extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconEnd;
|
||||
|
||||
public BlockChain(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconEnd = iconRegister.registerIcon(RefStrings.MODID + ":chain_end");
|
||||
super.registerBlockIcons(iconRegister);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
|
||||
if(world.isSideSolid(x, y - 1, z, ForgeDirection.UP, false) ||
|
||||
(world.getBlock(x, y - 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y - 1, z)))
|
||||
return this.blockIcon;
|
||||
|
||||
return this.iconEnd;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
func_149797_b(world.getBlockMetadata(x, y, z));
|
||||
|
||||
if(!world.isSideSolid(x, y - 1, z, ForgeDirection.UP, false))
|
||||
this.minY = 0.25;
|
||||
}
|
||||
|
||||
public void func_149797_b(int meta) {
|
||||
|
||||
float f = 0.125F;
|
||||
|
||||
if(meta == 0) {
|
||||
|
||||
this.minX = 3 * f;
|
||||
this.minY = 0;
|
||||
this.minZ = 3 * f;
|
||||
this.maxX = 5 * f;
|
||||
this.maxY = 1;
|
||||
this.maxZ = 5 * f;
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
this.setBlockBounds(3 * f, 0.0F, 1.0F - f, 5 * f, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (meta == 3)
|
||||
{
|
||||
this.setBlockBounds(3 * f, 0.0F, 0.0F, 5 * f, 1.0F, f);
|
||||
}
|
||||
|
||||
if (meta == 4)
|
||||
{
|
||||
this.setBlockBounds(1.0F - f, 0.0F, 3 * f, 1.0F, 1.0F, 5 * f);
|
||||
}
|
||||
|
||||
if (meta == 5)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 3 * f, f, 1.0F, 5 * f);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return super.getSelectedBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
|
||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) || world.getBlock(x, y + 1, z) == this)
|
||||
return true;
|
||||
|
||||
return world.isSideSolid(x - 1, y, z, EAST ) ||
|
||||
world.isSideSolid(x + 1, y, z, WEST ) ||
|
||||
world.isSideSolid(x, y, z - 1, SOUTH) ||
|
||||
world.isSideSolid(x, y, z + 1, NORTH);
|
||||
}
|
||||
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float p_149660_6_, float p_149660_7_, float p_149660_8_, int meta)
|
||||
{
|
||||
int j1 = meta;
|
||||
|
||||
if(side == 2 && world.isSideSolid(x, y, z + 1, NORTH))
|
||||
j1 = 2;
|
||||
|
||||
if(side == 3 && world.isSideSolid(x, y, z - 1, SOUTH))
|
||||
j1 = 3;
|
||||
|
||||
if(side == 4 && world.isSideSolid(x + 1, y, z, WEST))
|
||||
j1 = 4;
|
||||
|
||||
if(side == 5 && world.isSideSolid(x - 1, y, z, EAST))
|
||||
j1 = 5;
|
||||
|
||||
if(j1 == 0) {
|
||||
|
||||
if(world.getBlock(x, y + 1, z) == this)
|
||||
return world.getBlockMetadata(x, y + 1, z);
|
||||
|
||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(j1 == 0) {
|
||||
if(world.isSideSolid(x, y, z + 1, NORTH))
|
||||
j1 = 2;
|
||||
|
||||
if(world.isSideSolid(x, y, z - 1, SOUTH))
|
||||
j1 = 3;
|
||||
|
||||
if(world.isSideSolid(x + 1, y, z, WEST))
|
||||
j1 = 4;
|
||||
|
||||
if(world.isSideSolid(x - 1, y, z, EAST))
|
||||
j1 = 5;
|
||||
}
|
||||
|
||||
return j1;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
boolean flag = false;
|
||||
|
||||
if(world.getBlock(x, y + 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y + 1, z)) {
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
return;
|
||||
}
|
||||
|
||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) && world.getBlockMetadata(x, y, z) == 0) {
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
return;
|
||||
}
|
||||
|
||||
if (l == 2 && world.isSideSolid(x, y, z + 1, NORTH))
|
||||
flag = true;
|
||||
|
||||
if (l == 3 && world.isSideSolid(x, y, z - 1, SOUTH))
|
||||
flag = true;
|
||||
|
||||
if (l == 4 && world.isSideSolid(x + 1, y, z, WEST))
|
||||
flag = true;
|
||||
|
||||
if (l == 5 && world.isSideSolid(x - 1, y, z, EAST))
|
||||
flag = true;
|
||||
|
||||
if (!flag)
|
||||
world.func_147480_a(x, y, z, true);
|
||||
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockFence;
|
||||
@ -16,10 +17,12 @@ public class BlockMetalFence extends BlockFence {
|
||||
public BlockMetalFence(Material p_i45406_2_) {
|
||||
super("", p_i45406_2_);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334082;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,23 +1,17 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.deco.TileEntityBomber;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlock;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@ -43,13 +37,16 @@ public class DecoBlock extends BlockContainer {
|
||||
|
||||
return new TileEntityDecoBlock();
|
||||
}
|
||||
|
||||
public static int renderIDScaffold = RenderingRegistry.getNextAvailableRenderId();
|
||||
public static int renderIDBeam = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
if(this == ModBlocks.steel_scaffold)
|
||||
return 334078;
|
||||
return renderIDScaffold;
|
||||
else if(this == ModBlocks.steel_beam)
|
||||
return 334080;
|
||||
return renderIDBeam;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@ -8,10 +9,12 @@ public class DecoPoleTop extends Block {
|
||||
public DecoPoleTop(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334084;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,7 +15,7 @@ public class DecoSteelPoles extends Block {
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334079;
|
||||
return DecoTapeRecorder.renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -18,10 +19,12 @@ public class DecoTapeRecorder extends BlockContainer {
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334079;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -24,10 +25,12 @@ public class Spikes extends Block {
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
public int getRenderType()
|
||||
{
|
||||
return 334088;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
public boolean renderAsNormalBlock()
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityBarrel;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
@ -34,10 +35,12 @@ public class BlockFluidBarrel extends BlockContainer {
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityBarrel(capacity);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return 334081;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,7 +20,7 @@ public class MachineMiniRTG extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 334087;
|
||||
return MachineRTG.renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRTG;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
@ -25,10 +26,12 @@ public class MachineRTG extends BlockContainer {
|
||||
public MachineRTG(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 334087;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.network;
|
||||
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -35,10 +36,12 @@ public class BlockConveyor extends Block {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 334086;
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
69
src/main/java/com/hbm/entity/item/EntityFireworks.java
Normal file
@ -0,0 +1,69 @@
|
||||
package com.hbm.entity.item;
|
||||
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityFireworks extends Entity {
|
||||
|
||||
int color;
|
||||
int character;
|
||||
|
||||
public EntityFireworks(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityFireworks(World world, double x, double y, double z, int color, int character) {
|
||||
super(world);
|
||||
this.setPositionAndRotation(x, y, z, 0.0F, 0.0F);
|
||||
this.color = color;
|
||||
this.character = character;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() { }
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
this.moveEntity(0.0, 3.0D, 0.0);
|
||||
this.worldObj.spawnParticle("flame", posX, posY, posZ, 0.0, -0.3, 0.0);
|
||||
this.worldObj.spawnParticle("smoke", posX, posY, posZ, 0.0, -0.2, 0.0);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
ticksExisted++;
|
||||
|
||||
if(this.ticksExisted > 30) {
|
||||
|
||||
this.worldObj.playSoundEffect(posX, posY, posZ, "fireworks.blast", 20, 1F + this.rand.nextFloat() * 0.2F);
|
||||
|
||||
this.setDead();
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "fireworks");
|
||||
data.setInteger("color", color);
|
||||
data.setInteger("char", character);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(this.worldObj.provider.dimensionId, posX, posY, posZ, 300));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
this.character = nbt.getInteger("char");
|
||||
this.color = nbt.getInteger("color");
|
||||
this.ticksExisted = nbt.getInteger("ticksExisted");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("char", character);
|
||||
nbt.setInteger("color", color);
|
||||
nbt.setInteger("ticksExisted", ticksExisted);
|
||||
}
|
||||
|
||||
}
|
||||
@ -82,7 +82,7 @@ public class EntityBalefire extends Entity {
|
||||
if(!flag)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2);
|
||||
}
|
||||
|
||||
age++;
|
||||
|
||||
@ -93,7 +93,7 @@ public class EntityNukeExplosion extends Entity {
|
||||
ExplosionNukeGeneric.vapor(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.action);
|
||||
|
||||
this.action = this.damageRange / steps * this.counter;
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, (int)this.action);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, (int)this.action);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ public class EntityNukeExplosionMK3 extends Entity {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
|
||||
if(waste || extType != 1) {
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2);
|
||||
} else {
|
||||
ExplosionHurtUtil.doRadiation(worldObj, posX, posY, posZ, 15000, 250000, this.destructionRange);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.length * 2);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.length * 2);
|
||||
|
||||
if(explosion == null) {
|
||||
explosion = new ExplosionNukeRay(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.strength, this.count, this.speed, this.length);
|
||||
|
||||
@ -72,7 +72,7 @@ public class EntityNukeExplosionPlus extends Entity {
|
||||
if(!flag)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2);
|
||||
} else {
|
||||
if (!did2 && waste) {
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (this.wasteRange) * 10);
|
||||
|
||||
@ -79,7 +79,7 @@ public class EntityTomBlast extends Entity {
|
||||
|
||||
if(!flag) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, this.destructionRange * 2);
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2);
|
||||
}
|
||||
|
||||
age++;
|
||||
|
||||
@ -17,6 +17,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -34,6 +35,7 @@ import com.hbm.entity.projectile.EntityMiniMIRV;
|
||||
import com.hbm.entity.projectile.EntityMiniNuke;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
@ -113,69 +115,68 @@ public class ExplosionNukeGeneric {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void dealDamage(World world, double x, double y, double z, double radius) {
|
||||
dealDamage(world, x, y, z, radius, 250F);
|
||||
}
|
||||
|
||||
public static void dealDamage(World world, double x, double y, double z, double radius, float maxDamage) {
|
||||
|
||||
public static void dealDamage(World world, int x, int y, int z, int bombStartStrength) {
|
||||
float f = bombStartStrength;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = bombStartStrength/** 2 */
|
||||
;
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(x, y, z, x, y, z).expand(radius, radius, radius));
|
||||
|
||||
for(Entity e : list) {
|
||||
|
||||
double dist = e.getDistance(x, y, z);
|
||||
|
||||
if(dist <= radius) {
|
||||
|
||||
double entX = e.posX;
|
||||
double entY = e.posY + e.getEyeHeight();
|
||||
double entZ = e.posZ;
|
||||
|
||||
if(!isExplosionExempt(e) && !Library.isObstructed(world, x, y, z, entX, entY, entZ)) {
|
||||
|
||||
// bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / bombStartStrength;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if(!Library.isObstructed(world, x, y, z, entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ))
|
||||
if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall)
|
||||
&& !(entity instanceof EntityMIRV) && !(entity instanceof EntityMiniNuke)
|
||||
&& !(entity instanceof EntityMiniMIRV) && !(entity instanceof EntityGrenadeASchrab)
|
||||
&& !(entity instanceof EntityGrenadeNuclear) && !(entity instanceof EntityExplosiveBeam)
|
||||
&& !(entity instanceof EntityBulletBase) && !(entity instanceof EntityPlayer
|
||||
&& ArmorUtil.checkArmor((EntityPlayer) entity, ModItems.euphemium_helmet,
|
||||
ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))) {
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
// double d10 = (double)world.getBlockDensity(vec3,
|
||||
// entity.boundingBox);
|
||||
// if(d10 > 0) isOccupied = true;
|
||||
double d11 = (1.0D - d4);// * d10;
|
||||
if (!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP
|
||||
&& ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() != GameType.CREATIVE)) {
|
||||
// entity.attackEntityFrom(DamageSource.generic,
|
||||
// ((int)((d11 * d11 + d11) / 2.0D * 8.0D *
|
||||
// bombStartStrength + 1.0D)));
|
||||
double damage = entity.getDistance(x, y, z) / bombStartStrength * 250;
|
||||
entity.attackEntityFrom(ModDamageSource.nuclearBlast, (float)damage);
|
||||
entity.setFire(5);
|
||||
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
|
||||
entity.motionX += d5 * d8 * 0.2D;
|
||||
entity.motionY += d6 * d8 * 0.2D;
|
||||
entity.motionZ += d7 * d8 * 0.2D;
|
||||
}
|
||||
double damage = maxDamage * (radius - dist) / radius;
|
||||
e.attackEntityFrom(ModDamageSource.nuclearBlast, (float)damage);
|
||||
e.setFire(5);
|
||||
|
||||
double knockX = e.posX - x;
|
||||
double knockY = e.posY + e.getEyeHeight() - y;
|
||||
double knockZ = e.posZ - z;
|
||||
|
||||
Vec3 knock = Vec3.createVectorHelper(knockX, knockY, knockZ);
|
||||
knock = knock.normalize();
|
||||
|
||||
e.motionX += knock.xCoord * 0.2D;
|
||||
e.motionY += knock.yCoord * 0.2D;
|
||||
e.motionZ += knock.zCoord * 0.2D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bombStartStrength = (int) f;
|
||||
}
|
||||
|
||||
@Spaghetti("just look at it")
|
||||
private static boolean isExplosionExempt(Entity e) {
|
||||
|
||||
if (e instanceof EntityOcelot ||
|
||||
e instanceof EntityNukeCloudSmall ||
|
||||
e instanceof EntityMIRV ||
|
||||
e instanceof EntityMiniNuke ||
|
||||
e instanceof EntityMiniMIRV ||
|
||||
e instanceof EntityGrenadeASchrab ||
|
||||
e instanceof EntityGrenadeNuclear ||
|
||||
e instanceof EntityExplosiveBeam ||
|
||||
e instanceof EntityBulletBase ||
|
||||
e instanceof EntityPlayer &&
|
||||
ArmorUtil.checkArmor((EntityPlayer) e, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (e instanceof EntityPlayerMP && ((EntityPlayerMP)e).theItemInWorldManager.getGameType() == GameType.CREATIVE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void succ(World world, int x, int y, int z, int radius) {
|
||||
|
||||
@ -5,6 +5,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelChicken;
|
||||
import net.minecraft.client.particle.EntityCloudFX;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntityFireworkSparkFX;
|
||||
import net.minecraft.client.particle.EntityFlameFX;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
@ -26,6 +27,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.*;
|
||||
import com.hbm.entity.grenade.*;
|
||||
import com.hbm.entity.item.EntityFireworks;
|
||||
import com.hbm.entity.item.EntityMinecartTest;
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
import com.hbm.entity.logic.*;
|
||||
@ -365,6 +367,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChopperMine.class, new RenderChopperMine());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRubble.class, new RenderRubble());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShrapnel.class, new RenderShrapnel());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFireworks.class, new RenderShrapnel());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityOilSpill.class, new RenderEmpty());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityWaterSplash.class, new RenderEmpty());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEMP.class, new RenderEmpty());
|
||||
@ -473,7 +476,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeHead.class, new RenderWormHead());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBOTPrimeBody.class, new RenderWormBody());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDuck.class, new RenderDuck(new ModelChicken(), 0.3F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityQuackos.class, new RenderQuacc(new ModelChicken(), 0.3F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityQuackos.class, new RenderQuacc(new ModelChicken(), 7.5F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFBI.class, new RenderFBI());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRADBeast.class, new RenderRADBeast());
|
||||
//"particles"
|
||||
@ -510,6 +513,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerBlockHandler(new RenderConveyor());
|
||||
RenderingRegistry.registerBlockHandler(new RenderRTGBlock());
|
||||
RenderingRegistry.registerBlockHandler(new RenderSpikeBlock());
|
||||
RenderingRegistry.registerBlockHandler(new RenderChain());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -759,6 +763,23 @@ public class ClientProxy extends ServerProxy {
|
||||
}
|
||||
}
|
||||
|
||||
if("fireworks".equals(type)) {
|
||||
int color = data.getInteger("color");
|
||||
char c = (char)data.getInteger("char");
|
||||
|
||||
ParticleLetter fx = new ParticleLetter(world, x, y, z, color, c);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
|
||||
for(int i = 0; i < 50; i++) {
|
||||
EntityFireworkSparkFX blast = new EntityFireworkSparkFX(world, x, y, z,
|
||||
0.4 * world.rand.nextGaussian(),
|
||||
0.4 * world.rand.nextGaussian(),
|
||||
0.4 * world.rand.nextGaussian(), Minecraft.getMinecraft().effectRenderer);
|
||||
blast.setColour(color);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(blast);
|
||||
}
|
||||
}
|
||||
|
||||
if("vanillaburst".equals(type)) {
|
||||
|
||||
double motion = data.getDouble("motion");
|
||||
|
||||
@ -47,8 +47,8 @@ public class CraftingManager {
|
||||
PowderRecipes.register();
|
||||
}
|
||||
|
||||
public static void AddCraftingRec()
|
||||
{
|
||||
public static void AddCraftingRec() {
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.redstone_sword, 1), new Object[] { "R", "R", "S", 'R', Blocks.redstone_block, 'S', Items.stick });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.big_sword, 1), new Object[] { "QIQ", "QIQ", "GSG", 'G', Items.gold_ingot, 'S', Items.stick, 'I', Items.iron_ingot, 'Q', Items.quartz});
|
||||
|
||||
@ -699,7 +699,9 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ingot_schrabidium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', "ingotUranium", 'P', new ItemStack(ModItems.particle_higgs).setStackDisplayName("Higgs Boson (Temporary Recipe)") }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ingot_euphemium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', "ingotPlutonium", 'P', new ItemStack(ModItems.particle_dark).setStackDisplayName("Dark Matter (Temporary Recipe)") }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_dineutronium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', ModItems.ingot_schrabidate, 'P', new ItemStack(ModItems.particle_sparkticle).setStackDisplayName("Sparkticle (Temporary Recipe)") });
|
||||
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fireworks, 1), new Object[] { "PPP", "PPP", "WIW", 'P', Items.paper, 'W', "plankWood", 'I', "ingotIron" }));
|
||||
|
||||
if(GeneralConfig.enableBabyMode) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_semtex, 3), new Object[] { Items.slime_ball, Blocks.tnt, ModItems.niter });
|
||||
|
||||
@ -44,8 +44,7 @@ import com.hbm.config.WorldConfig;
|
||||
import com.hbm.creativetabs.*;
|
||||
import com.hbm.entity.effect.*;
|
||||
import com.hbm.entity.grenade.*;
|
||||
import com.hbm.entity.item.EntityMinecartTest;
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
import com.hbm.entity.item.*;
|
||||
import com.hbm.entity.logic.*;
|
||||
import com.hbm.entity.missile.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
@ -427,6 +426,7 @@ public class MainRegistry {
|
||||
GameRegistry.registerTileEntity(TileEntitySolarBoiler.class, "tileentity_solarboiler");
|
||||
GameRegistry.registerTileEntity(TileEntitySolarMirror.class, "tileentity_solarmirror");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineDetector.class, "tileentity_he_detector");
|
||||
GameRegistry.registerTileEntity(TileEntityFireworks.class, "tileentity_firework_box");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
@ -577,6 +577,7 @@ public class MainRegistry {
|
||||
EntityRegistry.registerModEntity(EntityMovingItem.class, "entity_c_item", 146, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityCloudTom.class, "entity_moonstone_blast", 147, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityBeamVortex.class, "entity_vortex_beam", 148, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityFireworks.class, "entity_firework_ball", 149, this, 1000, 1, true);
|
||||
|
||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
165
src/main/java/com/hbm/particle/ParticleLetter.java
Normal file
@ -0,0 +1,165 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ParticleLetter extends EntityFX {
|
||||
|
||||
int color;
|
||||
char c;
|
||||
|
||||
public ParticleLetter(World world, double x, double y, double z, int color, char c) {
|
||||
super(world, x, y, z);
|
||||
this.particleMaxAge = 30;
|
||||
this.color = color;
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tess, float interp, float x, float y, float z, float tx, float tz) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 0.0F);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
FontRenderer font = mc.fontRenderer;
|
||||
|
||||
this.rotationYaw = -mc.thePlayer.rotationYaw;
|
||||
this.rotationPitch = mc.thePlayer.rotationPitch;
|
||||
|
||||
float pX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double)interp - interpPosX);
|
||||
float pY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double)interp - interpPosY);
|
||||
float pZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double)interp - interpPosZ);
|
||||
|
||||
GL11.glTranslatef(pX, pY, pZ);
|
||||
GL11.glRotatef(this.rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.rotationPitch, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
|
||||
float time = (this.particleAge + interp) * 4F / this.particleMaxAge;
|
||||
|
||||
double scale = 1 - (1D / Math.pow(Math.E, time));
|
||||
|
||||
this.particleAlpha = 1 - (((float)this.particleAge + interp) / (float)this.particleMaxAge);
|
||||
|
||||
if(particleAlpha < 0)
|
||||
particleAlpha = 0;
|
||||
|
||||
int alpha = (int) (particleAlpha * 255);
|
||||
|
||||
if(alpha > 255)
|
||||
alpha = 255;
|
||||
|
||||
if(alpha < 10)
|
||||
alpha = 10;
|
||||
|
||||
int col = color + (alpha << 24);
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
font.drawString(String.valueOf(c), -(int)(font.getStringWidth(String.valueOf(c)) * 0.5F), -(int)(font.FONT_HEIGHT * 0.5F), col);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GL11.glPolygonOffset(0.0F, 0.0F);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/*public void func_70539_a(Tessellator p_renderParticle_1_, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
this.field_70177_z = (-Minecraft.func_71410_x().field_71439_g.field_70177_z);
|
||||
this.field_70125_A = Minecraft.func_71410_x().field_71439_g.field_70125_A;
|
||||
float size = 0.1F * this.field_70544_f;
|
||||
try
|
||||
{
|
||||
this.locX = ((float)(this.field_70169_q + (this.field_70165_t - this.field_70169_q) * par2 - field_70556_an));
|
||||
this.locY = ((float)(this.field_70167_r + (this.field_70163_u - this.field_70167_r) * par2 - field_70554_ao));
|
||||
this.locZ = ((float)(this.field_70166_s + (this.field_70161_v - this.field_70166_s) * par2 - field_70555_ap));
|
||||
par3 *= size;
|
||||
par4 *= size;
|
||||
par5 *= size;
|
||||
par6 *= size;
|
||||
par7 *= size;
|
||||
}
|
||||
catch (Throwable ex) {}
|
||||
GL11.glPushMatrix();
|
||||
if (this.shouldOnTop) {
|
||||
GL11.glDepthFunc(519);
|
||||
} else {
|
||||
GL11.glDepthFunc(515);
|
||||
}
|
||||
GL11.glTranslatef(this.locX, this.locY, this.locZ);
|
||||
GL11.glRotatef(this.field_70177_z, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(this.field_70125_A, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glScaled(this.field_70544_f * 0.008D, this.field_70544_f * 0.008D, this.field_70544_f * 0.008D);
|
||||
if (this.criticalhit) {
|
||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||
}
|
||||
FontRenderer fontRenderer = Minecraft.func_71410_x().field_71466_p;
|
||||
OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, 240.0F, 0.003662109F);
|
||||
GL11.glEnable(3553);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(3553);
|
||||
GL11.glEnable(2929);
|
||||
GL11.glDisable(2896);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glEnable(3008);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
if ((this.criticalhit) && (DIConfig.mainInstance().showCriticalStrikes))
|
||||
{
|
||||
if (DIConfig.mainInstance().useDropShadows) {
|
||||
fontRenderer.func_78276_b(this.critical, -MathHelper.func_76141_d(fontRenderer.func_78256_a(this.critical) / 2.0F) + 1, -MathHelper.func_76141_d(fontRenderer.field_78288_b / 2.0F) + 1, 0);
|
||||
}
|
||||
fontRenderer.func_78276_b(this.critical, -MathHelper.func_76141_d(fontRenderer.func_78256_a(this.critical) / 2.0F), -MathHelper.func_76141_d(fontRenderer.field_78288_b / 2.0F), -7600622);
|
||||
}
|
||||
else if (!this.criticalhit)
|
||||
{
|
||||
int color = this.heal ? DIConfig.mainInstance().healColor : DIConfig.mainInstance().DIColor;
|
||||
Color c_Color = new Color(color);
|
||||
c_Color = new Color(c_Color.getRed() / 5.0F / 255.0F, c_Color.getGreen() / 5.0F / 255.0F, c_Color.getBlue() / 5.0F / 255.0F);
|
||||
if (DIConfig.mainInstance().useDropShadows) {
|
||||
fontRenderer.func_78276_b(String.valueOf(this.Damage), -MathHelper.func_76141_d(fontRenderer.func_78256_a(this.Damage + "") / 2.0F) + 1, -MathHelper.func_76141_d(fontRenderer.field_78288_b / 2.0F) + 1, c_Color.getRGB());
|
||||
}
|
||||
fontRenderer.func_78276_b(String.valueOf(this.Damage), -MathHelper.func_76141_d(fontRenderer.func_78256_a(this.Damage + "") / 2.0F), -MathHelper.func_76141_d(fontRenderer.field_78288_b / 2.0F), color);
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDepthFunc(515);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
if (this.grow)
|
||||
{
|
||||
this.field_70544_f *= 1.08F;
|
||||
if (this.field_70544_f > diConfig.Size * 3.0D) {
|
||||
this.grow = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_70544_f *= 0.96F;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.DecoPoleTop;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -65,7 +66,6 @@ public class RenderAntennaTop implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334084;
|
||||
return DecoPoleTop.renderID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.BarbedWire;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -69,7 +70,7 @@ public class RenderBarbedWire implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334083;
|
||||
return BarbedWire.renderID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.machine.BlockFluidBarrel;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -64,6 +65,6 @@ public class RenderBarrel implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334081;
|
||||
return BlockFluidBarrel.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
127
src/main/java/com/hbm/render/block/RenderChain.java
Normal file
@ -0,0 +1,127 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import com.hbm.blocks.generic.BlockChain;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class RenderChain implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { }
|
||||
|
||||
@Override
|
||||
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(world, x, y, z, 0);
|
||||
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
double d0 = (double)iicon.getMinU();
|
||||
double d1 = (double)iicon.getMinV();
|
||||
double d2 = (double)iicon.getMaxU();
|
||||
double d3 = (double)iicon.getMaxV();
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
double d4 = 0.0D;
|
||||
double d5 = 0.05D;
|
||||
|
||||
if(l == 0) {
|
||||
|
||||
double minU = (double)iicon.getMinU();
|
||||
double minV = (double)iicon.getMinV();
|
||||
double maxU = (double)iicon.getMaxU();
|
||||
double maxV = (double)iicon.getMaxV();
|
||||
double d8 = x;
|
||||
double d9 = x + 1;
|
||||
double p_147765_4_ = y;
|
||||
double p_147765_8_ = 1;
|
||||
double d10 = z + 0;
|
||||
double d11 = z + 1;
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + (double)p_147765_8_, d10, minU, minV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + 0.0D, d10, minU, maxV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + 0.0D, d11, maxU, maxV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + (double)p_147765_8_, d11, maxU, minV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + (double)p_147765_8_, d11, minU, minV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + 0.0D, d11, minU, maxV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + 0.0D, d10, maxU, maxV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + (double)p_147765_8_, d10, maxU, minV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + (double)p_147765_8_, d11, minU, minV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + 0.0D, d11, minU, maxV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + 0.0D, d10, maxU, maxV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + (double)p_147765_8_, d10, maxU, minV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + (double)p_147765_8_, d10, minU, minV);
|
||||
tessellator.addVertexWithUV(d9, p_147765_4_ + 0.0D, d10, minU, maxV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + 0.0D, d11, maxU, maxV);
|
||||
tessellator.addVertexWithUV(d8, p_147765_4_ + (double)p_147765_8_, d11, maxU, minV);
|
||||
}
|
||||
|
||||
if (l == 5)
|
||||
{
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 1) + d4, (double)(z + 1) + d4, d0, d1);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 0) - d4, (double)(z + 1) + d4, d0, d3);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 0) - d4, (double)(z + 0) - d4, d2, d3);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 1) + d4, (double)(z + 0) - d4, d2, d1);
|
||||
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 0) - d4, (double)(z + 1) + d4, d0, d3);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 1) + d4, (double)(z + 1) + d4, d0, d1);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 1) + d4, (double)(z + 0) - d4, d2, d1);
|
||||
tessellator.addVertexWithUV((double)x + d5, (double)(y + 0) - d4, (double)(z + 0) - d4, d2, d3);
|
||||
}
|
||||
|
||||
if (l == 4)
|
||||
{
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 0) - d4, (double)(z + 1) + d4, d2, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 1) + d4, (double)(z + 1) + d4, d2, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 1) + d4, (double)(z + 0) - d4, d0, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 0) - d4, (double)(z + 0) - d4, d0, d3);
|
||||
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 1) + d4, (double)(z + 1) + d4, d2, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 0) - d4, (double)(z + 1) + d4, d2, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 0) - d4, (double)(z + 0) - d4, d0, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 1) - d5, (double)(y + 1) + d4, (double)(z + 0) - d4, d0, d1);
|
||||
}
|
||||
|
||||
if (l == 3)
|
||||
{
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 0) - d4, (double)z + d5, d2, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 1) + d4, (double)z + d5, d2, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 1) + d4, (double)z + d5, d0, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 0) - d4, (double)z + d5, d0, d3);
|
||||
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 1) + d4, (double)z + d5, d2, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 0) - d4, (double)z + d5, d2, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 0) - d4, (double)z + d5, d0, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 1) + d4, (double)z + d5, d0, d1);
|
||||
}
|
||||
|
||||
if (l == 2)
|
||||
{
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 1) + d4, (double)(z + 1) - d5, d0, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 0) - d4, (double)(z + 1) - d5, d0, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 0) - d4, (double)(z + 1) - d5, d2, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 1) + d4, (double)(z + 1) - d5, d2, d1);
|
||||
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 0) - d4, (double)(z + 1) - d5, d0, d3);
|
||||
tessellator.addVertexWithUV((double)(x + 1) + d4, (double)(y + 1) + d4, (double)(z + 1) - d5, d0, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 1) + d4, (double)(z + 1) - d5, d2, d1);
|
||||
tessellator.addVertexWithUV((double)(x + 0) - d4, (double)(y + 0) - d4, (double)(z + 1) - d5, d2, d3);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return BlockChain.renderID;
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.BlockCanCrate;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -64,6 +65,6 @@ public class RenderConserve implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334085;
|
||||
return BlockCanCrate.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.network.BlockConveyor;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -75,7 +76,7 @@ public class RenderConveyor implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334086;
|
||||
return BlockConveyor.renderID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMetalFence;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
@ -79,7 +80,7 @@ public class RenderFence implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334082;
|
||||
return BlockMetalFence.renderID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.machine.MachineRTG;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -48,6 +49,6 @@ public class RenderRTGBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334087;
|
||||
return MachineRTG.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.DecoBlock;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -83,7 +84,7 @@ public class RenderScaffoldBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334078;
|
||||
return DecoBlock.renderIDScaffold;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.Spikes;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -64,6 +65,6 @@ public class RenderSpikeBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334088;
|
||||
return Spikes.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.generic.DecoBlock;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -64,6 +65,6 @@ public class RenderSteelBeam implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334080;
|
||||
return DecoBlock.renderIDBeam;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@ -116,7 +118,7 @@ public class RenderTaintBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334077;
|
||||
return BlockTaint.renderID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.block;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.DecoTapeRecorder;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
@ -82,6 +83,6 @@ public class RenderTapeBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334079;
|
||||
return DecoTapeRecorder.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
|
||||
GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0));
|
||||
GL11.glTranslated(-0.625, 0, 0.625);
|
||||
|
||||
int count = chem.tanks[0].getFill() / 1000;
|
||||
int count = chem.tanks[0].getFill() * 16 / 24000;
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
if(i < count - 1)
|
||||
@ -150,7 +150,7 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
|
||||
GL11.glColor3ub((byte)((color & 0xFF0000) >> 16), (byte)((color & 0x00FF00) >> 8), (byte)((color & 0x0000FF) >> 0));
|
||||
GL11.glTranslated(0.625, 0, 0.625);
|
||||
|
||||
int count = chem.tanks[1].getFill() / 1000;
|
||||
int count = chem.tanks[1].getFill() * 16 / 24000;
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
if(i < count - 1)
|
||||
|
||||
@ -0,0 +1,84 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import com.hbm.entity.item.EntityFireworks;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityFireworks extends TileEntity {
|
||||
|
||||
public int color = 0xff0000;
|
||||
public String message = "EAT MY ASS";
|
||||
public int charges;
|
||||
|
||||
int index;
|
||||
int delay;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && !message.isEmpty() && charges > 0) {
|
||||
|
||||
delay--;
|
||||
|
||||
if(delay <= 0) {
|
||||
delay = 30;
|
||||
|
||||
int c = (int)(message.charAt(index));
|
||||
|
||||
int mod = index % 9;
|
||||
|
||||
double offX = (mod / 3 - 1) * 0.3125;
|
||||
double offZ = (mod % 3 - 1) * 0.3125;
|
||||
|
||||
EntityFireworks fireworks = new EntityFireworks(worldObj, xCoord + 0.5 + offX, yCoord + 1.5, zCoord + 0.5 + offZ, color, c);
|
||||
worldObj.spawnEntityInWorld(fireworks);
|
||||
|
||||
worldObj.playSoundAtEntity(fireworks, "hbm:weapon.rocketFlame", 3.0F, 1.0F);
|
||||
|
||||
charges--;
|
||||
this.markDirty();
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", "flame");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5 + offX, yCoord + 1.125, zCoord + 0.5 + offZ), new TargetPoint(this.worldObj.provider.dimensionId, xCoord + 0.5 + offX, yCoord + 1.125, zCoord + 0.5 + offZ, 100));
|
||||
|
||||
index++;
|
||||
|
||||
if(index >= message.length()) {
|
||||
index = 0;
|
||||
delay = 100;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
delay = 0;
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.charges = nbt.getInteger("charges");
|
||||
this.color = nbt.getInteger("color");
|
||||
this.message = nbt.getString("message");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setInteger("charges", charges);
|
||||
nbt.setInteger("color", color);
|
||||
nbt.setString("message", message);
|
||||
}
|
||||
}
|
||||