FIxed couple of warnings
This commit is contained in:
parent
a979ff747f
commit
927d3637a5
4 changed files with 13 additions and 42 deletions
|
@ -44,36 +44,4 @@ public class BlockStorage extends BaseBlock {
|
||||||
// return BlockStorage2.getStorageBlockByName(name, count);
|
// return BlockStorage2.getStorageBlockByName(name, count);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// public static ItemStack getStorageBlockByName(String name) {
|
|
||||||
// return getStorageBlockByName(name, 1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
|
||||||
// return Item.getItemFromBlock(this);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public int damageDropped(IBlockState state) {
|
|
||||||
// return getMetaFromState(state);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public IBlockState getStateFromMeta(int meta) {
|
|
||||||
// if (meta > types.length) {
|
|
||||||
// meta = 0;
|
|
||||||
// }
|
|
||||||
// return getBlockState().getBaseState().with(TYPE, typesList.get(meta));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public int getMetaFromState(IBlockState state) {
|
|
||||||
// return typesList.indexOf(state.getValue(TYPE));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// protected BlockStateContainer createBlockState() {
|
|
||||||
// return new BlockStateContainer(this, TYPE);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.blocks.generator;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
@ -58,7 +57,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
||||||
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn,
|
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer playerIn,
|
||||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||||
final TileFusionControlComputer tileFusionControlComputer = (TileFusionControlComputer) worldIn.getTileEntity(pos);
|
final TileFusionControlComputer tileFusionControlComputer = (TileFusionControlComputer) worldIn.getTileEntity(pos);
|
||||||
if(!playerIn.getHeldItem(hand).isEmpty() && playerIn.getHeldItem(hand).getItem() == Item.getItemFromBlock(TRContent.Machine.FUSION_COIL.block)){
|
if(!playerIn.getHeldItem(hand).isEmpty() && (playerIn.getHeldItem(hand).getItem() == TRContent.Machine.FUSION_COIL.asItem())){
|
||||||
List<BlockPos> coils = Torus.generate(tileFusionControlComputer.getPos(), tileFusionControlComputer.size);
|
List<BlockPos> coils = Torus.generate(tileFusionControlComputer.getPos(), tileFusionControlComputer.size);
|
||||||
boolean placed = false;
|
boolean placed = false;
|
||||||
for(BlockPos coil : coils){
|
for(BlockPos coil : coils){
|
||||||
|
|
|
@ -2,7 +2,6 @@ package techreborn.init;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.entity.item.EntityTNTPrimed;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IItemProvider;
|
import net.minecraft.util.IItemProvider;
|
||||||
|
@ -234,7 +233,7 @@ public class TRContent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item asItem() {
|
public Item asItem() {
|
||||||
return Item.getItemFromBlock(block);
|
return block.asItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +252,7 @@ public class TRContent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item asItem() {
|
public Item asItem() {
|
||||||
return Item.getItemFromBlock(block);
|
return block.asItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,7 +272,7 @@ public class TRContent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item asItem() {
|
public Item asItem() {
|
||||||
return Item.getItemFromBlock(block);
|
return block.asItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +303,7 @@ public class TRContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static enum Machine {
|
public static enum Machine implements IItemProvider {
|
||||||
ALLOY_SMELTER(new BlockAlloySmelter()),
|
ALLOY_SMELTER(new BlockAlloySmelter()),
|
||||||
ASSEMBLY_MACHINE(new BlockAssemblingMachine()),
|
ASSEMBLY_MACHINE(new BlockAssemblingMachine()),
|
||||||
AUTO_CRAFTING_TABLE(new BlockAutoCraftingTable()),
|
AUTO_CRAFTING_TABLE(new BlockAutoCraftingTable()),
|
||||||
|
@ -380,6 +379,11 @@ public class TRContent {
|
||||||
public ItemStack getStack() {
|
public ItemStack getStack() {
|
||||||
return new ItemStack(block);
|
return new ItemStack(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item asItem() {
|
||||||
|
return block.asItem();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum Dusts implements IItemProvider {
|
public static enum Dusts implements IItemProvider {
|
||||||
|
|
|
@ -143,7 +143,7 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
register(getStack(Blocks.OAK_FENCE_GATE));
|
register(getStack(Blocks.OAK_FENCE_GATE));
|
||||||
register(getStack(Blocks.SPRUCE_FENCE));
|
register(getStack(Blocks.SPRUCE_FENCE));
|
||||||
register(getStack(Blocks.SPRUCE_FENCE_GATE));
|
register(getStack(Blocks.SPRUCE_FENCE_GATE));
|
||||||
// register(getStack(Blocks.BRICK_BLOCK));
|
register(getStack(Blocks.BRICKS));
|
||||||
register(getStack(Blocks.CRAFTING_TABLE));
|
register(getStack(Blocks.CRAFTING_TABLE));
|
||||||
register(getStack(Blocks.PUMPKIN));
|
register(getStack(Blocks.PUMPKIN));
|
||||||
register(getStack(Blocks.NETHERRACK));
|
register(getStack(Blocks.NETHERRACK));
|
||||||
|
@ -154,7 +154,7 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
register(getStack(Blocks.SAND, 1));
|
register(getStack(Blocks.SAND, 1));
|
||||||
register(getStack(Blocks.GLOWSTONE));
|
register(getStack(Blocks.GLOWSTONE));
|
||||||
register(getStack(Blocks.GRAVEL));
|
register(getStack(Blocks.GRAVEL));
|
||||||
// register(getStack(Blocks.HARDENED_CLAY));
|
register(getStack(Blocks.CLAY));
|
||||||
register(getStack(Blocks.GLASS));
|
register(getStack(Blocks.GLASS));
|
||||||
register(getStack(Blocks.GLASS_PANE));
|
register(getStack(Blocks.GLASS_PANE));
|
||||||
register(getStack(Blocks.CACTUS));
|
register(getStack(Blocks.CACTUS));
|
||||||
|
@ -165,7 +165,7 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
register(getStack(Blocks.TNT));
|
register(getStack(Blocks.TNT));
|
||||||
register(getStack(Blocks.RAIL));
|
register(getStack(Blocks.RAIL));
|
||||||
register(getStack(Blocks.DETECTOR_RAIL));
|
register(getStack(Blocks.DETECTOR_RAIL));
|
||||||
// register(getStack(Blocks.GOLDEN_RAIL));
|
register(getStack(Blocks.POWERED_RAIL));
|
||||||
register(getStack(Blocks.ACTIVATOR_RAIL));
|
register(getStack(Blocks.ACTIVATOR_RAIL));
|
||||||
// register(getStack(Blocks.YELLOW_FLOWER));
|
// register(getStack(Blocks.YELLOW_FLOWER));
|
||||||
// register(getStack(Blocks.RED_FLOWER, 1, 0));
|
// register(getStack(Blocks.RED_FLOWER, 1, 0));
|
||||||
|
|
Loading…
Add table
Reference in a new issue