diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2017-03-04 12:58:47 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-03-04 12:58:47 +1000 |
| commit | ae21012d216df71f31aed6fbc9d76215fc24ceed (patch) | |
| tree | cc89accbe6ce5c04b72ed3c5e46b2a185f88be6a /src/Java/gtPlusPlus/xmod/forestry | |
| parent | ba89972a22a316030f8c3bd99974f915b1d7aefc (diff) | |
| download | GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.gz GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.bz2 GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.zip | |
+ New texture for the slow builders ring.
+ Added the Alkalus Disk.
$ Fixed Frame Box Assembler Recipes.
$ Fixed Missing 7Li material.
$ Fixed Tiered Tanks not showing their capacity in the tooltip.
$ Fixed tooltips for alloys containing Bronze or Steel.
$ Fixed Clay Pipe Extruder Recipes.
- Removed a handful of Plasma cells for misc. materials.
% Changed the Industrial Coke Oven's tooltip, to better describe the input/output requirements.
% Cleaned up The Entire Project.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/forestry')
19 files changed, 515 insertions, 515 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/Forestry.java b/src/Java/gtPlusPlus/xmod/forestry/Forestry.java index 698e6a8d01..8f5b36f6e3 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/Forestry.java +++ b/src/Java/gtPlusPlus/xmod/forestry/Forestry.java @@ -2,10 +2,6 @@ package gtPlusPlus.xmod.forestry; import static cpw.mods.fml.common.registry.GameRegistry.findBlock; import static cpw.mods.fml.common.registry.GameRegistry.findItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import net.minecraft.block.Block; -import net.minecraft.item.Item; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; @@ -16,6 +12,10 @@ import cpw.mods.fml.common.Mod.CustomProperty; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import net.minecraft.block.Block; +import net.minecraft.item.Item; @ChildMod(parent = CORE.MODID, mod = @Mod(modid = "Gregtech++|CompatForestry", name = "GT++ Compat: Forestry", @@ -27,12 +27,12 @@ public class Forestry { private static final String name = "Forestry"; @EventHandler - public void load(FMLInitializationEvent e) { + public void load(final FMLInitializationEvent e) { try { initForestry(); - } catch (Throwable $) { - ModContainer This = FMLCommonHandler.instance().findContainerFor(this); + } catch (final Throwable $) { + final ModContainer This = FMLCommonHandler.instance().findContainerFor(this); LogManager.getLogger(This.getModId()).log(Level.ERROR, "There was a problem loading " + This.getName(), $); } } @@ -43,47 +43,45 @@ public class Forestry { item = findItem(name, "sapling"); Block block = findBlock(name, "saplingGE"); - if (item != null && block != null) { + if ((item != null) && (block != null)) { //ForestrySapling sapling = new ForestrySapling(item, block); //MFRRegistry.registerPlantable(sapling); //MFRRegistry.registerFertilizable(sapling); - } else - //Utils.LOG_WARNING("Forestry sapling/block null!"); - - block = findBlock(name, "soil"); + } else { + block = findBlock(name, "soil"); + } if (block != null) { //ForestryBogEarth bog = new ForestryBogEarth(block); //MFRRegistry.registerPlantable(bog); //MFRRegistry.registerFertilizable(bog); //MFRRegistry.registerHarvestable(bog); //MFRRegistry.registerFruit(bog); - } else - //Utils.LOG_WARNING("Forestry bog earth null!"); - - for (int i = 1; true; ++i) { - block = findBlock(name, "log" + i); - l: if (block == null) { - if (i > 1) - Utils.LOG_WARNING("Forestry logs null at " + i + "."); - else { - block = findBlock(name, "logs"); - if (block != null) { - break l; + } else { + for (int i = 1; true; ++i) { + block = findBlock(name, "log" + i); + l: if (block == null) { + if (i > 1) { + Utils.LOG_WARNING("Forestry logs null at " + i + "."); + } else { + block = findBlock(name, "logs"); + if (block != null) { + break l; + } + Utils.LOG_WARNING("Forestry logs null!"); } - Utils.LOG_WARNING("Forestry logs null!"); + break; } - break; + //MFRRegistry.registerHarvestable(new HarvestableWood(block)); + //MFRRegistry.registerFruitLogBlock(block); } - //MFRRegistry.registerHarvestable(new HarvestableWood(block)); - //MFRRegistry.registerFruitLogBlock(block); } for (int i = 1; true; ++i) { block = findBlock(name, "fireproofLog" + i); l: if (block == null) { - if (i > 1) + if (i > 1) { Utils.LOG_WARNING("Forestry logs null at " + i + "."); - else { + } else { block = findBlock(name, "logsFireproof"); if (block != null) { break l; @@ -102,8 +100,9 @@ public class Forestry { //MFRRegistry.registerFertilizable(leaf); //MFRRegistry.registerHarvestable(leaf); //MFRRegistry.registerFruit(leaf); - } else + } else { Utils.LOG_WARNING("Forestry leaves null!"); + } block = findBlock(name, "pods"); item = findItem(name, "grafterProven"); @@ -112,12 +111,13 @@ public class Forestry { //MFRRegistry.registerFertilizable(pod); //MFRRegistry.registerHarvestable(pod); //MFRRegistry.registerFruit(pod); - } else + } else { Utils.LOG_WARNING("Forestry pods null!"); + } } @EventHandler - public static void postInit(FMLPostInitializationEvent e) { + public static void postInit(final FMLPostInitializationEvent e) { //MFRRegistry.registerLiquidDrinkHandler("bioethanol", new DrinkHandlerBiofuel()); //TileEntityUnifier.updateUnifierLiquids(); } diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java index e92aa40ca2..9d19af17b8 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java +++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java @@ -1,5 +1,6 @@ package gtPlusPlus.xmod.forestry; +import cpw.mods.fml.common.Optional; import forestry.core.proxy.Proxies; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; @@ -8,43 +9,42 @@ import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes; import net.minecraft.block.Block; import net.minecraft.world.World; -import cpw.mods.fml.common.Optional; public class HANDLER_FR { - public static void preInit(){ + public static void preInit(){ if (LoadedMods.Forestry){ FR_ItemRegistry.Register(); if (CORE.configSwitches.enableCustomAlvearyBlocks){ AlvearyHandler.run(); } - } + } } public static void Init(){ if (LoadedMods.Forestry){ - - } + + } } public static void postInit(){ if (LoadedMods.Forestry){ - FR_Gregtech_Recipes.registerItems(); - } - } - - public static boolean createBlockBreakParticles(World world, int x, int y, int z, Block block){ + FR_Gregtech_Recipes.registerItems(); + } + } + + public static boolean createBlockBreakParticles(final World world, final int x, final int y, final int z, final Block block){ if (LoadedMods.Forestry){ createBlockBreakParticles_INTERNAL(world, x, y, z, block); } return false; } - + @Optional.Method(modid = "Forestry") - private static void createBlockBreakParticles_INTERNAL(World world, int x, int y, int z, Block block){ + private static void createBlockBreakParticles_INTERNAL(final World world, final int x, final int y, final int z, final Block block){ Proxies.common.addBlockDestroyEffects(world, x, y, z, block, 0); } - - + + } 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/AlvearyHandler.java b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyHandler.java index fd18f069cf..ab093645b6 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyHandler.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/AlvearyHandler.java @@ -1,28 +1,28 @@ package gtPlusPlus.xmod.forestry.bees.alveary; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; import forestry.core.items.ItemBlockForestry; import forestry.core.utils.StringUtil; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; public class AlvearyHandler { @Optional.Method(modid = "Forestry") public static void run(){ if (!LoadedMods.ExtraBees){ - if (CORE.configSwitches.enableCustomAlvearyBlocks){//Alveary Stuff - FR_BlockAlveary alveary; - alveary = registerBlock(new FR_BlockAlveary(), ItemBlockForestry.class, "alveary"); - GameRegistry.registerTileEntity(TileAlvearyFrameHousing.class, "FrameHousing"); - } + if (CORE.configSwitches.enableCustomAlvearyBlocks){//Alveary Stuff + FR_BlockAlveary alveary; + alveary = registerBlock(new FR_BlockAlveary(), ItemBlockForestry.class, "alveary"); + GameRegistry.registerTileEntity(TileAlvearyFrameHousing.class, "FrameHousing"); + } } - } + } - protected static <T extends Block> T registerBlock(T block, Class<? extends ItemBlock> itemClass, String name, Object... itemCtorArgs) { + protected static <T extends Block> T registerBlock(final T block, final Class<? extends ItemBlock> itemClass, final String name, final Object... itemCtorArgs) { block.setBlockName("for." + name); GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block), itemCtorArgs); return block; 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 a322311434..06162f7dc1 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_AlvearyFrameBlock.java @@ -1,10 +1,9 @@ package gtPlusPlus.xmod.forestry.bees.alveary; -import net.minecraft.util.ChunkCoordinates; - import com.mojang.authlib.GameProfile; import forestry.api.multiblock.*; +import net.minecraft.util.ChunkCoordinates; public class FR_AlvearyFrameBlock implements IAlvearyComponent, IMultiblockComponent{ @@ -21,16 +20,16 @@ public class FR_AlvearyFrameBlock implements IAlvearyComponent, IMultiblockCompo } @Override - public void onMachineAssembled(IMultiblockController arg0, - ChunkCoordinates arg1, ChunkCoordinates arg2) { + public void onMachineAssembled(final IMultiblockController arg0, + final ChunkCoordinates arg1, final ChunkCoordinates arg2) { // TODO Auto-generated method stub - + } @Override public void onMachineBroken() { // TODO Auto-generated method stub - + } @Override 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 bf632ef039..cd74ec0e81 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_BlockAlveary.java @@ -3,6 +3,15 @@ package gtPlusPlus.xmod.forestry.bees.alveary; import java.util.ArrayList; import java.util.List; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import forestry.apiculture.MaterialBeehive; +import forestry.apiculture.multiblock.TileAlvearyPlain; +import forestry.core.blocks.BlockForestry; +import forestry.core.render.TextureManager; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.core.creative.AddToCreativeTab; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -13,15 +22,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import forestry.apiculture.MaterialBeehive; -import forestry.apiculture.multiblock.TileAlvearyPlain; -import forestry.core.blocks.BlockForestry; -import forestry.core.render.TextureManager; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; public class FR_BlockAlveary extends BlockForestry { @@ -31,8 +31,8 @@ public class FR_BlockAlveary extends BlockForestry PLAIN, ERROR, FRAME, - MUTATOR, - + MUTATOR, + //Placeholder Values HEATER, HYGRO, STABILIZER, SIEVE; @@ -44,37 +44,39 @@ public class FR_BlockAlveary extends BlockForestry public FR_BlockAlveary() { super(new MaterialBeehive(false)); - setHardness(1.0F); - setCreativeTab(AddToCreativeTab.tabBlock); - setHarvestLevel("axe", 0); - + this.setHardness(1.0F); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHarvestLevel("axe", 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) + 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; - } + return false; + } @Override @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, List list) + public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { for (int i = 0; i < 4; i++) { - if (i != 1 && i != 0) { + if ((i != 1) && (i != 0)) { list.add(new ItemStack(item, 1, i)); } } @@ -93,64 +95,64 @@ public class FR_BlockAlveary extends BlockForestry } @Override - public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) + public ArrayList<ItemStack> getDrops(final World world, final int x, final int y, final int z, final int metadata, final int fortune) { - ArrayList<ItemStack> drop = new ArrayList<ItemStack>(); + final ArrayList<ItemStack> drop = new ArrayList<>(); drop.add(new ItemStack(this, 1, metadata != 1 ? metadata : 0)); return drop; } @Override - public int getDamageValue(World world, int x, int y, int z) + public int getDamageValue(final World world, final int x, final int y, final int z) { - int meta = world.getBlockMetadata(x, y, z); + final int meta = world.getBlockMetadata(x, y, z); return meta != 1 ? meta : 0; } @Override - public TileEntity createTileEntity(World world, int metadata) + public TileEntity createTileEntity(final World world, final int metadata) { if ((metadata < 0) || (metadata > Type.VALUES.length)) { return null; } - - - - Type type = Type.VALUES[metadata]; + + + + final Type type = Type.VALUES[metadata]; switch (type) { - case FRAME: + case FRAME: LanguageRegistry.addName(this, "Alveary Frame Housing"); - case MUTATOR: + case MUTATOR: LanguageRegistry.addName(this, "Alveary Mutator Block"); - case ERROR: + case ERROR: LanguageRegistry.addName(this, "Invalid Alveary Block"); default: - LanguageRegistry.addName(this, "Unnamed Alveary Block"); + LanguageRegistry.addName(this, "Unnamed Alveary Block"); } switch (type) { - case FRAME: + case FRAME: return new TileAlvearyFrameHousing(); - case MUTATOR: + case MUTATOR: return new TileAlvearyPlain(); - case ERROR: + case ERROR: return new TileAlvearyPlain(); default: - return new TileAlvearyPlain(); + return new TileAlvearyPlain(); } } @Override - public Block setBlockName(String name) { + public Block setBlockName(final String name) { //int meta = this. return super.setBlockName(name); } @Override - public TileEntity createNewTileEntity(World world, int meta) + public TileEntity createNewTileEntity(final World world, final int meta) { - return createTileEntity(world, meta); + return this.createTileEntity(world, meta); } /* ICONS */ @@ -167,108 +169,108 @@ public class FR_BlockAlveary extends BlockForestry private IIcon[] icons; @SideOnly(Side.CLIENT) @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 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"); } @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]; + 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[BOTTOM]; } - Type type = Type.VALUES[metadata]; + final Type type = Type.VALUES[metadata]; switch (type) { case ERROR: - return icons[PLAIN]; + return this.icons[PLAIN]; case FRAME: - return icons[ALVEARY_FRAME_OFF]; + return this.icons[ALVEARY_FRAME_OFF]; case MUTATOR: - return icons[ALVEARY_MUTATOR_OFF]; + return this.icons[ALVEARY_MUTATOR_OFF]; case HEATER: - return icons[ALVEARY_MUTATOR_OFF]; + return this.icons[ALVEARY_MUTATOR_OFF]; case HYGRO: - return icons[ALVEARY_MUTATOR_OFF]; + return this.icons[ALVEARY_MUTATOR_OFF]; case STABILIZER: - return icons[PLAIN]; + return this.icons[PLAIN]; case SIEVE: - return icons[PLAIN]; + return this.icons[PLAIN]; default: return null; } } @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); + return this.getBlockTextureFromSideAndTile(world, x, y, z, side); } - Block blockXP = world.getBlock(x + 1, y, z); - Block blockXM = world.getBlock(x - 1, y, z); - if (blockXP == this && blockXM != this) { + 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); + 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 getIcon(side, 0); + return this.getIcon(side, 0); } - return icons[((FR_TileAlveary) tile).getIcon(side)]; + return this.icons[((FR_TileAlveary) tile).getIcon(side)]; } @SideOnly(Side.CLIENT) - private IIcon switchForSide(int textureId, int side) { - if (side == 4 || side == 5) { + private IIcon switchForSide(final int textureId, final int side) { + if ((side == 4) || (side == 5)) { if (textureId == 41) { - return icons[LEFT]; + return this.icons[LEFT]; } - return icons[RIGHT]; + return this.icons[RIGHT]; } else if (textureId == 41) { - return icons[RIGHT]; + return this.icons[RIGHT]; } else { - return icons[LEFT]; + return this.icons[LEFT]; } } @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) { + public ItemStack get(final Type type) { return new ItemStack(this, 1, type.ordinal()); } }
\ 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 62b54ade3c..b5e7845dab 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/alveary/FR_TileAlveary.java @@ -3,9 +3,6 @@ package gtPlusPlus.xmod.forestry.bees.alveary; import java.io.IOException; import java.util.List; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.Vec3; -import net.minecraft.world.biome.BiomeGenBase; import forestry.api.apiculture.*; import forestry.api.core.*; import forestry.api.multiblock.IAlvearyComponent; @@ -20,6 +17,9 @@ import forestry.core.multiblock.MultiblockTileEntityForestry; import forestry.core.network.*; import forestry.core.tiles.IClimatised; import forestry.core.tiles.ITitled; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.Vec3; +import net.minecraft.world.biome.BiomeGenBase; public abstract class FR_TileAlveary extends MultiblockTileEntityForestry<MultiblockLogicAlveary> @@ -32,26 +32,26 @@ implements IBeeHousing, IAlvearyComponent, IRestrictedAccess, IStreamableGui, IT 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"); - + } - public int getIcon(int side) + public int getIcon(final int side) { return 0; } @Override - public void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord, ChunkCoordinates maxCoord) + 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, getBlockType()); - markDirty(); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.markDirty(); } @Override @@ -60,92 +60,92 @@ implements IBeeHousing, IAlvearyComponent, IRestrictedAccess, IStreamableGui, IT if (this.worldObj.isRemote) { this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); } - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, getBlockType()); - markDirty(); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.markDirty(); } @Override public BiomeGenBase getBiome() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBiome(); + return this.getMultiblockLogic().getController().getBiome(); } @Override public Iterable<IBeeModifier> getBeeModifiers() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeModifiers(); + return this.getMultiblockLogic().getController().getBeeModifiers(); } @Override public Iterable<IBeeListener> getBeeListeners() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeListeners(); + return this.getMultiblockLogic().getController().getBeeListeners(); } @Override public IBeeHousingInventory getBeeInventory() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeInventory(); + return this.getMultiblockLogic().getController().getBeeInventory(); } @Override public IBeekeepingLogic getBeekeepingLogic() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeekeepingLogic(); + return this.getMultiblockLogic().getController().getBeekeepingLogic(); } @Override public Vec3 getBeeFXCoordinates() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBeeFXCoordinates(); + return this.getMultiblockLogic().getController().getBeeFXCoordinates(); } @Override public EnumTemperature getTemperature() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getTemperature(); + return this.getMultiblockLogic().getController().getTemperature(); } @Override public EnumHumidity getHumidity() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getHumidity(); + return this.getMultiblockLogic().getController().getHumidity(); } @Override public int getBlockLightValue() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getController().getBlockLightValue(); + return this.getMultiblockLogic().getController().getBlockLightValue(); } @Override public boolean canBlockSeeTheSky() { - return ((MultiblockLogicAlveary)getMultiblockLogic()).getCont |
