more cleanup, configs

This commit is contained in:
Boblet 2024-03-22 15:09:21 +01:00
parent 3f3d7551d5
commit 2c1c56a037
32 changed files with 54 additions and 1699 deletions

View File

@ -17,6 +17,7 @@
* Bottlecap blocks now use a single block ID and metadata instead of using one ID per type. This change however will delete all existing bottlecap blocks in the world
* Removed the config option for silos (the option no longer works anyway since the new silos use the structure component system)
* Finally removed the deaerator
* Removed some of the ancient test blocks that haven't been needed in about 8 years
* Removed a few other minor things that won't be mentioned because nobody's gonna even notice their absence anyway
* Retextured the laser detonator to look more like the old detonator, but keeping the 3D model
* Bedrock ores can now be customized in creative mode. Using a drillbit sets the tier, a fluid container sets the borefluid requirement and any other item sets the resource.
@ -39,6 +40,7 @@
* Pylons and wire connectors now use a texture instead of a solid colored wire
* The cable model has been simplified, being only a single face instead of three faces stuck inside each other at weird angles
* Cables now sag slightly more at long ranges
* There are now configs for toggling the startup message as well as the guidebook
## Fixed
* WarTec should now be compatible again

View File

@ -45,17 +45,10 @@ public class ModBlocks {
registerBlock();
}
public static Block test_render;
public static Block test_bomb;
public static Block test_bomb_advanced;
public static Block test_nuke;
public static Block event_tester;
public static Block obj_tester;
public static Block test_core;
public static Block test_charge;
public static Block test_pipe;
public static Block test_ct;
public static Block test_rail;
public static Block structure_anchor;
public static Block ore_uranium;
@ -1274,17 +1267,10 @@ public class ModBlocks {
private static void initializeBlock() {
test_render = new TestRender(Material.rock).setBlockName("test_render").setCreativeTab(null);
test_bomb = new TestBomb(Material.tnt).setBlockName("test_bomb").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":test_bomb");
test_bomb_advanced = new TestBombAdvanced(Material.tnt).setBlockName("test_bomb_advanced").setCreativeTab(null);
test_nuke = new TestNuke(Material.iron).setBlockName("test_nuke").setCreativeTab(null).setHardness(2.5F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":test_nuke");
event_tester = new TestEventTester(Material.iron).setBlockName("event_tester").setCreativeTab(null).setHardness(2.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":event_tester");
obj_tester = new TestObjTester(Material.iron).setBlockName("obj_tester").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
test_core = new TestCore(Material.iron).setBlockName("test_core").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_core");
test_charge = new TestCharge(Material.iron).setBlockName("test_charge").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F);
test_pipe = new TestPipe(Material.iron).setBlockName("test_pipe").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":pipe_neo");
test_ct = new TestCT(Material.iron).setBlockName("test_ct").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_ct");
test_rail = new TestRail(Material.iron).setBlockName("test_rail").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_rail");
structure_anchor = new BlockGeneric(Material.iron).setBlockName("structure_anchor").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":structure_anchor");
ore_uranium = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
@ -2447,20 +2433,10 @@ public class ModBlocks {
private static void registerBlock() {
//Test
GameRegistry.registerBlock(test_render, test_render.getUnlocalizedName());
//GameRegistry.registerBlock(test_container, test_container.getUnlocalizedName());
GameRegistry.registerBlock(test_bomb, test_bomb.getUnlocalizedName());
GameRegistry.registerBlock(test_bomb_advanced, test_bomb_advanced.getUnlocalizedName());
GameRegistry.registerBlock(test_nuke, test_nuke.getUnlocalizedName());
GameRegistry.registerBlock(event_tester, event_tester.getUnlocalizedName());
GameRegistry.registerBlock(obj_tester, obj_tester.getUnlocalizedName());
GameRegistry.registerBlock(test_core, test_core.getUnlocalizedName());
GameRegistry.registerBlock(test_charge, test_charge.getUnlocalizedName());
GameRegistry.registerBlock(test_pipe, test_pipe.getUnlocalizedName());
GameRegistry.registerBlock(test_ct, test_ct.getUnlocalizedName());
GameRegistry.registerBlock(test_rail, test_rail.getUnlocalizedName());
GameRegistry.registerBlock(structure_anchor, structure_anchor.getUnlocalizedName());
//Ores

View File

@ -5,7 +5,6 @@ import java.util.List;
import com.hbm.blocks.IBlockMulti;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.test.TestPipe;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
@ -13,6 +12,7 @@ import com.hbm.lib.RefStrings;
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
@ -109,9 +109,12 @@ public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti, ILo
}
return super.getPickBlock(target, world, x, y, z, player);
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
@Override
public int getRenderType() {
return TestPipe.renderID;
return renderID;
}
@Override

View File

@ -1,83 +0,0 @@
package com.hbm.blocks.test;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
public class TestBomb extends Block {
int bombStartStrength = 40;
int bombStrengthA = 10;
protected int timer1 = 20;
int timer2 = timer1;
public TestBomb(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
public void onBlockAdded(World world, int x, int y, int z)
{
super.onBlockAdded(world, x, y, z);
if (world.isBlockIndirectlyGettingPowered(x, y, z))
{
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
world.setBlockToAir(x, y, z);
soos(world, x, y, z, bombStartStrength, bombStrengthA);
}
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor Block
*/
@Override
public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_)
{
if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z))
{
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
p_149695_1_.setBlockToAir(x, y, z);
soos(p_149695_1_, x, y, z, bombStartStrength, bombStrengthA);
}
}
public boolean soos(World world, int x, int y, int z, int bombStartStrength, int bombStrengthA)
{
if (!world.isRemote)
explode(world,x,y,z, bombStartStrength, bombStrengthA);
world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns a huge explosion particle
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); //x,y,z,sound,volume,pitch
return false;
}
public void explode(World world, int x, int y, int z, int bombStartStrength, int bombStrengthA)
{
int r = bombStartStrength; //radius of explosion (change this to bigger numbers for more epicness)
int r2 = r*r; //radius^2, for faster distance checks. (No sqrt needed for pythagoras)
int r22 = r2/2; //half of r^2, calculations outside the loop only get called once. Always pull out as many things from the loop as possible.
for (int xx = -r; xx < r; xx++)
{
int X = xx+x; //x coordinate we are working on
int XX = xx*xx; //more stuff for a faster distance check
for (int yy = -r; yy < r; yy++)
{
int Y = yy+y; //y coord
//int YY = XX+yy*yy*3;
int YY = XX+yy*yy*3;
for (int zz = -r; zz < r; zz++)
{
int Z = zz+z; //z coord
int ZZ = YY+zz*zz; //final= x*x+y*y+z*z. remind you of anything?
if (ZZ<r22+world.rand.nextInt(r22)) //and the distance check. x*x+y*y+z*z < radius^2 is the same as sqrt(x*x+y*y+z*z) < radius, the distance formula. Here we use a random number between r^2 and r^2/2 for a jagged explosion.
{ //but since sqrt is slow we optimize the algorithm for super fast explosions! Yay!
//faster explosions means more explosions per second!
world.setBlock(X, Y, Z, Blocks.air, 0, 3); //destroy the block if its within the radius
} //you can change the if statement to if (ZZ<r2) for a smoother explosion crater.
}
}
}
}
}

