Iron furnace and Iron alloy furnace now return when broken
This commit is contained in:
parent
90f5d77a41
commit
b99df6f0a8
2 changed files with 31 additions and 4 deletions
|
@ -1,13 +1,21 @@
|
||||||
package techreborn.blocks;
|
package techreborn.blocks;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.GuiHandler;
|
import techreborn.client.GuiHandler;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.tiles.TileAlloyFurnace;
|
import techreborn.tiles.TileAlloyFurnace;
|
||||||
import techreborn.tiles.TileIronFurnace;
|
import techreborn.tiles.TileIronFurnace;
|
||||||
|
|
||||||
|
@ -31,6 +39,13 @@ public class BlockIronFurnace extends BlockMachineBase implements IRotationTextu
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||||
|
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||||
|
items.add(new ItemStack(this));
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
private final String prefix = "techreborn:blocks/machine/";
|
private final String prefix = "techreborn:blocks/machine/";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
package techreborn.blocks.machine;
|
package techreborn.blocks.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import reborncore.common.blocks.BlockMachineBase;
|
import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.blocks.IRotationTexture;
|
import reborncore.common.blocks.IRotationTexture;
|
||||||
|
@ -26,14 +33,19 @@ public class BlockAlloyFurnace extends BlockMachineBase implements IRotationText
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking())
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y,
|
player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y, z);
|
||||||
z);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||||
|
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||||
|
items.add(new ItemStack(this));
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
private final String prefix = "techreborn:blocks/machine/";
|
private final String prefix = "techreborn:blocks/machine/";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue