mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
[1.7.10] Some refactoring (#102)
* Some refactoring * Some refactoring Added some localization * Added some localization Fix wrong branch localization in page branch overview Simplify some localization * Simplify some localization * Removed unused localize method * Simplify some localization * Removed proxy.localise method * Simplify localization
This commit is contained in:
1 parent
81301c3bd2
commit
1ffaad9fcd
232 files changed
+1947
-2054
No files matched your search
@@ -3,6 +3,7 @@ package binnie.extratrees.alcohol;
|
||||
import binnie.Binnie;
|
||||
import binnie.core.liquid.FluidContainer;
|
||||
import binnie.core.liquid.IFluidType;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -106,7 +107,7 @@ public enum Alcohol implements IFluidType, ICocktailLiquid {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("fluid.alcohol." + name().toLowerCase());
|
||||
return I18N.localise("extrabees.fluid.alcohol." + name().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,9 +39,9 @@ public enum Glassware {
|
||||
|
||||
public String getName(String liquid) {
|
||||
if (liquid == null) {
|
||||
return ExtraTrees.proxy.localise("item.glassware." + name().toLowerCase());
|
||||
return I18N.localise("extratrees.item.glassware." + name().toLowerCase());
|
||||
}
|
||||
return I18N.localise(ExtraTrees.instance, "item.glassware." + name().toLowerCase() + ".usage", liquid);
|
||||
return I18N.localise("extratrees.item.glassware." + name().toLowerCase() + ".usage", liquid);
|
||||
}
|
||||
|
||||
public int getCapacity() {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
if (type >= 0 && type < DoorType.values().length) {
|
||||
return DoorType.values()[type];
|
||||
}
|
||||
return DoorType.Standard;
|
||||
return DoorType.STANDARD;
|
||||
}
|
||||
|
||||
private IIcon getFlippedIcon(boolean upper, boolean flip, int tileMeta) {
|
||||
@@ -53,7 +53,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return DoorType.Standard.iconDoorLower;
|
||||
return DoorType.STANDARD.iconDoorLower;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +89,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
}
|
||||
return getFlippedIcon(flag3, flag2, tileMeta);
|
||||
}
|
||||
return DoorType.Standard.iconDoorLower;
|
||||
return DoorType.STANDARD.iconDoorLower;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,9 +193,9 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
String typeName = getDoorType(meta).getName();
|
||||
String woodName = WoodManager.getPlankType(meta & 0xFF).getName();
|
||||
if (typeName.equals("")) {
|
||||
return I18N.localise(ExtraTrees.instance, "block.door.name", woodName);
|
||||
return I18N.localise("extratrees.block.door.name", woodName);
|
||||
}
|
||||
return I18N.localise(ExtraTrees.instance, "block.door.name.adv", woodName, typeName);
|
||||
return I18N.localise("extratrees.block.door.name.adv", woodName, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,18 +211,18 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemList) {
|
||||
for (IPlankType type : PlankType.ExtraTreePlanks.values()) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.Standard));
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
for (IPlankType type : PlankType.ForestryPlanks.values()) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.Standard));
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
for (IPlankType type : PlankType.ExtraBiomesPlank.values()) {
|
||||
if (type.getStack() != null) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.Standard));
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
}
|
||||
for (IPlankType type : PlankType.VanillaPlanks.values()) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.Standard));
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -129,11 +128,12 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.log.name", ILogType.ExtraTreeLog.values()[meta].getName());
|
||||
return I18N.localise("extratrees.block.log.name", ILogType.ExtraTreeLog.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -195,7 +195,7 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return BlockMetadata.getPickBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -74,7 +73,7 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return I18N.localise("extratrees.block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -144,7 +143,7 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return BlockMetadata.getPickBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,10 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
public BlockETSlab(boolean isDouble) {
|
||||
super(isDouble);
|
||||
setCreativeTab(Tabs.tabArboriculture);
|
||||
setHardness(2.0f).setResistance(5.0f).setStepSound(Block.soundTypeWood);
|
||||
setHardness(2.0f);
|
||||
setResistance(5.0f);
|
||||
setStepSound(Block.soundTypeWood);
|
||||
|
||||
if (!field_150004_a) {
|
||||
useNeighborBrightness = true;
|
||||
}
|
||||
@@ -39,7 +42,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int blockMeta, int fortune) {
|
||||
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> drops = new ArrayList<>();
|
||||
drops.addAll(BlockMetadata.getBlockDropped((IBlockMetadata) ExtraTrees.blockSlab, world, x, y, z, blockMeta));
|
||||
if (field_150004_a) {
|
||||
drops.addAll(BlockMetadata.getBlockDropped((IBlockMetadata) ExtraTrees.blockSlab, world, x, y, z, blockMeta));
|
||||
@@ -48,7 +51,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) {
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||
return BlockMetadata.breakBlock(this, player, world, x, y, z);
|
||||
}
|
||||
|
||||
@@ -82,11 +85,12 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodslab.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return I18N.localise("extratrees.block.woodslab.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +155,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return BlockMetadata.getPickBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class BlockETStairs extends BlockStairs implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z) {
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||
return BlockMetadata.breakBlock(this, player, world, x, y, z);
|
||||
}
|
||||
|
||||
@@ -106,11 +106,12 @@ public class BlockETStairs extends BlockStairs implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodstairs.name", WoodManager.getPlankType(meta + 32).getName());
|
||||
return I18N.localise("extratrees.block.woodstairs.name", WoodManager.getPlankType(meta + 32).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
public class BranchBlockRenderer implements ISimpleBlockRenderingHandler {
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.core.util.I18N;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public enum DoorType {
|
||||
Standard("standard"),
|
||||
Solid("solid"),
|
||||
Double("double"),
|
||||
Full("full");
|
||||
STANDARD("standard"),
|
||||
SOLID("solid"),
|
||||
DOUBLE("double"),
|
||||
FULL("full");
|
||||
|
||||
protected String id;
|
||||
protected IIcon iconDoorLower;
|
||||
@@ -16,11 +16,11 @@ public enum DoorType {
|
||||
protected IIcon iconDoorUpperFlip;
|
||||
protected IIcon iconItem;
|
||||
|
||||
DoorType(String iconName) {
|
||||
id = iconName;
|
||||
DoorType(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.door.type." + id);
|
||||
return I18N.localise("extratrees.block.door.type." + id);
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public interface ILogType {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return I18N.localise(ExtraTrees.instance, "block.planks." + name.toLowerCase(Locale.ENGLISH));
|
||||
return I18N.localise("extratrees.block.planks." + name.toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public void addRecipe() {
|
||||
|
||||
@@ -110,10 +110,10 @@ public class ModuleBlocks implements IInitializable {
|
||||
ItemStack planks2 = plank2.getStack();
|
||||
ItemStack fenceNormal = WoodManager.getFence(plank2, new FenceType(0), 1);
|
||||
ItemStack gate = WoodManager.getGate(plank2);
|
||||
ItemStack doorStandard = WoodManager.getDoor(plank2, DoorType.Standard);
|
||||
ItemStack doorSolid = WoodManager.getDoor(plank2, DoorType.Solid);
|
||||
ItemStack doorSplit = WoodManager.getDoor(plank2, DoorType.Double);
|
||||
ItemStack doorFull = WoodManager.getDoor(plank2, DoorType.Full);
|
||||
ItemStack doorStandard = WoodManager.getDoor(plank2, DoorType.STANDARD);
|
||||
ItemStack doorSolid = WoodManager.getDoor(plank2, DoorType.SOLID);
|
||||
ItemStack doorSplit = WoodManager.getDoor(plank2, DoorType.DOUBLE);
|
||||
ItemStack doorFull = WoodManager.getDoor(plank2, DoorType.FULL);
|
||||
if (planks2 != null) {
|
||||
if (gate == null) {
|
||||
continue;
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.extratrees.block;
|
||||
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.CarpentryManager;
|
||||
import com.google.common.base.Optional;
|
||||
@@ -75,12 +76,12 @@ public class PlankType {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.planks." + toString().toLowerCase());
|
||||
return I18N.localise("extratrees.block.planks." + toString().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localise("block.planks." + toString().toLowerCase() + ".desc");
|
||||
return I18N.localise("extratrees.block.planks." + toString().toLowerCase() + ".desc");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,12 +125,12 @@ public class PlankType {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.planks.vanilla." + toString().toLowerCase());
|
||||
return I18N.localise("extratrees.block.planks.vanilla." + toString().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localise("block.planks.vanilla." + toString().toLowerCase() + ".desc");
|
||||
return I18N.localise("extratrees.block.planks.vanilla." + toString().toLowerCase() + ".desc");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,12 +190,12 @@ public class PlankType {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.planks.forestry." + toString().toLowerCase());
|
||||
return I18N.localise("extratrees.block.planks.forestry." + toString().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localise("block.planks.forestry." + toString().toLowerCase() + ".desc");
|
||||
return I18N.localise("extratrees.block.planks.forestry." + toString().toLowerCase() + ".desc");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -239,12 +240,12 @@ public class PlankType {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.planks.ebxl." + toString().toLowerCase());
|
||||
return I18N.localise("extratrees.block.planks.ebxl." + toString().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localise("block.planks.ebxl." + toString().toLowerCase() + ".desc");
|
||||
return I18N.localise("extratrees.block.planks.ebxl." + toString().toLowerCase() + ".desc");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -121,7 +121,7 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodfence.name", getDescription(meta).getPlankType().getName());
|
||||
return I18N.localise("extratrees.block.woodfence.name", getDescription(meta).getPlankType().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,6 @@ import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.IPlankType;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -104,7 +103,7 @@ public class BlockGate extends BlockFenceGate implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodgate.name", WoodManager.getPlankType(meta).getName());
|
||||
return I18N.localise("extratrees.block.woodgate.name", WoodManager.getPlankType(meta).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,6 @@ package binnie.extratrees.block.decor;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.IPlankType;
|
||||
import binnie.extratrees.block.PlankType;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
@@ -40,6 +39,6 @@ public class BlockMultiFence extends BlockFence implements IBlockMetadata {
|
||||
IPlankType type2 = getDescription(meta).getSecondaryPlankType();
|
||||
boolean twoTypes = type1 != type2;
|
||||
FenceType type3 = getDescription(meta).getFenceType();
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodslab.name" + (twoTypes ? "2" : ""), type3.getPrefix(), type1.getName(), type2.getName());
|
||||
return I18N.localise("extratrees.block.woodslab.name" + (twoTypes ? "2" : ""), type3.getPrefix(), type1.getName(), type2.getName());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.block.PlankType;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -26,7 +25,7 @@ public class BlockCarpentry extends BlockDesign {
|
||||
|
||||
@Override
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodentile.name", design.getDesign().getName());
|
||||
return I18N.localise("extratrees.block.woodentile.name", design.getDesign().getName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package binnie.extratrees.carpentry;
|
||||
import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -85,7 +84,7 @@ public class BlockCarpentryPanel extends BlockCarpentry {
|
||||
@Override
|
||||
public String getBlockName(ItemStack stack) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
return I18N.localise(ExtraTrees.instance, "block.woodenpanel.name", block.getDesign().getName());
|
||||
return I18N.localise("extratrees.block.woodenpanel.name", block.getDesign().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,7 +6,6 @@ import binnie.core.block.IMultipassBlock;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.CarpentryManager;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.api.IDesignSystem;
|
||||
@@ -135,7 +134,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(I18N.localise(ExtraTrees.instance, "block.tooltip.twoColors", block.getPrimaryMaterial().getName(), block.getSecondaryMaterial().getName()));
|
||||
tooltip.add(I18N.localise("extratrees.block.tooltip.twoColors", block.getPrimaryMaterial().getName(), block.getSecondaryMaterial().getName()));
|
||||
} else {
|
||||
tooltip.add(block.getPrimaryMaterial().getName());
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -59,6 +58,6 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
|
||||
@Override
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return I18N.localise(ExtraTrees.instance, "block.stainedglass.name", design.getDesign().getName());
|
||||
return I18N.localise("extratrees.block.stainedglass.name", design.getDesign().getName());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.api.IDesignMaterial;
|
||||
import binnie.extratrees.api.IDesignSystem;
|
||||
@@ -137,7 +136,7 @@ public class DesignBlock {
|
||||
Label_1107:
|
||||
{
|
||||
switch (getFacing()) {
|
||||
case UP: {
|
||||
case UP:
|
||||
if (dir == ForgeDirection.DOWN || dir == ForgeDirection.UP) {
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateRight();
|
||||
@@ -145,8 +144,8 @@ public class DesignBlock {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DOWN: {
|
||||
|
||||
case DOWN:
|
||||
switch (dir) {
|
||||
case UP:
|
||||
case DOWN: {
|
||||
@@ -168,8 +167,8 @@ public class DesignBlock {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EAST: {
|
||||
|
||||
case EAST:
|
||||
switch (dir) {
|
||||
case SOUTH:
|
||||
case UP: {
|
||||
@@ -201,108 +200,102 @@ public class DesignBlock {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WEST: {
|
||||
|
||||
case WEST:
|
||||
switch (dir) {
|
||||
case NORTH: {
|
||||
case NORTH:
|
||||
layout = layout.rotateRight();
|
||||
break;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
case UP: {
|
||||
case UP:
|
||||
layout = layout.rotateLeft();
|
||||
break;
|
||||
}
|
||||
case DOWN: {
|
||||
|
||||
case DOWN:
|
||||
layout = layout.rotateLeft().flipVertical();
|
||||
break;
|
||||
}
|
||||
case EAST: {
|
||||
|
||||
case EAST:
|
||||
layout = layout.flipHorizontal();
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateLeft();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WEST: {
|
||||
|
||||
case WEST:
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateRight();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NORTH: {
|
||||
|
||||
case NORTH:
|
||||
switch (dir) {
|
||||
case WEST: {
|
||||
case WEST:
|
||||
layout = layout.rotateLeft();
|
||||
break Label_1107;
|
||||
}
|
||||
case EAST: {
|
||||
|
||||
case EAST:
|
||||
layout = layout.rotateRight();
|
||||
break Label_1107;
|
||||
}
|
||||
case DOWN: {
|
||||
|
||||
case DOWN:
|
||||
layout = layout.flipHorizontal();
|
||||
break Label_1107;
|
||||
}
|
||||
case SOUTH: {
|
||||
|
||||
case SOUTH:
|
||||
layout = layout.flipHorizontal();
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateLeft();
|
||||
}
|
||||
break Label_1107;
|
||||
}
|
||||
case NORTH: {
|
||||
|
||||
case NORTH:
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateRight();
|
||||
}
|
||||
break Label_1107;
|
||||
}
|
||||
default: {
|
||||
|
||||
default:
|
||||
break Label_1107;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
case SOUTH: {
|
||||
case SOUTH:
|
||||
switch (dir) {
|
||||
case EAST: {
|
||||
case EAST:
|
||||
layout = layout.rotateLeft();
|
||||
break Label_1107;
|
||||
}
|
||||
case WEST: {
|
||||
|
||||
case WEST:
|
||||
layout = layout.rotateRight();
|
||||
break Label_1107;
|
||||
}
|
||||
case UP: {
|
||||
|
||||
case UP:
|
||||
layout = layout.rotateRight().rotateRight();
|
||||
break Label_1107;
|
||||
}
|
||||
case DOWN: {
|
||||
|
||||
case DOWN:
|
||||
layout = layout.flipVertical();
|
||||
break Label_1107;
|
||||
}
|
||||
case NORTH: {
|
||||
|
||||
case NORTH:
|
||||
layout = layout.flipHorizontal();
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateLeft();
|
||||
}
|
||||
break Label_1107;
|
||||
}
|
||||
case SOUTH: {
|
||||
|
||||
case SOUTH:
|
||||
for (int j = 0; j < rotation; ++j) {
|
||||
layout = layout.rotateRight();
|
||||
}
|
||||
break Label_1107;
|
||||
}
|
||||
default: {
|
||||
break Label_1107;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
default:
|
||||
break Label_1107;
|
||||
}
|
||||
}
|
||||
}
|
||||
return layout;
|
||||
@@ -319,7 +312,9 @@ public class DesignBlock {
|
||||
}
|
||||
|
||||
public IIcon getIcon(IDesignSystem system, boolean secondary, ForgeDirection dir) {
|
||||
return secondary ? getSecondaryIcon(system, dir) : getPrimaryIcon(system, dir);
|
||||
return secondary
|
||||
? getSecondaryIcon(system, dir)
|
||||
: getPrimaryIcon(system, dir);
|
||||
}
|
||||
|
||||
public ForgeDirection getFacing() {
|
||||
@@ -364,8 +359,7 @@ public class DesignBlock {
|
||||
|
||||
if (rotation > 3) {
|
||||
rotation = 0;
|
||||
}
|
||||
if (rotation < 0) {
|
||||
} else if (rotation < 0) {
|
||||
rotation = 3;
|
||||
}
|
||||
}
|
||||
@@ -385,7 +379,7 @@ public class DesignBlock {
|
||||
public String getString() {
|
||||
String type;
|
||||
if (getPrimaryMaterial() != getSecondaryMaterial()) {
|
||||
type = I18N.localise(ExtraTrees.instance, "block.tooltip.twoMaterials", getPrimaryMaterial().getName(), getSecondaryMaterial().getName());
|
||||
type = I18N.localise("extratrees.block.tooltip.twoMaterials", getPrimaryMaterial().getName(), getSecondaryMaterial().getName());
|
||||
} else {
|
||||
type = getPrimaryMaterial().getName();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.api.ILayout;
|
||||
@@ -412,7 +411,7 @@ public enum EnumDesign implements IDesign {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return I18N.localise(Botany.instance, "design." + name);
|
||||
return I18N.localise("botany.design." + name);
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.api.CarpentryManager;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
@@ -28,7 +27,7 @@ public enum EnumDesignCategory implements IDesignCategory {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return I18N.localise(Botany.instance, "design.category." + name);
|
||||
return I18N.localise("botany.design.category." + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.craftgui.dictionary;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.ITooltip;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
@@ -134,7 +133,8 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
if (tile == null) {
|
||||
return;
|
||||
}
|
||||
Designer.ComponentWoodworkerRecipe recipe = tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
|
||||
|
||||
tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setShort("d", (short) CarpentryManager.carpentryInterface.getDesignIndex(getValue()));
|
||||
Window.get(getWidget()).sendClientAction("design", nbt);
|
||||
@@ -144,7 +144,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
|
||||
@Override
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
tooltip.add(I18N.localise(BinnieCore.instance, "gui.designer.pattern", getValue().getName()));
|
||||
tooltip.add(I18N.localise("binniecore.gui.designer.pattern", getValue().getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.genetics.TreeBreedingSystem;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.core.util.I18N;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class PageFruit extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(ItemStack species) {
|
||||
deleteAllChildren();
|
||||
WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), ExtraTrees.proxy.localise("gui.database.tab.fruit." + (treesThatBearFruit ? "natural" : "potential")), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), I18N.localise("extratrees.gui.database.tab.fruit." + (treesThatBearFruit ? "natural" : "potential")), TextJustification.MIDDLE_CENTER);
|
||||
Collection<IAlleleSpecies> trees = treesThatBearFruit ? ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername()) : ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatCanBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4.0f, 24.0f, size().x() - 8.0f, size().y() - 4.0f - 24.0f).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
package binnie.extratrees.craftgui.dictionary;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.database.DatabaseTab;
|
||||
import binnie.core.craftgui.database.PageAbstract;
|
||||
import binnie.core.craftgui.database.WindowAbstractDatabase;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlItemDisplay;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.block.DoorType;
|
||||
import binnie.extratrees.block.IPlankType;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
@@ -28,15 +25,14 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
@Override
|
||||
public void onValueChanged(ItemStack species) {
|
||||
deleteAllChildren();
|
||||
WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), species.getDisplayName(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new IArea(12.0f, 24.0f, size().x() - 24.0f, 24.0f), ExtraTrees.proxy.localise("gui.database.planks.use"), TextJustification.MiddleLeft);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new IArea(12.0f, 24.0f, size().x() - 24.0f, 24.0f), I18N.localise("extratrees.gui.database.planks.use"), TextJustification.MIDDLE_LEFT);
|
||||
IPlankType type = WoodManager.get(species);
|
||||
int x = 12;
|
||||
if (type != null) {
|
||||
ItemStack fence = WoodManager.getFence(type, new FenceType(0), 1);
|
||||
ItemStack gate = WoodManager.getGate(type);
|
||||
ItemStack door = WoodManager.getDoor(type, DoorType.Standard);
|
||||
ItemStack door = WoodManager.getDoor(type, DoorType.STANDARD);
|
||||
if (fence != null) {
|
||||
new ControlItemDisplay(this, x, 48.0f).setItemStack(fence);
|
||||
x += 22;
|
||||
@@ -47,12 +43,11 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
}
|
||||
if (door != null) {
|
||||
new ControlItemDisplay(this, x, 48.0f).setItemStack(door);
|
||||
x += 22;
|
||||
}
|
||||
}
|
||||
|
||||
ControlText controlDescription = new ControlText(this, new IArea(8.0f, 84.0f, getSize().x() - 16.0f, 0.0f), "", TextJustification.MiddleCenter);
|
||||
ControlText controlSignature = new ControlText(this, new IArea(8.0f, 84.0f, getSize().x() - 16.0f, 0.0f), "", TextJustification.BottomRight);
|
||||
ControlText controlDescription = new ControlText(this, new IArea(8.0f, 84.0f, getSize().x() - 16.0f, 0.0f), "", TextJustification.MIDDLE_CENTER);
|
||||
ControlText controlSignature = new ControlText(this, new IArea(8.0f, 84.0f, getSize().x() - 16.0f, 0.0f), "", TextJustification.BOTTOM_RIGHT);
|
||||
String desc = "";
|
||||
if (type != null) {
|
||||
desc = type.getDescription();
|
||||
@@ -61,7 +56,7 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
String descBody = EnumChatFormatting.ITALIC.toString();
|
||||
String descSig = "";
|
||||
if (desc == null || desc.length() == 0) {
|
||||
descBody += BinnieCore.proxy.localise("gui.database.nodescription");
|
||||
descBody += I18N.localise("binniecore.gui.database.nodescription");
|
||||
} else {
|
||||
String[] descStrings = desc.split("\\|");
|
||||
descBody += descStrings[0];
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PagePlanksTrees extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(ItemStack species) {
|
||||
deleteAllChildren();
|
||||
WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), species.getDisplayName(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatMakePlanks(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4.0f, 24.0f, size().x() - 8.0f, size().y() - 4.0f - 24.0f).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.extratrees.craftgui.dictionary;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.controls.core.Control;
|
||||
@@ -13,7 +12,7 @@ import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.geometry.TextJustification;
|
||||
import binnie.core.craftgui.minecraft.control.ControlItemDisplay;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.FakeWorld;
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
@@ -37,9 +36,9 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
|
||||
public static String tolerated(boolean t) {
|
||||
if (t) {
|
||||
return BinnieCore.proxy.localise("gui.tolerated");
|
||||
return I18N.localise("binniecore.gui.tolerated");
|
||||
}
|
||||
return BinnieCore.proxy.localise("gui.nottolerated");
|
||||
return I18N.localise("binniecore.gui.nottolerated");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,6 +48,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
if (template == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ITree tree = Binnie.Genetics.getTreeRoot().templateAsIndividual(template);
|
||||
if (tree == null) {
|
||||
return;
|
||||
@@ -68,7 +68,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
IAlleleTreeSpecies treeSpecies = genome.getPrimary();
|
||||
int w = 144;
|
||||
int h = 176;
|
||||
new ControlText(this, new IArea(0.0f, 4.0f, w, 16.0f), getValue().toString(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new IArea(0.0f, 4.0f, w, 16.0f), getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
ControlScrollableContent scrollable = new ControlScrollableContent(this, 4.0f, 20.0f, w - 8, h - 8 - 16, 12.0f);
|
||||
Control contents = new Control(scrollable, 0.0f, 0.0f, w - 8 - 12, h - 8 - 16);
|
||||
int tw = w - 8 - 12;
|
||||
@@ -78,11 +78,11 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
int th = 14;
|
||||
int th2 = 18;
|
||||
BreedingSystem syst = Binnie.Genetics.treeBreedingSystem;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.PLANT) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), treeSpecies.getPlantType().toString(), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.PLANT) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), treeSpecies.getPlantType().toString(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), BinnieCore.proxy.localise("gui.temperature.short") + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), treeSpecies.getTemperature().getName(), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), I18N.localise("binniecore.gui.temperature.short") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), treeSpecies.getTemperature().getName(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
IIcon leaf = treeSpecies.getLeafIcon(false, false);
|
||||
IIcon fruit = null;
|
||||
@@ -96,7 +96,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
}
|
||||
|
||||
if (leaf != null) {
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), ExtraTrees.proxy.localise("gui.database.leaves") + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), I18N.localise("extratrees.gui.database.leaves") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlBlockIconDisplay(contents, w2, y, leaf).setColor(treeSpecies.getLeafColour(false));
|
||||
if (fruit != null && !treeSpecies.getUID().equals("forestry.treeOak")) {
|
||||
new ControlBlockIconDisplay(contents, w2, y, fruit).setColor(fruitColour);
|
||||
@@ -107,27 +107,27 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
// ItemStack log = (genome.getFruitProvider().getProducts().length
|
||||
// > 0) ? genome.getFruitProvider().getProducts()[0] : null;
|
||||
if (log != null) {
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), ExtraTrees.proxy.localise("gui.database.log") + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), I18N.localise("extratrees.gui.database.log") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
ControlItemDisplay display = new ControlItemDisplay(contents, w2, y);
|
||||
display.setItemStack(log);
|
||||
display.setTooltip();
|
||||
y += th2;
|
||||
}
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GROWTH) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getGrowthProvider().getDescription(), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GROWTH) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getGrowthProvider().getDescription(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.HEIGHT) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getHeight() + "x", TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.HEIGHT) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getHeight() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
List<ItemStack> fruits = new ArrayList<ItemStack>();
|
||||
Collections.addAll(fruits, genome.getFruitProvider().getProducts());
|
||||
|
||||
if (!fruits.isEmpty()) {
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), syst.getChromosomeShortName(EnumTreeChromosome.FRUITS) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th2), syst.getChromosomeShortName(EnumTreeChromosome.FRUITS) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
for (ItemStack fruitw : fruits) {
|
||||
ControlItemDisplay display2 = new ControlItemDisplay(contents, w2, y);
|
||||
display2.setItemStack(fruitw);
|
||||
@@ -136,17 +136,17 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
}
|
||||
}
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.YIELD) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getYield() + "x", TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.YIELD) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getYield() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.SAPPINESS) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getSappiness() + "x", TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.SAPPINESS) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getSappiness() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.MATURATION) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getMaturationTime() + "x", TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.MATURATION) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getMaturationTime() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
contents.setSize(new IPoint(contents.size().x(), y));
|
||||
scrollable.setScrollableContent(contents);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PageWood extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(ItemStack species) {
|
||||
deleteAllChildren();
|
||||
WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), getValue().toString(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new IArea(0.0f, 0.0f, size().x(), 24.0f), getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatHaveWood(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4.0f, 24.0f, size().x() - 8.0f, size().y() - 4.0f - 24.0f).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import binnie.core.craftgui.database.WindowAbstractDatabase;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.genetics.TreeBreedingSystem;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -103,7 +104,7 @@ public class WindowArboristDatabase extends WindowAbstractDatabase {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("gui.database.mode." + name().toLowerCase());
|
||||
return I18N.localise("extratrees.gui.database.mode." + name().toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.extratrees.craftgui.dictionary;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
import binnie.core.craftgui.controls.ControlTextEdit;
|
||||
import binnie.core.craftgui.controls.scroll.ControlScrollableContent;
|
||||
@@ -17,6 +16,7 @@ import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.window.Panel;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.machines.Designer;
|
||||
import binnie.extratrees.machines.DesignerType;
|
||||
@@ -45,7 +45,7 @@ public class WindowWoodworker extends Window {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
new ControlText(this, new IArea(190.0f, 36.0f, 114.0f, 10.0f), BinnieCore.proxy.localise("gui.design"), TextJustification.TopCenter).setColor(4473924);
|
||||
new ControlText(this, new IArea(190.0f, 36.0f, 114.0f, 10.0f), I18N.localise("binniecore.gui.design"), TextJustification.TOP_CENTER).setColor(4473924);
|
||||
new Panel(this, 188.0f, 48.0f, 118.0f, 126.0f, MinecraftGUI.PanelType.Gray);
|
||||
textEdit = new ControlTextEdit(this, 188.0f, 178.0f, 118.0f, 12.0f);
|
||||
ControlScrollableContent scroll = new ControlScrollableContent(this, 190.0f, 50.0f, 114.0f, 122.0f, 12.0f);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.extratrees.genetics;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.FruitPod;
|
||||
import binnie.extratrees.config.ConfigurationMain;
|
||||
@@ -337,7 +338,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localise("item.food." + name().toLowerCase());
|
||||
return I18N.localise("extratrees.item.food." + name().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.extratrees.genetics;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.ILogType;
|
||||
import binnie.extratrees.worldgen.DefaultTreeGenerator;
|
||||
@@ -63,7 +64,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -1091,12 +1092,12 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("species." + name().toLowerCase() + ".name");
|
||||
return I18N.localise("extratrees.species." + name().toLowerCase() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ExtraTrees.proxy.localiseOrBlank("species." + name().toLowerCase() + ".desc");
|
||||
return I18N.localiseOrBlank("extratrees.species." + name().toLowerCase() + ".desc");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public enum ExtraTreeItems implements IItemMisc {
|
||||
|
||||
@Override
|
||||
public String getName(ItemStack itemStack) {
|
||||
return I18N.localise(ExtraTrees.instance, "item." + name);
|
||||
return I18N.localise("extratrees.item." + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package binnie.extratrees.item;
|
||||
import binnie.Binnie;
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.item.IItemMisc;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.alcohol.Juice;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
@@ -148,7 +149,7 @@ public enum Food implements IItemMisc {
|
||||
|
||||
@Override
|
||||
public String getName(ItemStack itemStack) {
|
||||
return ExtraTrees.proxy.localise("item.food." + name().toLowerCase());
|
||||
return I18N.localise("extratrees.item.food." + name().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,8 +32,8 @@ public class ItemHammer extends Item implements IToolHammer {
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack i) {
|
||||
return isDurableHammer ?
|
||||
I18N.localise(ExtraTrees.instance, "item.masterCarpentryHammer") :
|
||||
I18N.localise(ExtraTrees.instance, "item.carpentryHammer");
|
||||
I18N.localise("extratrees.item.masterCarpentryHammer") :
|
||||
I18N.localise("extratrees.item.carpentryHammer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import binnie.extratrees.genetics.ExtraTreeSpecies;
|
||||
import binnie.extratrees.worldgen.BlockType;
|
||||
import binnie.extratrees.worldgen.BlockTypeLeaf;
|
||||
import binnie.extratrees.worldgen.BlockTypeLog;
|
||||
import binnie.extratrees.worldgen.BlockTypeVoid;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
Reference in new issue
Block a user