View File

@ -1,138 +0,0 @@
package com.hbm.blocks.test;
import com.hbm.entity.logic.EntityNukeExplosionMK5;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.bomb.TileEntityTestBombAdvanced;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
//Testblock zum Rendern/<EFBFBD>ndern der visuellen Eigenschaften eines Tiles (Blockes)
//"extends BlockContainer" um ein TileEntity zu erschaffen
public class TestBombAdvanced extends BlockContainer {
//Lil' Boyy :3
int bombStartStrength = 40;
int bombStrengthA = 10;
protected int timer1 = 20;
int timer2 = timer1;
//Normaler Matrial-Constructor
public TestBombAdvanced(Material p_i45394_1_) {
super(p_i45394_1_);
}
//Nicht verf<EFBFBD>gbarer Rendertyp, setzt den Switch auf "Default" und erm<EFBFBD>glicht einen Customrenderer
@Override
public int getRenderType(){
return -1;
}
//Ob der Block transparent ist (Glas, Glowstone, Wasser, etc)
@Override
public boolean isOpaqueCube() {
return false;
}
//"Default" beim Switch zum Rendern erm<EFBFBD>glicht die Abfrage "renderAsNormalBlock", "true" um es als einen normalen Block rendern zu lassen, "false" f<EFBFBD>r einen Customrenderer
@Override
public boolean renderAsNormalBlock() {
return false;
}
//Erstellen eines TileEntitys
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return new TileEntityTestBombAdvanced();
}
//GUI Blocktextur muss f<EFBFBD>r Custommodel-Blocke nachtr<EFBFBD>glich ge<EFBFBD>ndert werden
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render");
}
//Setzt die Blockkollisionsbox (xMin, yMin, zMin, xMax, yMax, zMax)
@Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
{
float f = 0.0625F;
this.setBlockBounds(4*f, 0.0F, 0.0F, 12*f, 8*f, 1.0F);
}
@Override
public void onBlockAdded(World world, int x, int y, int z)
{
super.onBlockAdded(world, x, y, z);
if (world.isBlockIndirectlyGettingPowered(x, y, z))
{
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
world.setBlockToAir(x, y, z);
soos(world, x, y, z, bombStartStrength, bombStrengthA);
}
}
@Override
public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_)
{
if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z))
{
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
p_149695_1_.setBlockToAir(x, y, z);
soos(p_149695_1_, x, y, z, bombStartStrength, bombStrengthA);
}
}
public boolean soos(World world, int x, int y, int z, int bombStartStrength, int bombStrengthA) // <---Ettib<EFBFBD>r taught me this
{
if (!world.isRemote)
explode(world,x,y,z, bombStartStrength, bombStrengthA);
world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns a huge explosion particle
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); //x,y,z,sound,volume,pitch
return false;
}
public void explode(World world, int x, int y, int z, int bombStartStrength, int bombStrengthA)
{
/*int r = bombStartStrength; //radius of explosion (change this to bigger numbers for more epicness)
int r2 = r*r; //radius^2, for faster distance checks. (No sqrt needed for pythagoras)
int r22 = r2/2; //half of r^2, calculations outside the loop only get called once. Always pull out as many things from the loop as possible.
for (int xx = -r; xx < r; xx++)
{
int X = xx+x; //x coordinate we are working on
int XX = xx*xx; //more stuff for a faster distance check
for (int yy = -r; yy < r; yy++)
{
int Y = yy+y; //y coord
int YY = XX+yy*yy*3;
for (int zz = -r; zz < r; zz++)
{
int Z = zz+z; //z coord
int ZZ = YY+zz*zz; //final= x*x+y*y+z*z. remind you of anything?
if (ZZ<r22+world.rand.nextInt(r22)) //and the distance check. x*x+y*y+z*z < radius^2 is the same as sqrt(x*x+y*y+z*z) < radius, the distance formula. Here we use a random number between r^2 and r^2/2 for a jagged explosion.
{ //but since sqrt is slow we optimize the algorithm for super fast explosions! Yay!
//faster explosions means more explosions per second!
world.setBlock(X, Y, Z, Blocks.air, 0, 3); //destroy the block if its within the radius
} //you can change the if statement to if (ZZ<r2) for a smoother explosion crater.
}
}
}*/
world.setBlock(x, y, z, Blocks.air);
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(world, 50, x, y, z));
}
}

