Minor cleanup to remove some WIPs that likely won't be implemented for a while

dev
Arona Jones 2016-02-04 20:07:05 +00:00
parent 6c01accfe2
commit a71e04f897
10 changed files with 1 additions and 595 deletions

View File

@ -1,31 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the BoilerCraft Mod for Minecraft.
*
* BoilerCraft is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
*/
package steamcraft.api.block;
import net.minecraft.item.ItemStack;
/**
* The Interface IHammerable.
*
* @author warlordjones
*/
@Deprecated
public interface IHammerable
{
/**
* Gets the output when the Drop Hammer (NYI) is used on the implementing
* Block
*
* @param meta
* the meta
* @return the output
*/
public abstract ItemStack getOutput(int meta);
}

View File

@ -1,74 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
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;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.common.Steamcraft;
import steamcraft.common.lib.ModInfo;
import steamcraft.common.tiles.TileMotionSensor;
public class BlockMotionSensor extends BlockContainer
{
public boolean isOn;
public BlockMotionSensor(Material p_i45386_1_, boolean isOn)
{
super(p_i45386_1_);
this.isOn = isOn;
if (!isOn)
this.setCreativeTab(Steamcraft.tabSC2);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
{
return new TileMotionSensor();
}
public boolean isIndirectlyPoweringTo(World par1World, int par2, int par3, int par4, int par5)
{
return this.isOn;
}
@Override
public boolean canProvidePower()
{
return this.isOn;
}
@Override
public int isProvidingWeakPower(IBlockAccess p_149709_1_, int p_149709_2_, int p_149709_3_, int p_149709_4_, int p_149709_5_)
{
if (this.isOn)
return 15;
else
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir)
{
this.blockIcon = ir.registerIcon(ModInfo.PREFIX + this.getUnlocalizedName().substring(5));
}
}

View File

@ -1,188 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import steamcraft.client.lib.RenderIDs;
import steamcraft.common.Steamcraft;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.lib.ModInfo;
public class BlockPlankStack extends BaseBlock
{
// TODO: Use block metadata
public BlockPlankStack(Material mat)
{
super(mat);
this.setCreativeTab(Steamcraft.tabSC2);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir)
{
this.blockIcon = ir.registerIcon(ModInfo.PREFIX + this.getUnlocalizedName().substring(5));
}
/**
* Returns the quantity of items to drop on block destruction.
*/
@Override
public int quantityDropped(Random p_149745_1_)
{
return 6;
}
@Override
public int damageDropped(int meta)
{
return meta;
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(Blocks.planks);
}
/**
* Called whenever the block is added into the world. Args: world, x, y, z
*/
@Override
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
{
p_149726_1_.scheduleBlockUpdate(p_149726_2_, p_149726_3_, p_149726_4_, this, this.tickRate(p_149726_1_));
}
/**
* 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 p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
{
p_149695_1_.scheduleBlockUpdate(p_149695_2_, p_149695_3_, p_149695_4_, this, this.tickRate(p_149695_1_));
}
/**
* Ticks the block if it's been scheduled
*/
@Override
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
{
if (!p_149674_1_.isRemote)
{
this.func_149830_m(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
}
}
private void func_149830_m(World p_149830_1_, int p_149830_2_, int p_149830_3_, int p_149830_4_)
{
if (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ >= 0))
{
byte b0 = 32;
if (p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0, p_149830_3_ + b0,
p_149830_4_ + b0))
{
if (!p_149830_1_.isRemote)
{
EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, p_149830_2_ + 0.5F, p_149830_3_ + 0.5F,
p_149830_4_ + 0.5F, this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_));
this.func_149829_a(entityfallingblock);
p_149830_1_.spawnEntityInWorld(entityfallingblock);
}
}
}
}
protected void func_149829_a(EntityFallingBlock p_149829_1_)
{
}
/**
* How many world ticks before ticking
*/
@Override
public int tickRate(World p_149738_1_)
{
return 2;
}
public static boolean func_149831_e(World p_149831_0_, int p_149831_1_, int p_149831_2_, int p_149831_3_)
{
Block block = p_149831_0_.getBlock(p_149831_1_, p_149831_2_, p_149831_3_);
if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
{
return true;
}
else if (block == Blocks.fire)
{
return true;
}
else
{
Material material = block.getMaterial();
return (material == Material.water) || (material == Material.lava);
}
}
public void func_149828_a(World p_149828_1_, int p_149828_2_, int p_149828_3_, int p_149828_4_, int p_149828_5_)
{
}
@SuppressWarnings("all")
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List l)
{
for (int var4 = 0; var4 < 6; ++var4)
l.add(new ItemStack(InitBlocks.blockPlankStack, 1, var4));
}
@Override
public int getRenderType()
{
return RenderIDs.blockPlankStackRI;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
}

