mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-08 19:04:46 +00:00
Merge pull request #203 from SpoilersMC/1.7.10
Update Mekanism holder blocks to support Digital Miner
This commit is contained in:
6 files changed
+42
-68
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package mekanism.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -964,11 +965,10 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mekanism.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.MekanismConfig;
|
||||
@@ -185,17 +187,10 @@ public class BlockCardboardBox extends BlockContainer
|
||||
return world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
public static class BlockData
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package mekanism.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.Mekanism;
|
||||
@@ -108,17 +109,10 @@ public class BlockEnergyCube extends BlockContainer
|
||||
tileEntity.redstone = world.isBlockIndirectlyGettingPowered(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package mekanism.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
@@ -28,6 +26,10 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -154,6 +156,11 @@ public class BlockGasTank extends BlockContainer
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
|
||||
{
|
||||
@@ -193,18 +200,6 @@ public class BlockGasTank extends BlockContainer
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
|
||||
@@ -738,6 +738,11 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
@@ -749,12 +754,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
@@ -787,8 +786,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
{
|
||||
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z);
|
||||
|
||||
float motion = 0.7F;
|
||||
double motionX = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.generators.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -564,12 +565,6 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata)
|
||||
{
|
||||
@@ -583,11 +578,16 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
/*This method is not used, metadata manipulation is required to create a Tile Entity.*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
@@ -607,13 +607,6 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
return Mekanism.proxy.CTM_RENDER_ID;
|
||||
}
|
||||
|
||||
/*This method is not used, metadata manipulation is required to create a Tile Entity.*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user