View File

@ -1,54 +0,0 @@
package com.hbm.blocks.test;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
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.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class TestCT extends Block implements IBlockCT {
public TestCT(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
public int getRenderType() {
return CT.renderID;
}
@Override
public boolean renderAsNormalBlock() {
return true;
}
@Override
public boolean isOpaqueCube() {
return true;
}
@SideOnly(Side.CLIENT) public CTStitchReceiver rec;
@SideOnly(Side.CLIENT) protected IIcon secondIcon;
@SideOnly(Side.CLIENT) public CTStitchReceiver secondrec;
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName());
this.secondIcon = reg.registerIcon(this.getTextureName() + ".1");
this.rec = IBlockCT.primeReceiver(reg, this.getTextureName(), this.blockIcon);
this.secondrec = IBlockCT.primeReceiver(reg, this.getTextureName() + ".1", this.secondIcon);
}
@Override
public IIcon[] getFragments(IBlockAccess world, int x, int y, int z) {
if(world.getBlockMetadata(x, y, z) != 0)
return secondrec.fragCache;
return rec.fragCache;
}
}

View File

@ -1,263 +0,0 @@
package com.hbm.blocks.test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.bomb.TileEntityTestNuke;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.EnchantmentProtection;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
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.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class TestNuke extends BlockContainer {
protected int timer1 = 20;
int timer2 = timer1;
public TileEntityTestNuke tetn = new TileEntityTestNuke();
private final Random field_149933_a = new Random();
private static boolean keepInventory = false;
private Map field_77288_k = new HashMap();
public TestNuke(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityTestNuke();
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(ModBlocks.test_nuke);
}
@Override
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
if (!keepInventory)
{
TileEntityTestNuke tileentityfurnace = (TileEntityTestNuke)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tileentityfurnace != null)
{
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
{
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null)
{
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = this.field_149933_a.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
p_149749_1_.spawnEntityInWorld(entityitem);
}
}
}
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
}
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote)
{
return true;
} else if(!player.isSneaking())
{
TileEntityTestNuke entity = (TileEntityTestNuke) world.getTileEntity(x, y, z);
if(entity != null)
{
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
}
return true;
} else {
return false;
}
}
@Override
public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_)
{
TileEntityTestNuke entity = (TileEntityTestNuke) p_149695_1_.getTileEntity(x, y, z);
if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z))
{
if(entity.getNukeTier() > 0)
{
this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1);
int pootis = entity.getNukeTier();
entity.clearSlots();
p_149695_1_.setBlockToAir(x, y, z);
switch(pootis)
{
case 1:
igniteTestBomb(p_149695_1_, x, y, z, 20); break;
case 2:
igniteTestBomb(p_149695_1_, x, y, z, 40); break;
case 999:
igniteTestBomb(p_149695_1_, x, y, z, 200); break;
}
}
}
}
public boolean igniteTestBomb(World world, int x, int y, int z, int bombStartStrength)
{
if (!world.isRemote)
detonateTestBomb(world,x,y,z, bombStartStrength);
world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns a huge explosion particle
world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); //x,y,z,sound,volume,pitch
return false;
}
public void detonateTestBomb(World world, int x, int y, int z, int bombStartStrength)
{
//Rodol's awesome destruction code
int r = bombStartStrength; //radius of explosion (change this to bigger numbers for more epicness)
int r2 = r*r; //radius^2, for faster distance checks. (No sqrt needed for pythagoras)
int r22 = r2/2; //half of r^2, calculations outside the loop only get called once. Always pull out as many things from the loop as possible.
for (int xx = -r; xx < r; xx++)
{
int X = xx+x; //x coordinate we are working on
int XX = xx*xx; //more stuff for a faster distance check
for (int yy = -r; yy < r; yy++)
{
int Y = yy+y; //y coord
int YY = XX+yy*yy*3;
for (int zz = -r; zz < r; zz++)
{
int Z = zz+z; //z coord
int ZZ = YY+zz*zz; //final= x*x+y*y+z*z. remind you of anything?
if (ZZ<r22+world.rand.nextInt(r22)) //and the distance check. x*x+y*y+z*z < radius^2 is the same as sqrt(x*x+y*y+z*z) < radius, the distance formula. Here we use a random number between r^2 and r^2/2 for a jagged explosion.
{ //but since sqrt is slow we optimize the algorithm for super fast explosions! Yay!
//faster explosions means more explosions per second!
if(world.getBlock(X, Y, Z) != Blocks.bedrock)world.setBlock(X, Y, Z, Blocks.air, 0, 3); //destroy the block if its within the radius ...and if it's not bedrock :D
} //you can change the if statement to if (ZZ<r2) for a smoother explosion crater.
}
}
}
//BlockTNT.class Damage code
float f = bombStartStrength;
int i;
int j;
int k;
double d5;
double d6;
double d7;
double wat = bombStartStrength*2;
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 (d9 < wat)
{
d5 /= d9;
d6 /= d9;
d7 /= d9;
double d11 = (1.0D - d4);// * d10;
entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D)));
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
entity.motionX += d5 * d8;
entity.motionY += d6 * d8;
entity.motionZ += d7 * d8;
if (entity instanceof EntityPlayer)
{
this.field_77288_k.put(entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11));
}
}
}
}
bombStartStrength = (int)f;
//Particle creation: coming soon!
//spawnMush(world, x, y, z);
}
public void spawnMush(World world, int x, int y, int z)
{
for(int m = 0; m < 10; m++)
{
//world.spawnParticle("largesmoke", x, y + m, z, 0, 0, 0);
world.setBlock(x, y + m, z, ModBlocks.event_tester, 0, 0);
}
for(int m = -4; m < 6; m++)
{
for(int n = -6; n < 4; n++)
{
//world.spawnParticle("largesmoke", x + m, y + 10, z + n, 0, 0, 0);
world.setBlock(x + m, y + 10, z + n, ModBlocks.event_tester, 0, 0);
}
}
}
}