View File

@ -28,7 +28,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import boilerplate.common.baseclasses.blocks.BaseMetadataBlock;
import steamcraft.api.block.IHammerable;
import steamcraft.common.Steamcraft;
import steamcraft.common.init.InitBlocks;
import steamcraft.common.init.InitItems;
@ -38,8 +37,7 @@ import steamcraft.common.lib.ModInfo;
* @author Surseance
*
*/
@SuppressWarnings("deprecation")
public class BlockSteamcraftOre extends BaseMetadataBlock implements IHammerable
public class BlockSteamcraftOre extends BaseMetadataBlock
{
private final IIcon[] icon = new IIcon[7];
@ -92,15 +90,6 @@ public class BlockSteamcraftOre extends BaseMetadataBlock implements IHammerable
l.add(new ItemStack(InitBlocks.blockCustomOre, 1, var4));
}
@Override
public ItemStack getOutput(int meta)
{
if (meta < 4)
return new ItemStack(InitItems.itemPowder);
else
return null;
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
{

View File

@ -1,38 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks.machines;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import steamcraft.common.tiles.TileDropHammer;
/**
* @author warlordjones
*
*/
public class BlockDropHammerAnvil extends BaseContainerBlock
{
public BlockDropHammerAnvil(Material mat)
{
super(mat);
}
@Override
public TileEntity createNewTileEntity(World var1, int var2)
{
return new TileDropHammer();
}
}

View File

@ -1,62 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.blocks.machines;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import steamcraft.common.tiles.TileSawmill;
public class BlockSawmill extends BaseContainerBlock
{
/*
* TODO - Only Works on X Axis - Does not support dark oak/acacia wood. -
* Model - Should take time to saw - Plank blocks share number of planks &
* meta.
*/
public BlockSawmill(Material mat)
{
super(mat);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
{
return new TileSawmill();
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
{
int l = MathHelper.floor_double(((living.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3;
if (l == 0)
world.setBlockMetadataWithNotify(x, y, z, 0, 2);
if (l == 1)
world.setBlockMetadataWithNotify(x, y, z, 1, 2);
if (l == 2)
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if (l == 3)
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
super.onBlockPlacedBy(world, x, y, z, living, stack);
}
}

View File

@ -60,9 +60,7 @@ import steamcraft.common.blocks.BlockMeltingIce;
import steamcraft.common.blocks.BlockMetal;
import steamcraft.common.blocks.BlockMetalLattice;
import steamcraft.common.blocks.BlockMossyMetal;
import steamcraft.common.blocks.BlockMotionSensor;
import steamcraft.common.blocks.BlockMud;
import steamcraft.common.blocks.BlockPlankStack;
import steamcraft.common.blocks.BlockPlating;
import steamcraft.common.blocks.BlockPolishedPlanks;
import steamcraft.common.blocks.BlockRustyMetal;
@ -89,14 +87,12 @@ import steamcraft.common.blocks.machines.BlockCharger;
import steamcraft.common.blocks.machines.BlockCopperPipe;
import steamcraft.common.blocks.machines.BlockCopperTank;
import steamcraft.common.blocks.machines.BlockCopperWire;
import steamcraft.common.blocks.machines.BlockDropHammerAnvil;
import steamcraft.common.blocks.machines.BlockInjector;
import steamcraft.common.blocks.machines.BlockIntake;
import steamcraft.common.blocks.machines.BlockLightningRod;
import steamcraft.common.blocks.machines.BlockLiquidBoiler;
import steamcraft.common.blocks.machines.BlockNuclearBoiler;
import steamcraft.common.blocks.machines.BlockRefinery;
import steamcraft.common.blocks.machines.BlockSawmill;
import steamcraft.common.blocks.machines.BlockStasisField;
import steamcraft.common.blocks.machines.BlockSteamBoiler;
import steamcraft.common.blocks.machines.BlockSteelPipe;
@ -342,7 +338,6 @@ public class InitBlocks
blockLightningRod = new BlockLightningRod(Material.iron).setBlockName("blockLightningRod");
blockTeslaCoil = new BlockTeslaCoil(Material.iron).setBlockName("blockTeslaCoil");
blockCharger = new BlockCharger().setBlockName("blockCharger");
blockSaw = new BlockSawmill(Material.anvil).setBlockName("blockSawmill");
RegistryHelper.registerContainerBlockWithDesc(blockTurbine, TileTurbine.class, "BlockTurbine");
RegistryHelper.registerContainerBlockWithDesc(blockBattery, TileBattery.class, "BlockBattery");
@ -350,8 +345,6 @@ public class InitBlocks
RegistryHelper.registerContainerBlockWithDesc(blockLightningRod, TileLightningRod.class, "BlockLightningRod");
RegistryHelper.registerContainerBlockWithDesc(blockTeslaCoil, TileTeslaCoil.class, "BlockTeslaCoil");
RegistryHelper.registerContainerBlockWithDesc(blockCharger, TileCharger.class, "BlockCharger");
// RegistryHelper.registerContainerBlockWithDesc(blockSaw,
// TileSawmill.class, "BlockSawmill");
// Bloomery
blockBloomery = new BlockBloomery(Material.rock).setBlockName("blockBloomery");
@ -482,11 +475,6 @@ public class InitBlocks
private static void initializeOthers()
{
blockDropHammerAnvil = new BlockDropHammerAnvil(Material.anvil).setBlockName("blockDropHammerAnvil");
// RegistryHelper.registerContainerBlock(blockDropHammerAnvil,
// TileDropHammer.class, "BlockDropHammerAnvil");
blockTeaPlant = new BlockTeaPlant().setBlockName("blockTeaPlant");
registerBlock(blockTeaPlant, "BlockTeaPlant");
@ -499,21 +487,9 @@ public class InitBlocks
blockFlesh = new BaseBlock(Material.gourd).setBlockName("blockFlesh").setCreativeTab(Steamcraft.tabSC2);
registerBlock(blockFlesh, "BlockFlesh");
blockPlankStack = new BlockPlankStack(Material.wood).setBlockName("blockPlankStack").setCreativeTab(Steamcraft.tabSC2);
// registerBlock(blockPlankStack, BaseItemBlockWithMetadata.class,
// "BlockPlankStack");
blockCongealedSlime = new BlockCongealedSlime(Material.gourd).setBlockName("blockCongealedSlime").setCreativeTab(Steamcraft.tabSC2);
registerBlock(blockCongealedSlime, "BlockCongealedSlime");
blockMotionSensor = new BlockMotionSensor(Material.iron, false).setBlockName("blockMotionSensor");
blockMotionSensorOn = new BlockMotionSensor(Material.iron, true).setBlockName("blockMotionSensorOn");
// RegistryHelper.registerContainerBlock(blockMotionSensor,
// TileMotionSensor.class, "BlockMotionSensor");
// RegistryHelper.registerContainerBlock(blockMotionSensorOn,
// TileMotionSensor.class, "BlockMotionSensorOn");
// Standard
blockStandardSiren = new BlockSiren(Material.redstoneLight, false, "standard").setBlockName("blockStandardSiren");
blockStandardSirenOn = new BlockSiren(Material.redstoneLight, true, "standard").setBlockName("blockStandardSiren");

View File

@ -1,55 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.tiles;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import steamcraft.api.block.IHammerable;
/**
* @author warlordjones
*
*/
public class TileDropHammer extends TileEntity
{
@Override
public void updateEntity()
{
Block block = this.worldObj.getBlock(this.xCoord, this.yCoord + 1, this.zCoord);
int meta = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord + 1, this.zCoord);
// if(worldObj.getBlock(xCoord, yCoord+1, zCoord) != Blocks.air)
// {
if (block instanceof IHammerable)
{
IHammerable hammerable = (IHammerable) this.worldObj.getBlock(this.xCoord, this.yCoord + 1, this.zCoord);
if (hammerable.getOutput(meta) != null)
{
ItemStack output = hammerable.getOutput(meta);
Item outputItem = output.getItem();
if (!this.worldObj.isRemote)
{
this.worldObj.spawnEntityInWorld(
new EntityItem(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, new ItemStack(outputItem, 1, meta)));
this.worldObj.spawnEntityInWorld(
new EntityItem(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, new ItemStack(outputItem, 1, meta)));
}
this.worldObj.setBlockToAir(this.xCoord, this.yCoord + 1, this.zCoord);
}
}
}
}

View File

@ -1,46 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.tiles;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.EntityLiving;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import steamcraft.common.init.InitBlocks;
public class TileMotionSensor extends TileEntity
{
@Override
public void updateEntity()
{
AxisAlignedBB axisalignedbb = AxisAlignedBB
.getBoundingBox(this.xCoord, this.yCoord, this.zCoord, this.xCoord + 1, this.yCoord + 1, this.zCoord + 1).expand(5, 5, 5);
List list = this.worldObj.getEntitiesWithinAABB(EntityLiving.class, axisalignedbb);
Iterator iterator = list.iterator();
EntityLiving living;
while (iterator.hasNext())
{
living = (EntityLiving) iterator.next();
if ((living.motionX > 0.5) || (living.motionY > 0.5) || (living.motionZ > 0.5))
{
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, InitBlocks.blockMotionSensorOn);
}
else
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, InitBlocks.blockMotionSensor);
}
}
}

View File

@ -1,65 +0,0 @@
/**
* This class was created by BrassGoggledCoders modding team.
* This class is available as part of the Steamcraft 2 Mod for Minecraft.
*
* Steamcraft 2 is open-source and is distributed under the MMPL v1.0 License.
* (http://www.mod-buildcraft.com/MMPL-1.0.txt)
*
* Steamcraft 2 is based on the original Steamcraft Mod created by Proloe.
* Steamcraft (c) Proloe 2011
* (http://www.minecraftforum.net/topic/251532-181-steamcraft-source-code-releasedmlv054wip/)
*
*/
package steamcraft.common.tiles;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import steamcraft.common.blocks.BlockPlankStack;
import steamcraft.common.init.InitBlocks;
public class TileSawmill extends TileEntity
{
@Override
public void updateEntity()
{
int logPosX = this.xCoord;
int logPosZ = this.zCoord;
int plankPosX = this.xCoord;
int plankPosZ = this.zCoord;
switch (this.blockMetadata)
{
case 0:
logPosX = this.xCoord - 1;
plankPosX = this.xCoord + 1;
break;
case 1:
logPosX = this.xCoord + 1;
plankPosX = this.xCoord - 1;
break;
case 2:
logPosZ = this.zCoord - 1;
plankPosZ = this.zCoord + 1;
break;
case 3:
logPosZ = this.zCoord + 1;
plankPosZ = this.zCoord - 1;
break;
}
if ((this.worldObj.getBlock(logPosX, this.yCoord, logPosZ) == Blocks.log)
|| (this.worldObj.getBlock(logPosX, this.yCoord, logPosZ) == Blocks.log2))
{
if (this.worldObj.isAirBlock(plankPosX, this.yCoord, plankPosZ))
{
int meta = this.worldObj.getBlockMetadata(logPosX, this.yCoord, logPosZ);
this.worldObj.setBlockToAir(logPosX, this.yCoord, logPosZ);
this.worldObj.setBlock(plankPosX, this.yCoord, plankPosZ, InitBlocks.blockPlankStack);
BlockPlankStack stack = (BlockPlankStack) this.worldObj.getBlock(plankPosX, this.yCoord, plankPosZ);
if (this.worldObj.getBlock(logPosX, this.yCoord, logPosZ) == Blocks.log2)
this.worldObj.setBlockMetadataWithNotify(this.xCoord - 1, this.yCoord, this.zCoord, meta + 4, 2);
else
this.worldObj.setBlockMetadataWithNotify(this.xCoord - 1, this.yCoord, this.zCoord, meta, 2);
}
}
}
}