This commit is contained in:
Ellpeck 2015-12-21 22:46:23 +01:00
parent e6b10a63d3
commit 5239818e97
8 changed files with 51 additions and 51 deletions

View file

@ -85,6 +85,23 @@ public class BlockGiantChest extends BlockContainerBase{
return EnumRarity.epic;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack){
if(stack.getTagCompound() != null){
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityGiantChest){
NBTTagList list = stack.getTagCompound().getTagList("Items", 10);
ItemStack[] slots = ((TileEntityGiantChest)tile).slots;
for(int i = 0; i < list.tagCount(); i++){
slots[i] = ItemStack.loadItemStackFromNBT(list.getCompoundTagAt(i));
}
}
}
super.onBlockPlacedBy(world, x, y, z, entity, stack);
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune){
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);
@ -119,23 +136,6 @@ public class BlockGiantChest extends BlockContainerBase{
return drops;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack){
if(stack.getTagCompound() != null){
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityGiantChest){
NBTTagList list = stack.getTagCompound().getTagList("Items", 10);
ItemStack[] slots = ((TileEntityGiantChest)tile).slots;
for(int i = 0; i < list.tagCount(); i++){
slots[i] = ItemStack.loadItemStackFromNBT(list.getCompoundTagAt(i));
}
}
}
super.onBlockPlacedBy(world, x, y, z, entity, stack);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
TileEntity tile = world.getTileEntity(x, y, z);

View file

@ -46,13 +46,13 @@ public class BlockWildPlant extends BlockBushBase{
}
@Override
public boolean shouldAddCreative(){
return false;
public Class<? extends ItemBlockBase> getItemBlock(){
return TheItemBlock.class;
}
@Override
public Class<? extends ItemBlockBase> getItemBlock(){
return TheItemBlock.class;
public boolean shouldAddCreative(){
return false;
}
@Override

View file

@ -172,14 +172,14 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override

View file

@ -95,14 +95,14 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
return this.storage.getEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
}

View file

@ -105,14 +105,14 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
return this.storage.getEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
}

View file

@ -102,14 +102,14 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
return this.storage.getEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
}

View file

@ -131,14 +131,14 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
return this.storage.getEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
}

View file

@ -192,14 +192,14 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
return this.storage.getEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
@Override
@SideOnly(Side.CLIENT)
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
@Override
public void setEnergy(int energy){
this.storage.setEnergyStored(energy);
}
}