View File

@ -1,58 +0,0 @@
package com.hbm.blocks.test;
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
import cpw.mods.fml.client.registry.RenderingRegistry;
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.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class TestPipe extends BlockContainer {
@SideOnly(Side.CLIENT)
protected IIcon overlay;
public TestPipe(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
super.registerBlockIcons(iconRegister);
this.overlay = iconRegister.registerIcon(this.getTextureName() + "_overlay");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 0 ? this.blockIcon : this.overlay;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityPipeBaseNT();
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
@Override
public int getRenderType() {
return renderID;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
}

View File

@ -1,60 +0,0 @@
package com.hbm.blocks.test;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TestRail extends BlockContainer {
public TestRail(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return null;
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
/*
* +x
* 1 2 3
* +z 4 0 5 -z
* 6 7 8
* -x
*/
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
if(!(player instanceof EntityPlayer))
return;
world.setBlock(x + 1, y, z + 1, this, 1, 3);
world.setBlock(x + 1, y, z, this, 2, 3);
world.setBlock(x + 1, y, z - 1, this, 3, 3);
world.setBlock(x, y, z + 1, this, 4, 3);
world.setBlock(x, y, z - 1, this, 5, 3);
world.setBlock(x - 1, y, z + 1, this, 6, 3);
world.setBlock(x - 1, y, z, this, 7, 3);
world.setBlock(x - 1, y, z - 1, this, 8, 3);
}
}

View File

@ -1,68 +0,0 @@
package com.hbm.blocks.test;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.deco.TileEntityTestRender;
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.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
//Testblock zum Rendern/<EFBFBD>ndern der visuellen Eigenschaften eines Tiles (Blockes)
//"extends BlockContainer" um ein TileEntity zu erschaffen
public class TestRender extends BlockContainer {
//Y U NO WANTED WORKINGS? NAO U WORKINGS AN I KICK UR ARSE
//Normaler Matrial-Constructor
public TestRender(Material p_i45394_1_) {
super(p_i45394_1_);
}
//Nicht verf<EFBFBD>gbarer Rendertyp, setzt den Switch auf "Default" und erm<EFBFBD>glicht einen Customrenderer
@Override
public int getRenderType(){
return -1;
}
//Ob der Block transparent ist (Glas, Glowstone, Wasser, etc)
@Override
public boolean isOpaqueCube() {
return false;
}
//"Default" beim Switch zum Rendern erm<EFBFBD>glicht die Abfrage "renderAsNormalBlock", "true" um es als einen normalen Block rendern zu lassen, "false" f<EFBFBD>r einen Customrenderer
@Override
public boolean renderAsNormalBlock() {
return false;
}
//Erstellen eines TileEntitys
@Override
public TileEntity createNewTileEntity(World var1, int var2) {
return new TileEntityTestRender();
}
//GUI Blocktextur muss f<EFBFBD>r Custommodel-Blocke nachtr<EFBFBD>glich ge<EFBFBD>ndert werden
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":test_render");
}
//Setzt die Blockkollisionsbox (xMin, yMin, zMin, xMax, yMax, zMax)
@Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
{
float f = 0.0625F;
this.setBlockBounds(2*f, 0.0F, 2*f, 14*f, 1.0F, 14*f);
}
}

View File

@ -32,6 +32,8 @@ public class GeneralConfig {
public static boolean enableStatReRegistering = true;
public static boolean enableKeybindOverlap = true;
public static boolean enableFluidContainerCompat = true;
public static boolean enableMOTD = true;
public static boolean enableGuideBook = true;
public static int hintPos = 0;
public static boolean enableExpensiveMode = false;
@ -94,6 +96,8 @@ public class GeneralConfig {
enableStatReRegistering = config.get(CATEGORY_GENERAL, "1.33_enableStatReRegistering", true, "If enabled, will re-register item crafting/breaking/usage stats in order to fix a forge bug where modded items just won't show up.").getBoolean(true);
enableKeybindOverlap = config.get(CATEGORY_GENERAL, "1.34_enableKeybindOverlap", true, "If enabled, will handle keybinds that would otherwise be ignored due to overlapping.").getBoolean(true);
enableFluidContainerCompat = config.get(CATEGORY_GENERAL, "1.35_enableFluidContainerCompat", true, "If enabled, fluid containers will be oredicted and interchangable in recipes with other mods' containers, as well as TrainCraft's diesel being considered a valid diesel canister.").getBoolean(true);
enableMOTD = config.get(CATEGORY_GENERAL, "1.36_enableMOTD", true, "If enabled, shows the 'Loaded mod!' chat message as well as update notifications when joining a world").getBoolean(true);
enableGuideBook = config.get(CATEGORY_GENERAL, "1.37_enableGuideBook", true, "If enabled, gives players the guide book when joining the world for the first time").getBoolean(true);
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);

View File

@ -1,26 +0,0 @@
package com.hbm.creativetabs;
import com.hbm.blocks.ModBlocks;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
public class TestTab extends CreativeTabs {
public TestTab(int p_i1853_1_, String p_i1853_2_) {
super(p_i1853_1_, p_i1853_2_);
}
@Override
public Item getTabIconItem() {
if(ModBlocks.test_nuke != null)
{
return Item.getItemFromBlock(ModBlocks.test_nuke);
}
return Items.iron_pickaxe;
}
}

View File

@ -1,50 +0,0 @@
package com.hbm.inventory.container;
import com.hbm.tileentity.bomb.TileEntityTestNuke;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerTestNuke extends Container {
private TileEntityTestNuke testNuke;
public ContainerTestNuke(InventoryPlayer invPlayer, TileEntityTestNuke tedf) {
testNuke = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 26, 36));
this.addSlotToContainer(new Slot(tedf, 1, 44, 36));
this.addSlotToContainer(new Slot(tedf, 2, 62, 36));
this.addSlotToContainer(new Slot(tedf, 3, 80, 36));
this.addSlotToContainer(new Slot(tedf, 4, 98, 36));
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for(int i = 0; i < 9; i++)
{
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
{
return null;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return testNuke.isUseableByPlayer(player);
}
}

View File

@ -1,70 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import com.hbm.inventory.container.ContainerTestNuke;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.bomb.TileEntityTestNuke;
public class GUITestNuke extends GuiContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gunBombSchematicSmall.png");
private TileEntityTestNuke testNuke;
public GUITestNuke(InventoryPlayer invPlayer, TileEntityTestNuke tedf) {
super(new ContainerTestNuke(invPlayer, tedf));
testNuke = tedf;
this.xSize = 176;
this.ySize = 166;
}
@Override
protected void drawGuiContainerForegroundLayer( int i, int j) {
String name = this.testNuke.hasCustomInventoryName() ? this.testNuke.getInventoryName() : I18n.format(this.testNuke.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
switch(testNuke.getNukeTier())
{
case 0:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 0, 16, 16); break;
case 1:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 16, 16, 16); break;
case 2:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 32, 16, 16); break;
case 3:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 48, 16, 16); break;
case 4:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 64, 16, 16); break;
case 5:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 80, 16, 16); break;
case 6:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 96, 16, 16); break;
case 7:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 112, 16, 16); break;
case 8:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 128, 16, 16); break;
case 9:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 144, 16, 16); break;
case 999:
drawTexturedModalRect(guiLeft + 142, guiTop + 36, 176, 160, 16, 16); break;
default:
}
}
}

View File

@ -1906,7 +1906,6 @@ public class ModItems {
public static Item gas_mask_olde;
public static Item mask_rag;
public static Item mask_piss;
public static Item oxy_mask;
public static Item hat;
public static Item beta;
public static Item no9;

View File

@ -11,7 +11,6 @@ import com.hbm.render.model.ModelCloak;
import com.hbm.render.model.ModelGoggles;
import com.hbm.render.model.ModelHat;
import com.hbm.render.model.ModelM65;
import com.hbm.render.model.ModelOxygenMask;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -37,8 +36,6 @@ public class ArmorModel extends ItemArmor {
@SideOnly(Side.CLIENT)
private ModelCloak modelCloak;
@SideOnly(Side.CLIENT)
private ModelOxygenMask modelOxy;
@SideOnly(Side.CLIENT)
private ModelM65 modelM65;
@SideOnly(Side.CLIENT)
private ModelHat modelHat;
@ -65,14 +62,6 @@ public class ArmorModel extends ItemArmor {
return this.modelGoggles;
}
}
if(this == ModItems.oxy_mask) {
if(armorSlot == 0) {
if(this.modelOxy == null) {
this.modelOxy = new ModelOxygenMask();
}
return this.modelOxy;
}
}
if(this == ModItems.hat) {
if(armorSlot == 0) {
if(this.modelHat == null) {
@ -97,9 +86,6 @@ public class ArmorModel extends ItemArmor {
if(stack.getItem() == ModItems.goggles) {
return "hbm:textures/models/Goggles.png";
}
if(stack.getItem() == ModItems.oxy_mask) {
return null;
}
if(stack.getItem() == ModItems.cape_test) {
return "hbm:textures/models/TestCape.png";
}

View File

@ -159,8 +159,6 @@ public class ClientProxy extends ServerProxy {
@Override
public void registerTileEntitySpecialRenderer() {
//test crap
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestRender.class, new RenderTestRender());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestBombAdvanced.class, new RenderTestBombAdvanced());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityObjTester.class, new RendererObjTester());
//deco
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoPoleSatelliteReceiver.class, new RenderPoleSatelliteReceiver());
@ -467,8 +465,6 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.missile_carrier, new ItemRenderMissileGeneric(RenderMissileType.TYPE_CARRIER));
MinecraftForgeClient.registerItemRenderer(ModItems.missile_shuttle, new ItemRenderMissileGeneric(RenderMissileType.TYPE_ROBIN));
//test crap
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.test_bomb_advanced), new ItemRenderTestBombAdvanced());
//templates
MinecraftForgeClient.registerItemRenderer(ModItems.assembly_template, new ItemRenderTemplate());
MinecraftForgeClient.registerItemRenderer(ModItems.chemistry_template, new ItemRenderTemplate());

