mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Cleanup~
This commit is contained in:
parent
e6b10a63d3
commit
5239818e97
8 changed files with 51 additions and 51 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue