diff options
| author | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:23:26 +1000 |
|---|---|---|
| committer | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:23:26 +1000 |
| commit | 0669f5eb9d5029a8b94ec552171b0837605f7747 (patch) | |
| tree | 6b40e64c04d51b7a33cf2f0b35f7232cf37c4247 /src/Java/gtPlusPlus/xmod/forestry/bees | |
| parent | 3654052fb63a571c5eaca7f20714b87c17f7e966 (diff) | |
| download | GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.gz GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.bz2 GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.zip | |
$ Cleaned up the entire project.
> Much neat, very nices.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/forestry/bees')
16 files changed, 821 insertions, 928 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyBeeListener.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyBeeListener.java index 6736c54309..039c80fe00 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyBeeListener.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyBeeListener.java @@ -6,13 +6,13 @@ import gtPlusPlus.xmod.forestry.bees.alveary.gui.InventoryFrameHousing; public class AlvearyBeeListener extends DefaultBeeListener { private final IAlvearyFrameHousing apiary; - public AlvearyBeeListener(IAlvearyFrameHousing apiary) { + public AlvearyBeeListener(final IAlvearyFrameHousing apiary) { this.apiary = apiary; } @Override - public void wearOutEquipment(int amount) { - InventoryFrameHousing apiaryInventory = apiary.getAlvearyInventory(); - apiaryInventory.wearOutFrames(apiary, amount); + public void wearOutEquipment(final int amount) { + final InventoryFrameHousing apiaryInventory = this.apiary.getAlvearyInventory(); + apiaryInventory.wearOutFrames(this.apiary, amount); } } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java index a304647f72..5c6956ec86 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java @@ -5,7 +5,7 @@ import com.mojang.authlib.GameProfile; import forestry.api.multiblock.*; import net.minecraft.util.ChunkCoordinates; -public class FR_AlvearyFrameBlock implements IAlvearyComponent, IMultiblockComponent{ +public class FR_AlvearyFrameBlock implements IAlvearyComponent, IMultiblockComponent { @Override public ChunkCoordinates getCoordinates() { @@ -14,28 +14,28 @@ public class FR_AlvearyFrameBlock implements IAlvearyComponent, IMultiblockCompo } @Override - public GameProfile getOwner() { + public IMultiblockLogicAlveary getMultiblockLogic() { // TODO Auto-generated method stub return null; } @Override - public void onMachineAssembled(IMultiblockController arg0, - ChunkCoordinates arg1, ChunkCoordinates arg2) { + public GameProfile getOwner() { // TODO Auto-generated method stub - + return null; } @Override - public void onMachineBroken() { + public void onMachineAssembled(final IMultiblockController arg0, final ChunkCoordinates arg1, + final ChunkCoordinates arg2) { // TODO Auto-generated method stub - + } @Override - public IMultiblockLogicAlveary getMultiblockLogic() { + public void onMachineBroken() { // TODO Auto-generated method stub - return null; + } } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java index b3eaa94566..d4fce6465b 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java @@ -23,252 +23,249 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -public class FR_BlockAlveary extends BlockStructure -{ +public class FR_BlockAlveary extends BlockStructure { - public static enum Type - { - PLAIN, - ERROR, - FRAME, - MUTATOR, - - //Placeholder Values + public static enum Type { + PLAIN, ERROR, FRAME, MUTATOR, + + // Placeholder Values HEATER, HYGRO, STABILIZER, SIEVE; - public static final Type[] VALUES = values(); + public static final Type[] VALUES = Type.values(); - private Type() {} + private Type() { + } } - public FR_BlockAlveary() - { - super(new MaterialBeehive(false)); - setHardness(1.0F); - setCreativeTab(AddToCreativeTab.tabBlock); - setHarvestLevel("axe", 0); - - } + /* ICONS */ + public static final int PLAIN = 0; - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, float lz) - { - if (world.isRemote) return true; - - TileEntity te = world.getTileEntity(x, y, z); - if (te != null && te instanceof TileAlvearyFrameHousing) - { - player.openGui(GTplusplus.instance, 0, world, x, y, z); - return true; - } - /*else if (te != null && te instanceof TileAlvearyFrameHousing) - { - player.openGui(GTplusplus.instance, 0, world, x, y, z); - return true; - }*/ - return false; - } + public static final int ENTRANCE = 1; - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, List list) - { - for (int i = 0; i < 4; i++) { - if (i != 1 && i != 0) { - list.add(new ItemStack(item, 1, i)); - } - } - } + public static final int BOTTOM = 2; - @Override - public int getRenderType() - { - return 0; - } + public static final int LEFT = 3; - @Override - public boolean renderAsNormalBlock() - { - return true; - } + public static final int RIGHT = 4; - @Override - public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) - { - ArrayList<ItemStack> drop = new ArrayList<ItemStack>(); - drop.add(new ItemStack(this, 1, metadata != 1 ? metadata : 0)); - return drop; - } + public static final int ALVEARY_FRAME_OFF = 5; + + public static final int ALVEARY_FRAME_ON = 6; + + public static final int ALVEARY_MUTATOR_OFF = 7; + public static final int ALVEARY_MUTATOR_ON = 8; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + + public FR_BlockAlveary() { + super(new MaterialBeehive(false)); + this.setHardness(1.0F); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHarvestLevel("axe", 0); + + } @Override - public int getDamageValue(World world, int x, int y, int z) - { - int meta = world.getBlockMetadata(x, y, z); - return meta != 1 ? meta : 0; + public TileEntity createNewTileEntity(final World world, final int meta) { + return this.createTileEntity(world, meta); } - @Override - public TileEntity createTileEntity(World world, int metadata) - { - if ((metadata < 0) || (metadata > Type.VALUES.length)) { + public TileEntity createTileEntity(final World world, final int metadata) { + if (metadata < 0 || metadata > Type.VALUES.length) { return null; } - - - - Type type = Type.VALUES[metadata]; - switch (type) - { - case FRAME: - LanguageRegistry.addName(this, "Alveary Frame Housing"); - case MUTATOR: - LanguageRegistry.addName(this, "Alveary Mutator Block"); - case ERROR: - LanguageRegistry.addName(this, "Invalid Alveary Block"); - default: - LanguageRegistry.addName(this, "Unnamed Alveary Block"); + + final Type type = Type.VALUES[metadata]; + switch (type) { + case FRAME: + LanguageRegistry.addName(this, "Alveary Frame Housing"); + case MUTATOR: + LanguageRegistry.addName(this, "Alveary Mutator Block"); + case ERROR: + LanguageRegistry.addName(this, "Invalid Alveary Block"); + default: + LanguageRegistry.addName(this, "Unnamed Alveary Block"); } - switch (type) - { - case FRAME: - return new TileAlvearyFrameHousing(); - case MUTATOR: - return new TileAlvearyPlain(); - case ERROR: - return new TileAlvearyPlain(); - default: - return new TileAlvearyPlain(); + switch (type) { + case FRAME: + return new TileAlvearyFrameHousing(); + case MUTATOR: + return new TileAlvearyPlain(); + case ERROR: + return new TileAlvearyPlain(); + default: + return new TileAlvearyPlain(); } } - - @Override - public Block setBlockName(String name) { - //int meta = this. - return super.setBlockName(name); - } - - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return createTileEntity(world, meta); + public ItemStack get(final Type type) { + return new ItemStack(this, 1, type.ordinal()); } - - /* ICONS */ - public static final int PLAIN = 0; - public static final int ENTRANCE = 1; - public static final int BOTTOM = 2; - public static final int LEFT = 3; - public static final int RIGHT = 4; - public static final int ALVEARY_FRAME_OFF = 5; - public static final int ALVEARY_FRAME_ON = 6; - public static final int ALVEARY_MUTATOR_OFF = 7; - public static final int ALVEARY_MUTATOR_ON = 8; - @SideOnly(Side.CLIENT) - private IIcon[] icons; @SideOnly(Side.CLIENT) + private IIcon getBlockTextureFromSideAndTile(final IBlockAccess world, final int x, final int y, final int z, + final int side) { + final TileEntity tile = world.getTileEntity(x, y, z); + if (!(tile instanceof FR_TileAlveary)) { + return this.getIcon(side, 0); + } + return this.icons[((FR_TileAlveary) tile).getIcon(side)]; + } @Override - public void registerBlockIcons(IIconRegister register) { - icons = new IIcon[9]; - icons[0] = TextureManager.registerTex(register, "apiculture/alveary.plain"); - icons[1] = TextureManager.registerTex(register, "apiculture/alveary.entrance"); - icons[2] = TextureManager.registerTex(register, "apiculture/alveary.bottom"); - icons[3] = TextureManager.registerTex(register, "apiculture/alveary.left"); - icons[4] = TextureManager.registerTex(register, "apiculture/alveary.right"); - icons[5] = TextureManager.registerTex(register, "apiculture/alveary.framehousing.off"); - icons[6] = TextureManager.registerTex(register, "apiculture/alveary.framehousing.on"); - icons[7] = TextureManager.registerTex(register, "apiculture/alveary.mutator.off"); - icons[8] = TextureManager.registerTex(register, "apiculture/alveary.mutator.on"); + public int getDamageValue(final World world, final int x, final int y, final int z) { + final int meta = world.getBlockMetadata(x, y, z); + return meta != 1 ? meta : 0; } - @SideOnly(Side.CLIENT) @Override - public IIcon getIcon(int side, int metadata) { - if ((metadata <= 1 - || metadata == Type.FRAME.ordinal() || metadata == Type.MUTATOR.ordinal()) - && (side == 1 || side == 0)) { - return icons[BOTTOM]; - } - Type type = Type.VALUES[metadata]; - switch (type) { - case ERROR: - return icons[PLAIN]; - case FRAME: - return icons[ALVEARY_FRAME_OFF]; - case MUTATOR: - return icons[ALVEARY_MUTATOR_OFF]; - case HEATER: - return icons[ALVEARY_MUTATOR_OFF]; - case HYGRO: - return icons[ALVEARY_MUTATOR_OFF]; - case STABILIZER: - return icons[PLAIN]; - case SIEVE: - return icons[PLAIN]; - default: - return null; - } + public ArrayList<ItemStack> getDrops(final World world, final int x, final int y, final int z, final int metadata, + final int fortune) { + final ArrayList<ItemStack> drop = new ArrayList<ItemStack>(); + drop.add(new ItemStack(this, 1, metadata != 1 ? metadata : 0)); + return drop; } @SideOnly(Side.CLIENT) @Override - public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { - int meta = world.getBlockMetadata(x, y, z); + public IIcon getIcon(final IBlockAccess world, final int x, final int y, final int z, final int side) { + final int meta = world.getBlockMetadata(x, y, z); if (meta == 1) { return this.getIcon(side, meta); - } else if (meta > 1) { - return getBlockTextureFromSideAndTile(world, x, y, z, side); } - Block blockXP = world.getBlock(x + 1, y, z); - Block blockXM = world.getBlock(x - 1, y, z); + else if (meta > 1) { + return this.getBlockTextureFromSideAndTile(world, x, y, z, side); + } + final Block blockXP = world.getBlock(x + 1, y, z); + final Block blockXM = world.getBlock(x - 1, y, z); if (blockXP == this && blockXM != this) { if (world.getBlockMetadata(x + 1, y, z) == 1) { if (world.getBlock(x, y, z + 1) != this) { - return switchForSide(42, side); + return this.switchForSide(42, side); } - return switchForSide(41, side); + return this.switchForSide(41, side); } return this.getIcon(side, meta); - } else if (blockXP != this && blockXM == this) { + } + else if (blockXP != this && blockXM == this) { if (world.getBlockMetadata(x - 1, y, z) == 1) { if (world.getBlock(x, y, z + 1) != this) { - return switchForSide(41, side); + return this.switchForSide(41, side); } - return switchForSide(42, side); + return this.switchForSide(42, side); } return this.getIcon(side, meta); } return this.getIcon(side, meta); } @SideOnly(Side.CLIENT) - private IIcon getBlockTextureFromSideAndTile(IBlockAccess world, int x, int y, int z, int side) { - TileEntity tile = world.getTileEntity(x, y, z); - if (!(tile instanceof FR_TileAlveary)) { - return getIcon(side, 0); + @Override + public IIcon getIcon(final int side, final int metadata) { + if ((metadata <= 1 || metadata == Type.FRAME.ordinal() || metadata == Type.MUTATOR.ordinal()) + && (side == 1 || side == 0)) { + return this.icons[FR_BlockAlveary.BOTTOM]; + } + final Type type = Type.VALUES[metadata]; + switch (type) { + case ERROR: + return this.icons[FR_BlockAlveary.PLAIN]; + case FRAME: + return this.icons[FR_BlockAlveary.ALVEARY_FRAME_OFF]; + case MUTATOR: + return this.icons[FR_BlockAlveary.ALVEARY_MUTATOR_OFF]; + case HEATER: + return this.icons[FR_BlockAlveary.ALVEARY_MUTATOR_OFF]; + case HYGRO: + return this.icons[FR_BlockAlveary.ALVEARY_MUTATOR_OFF]; + case STABILIZER: + return this.icons[FR_BlockAlveary.PLAIN]; + case SIEVE: + return this.icons[FR_BlockAlveary.PLAIN]; + default: + return null; } - return icons[((FR_TileAlveary) tile).getIcon(side)]; } + @Override + public int getRenderType() { + return 0; + } + + @Override @SideOnly(Side.CLIENT) - private IIcon switchForSide(int textureId, int side) { - if (side == 4 || side == 5) { - if (textureId == 41) { - return icons[LEFT]; + public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { + for (int i = 0; i < 4; i++) { + if (i != 1 && i != 0) { + list.add(new ItemStack(item, 1, i)); } - return icons[RIGHT]; - } else if (textureId == 41) { - return icons[RIGHT]; - } else { - return icons[LEFT]; } } + + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, + final int side, final float lx, final float ly, final float lz) { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if (te != null && te instanceof TileAlvearyFrameHousing) { + player.openGui(GTplusplus.instance, 0, world, x, y, z); + return true; + } + /* + * else if (te != null && te instanceof TileAlvearyFrameHousing) { + * player.openGui(GTplusplus.instance, 0, world, x, y, z); return true; + * } + */ + return false; + } + @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + public void onNeighborBlockChange(final World world, final int x, final int y, final int z, final Block block) { super.onNeighborBlockChange(world, x, y, z, block); - TileEntity tileEntity = world.getTileEntity(x, y, z); + final TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity instanceof FR_TileAlveary) { - FR_TileAlveary tileAlveary = (FR_TileAlveary) tileEntity; + final FR_TileAlveary tileAlveary = (FR_TileAlveary) tileEntity; // We must check that the slabs on top were not removed tileAlveary.getMultiblockLogic().getController().reassemble(); } } - public ItemStack get(Type type) { - return new ItemStack(this, 1, type.ordinal()); + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(final IIconRegister register) { + this.icons = new IIcon[9]; + this.icons[0] = TextureManager.registerTex(register, "apiculture/alveary.plain"); + this.icons[1] = TextureManager.registerTex(register, "apiculture/alveary.entrance"); + this.icons[2] = TextureManager.registerTex(register, "apiculture/alveary.bottom"); + this.icons[3] = TextureManager.registerTex(register, "apiculture/alveary.left"); + this.icons[4] = TextureManager.registerTex(register, "apiculture/alveary.right"); + this.icons[5] = TextureManager.registerTex(register, "apiculture/alveary.framehousing.off"); + this.icons[6] = TextureManager.registerTex(register, "apiculture/alveary.framehousing.on"); + this.icons[7] = TextureManager.registerTex(register, "apiculture/alveary.mutator.off"); + this.icons[8] = TextureManager.registerTex(register, "apiculture/alveary.mutator.on"); + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + @Override + public Block setBlockName(final String name) { + // int meta = this. + return super.setBlockName(name); + } + + @SideOnly(Side.CLIENT) + private IIcon switchForSide(final int textureId, final int side) { + if (side == 4 || side == 5) { + if (textureId == 41) { + return this.icons[FR_BlockAlveary.LEFT]; + } + return this.icons[FR_BlockAlveary.RIGHT]; + } + else if (textureId == 41) { + return this.icons[FR_BlockAlveary.RIGHT]; + } + else { + return this.icons[FR_BlockAlveary.LEFT]; + } } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java index 5c456916f0..2db809ae90 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java @@ -21,169 +21,142 @@ import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.Vec3; import net.minecraft.world.biome.BiomeGenBase; -public abstract class FR_TileAlveary -extends MultiblockTileEntityForestry<MultiblockLogicAlveary> -implements IBeeHousing, IAlvearyComponent, IRestrictedAccess, IStreamableGui, ITitled, IClimatised, IHintSource, IGuiHandlerForestry -{ +public abstract class FR_TileAlveary extends MultiblockTileEntityForestry<MultiblockLogicAlveary> + implements IBeeHousing, IAlvearyComponent, IRestrictedAccess, IStreamableGui, ITitled, IClimatised, IHintSource, + IGuiHandlerForestry { private final String unlocalizedTitle; - protected FR_TileAlveary() - { + protected FR_TileAlveary() { this(FR_BlockAlveary.Type.ERROR); } - protected FR_TileAlveary(FR_BlockAlveary.Type type) - { + protected FR_TileAlveary(final FR_BlockAlveary.Type type) { super(new MultiblockLogicAlveary()); - this.unlocalizedTitle = ("advanced.tile.for.alveary." + type.ordinal() + ".name"); - - } + this.unlocalizedTitle = "advanced.tile.for.alveary." + type.ordinal() + ".name"; - public int getIcon(int side) - { - return 0; } @Override - public void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord, ChunkCoordinates maxCoord) - { - if (this.worldObj.isRemote) { - this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); - } - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, getBlockType()); - markDirty(); + public boolean canBlockSeeTheSky() { + return this.getMultiblockLogic().getController().canBlockSeeTheSky(); } @Override - public void onMachineBroken() - { - if (this.worldObj.isRemote) { - this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); - } - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, getBlockType()); - markDirty(); + public IAccessHandler getAccessHandler() { + return this.getMultiblockLogic().getController().getAccessHandler(); } @Override - public BiomeGenBase getBiome() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBiome(); + public Vec3 getBeeFXCoordinates() { + return this.getMultiblockLogic().getController().getBeeFXCoordinates(); } @Override - public Iterable<IBeeModifier> getBeeModifiers() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeModifiers(); + public IBeeHousingInventory getBeeInventory() { + return this.getMultiblockLogic().getController().getBeeInventory(); } @Override - public Iterable<IBeeListener> getBeeListeners() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeListeners(); + public IBeekeepingLogic getBeekeepingLogic() { + return this.getMultiblockLogic().getController().getBeekeepingLogic(); } @Override - public IBeeHousingInventory getBeeInventory() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeInventory(); + public Iterable<IBeeListener> getBeeListeners() { + return this.getMultiblockLogic().getController().getBeeListeners(); } @Override - public IBeekeepingLogic getBeekeepingLogic() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeekeepingLogic(); + public Iterable<IBeeModifier> getBeeModifiers() { + return this.getMultiblockLogic().getController().getBeeModifiers(); } @Override - public Vec3 getBeeFXCoordinates() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeFXCoordinates(); + public BiomeGenBase getBiome() { + return this.getMultiblockLogic().getController().getBiome(); } @Override - public EnumTemperature getTemperature() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getTemperature(); + public int getBlockLightValue() { + return this.getMultiblockLogic().getController().getBlockLightValue(); } @Override - public EnumHumidity getHumidity() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getHumidity(); + public IErrorLogic getErrorLogic() { + return this.getMultiblockLogic().getController().getErrorLogic(); } @Override - public int getBlockLightValue() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBlockLightValue(); + public float getExactHumidity() { + return this.getMultiblockLogic().getController().getExactHumidity(); } @Override - public boolean canBlockSeeTheSky() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().canBlockSeeTheSky(); + public float getExactTemperature() { + return this.getMultiblockLogic().getController().getExactTemperature(); } @Override - public IErrorLogic getErrorLogic() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getErrorLogic(); + public List<String> getHints() { + return Config.hints.get("apiary"); } @Override - public IAccessHandler getAccessHandler() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getAccessHandler(); + public EnumHumidity getHumidity() { + return this.getMultiblockLogic().getController().getHumidity(); + } + + public int getIcon(final int side) { + return 0; } @Override - public void onSwitchAccess(EnumAccess oldAccess, EnumAccess newAccess) - { - ((MultiblockLogicAlveary)getMultiblockLogic()).getController().onSwitchAccess(oldAccess, newAccess); + public IInventoryAdapter getInternalInventory() { + return this.getMultiblockLogic().getController().getInternalInventory(); } @Override - public IInventoryAdapter getInternalInventory() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getInternalInventory(); + public EnumTemperature getTemperature() { + return this.getMultiblockLogic().getController().getTemperature(); } @Override - public String getUnlocalizedTitle() - { + public String getUnlocalizedTitle() { return this.unlocalizedTitle; } @Override - public List<String> getHints() - { - return Config.hints.get("apiary"); + public void onMachineAssembled(final IMultiblockController multiblockController, final ChunkCoordinates minCoord, + final ChunkCoordinates maxCoord) { + if (this.worldObj.isRemote) { + this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); + } + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.markDirty(); } @Override - public float getExactTemperature() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getExactTemperature(); + public void onMachineBroken() { + if (this.worldObj.isRemote) { + this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); + } + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.markDirty(); } @Override - public float getExactHumidity() - { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getExactHumidity(); + public void onSwitchAccess(final EnumAccess oldAccess, final EnumAccess newAccess) { + this.getMultiblockLogic().getController().onSwitchAccess(oldAccess, newAccess); } @Override - public void writeGuiData(DataOutputStreamForestry data) - throws IOException - { - ((MultiblockLogicAlveary)getMultiblockLogic()).getController().writeGuiData(data); + public void readGuiData(final DataInputStreamForestry data) throws IOException { + this.getMultiblockLogic().getController().readGuiData(data); } @Override - public void readGuiData(DataInputStreamForestry data) - throws IOException - { - ((MultiblockLogicAlveary)getMultiblockLogic()).getController().readGuiData(data); + public void writeGuiData(final DataOutputStreamForestry data) throws IOException { + this.getMultiblockLogic().getController().writeGuiData(data); } } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyComponentAdvanced.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyComponentAdvanced.java index b55d2d37a6..c5c2e0c8f4 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyComponentAdvanced.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyComponentAdvanced.java @@ -5,24 +5,16 @@ import forestry.api.core.IClimateControlled; import forestry.api.multiblock.IMultiblockComponent; import forestry.api.multiblock.IMultiblockLogicAlveary; -public abstract interface IAlvearyComponentAdvanced<T extends IMultiblockLogicAlveary> -extends IMultiblockComponent -{ - @Override - public abstract T getMultiblockLogic(); +public abstract interface IAlvearyComponentAdvanced<T extends IMultiblockLogicAlveary> extends IMultiblockComponent { + public static abstract interface BeeModifier extends IAlvearyComponentAdvanced { + public abstract IBeeModifier getBeeModifier(); + } - - public static abstract interface FrameHouse - extends IAlvearyComponentAdvanced - { + public static abstract interface FrameHouse extends IAlvearyComponentAdvanced { public abstract void changeClimate(int paramInt, IClimateControlled paramIClimateControlled); } - - public static abstract interface BeeModifier - extends IAlvearyComponentAdvanced - { - public abstract IBeeModifier getBeeModifier(); - } + @Override + public abstract T getMultiblockLogic(); } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyFrameHousing.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyFrameHousing.java index 6eeefa2696..d4166b00c9 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyFrameHousing.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/IAlvearyFrameHousing.java @@ -5,5 +5,6 @@ import gtPlusPlus.xmod.forestry.bees.alveary.gui.InventoryFrameHousing; public interface IAlvearyFrameHousing extends IBeeHousing { InventoryFrameHousing getAlvearyInventory(); + void wearOutFrames(IBeeHousing beeHousing, int amount); } diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/ISidedFrameWearingInventory.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/ISidedFrameWearingInventory.java index 5c485a9618..f8724fc840 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/ISidedFrameWearingInventory.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/ISidedFrameWearingInventory.java @@ -3,8 +3,6 @@ package gtPlusPlus.xmod.forestry.bees.alveary; import forestry.api.apiculture.IBeeHousing; import net.minecraft.inventory.ISidedInventory; -public abstract interface ISidedFrameWearingInventory - extends ISidedInventory -{ - public abstract void wearOutFrames(IBeeHousing paramIBeeHousing, int paramInt); +public abstract interface ISidedFrameWearingInventory extends ISidedInventory { + public abstract void wearOutFrames(IBeeHousing paramIBeeHousing, int paramInt); }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/TileAlvearyFrameHousing.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/TileAlvearyFrameHousing.java index 1e6507208c..af1e0b95b3 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/TileAlvearyFrameHousing.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/TileAlvearyFrameHousing.java @@ -7,7 +7,6 @@ import forestry.api.arboriculture.EnumGermlingType; import forestry.api.genetics.*; import forestry.api.multiblock.IAlvearyComponent; import forestry.apiculture.AlvearyBeeModifier; -import forestry.apiculture.multiblock.MultiblockLogicAlveary; import forestry.apiculture.network.packets.PacketActiveUpdate; import forestry.apiculture.worldgen.*; import forestry.core.inventory.IInv |