View File

@ -1241,6 +1241,13 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.bottle2_sunset");
ignoreMappings.add("hbm:item.cap_sunset");
ignoreMappings.add("hbm:item.cap_star");
ignoreMappings.add("hbm:tile.test_render");
ignoreMappings.add("hbm:tile.test_bomb");
ignoreMappings.add("hbm:tile.test_bomb_advanced");
ignoreMappings.add("hbm:tile.test_nuke");
ignoreMappings.add("hbm:tile.test_pipe");
ignoreMappings.add("hbm:tile.test_ct");
ignoreMappings.add("hbm:tile.test_rail");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -158,6 +158,8 @@ public class ModEventHandler {
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
if(!event.player.worldObj.isRemote) {
if(GeneralConfig.enableMOTD) {
event.player.addChatMessage(new ChatComponentText("Loaded world with Hbm's Nuclear Tech Mod " + RefStrings.VERSION + " for Minecraft 1.7.10!"));
if(HTTPHandler.newVersion) {
@ -174,11 +176,13 @@ public class ModEventHandler {
.appendSibling(new ChatComponentText(" to download!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)))
);
}
}
if(MobConfig.enableDucks && event.player instanceof EntityPlayerMP && !event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked"))
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket("Press O to Duck!", MainRegistry.proxy.ID_DUCK, 30_000), (EntityPlayerMP) event.player);
if(GeneralConfig.enableGuideBook) {
HbmPlayerProps props = HbmPlayerProps.getData(event.player);
if(!props.hasReceivedBook) {
@ -188,6 +192,7 @@ public class ModEventHandler {
}
}
}
}
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {

View File

@ -2,7 +2,7 @@ package com.hbm.render.block;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.test.TestPipe;
import com.hbm.blocks.network.FluidDuctStandard;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.lib.Library;
@ -146,6 +146,6 @@ public class RenderTestPipe implements ISimpleBlockRenderingHandler {
@Override
public int getRenderId() {
return TestPipe.renderID;
return FluidDuctStandard.renderID;
}
}

View File

@ -1,64 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.bomb.TileEntityTestBombAdvanced;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderTestBombAdvanced implements IItemRenderer {
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
ItemRendererHelper helper) {
return true;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
//TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityTestBombAdvanced(), 0.0D, 0.0D, 0.0D, 0.0F);
switch(type) {
case INVENTORY:
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/NukeTestBomb.png"));
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(0.65F, 0.65F, 0.65F);
GL11.glTranslatef(0.0F, -0.75F, 0.0F);
//bombModel.render((Entity)data[0], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityTestBombAdvanced(), 0.0D, 0.0D, 0.0D, 0.0F);
GL11.glPopMatrix();
break;
case EQUIPPED:
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/NukeTestBomb.png"));
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-1.5F, 0.0F, 0.0F);
//bombModel.render((Entity)data[0], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityTestBombAdvanced(), 0.0D, 0.0D, 0.0D, 0.0F);
GL11.glPopMatrix();
break;
case EQUIPPED_FIRST_PERSON:
case ENTITY:
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityTestBombAdvanced(), 0.0D, 0.0D, 0.0D, 0.0F);
default: break;
}
}
}

View File

@ -1,114 +0,0 @@
package com.hbm.render.model;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
public class ModelOxygenMask extends ModelBiped {
// fields
ModelRenderer mask;
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
public ModelOxygenMask() {
textureWidth = 64;
textureHeight = 32;
mask = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 8, 3);
Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
convertToChild(mask, Shape1);
Shape2 = new ModelRenderer(this, 22, 0);
Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
convertToChild(mask, Shape2);
Shape3 = new ModelRenderer(this, 22, 0);
Shape3.addBox(0F, 0F, 0F, 2, 2, 1);
Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
convertToChild(mask, Shape3);
Shape4 = new ModelRenderer(this, 0, 11);
Shape4.addBox(0F, 0F, 0F, 2, 2, 2);
Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, -0.7853982F, 0F, 0F);
convertToChild(mask, Shape4);
Shape5 = new ModelRenderer(this, 0, 15);
Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3);
Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4);
Shape5.setTextureSize(64, 32);
Shape5.mirror = true;
setRotation(Shape5, -0.7853982F, 0F, 0F);
convertToChild(mask, Shape5);
Shape6 = new ModelRenderer(this, 0, 22);
Shape6.addBox(0F, 0F, 0F, 8, 1, 5);
Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
convertToChild(mask, Shape6);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) {
this.isSneak = true;
} else {
this.isSneak = false;
}
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
this.mask.rotationPointX = this.bipedHead.rotationPointX;
this.mask.rotationPointY = this.bipedHead.rotationPointY;
this.mask.rotateAngleY = this.bipedHead.rotateAngleY;
this.mask.rotateAngleX = this.bipedHead.rotateAngleX;
}
@Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
GL11.glPushMatrix();
GL11.glScalef(1.15F, 1.15F, 1.15F);
this.mask.render(par7);
GL11.glPopMatrix();
}
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) {
// move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ;
// make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ;
// create relationship
parParent.addChild(parChild);
}
}

View File

