mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +00:00
* Added missing ru_RU localization * Fixed first letter * Rename Binnie.Language to short Binnie.I18N Removed some unused methods, classes. Removed some hardcod strings, replaced it on i18n Moved pigment colors of blocks and items to tooltips
This commit is contained in:
1 parent
f6186d3cf3
commit
e8802c66d3
62 files changed
+405
-264
No files matched your search
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
public final class Binnie {
|
||||
public static List<ManagerBase> Managers = new ArrayList<>();
|
||||
public static ManagerLanguage Language = new ManagerLanguage();
|
||||
public static ManagerLanguage I18N = new ManagerLanguage();
|
||||
public static ManagerGenetics Genetics = new ManagerGenetics();
|
||||
public static ManagerConfig Configuration = new ManagerConfig();
|
||||
public static ManagerLiquid Liquid = new ManagerLiquid();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
@@ -16,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -74,13 +76,13 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return EnumFlowerColor.get(meta).getName() + " Ceramic Block";
|
||||
return Binnie.I18N.localise(Botany.instance, "ceramicBlock");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
int meta = TileEntityMetadata.getItemDamage(stack);
|
||||
tooltip.add(EnumChatFormatting.GRAY + EnumFlowerColor.get(meta).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +91,7 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, c.ordinal()));
|
||||
}
|
||||
@@ -127,14 +129,13 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
par1World.removeTileEntity(par2, par3, par4);
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int side) {
|
||||
super.breakBlock(world, x, y, z, block, side);
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
// TODO remove deprecated
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
import binnie.botany.items.BotanyItems;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.IMultipassBlock;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.block.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -20,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -86,8 +84,9 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
getType(meta).addTooltip(tooltip);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,7 +95,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
BlockType type = new BlockType(c, c, TileType.Tile);
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, type.ordinal()));
|
||||
@@ -145,7 +144,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
if (tile != null) {
|
||||
return getRenderColor(tile.getTileMetadata());
|
||||
}
|
||||
return 16777215;
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,16 +187,16 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
public enum TileType {
|
||||
Tile("tile", "Ceramic Tile"),
|
||||
Brick("brick", "Ceramic Bricks"),
|
||||
StripeBrick("brickstripe", "Striped Ceramic Bricks"),
|
||||
LargeBrick("bricklarge", "Large Ceramic Bricks"),
|
||||
Split("split", "Split Ceramic Tile"),
|
||||
Chequered("cheque", "Chequered Ceramic Tile"),
|
||||
Mixed("mixed", "Mixed Ceramic Tile"),
|
||||
VerticalBrick("verticalbrick", "Vertical Ceramic Bricks"),
|
||||
VerticalStripeBrick("verticalbrickstripe", "Vertical Striped Ceramic Bricks"),
|
||||
VerticalLargeBrick("verticalbricklarge", "Large Vertical Ceramic Bricks");
|
||||
Tile("tile", "ceramicTile"),
|
||||
Brick("brick", "ceramicBricks"),
|
||||
StripeBrick("brickstripe", "strippedCeramicBricks"),
|
||||
LargeBrick("bricklarge", "largeCeramicBricks"),
|
||||
Split("split", "splitCeramicTile"),
|
||||
Chequered("cheque", "chequeredCeramicTile"),
|
||||
Mixed("mixed", "mixedCeramicTile"),
|
||||
VerticalBrick("verticalbrick", "verticalCeramicBricks"),
|
||||
VerticalStripeBrick("verticalbrickstripe", "verticalStripedCeramicBricks"),
|
||||
VerticalLargeBrick("verticalbricklarge", "largeVerticalCeramicBricks");
|
||||
|
||||
protected String id;
|
||||
protected String name;
|
||||
@@ -419,8 +418,8 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
|
||||
private ItemStack getBrickRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() == 1) {
|
||||
ItemStack stack5 = stacks.get(0);
|
||||
BlockType type = new BlockType(stack5);
|
||||
ItemStack stack = stacks.get(0);
|
||||
BlockType type = new BlockType(stack);
|
||||
if (type.type == TileType.VerticalBrick) {
|
||||
type.type = this;
|
||||
return type.getStack(1);
|
||||
@@ -439,18 +438,18 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
|
||||
int[] colors = {-1, -1};
|
||||
for (int index2 = 0; index2 < stacks.size(); ++index2) {
|
||||
ItemStack stack4 = stacks.get(index2);
|
||||
if (stack4.getItem() != Item.getItemFromBlock(Botany.ceramicBrick)) {
|
||||
ItemStack stack = stacks.get(index2);
|
||||
if (stack.getItem() != Item.getItemFromBlock(Botany.ceramicBrick)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BlockType type4 = new BlockType(stack4);
|
||||
if (type4.type != TileType.LargeBrick) {
|
||||
BlockType type = new BlockType(stack);
|
||||
if (type.type != TileType.LargeBrick) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int color5 = type4.color1.ordinal();
|
||||
int color6 = type4.color2.ordinal();
|
||||
int color5 = type.color1.ordinal();
|
||||
int color6 = type.color2.ordinal();
|
||||
int alt2 = (index2 != 0 && index2 != 3) ? 1 : 0;
|
||||
if (this == TileType.StripeBrick) {
|
||||
alt2 = 0;
|
||||
@@ -528,11 +527,15 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Binnie.I18N.localise(Botany.instance, type.name);
|
||||
}
|
||||
|
||||
public void addTooltip(List tooltip) {
|
||||
String name = color1.getName();
|
||||
if (type.canDouble() && color2 != color1) {
|
||||
name = name + " & " + color2.getName();
|
||||
name = Binnie.I18N.localise(Botany.instance, "colour.double", name, color2.getName());
|
||||
}
|
||||
return name + " " + type.name;
|
||||
tooltip.add(EnumChatFormatting.GRAY + name);
|
||||
}
|
||||
|
||||
public int ordinal() {
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.carpentry.BlockDesign;
|
||||
import binnie.extratrees.carpentry.DesignBlock;
|
||||
import binnie.extratrees.carpentry.ModuleCarpentry;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCeramicPatterned extends BlockDesign {
|
||||
public BlockCeramicPatterned() {
|
||||
@@ -25,6 +31,13 @@ public class BlockCeramicPatterned extends BlockDesign {
|
||||
|
||||
@Override
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return design.getDesign().getName() + " Ceramic Block";
|
||||
return Binnie.I18N.localise(Botany.instance, "ceramicBlock");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
super.addBlockTooltip(stack, tooltip);
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
tooltip.add(EnumChatFormatting.GRAY + block.getDesign().getName());
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
@@ -17,6 +18,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -59,9 +61,9 @@ public class BlockStained extends Block implements IBlockMetadata {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||
// Block block2 = world.getBlock(x - Facing.offsetsXForSide[side], y - Facing.offsetsYForSide[side], z - Facing.offsetsZForSide[side]);
|
||||
Block block3 = world.getBlock(x, y, z);
|
||||
return block3 != this
|
||||
&& block3 != ExtraTrees.blockStained
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block != this
|
||||
&& block != ExtraTrees.blockStained
|
||||
&& super.shouldSideBeRendered(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@@ -70,9 +72,8 @@ public class BlockStained extends Block implements IBlockMetadata {
|
||||
return BlockMetadata.getBlockDropped(this, world, x, y, z, blockMeta);
|
||||
}
|
||||
|
||||
// TODO remove deprecated
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -105,13 +106,13 @@ public class BlockStained extends Block implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return EnumFlowerColor.get(meta).getName() + " Pigmented Glass";
|
||||
return Binnie.I18N.localise(Botany.instance, "pigmentedGlass");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
tooltip.add(EnumChatFormatting.GRAY + EnumFlowerColor.get(meta).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -154,7 +155,7 @@ public class BlockStained extends Block implements IBlockMetadata {
|
||||
if (tile != null) {
|
||||
return getRenderColor(tile.getTileMetadata());
|
||||
}
|
||||
return 16777215;
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -184,7 +185,7 @@ public class BlockStained extends Block 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.core.block.ItemMetadata;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
// TODO unused class?
|
||||
public class ItemCeramic extends ItemMetadata {
|
||||
public ItemCeramic(Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int renderPass) {
|
||||
return 0xff00ff;
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,9 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class PigmentRecipe implements IRecipe {
|
||||
protected ItemStack cached;
|
||||
|
||||
private ItemStack unknown;
|
||||
ItemStack cached;
|
||||
|
||||
public PigmentRecipe() {
|
||||
unknown = null;
|
||||
|
||||
@@ -11,13 +11,13 @@ public class ModuleCore implements IInitializable {
|
||||
@Override
|
||||
public void preInit() {
|
||||
for (EnumAcidity pH : EnumAcidity.values()) {
|
||||
Binnie.Language.addObjectName(pH, Binnie.Language.unlocalised(Botany.instance, "ph." + pH.getID()));
|
||||
Binnie.I18N.addObjectName(pH, Binnie.I18N.unlocalised(Botany.instance, "ph." + pH.getID()));
|
||||
}
|
||||
for (EnumMoisture pH2 : EnumMoisture.values()) {
|
||||
Binnie.Language.addObjectName(pH2, Binnie.Language.unlocalised(Botany.instance, "moisture." + pH2.getID()));
|
||||
Binnie.I18N.addObjectName(pH2, Binnie.I18N.unlocalised(Botany.instance, "moisture." + pH2.getID()));
|
||||
}
|
||||
for (EnumSoilType pH3 : EnumSoilType.values()) {
|
||||
Binnie.Language.addObjectName(pH3, Binnie.Language.unlocalised(Botany.instance, "soil." + pH3.getID()));
|
||||
Binnie.I18N.addObjectName(pH3, Binnie.I18N.unlocalised(Botany.instance, "soil." + pH3.getID()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.controls.listbox.ControlListBox;
|
||||
|
||||
public class ControlColorMixBox extends ControlListBox<IColourMix> {
|
||||
private int index;
|
||||
private Type type;
|
||||
|
||||
public ControlColorMixBox(IWidget parent, int x, int y, int width, int height, Type type) {
|
||||
|
||||
@@ -7,11 +7,11 @@ import binnie.core.craftgui.database.WindowAbstractDatabase;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
|
||||
public class ControlColorMixItem extends ControlOption<IColourMix> {
|
||||
ControlColorDisplay itemWidget1;
|
||||
ControlColorDisplay itemWidget2;
|
||||
ControlColorDisplay itemWidget3;
|
||||
ControlColourMixSymbol addSymbol;
|
||||
ControlColourMixSymbol arrowSymbol;
|
||||
protected ControlColorDisplay itemWidget1;
|
||||
protected ControlColorDisplay itemWidget2;
|
||||
protected ControlColorDisplay itemWidget3;
|
||||
protected ControlColourMixSymbol addSymbol;
|
||||
protected ControlColourMixSymbol arrowSymbol;
|
||||
|
||||
public ControlColorMixItem(ControlList<IColourMix> controlList, IColourMix option, int y) {
|
||||
super(controlList, option, y);
|
||||
|
||||
@@ -9,8 +9,8 @@ import binnie.core.craftgui.geometry.CraftGUIUtil;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
|
||||
public class ControlColorOption extends ControlTextOption<IFlowerColor> {
|
||||
ControlColorDisplay controlBee;
|
||||
IPoint boxPosition;
|
||||
protected ControlColorDisplay controlBee;
|
||||
protected IPoint boxPosition;
|
||||
|
||||
public ControlColorOption(ControlList<IFlowerColor> controlList, IFlowerColor option, int y) {
|
||||
super(controlList, option, option.getName(), y);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.craftgui;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.ITooltip;
|
||||
@@ -13,16 +15,11 @@ import binnie.core.craftgui.resource.minecraft.CraftGUITextureSheet;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
|
||||
public class ControlColourMixSymbol extends Control implements ITooltip {
|
||||
static Texture MutationPlus;
|
||||
static Texture MutationArrow;
|
||||
protected static Texture MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
|
||||
protected static Texture MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
|
||||
|
||||
static {
|
||||
ControlColourMixSymbol.MutationPlus = new StandardTexture(2, 94, 16, 16, CraftGUITextureSheet.Controls2);
|
||||
ControlColourMixSymbol.MutationArrow = new StandardTexture(20, 94, 32, 16, CraftGUITextureSheet.Controls2);
|
||||
}
|
||||
|
||||
IColourMix value;
|
||||
int type;
|
||||
protected IColourMix value;
|
||||
protected int type;
|
||||
|
||||
protected ControlColourMixSymbol(IWidget parent, int x, int y, int type) {
|
||||
super(parent, x, y, 16 + type * 16, 16.0f);
|
||||
@@ -43,14 +40,14 @@ public class ControlColourMixSymbol extends Control implements ITooltip {
|
||||
|
||||
public void setValue(IColourMix value) {
|
||||
this.value = value;
|
||||
setColor(16777215);
|
||||
setColor(0xffffff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
if (type == 1) {
|
||||
float chance = value.getChance();
|
||||
tooltip.add("Current Chance - " + chance + "%");
|
||||
tooltip.add(Binnie.I18N.localise(Botany.instance, "gui.controls.colorMixSymbol.chance", chance));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.craftgui;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IFlowerColor;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
@@ -18,7 +20,7 @@ public class PageColorMixResultant extends PageAbstract<IFlowerColor> {
|
||||
|
||||
public PageColorMixResultant(IWidget parent, DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
pageSpeciesFurtherTitle = new ControlTextCentered(this, 8.0f, "Resultant Mixes");
|
||||
pageSpeciesFurtherTitle = new ControlTextCentered(this, 8.0f, Binnie.I18N.localise(Botany.instance, "gui.controls.pageSpeciesFurtherTitle"));
|
||||
pageSpeciesFurtherList = new ControlColorMixBox(this, 4, 20, 136, 152, ControlColorMixBox.Type.Resultant);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.craftgui;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IColourMix;
|
||||
import binnie.botany.api.IFlowerColor;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
@@ -13,13 +15,13 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageColourMix extends PageAbstract<IFlowerColor> {
|
||||
ControlText pageSpeciesFurther_Title;
|
||||
ControlColorMixBox pageSpeciesFurther_List;
|
||||
ControlText pageSpeciesFurtherTitle;
|
||||
ControlColorMixBox pageSpeciesFurtherList;
|
||||
|
||||
public PageColourMix(IWidget parent, DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
pageSpeciesFurther_Title = new ControlTextCentered(this, 8.0f, "Further Mixes");
|
||||
pageSpeciesFurther_List = new ControlColorMixBox(this, 4, 20, 136, 152, ControlColorMixBox.Type.Further);
|
||||
pageSpeciesFurtherTitle = new ControlTextCentered(this, 8.0f, Binnie.I18N.localise(Botany.instance, "gui.controls.pageColorFurtherTitle"));
|
||||
pageSpeciesFurtherList = new ControlColorMixBox(this, 4, 20, 136, 152, ControlColorMixBox.Type.Further);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -30,6 +32,6 @@ public class PageColourMix extends PageAbstract<IFlowerColor> {
|
||||
mixes.add(mix);
|
||||
}
|
||||
}
|
||||
pageSpeciesFurther_List.setOptions(mixes);
|
||||
pageSpeciesFurtherList.setOptions(mixes);
|
||||
}
|
||||
}
|
||||
@@ -27,13 +27,6 @@ public class PageSpeciesFlowerGenome extends PageSpecies {
|
||||
super(parent, tab);
|
||||
}
|
||||
|
||||
public static String tolerated(boolean t) {
|
||||
if (t) {
|
||||
return "Tolerated";
|
||||
}
|
||||
return "Not Tolerated";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onValueChanged(IAlleleSpecies species) {
|
||||
deleteAllChildren();
|
||||
@@ -41,42 +34,51 @@ public class PageSpeciesFlowerGenome extends PageSpecies {
|
||||
if (template == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
IFlower tree = Binnie.Genetics.getFlowerRoot().templateAsIndividual(template);
|
||||
if (tree == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
IFlowerGenome genome = tree.getGenome();
|
||||
IAlleleFlowerSpecies treeSpecies = genome.getPrimary();
|
||||
int w = 144;
|
||||
int h = 176;
|
||||
// TODO localise
|
||||
new ControlText(this, new IArea(0.0f, 4.0f, w, 16.0f), "Genome", TextJustification.MiddleCenter);
|
||||
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;
|
||||
int w2 = 55;
|
||||
int w3 = tw - 50;
|
||||
int y = 0;
|
||||
int th = 14;
|
||||
int th2 = 18;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "Temp. : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), treeSpecies.getTemperature().getName(), TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "Moist. : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), Binnie.Language.localise(treeSpecies.getMoisture()), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), Binnie.I18N.localise(treeSpecies.getMoisture()), TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "pH. : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), Binnie.Language.localise(treeSpecies.getPH()), TextJustification.MiddleLeft);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), Binnie.I18N.localise(treeSpecies.getPH()), TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "Fertility : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
float lifespan = genome.getLifespan() * 68.27f / genome.getAgeChance() / 24000.0f;
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "Lifespan : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), "" + String.format("%.2f", lifespan) + " days", TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), "Nectar : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getActiveAllele(EnumFlowerChromosome.SAPPINESS).getName(), TextJustification.MiddleLeft);
|
||||
y += th;
|
||||
|
||||
int x = w2;
|
||||
int tot = 0;
|
||||
for (IIndividual vid : BotanyCore.getFlowerRoot().getIndividualTemplates()) {
|
||||
@@ -88,10 +90,11 @@ public class PageSpeciesFlowerGenome extends PageSpecies {
|
||||
ItemStack stack = BotanyCore.getFlowerRoot().getMemberStack(vid, EnumFlowerStage.FLOWER.ordinal());
|
||||
ControlItemDisplay display = new ControlItemDisplay(contents, x, y);
|
||||
display.setItemStack(stack);
|
||||
++tot;
|
||||
tot++;
|
||||
x += 18;
|
||||
}
|
||||
}
|
||||
|
||||
int numOfLines = 1 + (tot - 1) / 3;
|
||||
new ControlText(contents, new IArea(0.0f, y - (numOfLines - 1) * 18, w2, 4 + 18 * numOfLines), "Varieties : ", TextJustification.MiddleRight);
|
||||
y += th;
|
||||
|
||||
@@ -23,11 +23,10 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
protected ControlListBox<EnumFlowerColor> selectionBoxColors;
|
||||
|
||||
public WindowBotanistDatabase(EntityPlayer player, Side side, boolean nei) {
|
||||
super(player, side, nei, Binnie.Genetics.flowerBreedingSystem, 130.0f);
|
||||
}
|
||||
@@ -45,22 +44,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
new PageSpeciesMutations(getInfoPages(Mode.Species), new DatabaseTab(Botany.instance, "species.further", 0));
|
||||
new PageBranchOverview(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.overview", 0));
|
||||
new PageBranchSpecies(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.species", 0));
|
||||
createMode(FlowerMode.Colour, new ModeWidgets(FlowerMode.Colour, this) {
|
||||
@Override
|
||||
public void createListBox(IArea area) {
|
||||
listBox = new ControlListBox<IFlowerColor>(modePage, area.x(), area.y(), area.w(), area.h(), 12.0f) {
|
||||
@Override
|
||||
public IWidget createOption(IFlowerColor value, int y) {
|
||||
return new ControlColorOption(getContent(), value, y);
|
||||
}
|
||||
};
|
||||
List<IFlowerColor> colors = new ArrayList<IFlowerColor>();
|
||||
for (IFlowerColor c : EnumFlowerColor.values()) {
|
||||
colors.add(c);
|
||||
}
|
||||
listBox.setOptions(colors);
|
||||
}
|
||||
});
|
||||
createMode(FlowerMode.Colour, new ColorModeWidget());
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.resultant", 0));
|
||||
new PageColourMix(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.further", 0));
|
||||
new PageBreeder(getInfoPages(Mode.Breeder), getUsername(), new DatabaseTab(Botany.instance, "breeder", 0));
|
||||
@@ -73,7 +57,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "FlowerDatabase";
|
||||
return Binnie.I18N.localise(Botany.instance, "gui.database.name");
|
||||
}
|
||||
|
||||
enum FlowerMode implements IDatabaseMode {
|
||||
@@ -84,4 +68,23 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
return Botany.proxy.localise("gui.database.mode." + name().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
private class ColorModeWidget extends ModeWidgets {
|
||||
public ColorModeWidget() {
|
||||
super(FlowerMode.Colour, WindowBotanistDatabase.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createListBox(IArea area) {
|
||||
listBox = new ControlListBox<IFlowerColor>(modePage, area.x(), area.y(), area.w(), area.h(), 12.0f) {
|
||||
@Override
|
||||
public IWidget createOption(IFlowerColor value, int y) {
|
||||
return new ControlColorOption(getContent(), value, y);
|
||||
}
|
||||
};
|
||||
List<IFlowerColor> colors = new ArrayList<>();
|
||||
Collections.addAll(colors, EnumFlowerColor.values());
|
||||
listBox.setOptions(colors);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.botany.farm;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumMoisture;
|
||||
import binnie.core.circuits.BinnieCircuit;
|
||||
@@ -11,7 +12,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class CircuitGarden extends BinnieCircuit {
|
||||
private Class<? extends FarmLogic> logicClass;
|
||||
private boolean isManual;
|
||||
private boolean isFertilised;
|
||||
private ItemStack icon;
|
||||
@@ -28,32 +28,42 @@ public class CircuitGarden extends BinnieCircuit {
|
||||
String info = "";
|
||||
|
||||
if (moisture == EnumMoisture.Dry) {
|
||||
info += EnumChatFormatting.YELLOW + "Dry" + EnumChatFormatting.RESET;
|
||||
info += EnumChatFormatting.YELLOW
|
||||
+ Binnie.I18N.localise(Botany.instance, "moisture.dry")
|
||||
+ EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
if (moisture == EnumMoisture.Damp) {
|
||||
info += EnumChatFormatting.YELLOW + "Damp" + EnumChatFormatting.RESET;
|
||||
info += EnumChatFormatting.YELLOW
|
||||
+ Binnie.I18N.localise(Botany.instance, "moisture.damp")
|
||||
+ EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
if (acidity == EnumAcidity.Acid) {
|
||||
if (info.length() > 0) {
|
||||
info += ", ";
|
||||
}
|
||||
info += EnumChatFormatting.RED + "Acidic" + EnumChatFormatting.RESET;
|
||||
info += EnumChatFormatting.RED
|
||||
+ Binnie.I18N.localise(Botany.instance, "ph.acid")
|
||||
+ EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
if (acidity == EnumAcidity.Neutral) {
|
||||
if (info.length() > 0) {
|
||||
info += ", ";
|
||||
}
|
||||
info += EnumChatFormatting.GREEN + "Neutral" + EnumChatFormatting.RESET;
|
||||
info += EnumChatFormatting.GREEN
|
||||
+ Binnie.I18N.localise(Botany.instance, "ph.neutral")
|
||||
+ EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
if (acidity == EnumAcidity.Alkaline) {
|
||||
if (info.length() > 0) {
|
||||
info += ", ";
|
||||
}
|
||||
info += EnumChatFormatting.AQUA + "Alkaline" + EnumChatFormatting.RESET;
|
||||
info += EnumChatFormatting.AQUA
|
||||
+ Binnie.I18N.localise(Botany.instance, "ph.alkaline")
|
||||
+ EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
if (info.length() > 0) {
|
||||
@@ -72,8 +82,9 @@ public class CircuitGarden extends BinnieCircuit {
|
||||
if (!isCircuitable(tile)) {
|
||||
return;
|
||||
}
|
||||
|
||||
GardenLogic logic = new GardenLogic((IFarmHousing) tile);
|
||||
logic.setData(moisture, acidity, isManual, isFertilised, icon, Binnie.Language.localise(getName()));
|
||||
logic.setData(moisture, acidity, isManual, isFertilised, icon, Binnie.I18N.localise(getName()));
|
||||
((IFarmHousing) tile).setFarmLogic(FarmDirection.values()[slot], logic);
|
||||
}
|
||||
|
||||
@@ -92,6 +103,6 @@ public class CircuitGarden extends BinnieCircuit {
|
||||
|
||||
@Override
|
||||
public void onTick(int arg0, Object arg1) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
}
|
||||
@@ -356,5 +356,4 @@ public class GardenLogic extends FarmLogic {
|
||||
icon = icon2;
|
||||
name = name2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -62,12 +62,10 @@ public class Vect {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
if (obj == null || getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Vect other = (Vect) obj;
|
||||
return x == other.x
|
||||
&& y == other.y
|
||||
|
||||
@@ -99,20 +99,22 @@ public class BlockFlower extends BlockContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityFlower) {
|
||||
TileEntityFlower f = (TileEntityFlower) tile;
|
||||
EnumFlowerStage stage = (f.getAge() == 0) ? EnumFlowerStage.SEED : EnumFlowerStage.FLOWER;
|
||||
IFlowerType flower = f.getType();
|
||||
int section = f.getRenderSection();
|
||||
boolean flowered = f.isFlowered();
|
||||
if (RendererBotany.pass == 0) {
|
||||
return flower.getStem(stage, flowered, section);
|
||||
}
|
||||
return (RendererBotany.pass == 1) ?
|
||||
flower.getPetalIcon(stage, flowered, section) :
|
||||
flower.getVariantIcon(stage, flowered, section);
|
||||
if (!(tile instanceof TileEntityFlower)) {
|
||||
return super.getIcon(world, x, y, z, side);
|
||||
}
|
||||
return super.getIcon(world, x, y, z, side);
|
||||
|
||||
TileEntityFlower f = (TileEntityFlower) tile;
|
||||
EnumFlowerStage stage = (f.getAge() == 0) ? EnumFlowerStage.SEED : EnumFlowerStage.FLOWER;
|
||||
IFlowerType flower = f.getType();
|
||||
int section = f.getRenderSection();
|
||||
boolean flowered = f.isFlowered();
|
||||
if (RendererBotany.pass == 0) {
|
||||
return flower.getStem(stage, flowered, section);
|
||||
}
|
||||
|
||||
return (RendererBotany.pass == 1) ?
|
||||
flower.getPetalIcon(stage, flowered, section) :
|
||||
flower.getVariantIcon(stage, flowered, section);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,7 +135,8 @@ public class BlockFlower extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && canBlockStay(world, x, y, z);
|
||||
return super.canPlaceBlockAt(world, x, y, z)
|
||||
&& canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block block) {
|
||||
@@ -153,7 +156,11 @@ public class BlockFlower extends BlockContainer {
|
||||
}
|
||||
|
||||
TileEntityFlower flower = (TileEntityFlower) tile;
|
||||
if (flower.getSection() == 0 && flower.getFlower() != null && flower.getFlower().getAge() > 0 && flower.getFlower().getGenome().getPrimary().getType().getSections() > 1 && world.getBlock(x, y + 1, z) != Botany.flower) {
|
||||
if (flower.getSection() == 0
|
||||
&& flower.getFlower() != null
|
||||
&& flower.getFlower().getAge() > 0
|
||||
&& flower.getFlower().getGenome().getPrimary().getType().getSections() > 1
|
||||
&& world.getBlock(x, y + 1, z) != Botany.flower) {
|
||||
dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
@@ -199,9 +206,8 @@ public class BlockFlower extends BlockContainer {
|
||||
return drops;
|
||||
}
|
||||
|
||||
// TODO remove deprecated
|
||||
@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) {
|
||||
List<ItemStack> drops = getDrops(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||
boolean hasBeenBroken = world.setBlockToAir(x, y, z);
|
||||
if (hasBeenBroken && BinnieCore.proxy.isSimulating(world) && drops.size() > 0 && (player == null || !player.capabilities.isCreativeMode)) {
|
||||
|
||||
@@ -3,11 +3,7 @@ package binnie.botany.flower;
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.api.EnumFlowerChromosome;
|
||||
import binnie.botany.api.EnumFlowerStage;
|
||||
import binnie.botany.api.IAlleleFlowerSpecies;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IFlowerType;
|
||||
import binnie.botany.api.*;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import binnie.botany.genetics.EnumFlowerType;
|
||||
import binnie.botany.genetics.Flower;
|
||||
@@ -59,14 +55,13 @@ public abstract class ItemBotany extends Item {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO remove deprecated
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemstack) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
public boolean hasEffect(ItemStack stack, int pass) {
|
||||
if (!stack.hasTagCompound()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IIndividual individual = getIndividual(itemstack);
|
||||
IIndividual individual = getIndividual(stack);
|
||||
return individual != null
|
||||
&& individual.getGenome() != null
|
||||
&& individual.hasEffect();
|
||||
@@ -83,7 +78,12 @@ public abstract class ItemBotany extends Item {
|
||||
return;
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + individual.getGenome().getPrimaryColor().getName() + ((individual.getGenome().getPrimaryColor() == individual.getGenome().getSecondaryColor()) ? "" : (" and " + individual.getGenome().getSecondaryColor().getName())) + ", " + individual.getGenome().getStemColor().getName() + " Stem");
|
||||
IFlowerGenome genome = individual.getGenome();
|
||||
IFlowerColor primaryColor = genome.getPrimaryColor();
|
||||
IFlowerColor secondColor = genome.getSecondaryColor();
|
||||
IFlowerColor stemColor = genome.getStemColor();
|
||||
list.add(EnumChatFormatting.YELLOW + primaryColor.getName() + ((primaryColor == secondColor) ? "" : (" and " + secondColor.getName())) + ", " + stemColor.getName() + " Stem");
|
||||
|
||||
if (individual.isAnalyzed()) {
|
||||
if (BinnieCore.proxy.isShiftDown()) {
|
||||
individual.addTooltip(list);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.flower;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -33,26 +34,31 @@ public class ItemInsulatedTube extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (Material mat : Material.values()) {
|
||||
for (Insulate ins : Insulate.values()) {
|
||||
p_150895_3_.add(new ItemStack(this, 1, mat.ordinal() + ins.ordinal() * 128));
|
||||
list.add(new ItemStack(this, 1, mat.ordinal() + ins.ordinal() * 128));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister p_94581_1_) {
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
icons[i] = Botany.proxy.getIcon(p_94581_1_, "insulatedTube." + i);
|
||||
icons[i] = Botany.proxy.getIcon(register, "insulatedTube." + i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
return (pass == 0) ? 16777215 : ((pass == 1) ? Material.get(stack.getItemDamage()).getColor() : Insulate.get(stack.getItemDamage()).getColor());
|
||||
if (pass == 0) {
|
||||
return 0xffffff;
|
||||
}
|
||||
return (pass == 1) ?
|
||||
Material.get(stack.getItemDamage()).getColor() :
|
||||
Insulate.get(stack.getItemDamage()).getColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,7 +70,8 @@ public class ItemInsulatedTube extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return Material.get(stack.getItemDamage()).getName() + " Insulated Tube";
|
||||
return Material.get(stack.getItemDamage()).getName() + " "
|
||||
+ Binnie.I18N.localise(Botany.instance, "tube.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,10 +90,10 @@ public class ItemInsulatedTube extends Item {
|
||||
}
|
||||
|
||||
enum Material {
|
||||
Copper(0xe3b78e, "Copper"),
|
||||
Tin(0xe1eef4, "Tin"),
|
||||
Bronze(0xddc276, "Bronze"),
|
||||
Iron(0xd8d8d8, "Iron");
|
||||
Copper(0xe3b78e, "tube.cooper"),
|
||||
Tin(0xe1eef4, "tube.tin"),
|
||||
Bronze(0xddc276, "tube.bronze"),
|
||||
Iron(0xd8d8d8, "tube.iron");
|
||||
|
||||
protected int color;
|
||||
protected String name;
|
||||
@@ -105,17 +112,17 @@ public class ItemInsulatedTube extends Item {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
return Binnie.I18N.localise(Botany.instance, name);
|
||||
}
|
||||
}
|
||||
|
||||
enum Insulate {
|
||||
Clay(0xa1aacc, "Clay"),
|
||||
Cobble(0x7b7b7b, "Cobblestone"),
|
||||
Sand(0xefeab5, "Sand"),
|
||||
HardenedClay(0x935c43, "Hardened Clay"),
|
||||
Stone(0x6d6d6d, "Smooth Stone"),
|
||||
Sandstone(0xc1b989, "Sandstone");
|
||||
Clay(0xa1aacc, "tube.insulate.clay"),
|
||||
Cobble(0x7b7b7b, "tube.insulate.cobblestone"),
|
||||
Sand(0xefeab5, "tube.insulate.sand"),
|
||||
HardenedClay(0x935c43, "tube.insulate.hardenedClay"),
|
||||
Stone(0x6d6d6d, "tube.insulate.smoothStone"),
|
||||
Sandstone(0xc1b989, "tube.insulate.sandstone");
|
||||
|
||||
protected int color;
|
||||
protected String name;
|
||||
@@ -134,7 +141,7 @@ public class ItemInsulatedTube extends Item {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
return Binnie.I18N.localise(Botany.instance, name);
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
|
||||
@@ -54,11 +54,11 @@ public class BlockSoil extends Block implements IBlockSoil {
|
||||
}
|
||||
|
||||
public static String getPH(ItemStack stack) {
|
||||
return Binnie.Language.localise(EnumAcidity.values()[stack.getItemDamage() / 3]);
|
||||
return Binnie.I18N.localise(EnumAcidity.values()[stack.getItemDamage() / 3]);
|
||||
}
|
||||
|
||||
public static String getMoisture(ItemStack stack) {
|
||||
return Binnie.Language.localise(EnumMoisture.values()[stack.getItemDamage() % 3]);
|
||||
return Binnie.I18N.localise(EnumMoisture.values()[stack.getItemDamage() % 3]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ItemSoilMeter extends Item {
|
||||
EnumChatFormatting.LIGHT_PURPLE,
|
||||
};
|
||||
String info = "Type: ";
|
||||
info += colors[type.ordinal()] + Binnie.Language.localise(type) + EnumChatFormatting.RESET;
|
||||
info += colors[type.ordinal()] + Binnie.I18N.localise(type) + EnumChatFormatting.RESET;
|
||||
|
||||
colors = new EnumChatFormatting[]{
|
||||
EnumChatFormatting.YELLOW,
|
||||
@@ -56,7 +56,7 @@ public class ItemSoilMeter extends Item {
|
||||
EnumChatFormatting.BLUE,
|
||||
};
|
||||
info += ", Moisture: ";
|
||||
info += colors[moisture.ordinal()] + Binnie.Language.localise(moisture) + EnumChatFormatting.RESET;
|
||||
info += colors[moisture.ordinal()] + Binnie.I18N.localise(moisture) + EnumChatFormatting.RESET;
|
||||
|
||||
colors = new EnumChatFormatting[]{
|
||||
EnumChatFormatting.RED,
|
||||
@@ -64,7 +64,7 @@ public class ItemSoilMeter extends Item {
|
||||
EnumChatFormatting.AQUA,
|
||||
};
|
||||
info += ", pH: ";
|
||||
info += colors[pH.ordinal()] + Binnie.Language.localise(pH) + EnumChatFormatting.RESET;
|
||||
info += colors[pH.ordinal()] + Binnie.I18N.localise(pH) + EnumChatFormatting.RESET;
|
||||
IChatComponent chat = new ChatComponentText(info);
|
||||
player.addChatMessage(chat);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.items;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
@@ -7,8 +8,10 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,6 +22,12 @@ public class ItemClay extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) {
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
tooltip.add(EnumChatFormatting.GRAY + EnumFlowerColor.get(stack.getItemDamage()).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int index) {
|
||||
@@ -28,7 +37,7 @@ public class ItemClay extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return EnumFlowerColor.get(stack.getItemDamage()).getName() + " Clay";
|
||||
return Binnie.I18N.localise(Botany.instance, "item.clay.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.items;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
@@ -7,8 +8,10 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,6 +22,12 @@ public class ItemPigment extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) {
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
tooltip.add(EnumChatFormatting.GRAY + EnumFlowerColor.get(stack.getItemDamage()).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int index) {
|
||||
@@ -28,7 +37,7 @@ public class ItemPigment extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return EnumFlowerColor.get(stack.getItemDamage()).getName() + " Pigment";
|
||||
return Binnie.I18N.localise(Botany.instance, "item.pigment.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,7 +61,7 @@ public class BlockMetadata extends BlockContainer implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface IBlockMetadata extends ITileEntityProvider {
|
||||
|
||||
String getBlockName(ItemStack itemStack);
|
||||
|
||||
void getBlockTooltip(ItemStack itemStack, List tooltip);
|
||||
void addBlockTooltip(ItemStack itemStack, List tooltip);
|
||||
|
||||
void dropAsStack(World world, int x, int y, int z, ItemStack itemStack);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class ItemMetadata extends ItemBlock {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List tooltip, boolean advanced) {
|
||||
((IBlockMetadata) field_150939_a).getBlockTooltip(itemStack, tooltip);
|
||||
((IBlockMetadata) field_150939_a).addBlockTooltip(itemStack, tooltip);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,12 +24,12 @@ public class BinnieCircuitLayout implements ICircuitLayout {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return Binnie.Language.localise(mod, "circuit.layout." + uid.toLowerCase());
|
||||
return Binnie.I18N.localise(mod, "circuit.layout." + uid.toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsage() {
|
||||
return Binnie.Language.localise(mod, "circuit.layout." + uid.toLowerCase() + ".usage");
|
||||
return Binnie.I18N.localise(mod, "circuit.layout." + uid.toLowerCase() + ".usage");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -194,8 +194,8 @@ public class WindowFieldKit extends Window {
|
||||
List<String> infos = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
for (String pref = root.getUID() + ".fieldkit." + type.getName().toLowerCase() + "."; Binnie.Language.canLocalise(pref + i); ++i) {
|
||||
infos.add(Binnie.Language.localise(pref + i));
|
||||
for (String pref = root.getUID() + ".fieldkit." + type.getName().toLowerCase() + "."; Binnie.I18N.canLocalise(pref + i); ++i) {
|
||||
infos.add(Binnie.I18N.localise(pref + i));
|
||||
}
|
||||
|
||||
String text = Binnie.Genetics.getSystem(root).getAlleleName(type, allele);
|
||||
|
||||
@@ -18,11 +18,11 @@ public class DatabaseTab implements ITooltipHelp {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Binnie.Language.localise(mod, "gui.database.tab." + unloc);
|
||||
return Binnie.I18N.localise(mod, "gui.database.tab." + unloc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getHelpTooltip(Tooltip tooltip) {
|
||||
tooltip.add(Binnie.Language.localiseOrBlank(mod, "gui.database.tab." + unloc + ".help"));
|
||||
tooltip.add(Binnie.I18N.localiseOrBlank(mod, "gui.database.tab." + unloc + ".help"));
|
||||
}
|
||||
}
|
||||
@@ -56,16 +56,16 @@ class BeeBreedingSystem extends BreedingSystem {
|
||||
public String getAlleleName(IChromosomeType chromosome, IAllele allele) {
|
||||
if (chromosome == EnumBeeChromosome.FERTILITY) {
|
||||
if (allele.getUID().contains("Low")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.low");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.low");
|
||||
}
|
||||
if (allele.getUID().contains("Normal")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.normal");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.normal");
|
||||
}
|
||||
if (allele.getUID().contains("High")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.high");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.high");
|
||||
}
|
||||
if (allele.getUID().contains("Maximum")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
}
|
||||
}
|
||||
return super.getAlleleName(chromosome, allele);
|
||||
|
||||
@@ -421,11 +421,11 @@ public abstract class BreedingSystem implements IItemStackRepresentative {
|
||||
public String getAlleleName(IChromosomeType chromosome, IAllele allele) {
|
||||
if (allele instanceof IAlleleBoolean) {
|
||||
return ((IAlleleBoolean) allele).getValue() ?
|
||||
Binnie.Language.localise(BinnieCore.instance, "allele.true") :
|
||||
Binnie.Language.localise(BinnieCore.instance, "allele.false");
|
||||
Binnie.I18N.localise(BinnieCore.instance, "allele.true") :
|
||||
Binnie.I18N.localise(BinnieCore.instance, "allele.false");
|
||||
}
|
||||
if (allele.getName() == "for.gui.maximum") {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
}
|
||||
return allele.getName();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,6 @@ public enum EnumBeeModifier {
|
||||
GeneticDecay;
|
||||
|
||||
public String getName() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "beemodifier." + name().toLowerCase());
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "beemodifier." + name().toLowerCase());
|
||||
}
|
||||
}
|
||||
@@ -50,16 +50,16 @@ class FlowerBreedingSystem extends BreedingSystem {
|
||||
public String getAlleleName(IChromosomeType chromosome, IAllele allele) {
|
||||
if (chromosome == EnumFlowerChromosome.FERTILITY) {
|
||||
if (allele.getUID().contains("Low")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.low");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.low");
|
||||
}
|
||||
if (allele.getUID().contains("Normal")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.normal");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.normal");
|
||||
}
|
||||
if (allele.getUID().contains("High")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.high");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.high");
|
||||
}
|
||||
if (allele.getUID().contains("Maximum")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.fertility.maximum");
|
||||
}
|
||||
}
|
||||
return super.getAlleleName(chromosome, allele);
|
||||
|
||||
@@ -35,7 +35,7 @@ interface IBreedingMessage {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "gui.breedingmessage.species");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "gui.breedingmessage.species");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +70,7 @@ interface IBreedingMessage {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "gui.breedingmessage.branch");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "gui.breedingmessage.branch");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,7 +95,7 @@ interface IBreedingMessage {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "gui.breedingmessage.epithet");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "gui.breedingmessage.epithet");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,24 +49,24 @@ class MothBreedingSystem extends BreedingSystem {
|
||||
if (chromosome == EnumButterflyChromosome.METABOLISM) {
|
||||
int metabolism = ((IAlleleInteger) allele).getValue();
|
||||
if (metabolism >= 19) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.highest");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.highest");
|
||||
}
|
||||
if (metabolism >= 16) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.higher");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.higher");
|
||||
}
|
||||
if (metabolism >= 13) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.high");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.high");
|
||||
}
|
||||
if (metabolism >= 10) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.normal");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.normal");
|
||||
}
|
||||
if (metabolism >= 7) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.slow");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.slow");
|
||||
}
|
||||
if (metabolism >= 4) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.slower");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.slower");
|
||||
}
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.metabolism.slowest");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.metabolism.slowest");
|
||||
}
|
||||
if (chromosome == EnumButterflyChromosome.FERTILITY) {
|
||||
return ((IAlleleInteger) allele).getValue() + "x";
|
||||
|
||||
@@ -88,23 +88,23 @@ public class TreeBreedingSystem extends BreedingSystem {
|
||||
if (chromosome == EnumTreeChromosome.PLANT) {
|
||||
EnumSet<EnumPlantType> types = ((IAllelePlantType) allele).getPlantTypes();
|
||||
return types.isEmpty() ?
|
||||
Binnie.Language.localise(BinnieCore.instance, "allele.none") :
|
||||
Binnie.I18N.localise(BinnieCore.instance, "allele.none") :
|
||||
types.iterator().next().toString();
|
||||
}
|
||||
|
||||
if (chromosome == EnumTreeChromosome.FRUITS && allele.getUID().contains(".")) {
|
||||
IFruitProvider provider = ((IAlleleFruit) allele).getProvider();
|
||||
return (provider.getProducts().length == 0) ?
|
||||
Binnie.Language.localise(BinnieCore.instance, "allele.none") :
|
||||
Binnie.I18N.localise(BinnieCore.instance, "allele.none") :
|
||||
provider.getProducts()[0].getDisplayName();
|
||||
}
|
||||
|
||||
if (chromosome == EnumTreeChromosome.GROWTH) {
|
||||
if (allele.getUID().contains("Tropical")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.growth.tropical");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.growth.tropical");
|
||||
}
|
||||
if (allele.getUID().contains("Lightlevel")) {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "allele.growth.lightlevel");
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "allele.growth.lightlevel");
|
||||
}
|
||||
}
|
||||
return super.getAlleleName(chromosome, allele);
|
||||
|
||||
@@ -27,7 +27,7 @@ public abstract class MachinePackage {
|
||||
public abstract TileEntity createTileEntity();
|
||||
|
||||
public String getDisplayName() {
|
||||
return Binnie.Language.localise(group.getMod(), "machine." + group.getShortUID() + "." + getUID());
|
||||
return Binnie.I18N.localise(group.getMod(), "machine." + group.getShortUID() + "." + getUID());
|
||||
}
|
||||
|
||||
public Integer getMetadata() {
|
||||
@@ -57,6 +57,6 @@ public abstract class MachinePackage {
|
||||
}
|
||||
|
||||
public String getInformation() {
|
||||
return Binnie.Language.localise(group.getMod(), "machine." + group.getShortUID() + "." + getUID() + ".info");
|
||||
return Binnie.I18N.localise(group.getMod(), "machine." + group.getShortUID() + "." + getUID() + ".info");
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class InventorySlot extends BaseSlot<ItemStack> {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "gui.slot." + unlocName);
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "gui.slot." + unlocName);
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
|
||||
@@ -48,6 +48,6 @@ public class TankSlot extends BaseSlot<FluidStack> {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return Binnie.Language.localise(BinnieCore.instance, "gui.slot." + unlocName);
|
||||
return Binnie.I18N.localise(BinnieCore.instance, "gui.slot." + unlocName);
|
||||
}
|
||||
}
|
||||
@@ -60,10 +60,10 @@ public class BinnieModProxy implements IBinnieModProxy {
|
||||
}
|
||||
|
||||
public String localise(String string) {
|
||||
return Binnie.Language.localise(mod, string);
|
||||
return Binnie.I18N.localise(mod, string);
|
||||
}
|
||||
|
||||
public String localiseOrBlank(String string) {
|
||||
return Binnie.Language.localiseOrBlank(mod, string);
|
||||
return Binnie.I18N.localiseOrBlank(mod, string);
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public enum Glassware {
|
||||
if (liquid == null) {
|
||||
return ExtraTrees.proxy.localise("item.glassware." + name().toLowerCase());
|
||||
}
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "item.glassware." + name().toLowerCase() + ".usage", liquid);
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "item.glassware." + name().toLowerCase() + ".usage", liquid);
|
||||
}
|
||||
|
||||
public int getCapacity() {
|
||||
|
||||
@@ -113,7 +113,7 @@ public class BlockBranch extends BlockLog implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
|
||||
@@ -194,13 +194,13 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
String typeName = getDoorType(meta).getName();
|
||||
String woodName = WoodManager.getPlankType(meta & 0xFF).getName();
|
||||
if (typeName.equals("")) {
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.door.name", woodName);
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.door.name", woodName);
|
||||
}
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.door.name.adv", woodName, typeName);
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.door.name.adv", woodName, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
|
||||
@@ -129,11 +129,11 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.log.name", ILogType.ExtraTreeLog.values()[meta].getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.log.name", ILogType.ExtraTreeLog.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,11 +74,11 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
|
||||
@@ -82,11 +82,11 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodslab.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodslab.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -106,11 +106,11 @@ public class BlockETStairs extends BlockStairs implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodstairs.name", WoodManager.getPlankType(meta + 32).getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodstairs.name", WoodManager.getPlankType(meta + 32).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -121,11 +121,11 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodfence.name", getDescription(meta).getPlankType().getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodfence.name", getDescription(meta).getPlankType().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,11 +104,11 @@ public class BlockGate extends BlockFenceGate implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodgate.name", WoodManager.getPlankType(meta).getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodgate.name", WoodManager.getPlankType(meta).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,6 +40,6 @@ public class BlockMultiFence extends BlockFence implements IBlockMetadata {
|
||||
IPlankType type2 = getDescription(meta).getSecondaryPlankType();
|
||||
boolean twoTypes = type1 != type2;
|
||||
FenceType type3 = getDescription(meta).getFenceType();
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodslab.name" + (twoTypes ? "2" : ""), type3.getPrefix(), type1.getName(), type2.getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodslab.name" + (twoTypes ? "2" : ""), type3.getPrefix(), type1.getName(), type2.getName());
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class BlockCarpentry extends BlockDesign {
|
||||
|
||||
@Override
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodentile.name", design.getDesign().getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodentile.name", design.getDesign().getName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class BlockCarpentryPanel extends BlockCarpentry {
|
||||
@Override
|
||||
public String getBlockName(ItemStack stack) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.woodenpanel.name", block.getDesign().getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.woodenpanel.name", block.getDesign().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -101,8 +101,8 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
return getBlockName(block);
|
||||
}
|
||||
|
||||
public abstract String getBlockName(DesignBlock p0);
|
||||
|
||||
public abstract String getBlockName(DesignBlock design);
|
||||
|
||||
public DesignBlock getCarpentryBlock(IBlockAccess world, int x, int y, int z) {
|
||||
return ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getTileMetadata(world, x, y, z));
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlockTooltip(ItemStack stack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(block.getPrimaryMaterial().getName() + " and " + block.getSecondaryMaterial().getName());
|
||||
|
||||
@@ -59,6 +59,6 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
|
||||
@Override
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return Binnie.Language.localise(ExtraTrees.instance, "block.stainedglass.name", design.getDesign().getName());
|
||||
return Binnie.I18N.localise(ExtraTrees.instance, "block.stainedglass.name", design.getDesign().getName());
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
|
||||
@Override
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
tooltip.add(Binnie.Language.localise(BinnieCore.instance, "gui.designer.pattern", getValue().getName()));
|
||||
tooltip.add(Binnie.I18N.localise(BinnieCore.instance, "gui.designer.pattern", getValue().getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -107,7 +107,7 @@ public class AnalystPageSoil extends ControlAnalystPage {
|
||||
new ControlToleranceBar<EnumMoisture>(parent, x, y, w, h, EnumMoisture.class) {
|
||||
@Override
|
||||
protected String getName(EnumMoisture value) {
|
||||
return Binnie.Language.localise(value);
|
||||
return Binnie.I18N.localise(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,7 +121,7 @@ public class AnalystPageSoil extends ControlAnalystPage {
|
||||
new ControlToleranceBar<EnumAcidity>(parent, x, y, w, h, EnumAcidity.class) {
|
||||
@Override
|
||||
protected String getName(EnumAcidity value) {
|
||||
return Binnie.Language.localise(value);
|
||||
return Binnie.I18N.localise(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user