mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Move EnumFarmBlock to its own file
This commit is contained in:
1 parent
2f6969e141
commit
d705f4f4db
6 files changed
+135
-104
No files matched your search
@@ -10,15 +10,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.gadgets;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.core.gadgets.BlockStructure;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.farming.gadgets.TileFarm.EnumFarmBlock;
|
||||
import forestry.plugins.PluginFarming;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -33,6 +27,14 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.core.gadgets.BlockStructure;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.plugins.PluginFarming;
|
||||
|
||||
public class BlockFarm extends BlockStructure {
|
||||
|
||||
public BlockFarm() {
|
||||
@@ -152,7 +154,7 @@ public class BlockFarm extends BlockStructure {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getBlockTextureFromSideAndMetadata(EnumFarmBlock type, int side, int metadata) {
|
||||
return StackUtils.getBlock(type.base).getIcon(side, type.base.getItemDamage());
|
||||
return StackUtils.getBlock(type.getBase()).getIcon(side, type.getBase().getItemDamage());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -189,10 +191,10 @@ public class BlockFarm extends BlockStructure {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
ItemStack base = EnumFarmBlock.BRICK_STONE.base;
|
||||
ItemStack base = EnumFarmBlock.BRICK_STONE.getBase();
|
||||
|
||||
if (tile instanceof TileFarm)
|
||||
base = ((TileFarm) tile).farmBlock.base;
|
||||
base = ((TileFarm) tile).farmBlock.getBase();
|
||||
|
||||
return StackUtils.getBlock(base).getIcon(side, base.getItemDamage());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user