@ -1,125 +0,0 @@
// Date: 18.05.2015 21:04:52
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package com.hbm.render.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTestBombAdvanced extends ModelBase
{
//fields
ModelRenderer FinEnd;
ModelRenderer BombTip;
ModelRenderer FinBase;
ModelRenderer FinTop;
ModelRenderer FinBottom;
ModelRenderer FinLeft;
ModelRenderer FinRight;
ModelRenderer BombBody;
public ModelTestBombAdvanced()
{
textureWidth = 128;
textureHeight = 128;
FinEnd = new ModelRenderer(this, 0, 0);
FinEnd.addBox(0F, 0F, 0F, 8, 8, 4);
FinEnd.setRotationPoint(-4F, 16F, 20F);
FinEnd.setTextureSize(128, 128);
FinEnd.mirror = true;
setRotation(FinEnd, 0F, 0F, 0F);
BombTip = new ModelRenderer(this, 55, 0);
BombTip.addBox(0F, 0F, 0F, 6, 6, 2);
BombTip.setRotationPoint(-3F, 17F, -24F);
BombTip.setTextureSize(128, 128);
BombTip.mirror = true;
setRotation(BombTip, 0F, 0F, 0F);
FinBase = new ModelRenderer(this, 74, 0);
FinBase.addBox(0F, 0F, 0F, 6, 6, 2);
FinBase.setRotationPoint(-3F, 17F, 14F);
FinBase.setTextureSize(128, 128);
FinBase.mirror = true;
setRotation(FinBase, 0F, 0F, 0F);
FinTop = new ModelRenderer(this, 0, 74);
FinTop.addBox(0F, 0F, -6F, 8, 0, 6);
FinTop.setRotationPoint(-4F, 16F, 20F);
FinTop.setTextureSize(128, 128);
FinTop.mirror = true;
setRotation(FinTop, 0.4363323F, 0F, 0F);
FinBottom = new ModelRenderer(this, 0, 74);
FinBottom.addBox(0F, 0F, -6F, 8, 0, 6);
FinBottom.setRotationPoint(-4F, 24F, 20F);
FinBottom.setTextureSize(128, 128);
FinBottom.mirror = true;
setRotation(FinBottom, -0.4363323F, 0F, 0F);
FinLeft = new ModelRenderer(this, 0, 51);
FinLeft.addBox(0F, 0F, -6F, 0, 8, 6);
FinLeft.setRotationPoint(4F, 16F, 20F);
FinLeft.setTextureSize(128, 128);
FinLeft.mirror = true;
setRotation(FinLeft, 0F, 0.4363323F, 0F);
FinRight = new ModelRenderer(this, 0, 51);
FinRight.addBox(0F, 0F, -6F, 0, 8, 6);
FinRight.setRotationPoint(-4F, 16F, 20F);
FinRight.setTextureSize(128, 128);
FinRight.mirror = true;
setRotation(FinRight, 0F, -0.4363323F, 0F);
BombBody = new ModelRenderer(this, 0, 0);
BombBody.addBox(0F, 0F, 0F, 8, 8, 36);
BombBody.setRotationPoint(-4F, 16F, -22F);
BombBody.setTextureSize(128, 128);
BombBody.mirror = true;
setRotation(BombBody, 0F, 0F, 0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
FinEnd.render(f5);
BombTip.render(f5);
FinBase.render(f5);
FinTop.render(f5);
FinBottom.render(f5);
FinLeft.render(f5);
FinRight.render(f5);
BombBody.render(f5);
}
public void renderModel(float f)
{
FinEnd.render(f);
BombTip.render(f);
FinBase.render(f);
FinTop.render(f);
FinBottom.render(f);
FinLeft.render(f);
FinRight.render(f);
BombBody.render(f);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View File

@ -1,61 +0,0 @@
// Date: 16.05.2015 19:38:19
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package com.hbm.render.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTestRender extends ModelBase
{
//fields
ModelRenderer MainBlock;
public ModelTestRender()
{
textureWidth = 64;
textureHeight = 32;
MainBlock = new ModelRenderer(this, 0, 0);
MainBlock.addBox(0F, 0F, 0F, 12, 16, 12);
MainBlock.setRotationPoint(-6F, 8F, -6F);
MainBlock.setTextureSize(64, 32);
MainBlock.mirror = true;
setRotation(MainBlock, 0F, 0F, 0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
MainBlock.render(f5);
}
public void renderModel(float f) {
MainBlock.render(f);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

View File

@ -1,36 +0,0 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelTestRender;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class RenderRedBarrel extends TileEntitySpecialRenderer {
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":" + "textures/models/ModelRedBarrel.png");
private ModelTestRender model;
public RenderRedBarrel() {
this.model = new ModelTestRender();
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glRotatef(180, 0F, 0F, 1F);
this.bindTexture(texture);
GL11.glPushMatrix();
this.model.renderModel(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}

View File

@ -1,36 +0,0 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelTestBombAdvanced;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class RenderTestBombAdvanced extends TileEntitySpecialRenderer {
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":" + "textures/models/NukeTestBomb.png");
private ModelTestBombAdvanced modelBomb;
public RenderTestBombAdvanced() {
this.modelBomb = new ModelTestBombAdvanced();
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glRotatef(180, 0F, 0F, 1F);
this.bindTexture(texture);
GL11.glPushMatrix();
this.modelBomb.renderModel(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}

View File

@ -1,42 +0,0 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderTestMissile extends Render {
private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Missile.obj");
private IModelCustom boyModel;
private ResourceLocation boyTexture;
public RenderTestMissile() {
boyModel = AdvancedModelLoader.loadModel(objTesterModelRL);
boyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Missile.png");
}
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
bindTexture(boyTexture);
boyModel.renderAll();
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return new ResourceLocation(RefStrings.MODID +":textures/models/Missile.png");
}
}

View File

@ -1,36 +0,0 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelTestRender;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class RenderTestRender extends TileEntitySpecialRenderer {
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":" + "textures/models/ModelTestRender.png");
private ModelTestRender model;
public RenderTestRender() {
this.model = new ModelTestRender();
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glRotatef(180, 0F, 0F, 1F);
this.bindTexture(texture);
GL11.glPushMatrix();
this.model.renderModel(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}

View File

@ -49,10 +49,7 @@ public class TileMappings {
public static List<Class<? extends IConfigurableMachine>> configurables = new ArrayList<Class<? extends IConfigurableMachine>>();
public static void writeMappings() {
put(TileEntityTestBombAdvanced.class, "tilentity_testbombadvanced");
put(TileEntityDiFurnace.class, "tilentity_diFurnace");
put(TileEntityTestNuke.class, "tilentity_testnuke");
put(TileEntityTestRender.class, "tilentity_testrenderer");
put(TileEntityObjTester.class, "tilentity_objtester");
put(TileEntityMachineCentrifuge.class, "tileentity_centrifuge");
put(TileEntityNukeMan.class, "tileentity_nukeman");

View File

@ -1,7 +0,0 @@
package com.hbm.tileentity.bomb;
import net.minecraft.tileentity.TileEntity;
public class TileEntityTestBombAdvanced extends TileEntity {
}

View File

@ -1,222 +0,0 @@
package com.hbm.tileentity.bomb;
import com.hbm.inventory.container.ContainerTestNuke;
import com.hbm.inventory.gui.GUITestNuke;
import com.hbm.items.ModItems;
import com.hbm.tileentity.IGUIProvider;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TileEntityTestNuke extends TileEntity implements ISidedInventory, IGUIProvider {
private ItemStack slots[];
private String customName;
public TileEntityTestNuke() {
slots = new ItemStack[5];
}
@Override
public int getSizeInventory() {
return slots.length;
}
@Override
public ItemStack getStackInSlot(int i) {
return slots[i];
}
@Override
public ItemStack decrStackSize(int i, int j) {
if(slots[i] != null)
{
if(slots[i].stackSize <= j)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
}
ItemStack itemStack1 = slots[i].splitStack(j);
if (slots[i].stackSize == 0)
{
slots[i] = null;
}
return itemStack1;
} else {
return null;
}
}
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if(slots[i] != null)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
} else {
return null;
}
}
@Override
public void setInventorySlotContents(int i, ItemStack itemStack) {
slots[i] = itemStack;
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
{
itemStack.stackSize = getInventoryStackLimit();
}
}
@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.customName : "container.testNuke";
}
@Override
public boolean hasCustomInventoryName() {
return this.customName != null && this.customName.length() > 0;
}
public void setCustomName(String name) {
this.customName = name;
}
@Override
public int getInventoryStackLimit() {
return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
{
return false;
}else{
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
}
}
@Override
public void openInventory() {
}
@Override
public void closeInventory() {
}
@Override
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
return false;
}
@Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
return new int[0];
}
@Override
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
return this.isItemValidForSlot(i, itemStack);
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return j != 0 || i != 1 || itemStack.getItem() == Items.bucket;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
NBTTagList list = nbt.getTagList("items", 10);
slots = new ItemStack[getSizeInventory()];
for(int i = 0; i < list.tagCount(); i++)
{
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
byte b0 = nbt1.getByte("slot");
if(b0 >= 0 && b0 < slots.length)
{
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
}
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
NBTTagList list = new NBTTagList();
for(int i = 0; i < slots.length; i++)
{
if(slots[i] != null)
{
NBTTagCompound nbt1 = new NBTTagCompound();
nbt1.setByte("slot", (byte)i);
slots[i].writeToNBT(nbt1);
list.appendTag(nbt1);
}
}
nbt.setTag("items", list);
}
public int getNukeTier() {
if(this.slots[0] != null && this.slots[1] != null && this.slots[2] != null && this.slots[3] != null && this.slots[4] != null)
{
if(this.slots[0].getItem() == ModItems.test_nuke_tier1_shielding && this.slots[1].getItem() == ModItems.test_nuke_tier1_target && this.slots[2].getItem() == ModItems.test_nuke_tier1_bullet && this.slots[3].getItem() == ModItems.test_nuke_propellant && this.slots[4].getItem() == ModItems.test_nuke_igniter)
{
return 1;
}
if(this.slots[0].getItem() == ModItems.test_nuke_tier2_shielding && this.slots[1].getItem() == ModItems.test_nuke_tier2_target && this.slots[2].getItem() == ModItems.test_nuke_tier2_bullet && this.slots[3].getItem() == ModItems.test_nuke_propellant && this.slots[4].getItem() == ModItems.test_nuke_igniter)
{
return 2;
}
if(this.slots[0].getItem() == Item.getItemFromBlock(Blocks.obsidian) && this.slots[1].getItem() == Items.nether_star && this.slots[2].getItem() == Items.diamond && this.slots[3].getItem() == Item.getItemFromBlock(Blocks.tnt) && this.slots[4].getItem() == Items.repeater)
{
return 999;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
public void clearSlots() {
for(int i = 0; i < slots.length; i++)
{
slots[i] = null;
}
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerTestNuke(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUITestNuke(player.inventory, this);
}
}

View File

@ -1,7 +0,0 @@
package com.hbm.tileentity.deco;
import net.minecraft.tileentity.TileEntity;
public class TileEntityTestRender extends TileEntity {
}