mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +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;
|
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
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune){
|
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);
|
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);
|
||||||
|
@ -119,23 +136,6 @@ public class BlockGiantChest extends BlockContainerBase{
|
||||||
return drops;
|
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
|
@Override
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
|
@ -46,13 +46,13 @@ public class BlockWildPlant extends BlockBushBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldAddCreative(){
|
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||||
return false;
|
return TheItemBlock.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
public boolean shouldAddCreative(){
|
||||||
return TheItemBlock.class;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -172,14 +172,14 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
public void setEnergy(int energy){
|
||||||
public int getMaxEnergy(){
|
this.storage.setEnergyStored(energy);
|
||||||
return this.storage.getMaxEnergyStored();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setEnergy(int energy){
|
@SideOnly(Side.CLIENT)
|
||||||
this.storage.setEnergyStored(energy);
|
public int getMaxEnergy(){
|
||||||
|
return this.storage.getMaxEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -95,14 +95,14 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
|
||||||
return this.storage.getEnergyStored();
|
return this.storage.getEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnergy(int energy){
|
||||||
|
this.storage.setEnergyStored(energy);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getMaxEnergy(){
|
public int getMaxEnergy(){
|
||||||
return this.storage.getMaxEnergyStored();
|
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();
|
return this.storage.getEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnergy(int energy){
|
||||||
|
this.storage.setEnergyStored(energy);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getMaxEnergy(){
|
public int getMaxEnergy(){
|
||||||
return this.storage.getMaxEnergyStored();
|
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();
|
return this.storage.getEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnergy(int energy){
|
||||||
|
this.storage.setEnergyStored(energy);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getMaxEnergy(){
|
public int getMaxEnergy(){
|
||||||
return this.storage.getMaxEnergyStored();
|
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();
|
return this.storage.getEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnergy(int energy){
|
||||||
|
this.storage.setEnergyStored(energy);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getMaxEnergy(){
|
public int getMaxEnergy(){
|
||||||
return this.storage.getMaxEnergyStored();
|
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();
|
return this.storage.getEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnergy(int energy){
|
||||||
|
this.storage.setEnergyStored(energy);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getMaxEnergy(){
|
public int getMaxEnergy(){
|
||||||
return this.storage.getMaxEnergyStored();
|
return this.storage.getMaxEnergyStored();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setEnergy(int energy){
|
|
||||||
this.storage.setEnergyStored(energy);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue