diff --git a/changelog b/changelog index 4a939b783..a05f15dee 100644 --- a/changelog +++ b/changelog @@ -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 diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 2df3a276c..f1cbc04ca 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -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 diff --git a/src/main/java/com/hbm/blocks/network/FluidDuctStandard.java b/src/main/java/com/hbm/blocks/network/FluidDuctStandard.java index e58d7ab02..8bf891a05 100644 --- a/src/main/java/com/hbm/blocks/network/FluidDuctStandard.java +++ b/src/main/java/com/hbm/blocks/network/FluidDuctStandard.java @@ -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; @@ -99,19 +99,22 @@ public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti, ILo @Override @SideOnly(Side.CLIENT) public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) { - TileEntity tileEntity = world.getTileEntity(x, y, z); - if (tileEntity instanceof TileEntityPipeBaseNT) { - TileEntityPipeBaseNT pipe = (TileEntityPipeBaseNT) tileEntity; - FluidType fluidType = pipe.getType(); - int retadata = fluidType.getID(); //florf + TileEntity tileEntity = world.getTileEntity(x, y, z); + if(tileEntity instanceof TileEntityPipeBaseNT) { + TileEntityPipeBaseNT pipe = (TileEntityPipeBaseNT) tileEntity; + FluidType fluidType = pipe.getType(); + int retadata = fluidType.getID(); // florf - return new ItemStack(ModItems.fluid_duct, 1, retadata); - } - return super.getPickBlock(target, world, x, y, z, player); + return new ItemStack(ModItems.fluid_duct, 1, retadata); + } + 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 diff --git a/src/main/java/com/hbm/blocks/test/TestBomb.java b/src/main/java/com/hbm/blocks/test/TestBomb.java deleted file mode 100644 index 377eda42d..000000000 --- a/src/main/java/com/hbm/blocks/test/TestBomb.java +++ /dev/null @@ -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 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> configurables = new ArrayList>(); 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"); diff --git a/src/main/java/com/hbm/tileentity/bomb/TileEntityTestBombAdvanced.java b/src/main/java/com/hbm/tileentity/bomb/TileEntityTestBombAdvanced.java deleted file mode 100644 index f47eb33f5..000000000 --- a/src/main/java/com/hbm/tileentity/bomb/TileEntityTestBombAdvanced.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.hbm.tileentity.bomb; - -import net.minecraft.tileentity.TileEntity; - -public class TileEntityTestBombAdvanced extends TileEntity { - -} diff --git a/src/main/java/com/hbm/tileentity/bomb/TileEntityTestNuke.java b/src/main/java/com/hbm/tileentity/bomb/TileEntityTestNuke.java deleted file mode 100644 index d18dbcc55..000000000 --- a/src/main/java/com/hbm/tileentity/bomb/TileEntityTestNuke.java +++ /dev/null @@ -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); - } -} diff --git a/src/main/java/com/hbm/tileentity/deco/TileEntityTestRender.java b/src/main/java/com/hbm/tileentity/deco/TileEntityTestRender.java deleted file mode 100644 index 251dbc96a..000000000 --- a/src/main/java/com/hbm/tileentity/deco/TileEntityTestRender.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.hbm.tileentity.deco; - -import net.minecraft.tileentity.TileEntity; - -public class TileEntityTestRender extends TileEntity { - -}