mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-26 06:53:30 +00:00
[1.7.10] Added some localization (#106)
* 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 * Added some localization * Added some localization * Added some localization * Some refactoring
This commit is contained in:
1 parent
1ffaad9fcd
commit
bd0dbc3e14
54 files changed
+394
-520
No files matched your search
@@ -99,12 +99,12 @@ public class BlockETLog extends BlockLog 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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1, int i) {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityMetadata();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BlockETPlanks extends BlockWood 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ public class GateItemRenderer implements IItemRenderer {
|
||||
private void renderStairBlock(RenderBlocks renderBlocks, ItemStack item, float f, float g, float h) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ((ItemBlock) item.getItem()).field_150939_a;
|
||||
IIcon textureIndex = WoodManager.getPlankType(item.getItemDamage()).getIcon();
|
||||
for (int k = 0; k < 3; ++k) {
|
||||
float f2 = 0.0625f;
|
||||
if (k == 0) {
|
||||
|
||||
@@ -42,9 +42,7 @@ public class ItemETDoor extends ItemMetadata {
|
||||
boolean flag = world.getBlock(x - b0, y, z - b2) == block || world.getBlock(x - b0, y + 1, z - b2) == block;
|
||||
boolean flag2 = world.getBlock(x + b0, y, z + b2) == block || world.getBlock(x + b0, y + 1, z + b2) == block;
|
||||
boolean flag3 = false;
|
||||
if (flag && !flag2) {
|
||||
flag3 = true;
|
||||
} else if (j1 > i1) {
|
||||
if (flag && !flag2 || j1 > i1) {
|
||||
flag3 = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ public class ItemETSlab extends ItemMetadata {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return func_77888_a(stack, player, world, x, y, z, meta) || super.onItemUse(stack, player, world, x, y, z, meta, hitX, hitY, hitZ);
|
||||
return func_77888_a(stack, player, world, x, y, z, meta)
|
||||
|| super.onItemUse(stack, player, world, x, y, z, meta, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
private boolean func_77888_a(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side) {
|
||||
|
||||
@@ -69,8 +69,7 @@ public class ModuleBlocks implements IInitializable {
|
||||
|
||||
FMLInterModComms.sendMessage("Forestry", "add-fence-block", "ExtraTrees:fence");
|
||||
FMLInterModComms.sendMessage("Forestry", "add-fence-block", "ExtraTrees:gate");
|
||||
// FMLInterModComms.sendMessage("Forestry", "add-alveary-slab",
|
||||
// "ExtraTrees:slab");
|
||||
// FMLInterModComms.sendMessage("Forestry", "add-alveary-slab", "ExtraTrees:slab");
|
||||
FMLInterModComms.sendMessage("Forestry", "add-fence-block", "ExtraTrees:multifence");
|
||||
ModuleBlocks.hedgeRenderID = BinnieCore.proxy.getUniqueRenderID();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ public class StairItemRenderer implements IItemRenderer {
|
||||
if (i == 1) {
|
||||
renderBlocks.setRenderBounds(0.0, 0.0, 0.5, 1.0, 0.5, 1.0);
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0f, -1.0f, 0.0f);
|
||||
|
||||
@@ -49,7 +49,6 @@ public class WoodManager {
|
||||
if (f != null && ItemStack.areItemStacksEqual(stack, f)) {
|
||||
return new FenceDescription(new FenceType(0), type, type);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -95,7 +94,7 @@ public class WoodManager {
|
||||
}
|
||||
|
||||
public static List<IPlankType> getAllPlankTypes() {
|
||||
List<IPlankType> list = new ArrayList<IPlankType>();
|
||||
List<IPlankType> list = new ArrayList<>();
|
||||
Collections.addAll(list, PlankType.ExtraTreePlanks.values());
|
||||
Collections.addAll(list, PlankType.ForestryPlanks.values());
|
||||
for (IPlankType type : PlankType.ExtraBiomesPlank.values()) {
|
||||
|
||||
@@ -42,7 +42,12 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
}
|
||||
|
||||
public static boolean canConnect(Block block) {
|
||||
return block == ((ItemBlock) Mods.forestry.item("fences")).field_150939_a || block == Blocks.fence || block == Blocks.fence_gate || block == Blocks.nether_brick_fence || block instanceof IBlockFence || block == ExtraTrees.blockGate;
|
||||
return block == ((ItemBlock) Mods.forestry.item("fences")).field_150939_a
|
||||
|| block == Blocks.fence
|
||||
|| block == Blocks.fence_gate
|
||||
|| block == Blocks.nether_brick_fence
|
||||
|| block instanceof IBlockFence
|
||||
|| block == ExtraTrees.blockGate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,10 +181,11 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public class BlockGate extends BlockFenceGate 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ public class BlockMultiFence extends BlockFence implements IBlockMetadata {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
IPlankType type1 = getDescription(meta).getPlankType();
|
||||
IPlankType type2 = getDescription(meta).getSecondaryPlankType();
|
||||
boolean twoTypes = type1 != type2;
|
||||
FenceType type3 = getDescription(meta).getFenceType();
|
||||
boolean twoTypes = type1 != type2;
|
||||
return I18N.localise("extratrees.block.woodslab.name" + (twoTypes ? "2" : ""), type3.getPrefix(), type1.getName(), type2.getName());
|
||||
}
|
||||
}
|
||||
@@ -18,26 +18,28 @@ public class MultiFenceRecipeEmbedded implements IRecipe {
|
||||
ItemStack a = inv.getStackInSlot(row * 3);
|
||||
ItemStack b = inv.getStackInSlot(row * 3 + 1);
|
||||
ItemStack c = inv.getStackInSlot(row * 3 + 2);
|
||||
if (a != null && b != null) {
|
||||
if (c != null) {
|
||||
type = WoodManager.getFenceType(a);
|
||||
FenceType type2 = WoodManager.getFenceType(c);
|
||||
if (type != null && type2 != null) {
|
||||
if (type.equals(type2)) {
|
||||
IPlankType pType = WoodManager.get(b);
|
||||
if (WoodManager.getFenceDescription(a).getPlankType() == pType) {
|
||||
cached = WoodManager.getFence(
|
||||
WoodManager.getFenceDescription(a).getPlankType(),
|
||||
WoodManager.getFenceDescription(a).getSecondaryPlankType(),
|
||||
new FenceType(type.size, type.solid, true),
|
||||
2
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a == null || b == null || c == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
type = WoodManager.getFenceType(a);
|
||||
FenceType type2 = WoodManager.getFenceType(c);
|
||||
if (type == null || type2 == null || !type.equals(type2)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
IPlankType pType = WoodManager.get(b);
|
||||
if (WoodManager.getFenceDescription(a).getPlankType() != pType) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cached = WoodManager.getFence(
|
||||
WoodManager.getFenceDescription(a).getPlankType(),
|
||||
WoodManager.getFenceDescription(a).getSecondaryPlankType(),
|
||||
new FenceType(type.size, type.solid, true),
|
||||
2
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,24 +17,24 @@ public class MultiFenceRecipeSolid implements IRecipe {
|
||||
ItemStack a = inv.getStackInSlot(row * 3);
|
||||
ItemStack b = inv.getStackInSlot(row * 3 + 1);
|
||||
ItemStack c = inv.getStackInSlot(row * 3 + 2);
|
||||
if (a != null && b != null) {
|
||||
if (c != null) {
|
||||
type = WoodManager.getFenceType(a);
|
||||
FenceType type2 = WoodManager.getFenceType(b);
|
||||
FenceType type3 = WoodManager.getFenceType(c);
|
||||
if (type != null && type2 != null && type3 != null && type.equals(type2)) {
|
||||
if (type.equals(type3)) {
|
||||
cached = WoodManager.getFence(
|
||||
WoodManager.getFenceDescription(a).getPlankType(),
|
||||
WoodManager.getFenceDescription(a).getSecondaryPlankType(),
|
||||
new FenceType(type.size, true, type.solid),
|
||||
2
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a == null || b == null || c == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
type = WoodManager.getFenceType(a);
|
||||
FenceType type2 = WoodManager.getFenceType(b);
|
||||
FenceType type3 = WoodManager.getFenceType(c);
|
||||
if (type == null || type2 == null || type3 == null || !type.equals(type2) || !type.equals(type3)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cached = WoodManager.getFence(
|
||||
WoodManager.getFenceDescription(a).getPlankType(),
|
||||
WoodManager.getFenceDescription(a).getSecondaryPlankType(),
|
||||
new FenceType(type.size, true, type.solid),
|
||||
2
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ public class NBTShapedRecipe implements IRecipe {
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting crafting) {
|
||||
ItemStack itemstack = getRecipeOutput().copy();
|
||||
// todo unused code?
|
||||
if (field_92101_f) {
|
||||
for (int i = 0; i < crafting.getSizeInventory(); ++i) {
|
||||
ItemStack itemstack2 = crafting.getStackInSlot(i);
|
||||
|
||||
@@ -134,7 +134,11 @@ 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.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());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ public class CarpentryInterface implements ICarpentryInterface {
|
||||
|
||||
@Override
|
||||
public boolean registerCarpentryWood(int index, IDesignMaterial wood) {
|
||||
return wood != null && CarpentryInterface.woodMap.put(index, wood) == null;
|
||||
return wood != null
|
||||
&& CarpentryInterface.woodMap.put(index, wood) == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,31 +32,25 @@ public enum DesignSystem implements IDesignSystem {
|
||||
@Override
|
||||
public IDesignMaterial getDefaultMaterial() {
|
||||
switch (this) {
|
||||
case Glass: {
|
||||
case Glass:
|
||||
return GlassType.get(0);
|
||||
}
|
||||
case Wood: {
|
||||
|
||||
case Wood:
|
||||
return PlankType.ExtraTreePlanks.Fir;
|
||||
}
|
||||
default: {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDesignMaterial getDefaultMaterial2() {
|
||||
switch (this) {
|
||||
case Glass: {
|
||||
case Glass:
|
||||
return GlassType.get(1);
|
||||
}
|
||||
case Wood: {
|
||||
|
||||
case Wood:
|
||||
return PlankType.ExtraTreePlanks.Whitebeam;
|
||||
}
|
||||
default: {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,11 +7,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class DesignerManager {
|
||||
public static DesignerManager instance;
|
||||
|
||||
static {
|
||||
DesignerManager.instance = new DesignerManager();
|
||||
}
|
||||
public static DesignerManager instance = new DesignerManager();
|
||||
|
||||
List<IDesignSystem> systems;
|
||||
|
||||
@@ -26,8 +22,4 @@ public class DesignerManager {
|
||||
public Collection<IDesignSystem> getDesignSystems() {
|
||||
return systems;
|
||||
}
|
||||
|
||||
public void addDesignSystem(DesignSystem system) {
|
||||
systems.add(system);
|
||||
}
|
||||
}
|
||||
@@ -7,16 +7,16 @@ import binnie.extratrees.api.IDesignMaterial;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GlassType implements IDesignMaterial {
|
||||
protected static Map<Integer, GlassType> types;
|
||||
protected static Map<Integer, GlassType> types = new LinkedHashMap<>();
|
||||
|
||||
static {
|
||||
GlassType.types = new LinkedHashMap<>();
|
||||
for (StandardColor c : StandardColor.values()) {
|
||||
GlassType.types.put(c.ordinal(), new GlassType(c.ordinal(), c.name, c.colour));
|
||||
GlassType.types.put(c.ordinal(), new GlassType(c.ordinal(), c.name, c.color));
|
||||
}
|
||||
for (EnumFlowerColor c2 : EnumFlowerColor.values()) {
|
||||
GlassType.types.put(128 + c2.ordinal(), new GlassType(128 + c2.ordinal(), c2.getName(), c2.getColor(false)));
|
||||
@@ -24,13 +24,13 @@ public class GlassType implements IDesignMaterial {
|
||||
}
|
||||
|
||||
protected String name;
|
||||
protected int colour;
|
||||
protected int color;
|
||||
protected int id;
|
||||
|
||||
private GlassType(int id, String name, int colour) {
|
||||
private GlassType(int id, String name, int color) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.colour = colour;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public static int getIndex(IDesignMaterial id) {
|
||||
@@ -73,33 +73,33 @@ public class GlassType implements IDesignMaterial {
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return colour;
|
||||
return color;
|
||||
}
|
||||
|
||||
private enum StandardColor {
|
||||
White("White", 16777215),
|
||||
Orange("Orange", 14188339),
|
||||
Magenta("Magenta", 11685080),
|
||||
LightBlue("Light Blue", 6724056),
|
||||
Yellow("Yellow", 15066419),
|
||||
Lime("Lime", 8375321),
|
||||
Pink("Pink", 15892389),
|
||||
Gray("Gray", 5000268),
|
||||
LightGray("Light Gray", 10066329),
|
||||
Cyan("Cyan", 5013401),
|
||||
Purple("Purple", 8339378),
|
||||
Blue("Blue", 3361970),
|
||||
Brown("Brown", 6704179),
|
||||
Green("Green", 6717235),
|
||||
Red("Red", 10040115),
|
||||
Black("Black", 1644825);
|
||||
White("White", new Color(0xffffff)),
|
||||
Orange("Orange", new Color(0xd87f33)),
|
||||
Magenta("Magenta", new Color(0xb24cd8)),
|
||||
LightBlue("Light Blue", new Color(0x6699d8)),
|
||||
Yellow("Yellow", new Color(0xe5e533)),
|
||||
Lime("Lime", new Color(0x7fcc19)),
|
||||
Pink("Pink", new Color(0xf27fa5)),
|
||||
Gray("Gray", new Color(0x4c4c4c)),
|
||||
LightGray("Light Gray", new Color(0x999999)),
|
||||
Cyan("Cyan", new Color(0x4c7f99)),
|
||||
Purple("Purple", new Color(0x7f3fb2)),
|
||||
Blue("Blue", new Color(0x334cb2)),
|
||||
Brown("Brown", new Color(0x664c33)),
|
||||
Green("Green", new Color(0x667f33)),
|
||||
Red("Red", new Color(0x993333)),
|
||||
Black("Black", new Color(0x191919));
|
||||
|
||||
protected String name;
|
||||
protected int colour;
|
||||
protected int color;
|
||||
|
||||
StandardColor(String name, int colour) {
|
||||
StandardColor(String name, Color color) {
|
||||
this.name = name;
|
||||
this.colour = colour;
|
||||
this.color = color.getRGB();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,4 @@ public class ModuleCarpentry implements IInitializable {
|
||||
CarpentryManager.carpentryInterface.registerDesign(design.ordinal(), design);
|
||||
}
|
||||
}
|
||||
|
||||
enum Axis {
|
||||
Y,
|
||||
X,
|
||||
Z
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.util.Collections;
|
||||
|
||||
public class ControlBreweryProgress extends ControlProgressBase {
|
||||
protected static Texture Brewery = new StandardTexture(0, 69, 34, 39, ExtraTreeTexture.Gui);
|
||||
protected static Texture BreweryOverlay = new StandardTexture(34, 69, 34, 39, ExtraTreeTexture.Gui);
|
||||
protected static Texture brewery = new StandardTexture(0, 69, 34, 39, ExtraTreeTexture.Gui);
|
||||
protected static Texture breweryOverlay = new StandardTexture(34, 69, 34, 39, ExtraTreeTexture.Gui);
|
||||
|
||||
protected ControlBreweryProgress(IWidget parent, float x, float y) {
|
||||
super(parent, x, y, 34.0f, 39.0f);
|
||||
@@ -31,12 +31,9 @@ public class ControlBreweryProgress extends ControlProgressBase {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(ControlBreweryProgress.Brewery, new IPoint(0.0f, 0.0f));
|
||||
CraftGUI.Render.texture(ControlBreweryProgress.brewery, new IPoint(0.0f, 0.0f));
|
||||
Brewery.ComponentBreweryLogic logic = Machine.getInterface(Brewery.ComponentBreweryLogic.class, Window.get(this).getInventory());
|
||||
if (logic.currentCrafting == null) {
|
||||
return;
|
||||
}
|
||||
if (logic.currentCrafting.currentInput == null) {
|
||||
if (logic.currentCrafting == null || logic.currentCrafting.currentInput == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -80,7 +77,6 @@ public class ControlBreweryProgress extends ControlProgressBase {
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
IIcon icon = fluid.getFluid().getIcon();
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
|
||||
+29
-28
@@ -14,42 +14,24 @@ import binnie.core.machines.Machine;
|
||||
import binnie.extratrees.core.ExtraTreeTexture;
|
||||
import binnie.extratrees.machines.Distillery;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ControlDistilleryProgress extends ControlProgressBase {
|
||||
protected static Texture DistilleryBase = new StandardTexture(43, 0, 58, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture DistilleryOverlay = new StandardTexture(139, 0, 18, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture LiquidFlow = new StandardTexture(101, 0, 38, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture Output = new StandardTexture(68, 66, 17, 7, ExtraTreeTexture.Gui);
|
||||
protected static Texture distilleryBase = new StandardTexture(43, 0, 58, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture distilleryOverlay = new StandardTexture(139, 0, 18, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture liquidFlow = new StandardTexture(101, 0, 38, 66, ExtraTreeTexture.Gui);
|
||||
protected static Texture output = new StandardTexture(68, 66, 17, 7, ExtraTreeTexture.Gui);
|
||||
|
||||
protected ControlDistilleryProgress(IWidget parent, float x, float y) {
|
||||
super(parent, x, y, 58.0f, 66.0f);
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
int distillationLevel = -1;
|
||||
if (new IArea(45.0f, 8.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 0;
|
||||
} else if (new IArea(45.0f, 23.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 1;
|
||||
} else if (new IArea(45.0f, 38.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 2;
|
||||
}
|
||||
if (distillationLevel >= 0) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setByte("i", (byte) distillationLevel);
|
||||
Window.get(getWidget()).sendClientAction("still-level", nbt);
|
||||
}
|
||||
}
|
||||
});
|
||||
addSelfEventHandler(new MouseDownHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(ControlDistilleryProgress.DistilleryBase, new IPoint(0.0f, 0.0f));
|
||||
CraftGUI.Render.texturePercentage(ControlDistilleryProgress.LiquidFlow, new IArea(18.0f, 0.0f, 38.0f, 66.0f), Position.LEFT, progress);
|
||||
CraftGUI.Render.texture(ControlDistilleryProgress.distilleryBase, new IPoint(0.0f, 0.0f));
|
||||
CraftGUI.Render.texturePercentage(ControlDistilleryProgress.liquidFlow, new IArea(18.0f, 0.0f, 38.0f, 66.0f), Position.LEFT, progress);
|
||||
Distillery.ComponentDistilleryLogic component = Machine.getInterface(Distillery.ComponentDistilleryLogic.class, Window.get(this).getInventory());
|
||||
FluidStack stack = null;
|
||||
if (component != null) {
|
||||
@@ -66,8 +48,8 @@ public class ControlDistilleryProgress extends ControlProgressBase {
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
int level = Machine.getInterface(Distillery.ComponentDistilleryLogic.class, Window.get(this).getInventory()).level;
|
||||
CraftGUI.Render.texture(ControlDistilleryProgress.Output, new IPoint(47.0f, 14 + level * 15));
|
||||
CraftGUI.Render.texture(ControlDistilleryProgress.DistilleryOverlay, new IPoint(0.0f, 0.0f));
|
||||
CraftGUI.Render.texture(output, new IPoint(47.0f, 14 + level * 15));
|
||||
CraftGUI.Render.texture(distilleryOverlay, new IPoint(0.0f, 0.0f));
|
||||
}
|
||||
|
||||
public void renderFluid(FluidStack fluid, IPoint pos) {
|
||||
@@ -75,11 +57,30 @@ public class ControlDistilleryProgress extends ControlProgressBase {
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
IIcon icon = fluid.getFluid().getIcon();
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
CraftGUI.Render.iconBlock(pos, fluid.getFluid().getIcon());
|
||||
GL11.glDisable(3042);
|
||||
}
|
||||
|
||||
private class MouseDownHandler extends EventMouse.Down.Handler {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
int distillationLevel = -1;
|
||||
if (new IArea(45.0f, 8.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 0;
|
||||
} else if (new IArea(45.0f, 23.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 1;
|
||||
} else if (new IArea(45.0f, 38.0f, 19.0f, 11.0f).contains(getRelativeMousePosition())) {
|
||||
distillationLevel = 2;
|
||||
}
|
||||
|
||||
if (distillationLevel >= 0) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setByte("i", (byte) distillationLevel);
|
||||
Window.get(getWidget()).sendClientAction("still-level", nbt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
-21
@@ -13,55 +13,56 @@ import binnie.extratrees.core.ExtraTreeTexture;
|
||||
import binnie.extratrees.machines.Press;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ControlFruitPressProgress extends ControlProgressBase {
|
||||
protected static Texture PressTexture = new StandardTexture(6, 0, 24, 52, ExtraTreeTexture.Gui);
|
||||
protected static Texture PressSlot = new StandardTexture(9, 52, 34, 17, ExtraTreeTexture.Gui);
|
||||
protected static Texture pressTexture = new StandardTexture(6, 0, 24, 52, ExtraTreeTexture.Gui);
|
||||
protected static Texture pressSlot = new StandardTexture(9, 52, 34, 17, ExtraTreeTexture.Gui);
|
||||
|
||||
protected ControlFruitPressProgress(IWidget parent, float x, float y) {
|
||||
super(parent, x, y, 37.0f, 69.0f);
|
||||
addAttribute(WidgetAttribute.MOUSE_OVER);
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
if (event.getButton() == 0) {
|
||||
NBTTagCompound action = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("fruitpress-click", action);
|
||||
} else if (event.getButton() == 1) {
|
||||
NBTTagCompound action = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("clear-fruit", action);
|
||||
}
|
||||
}
|
||||
});
|
||||
addSelfEventHandler(new MouseDownHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(ControlFruitPressProgress.PressSlot, new IPoint(3.0f, 52.0f));
|
||||
ItemStack input = Window.get(this).getContainer().getSlotFromInventory(Window.get(this).getInventory(), Press.slotCurrent).getStack();
|
||||
Window window = Window.get(this);
|
||||
CraftGUI.Render.texture(ControlFruitPressProgress.pressSlot, new IPoint(3.0f, 52.0f));
|
||||
ItemStack input = window.getContainer().getSlotFromInventory(window.getInventory(), Press.slotCurrent).getStack();
|
||||
if (input == null || Press.getOutput(input) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Fluid fluid = Press.getOutput(input).getFluid();
|
||||
int hex = fluid.getColor(Press.getOutput(input));
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
IIcon icon = fluid.getIcon();
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
CraftGUI.Render.iconBlock(new IPoint(4.0f, 52.0f), fluid.getIcon());
|
||||
GL11.glDisable(3042);
|
||||
icon = input.getIconIndex();
|
||||
CraftGUI.Render.iconItem(new IPoint(4.0f, 52.0f), icon);
|
||||
CraftGUI.Render.iconItem(new IPoint(4.0f, 52.0f), input.getIconIndex());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
CraftGUI.Render.texture(ControlFruitPressProgress.PressTexture, new IPoint(0.0f, 16.0f * progress));
|
||||
CraftGUI.Render.texture(ControlFruitPressProgress.pressTexture, new IPoint(0.0f, 16.0f * progress));
|
||||
}
|
||||
|
||||
private class MouseDownHandler extends EventMouse.Down.Handler {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
if (event.getButton() == 0) {
|
||||
NBTTagCompound action = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("fruitpress-click", action);
|
||||
} else if (event.getButton() == 1) {
|
||||
NBTTagCompound action = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("clear-fruit", action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,6 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
}
|
||||
|
||||
IIcon icon2 = block2.getIcon(2, result.getItemDamage());
|
||||
IPoint size = getSize();
|
||||
IPoint pos = getAbsolutePosition();
|
||||
CraftGUI.Render.limitArea(new IArea(pos.add(new IPoint(0.0f, 0.0f)), new IPoint(progress * 64.0f + 2.0f, 18.0f)));
|
||||
GL11.glEnable(3089);
|
||||
|
||||
@@ -14,18 +14,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
public class ControlRecipeSlot extends ControlSlotBase {
|
||||
public ControlRecipeSlot(IWidget parent, int x, int y) {
|
||||
super(parent, x, y, 50);
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
TileEntity tile = (TileEntity) Window.get(getWidget()).getInventory();
|
||||
if (tile == null || !(tile instanceof TileEntityMachine)) {
|
||||
return;
|
||||
}
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("recipe", nbt);
|
||||
}
|
||||
});
|
||||
addSelfEventHandler(new MouseDownHandler());
|
||||
setRotating();
|
||||
}
|
||||
|
||||
@@ -34,4 +23,17 @@ public class ControlRecipeSlot extends ControlSlotBase {
|
||||
IComponentRecipe recipe = Machine.getInterface(IComponentRecipe.class, Window.get(this).getInventory());
|
||||
return recipe.isRecipe() ? recipe.getProduct() : null;
|
||||
}
|
||||
|
||||
private class MouseDownHandler extends EventMouse.Down.Handler {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
TileEntity tile = (TileEntity) Window.get(getWidget()).getInventory();
|
||||
if (tile == null || !(tile instanceof TileEntityMachine)) {
|
||||
return;
|
||||
}
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("recipe", nbt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
|
||||
@Override
|
||||
public void movePercentage(float percentage) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,7 +84,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
deleteAllChildren();
|
||||
int cx;
|
||||
int cy = 2;
|
||||
Map<IDesignCategory, List<IDesign>> designs = new HashMap<IDesignCategory, List<IDesign>>();
|
||||
Map<IDesignCategory, List<IDesign>> designs = new HashMap<>();
|
||||
for (IDesignCategory category : CarpentryManager.carpentryInterface.getAllDesignCategories()) {
|
||||
designs.put(category, new ArrayList<>());
|
||||
for (IDesign tile : category.getDesigns()) {
|
||||
@@ -126,20 +127,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
super(parent, x, y, 18.0f, 18.0f);
|
||||
setValue(value);
|
||||
addAttribute(WidgetAttribute.MOUSE_OVER);
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
TileEntityMachine tile = (TileEntityMachine) Window.get(getWidget()).getInventory();
|
||||
if (tile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setShort("d", (short) CarpentryManager.carpentryInterface.getDesignIndex(getValue()));
|
||||
Window.get(getWidget()).sendClientAction("design", nbt);
|
||||
}
|
||||
});
|
||||
addSelfEventHandler(new MouseDownHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,5 +164,20 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), -1433892728, -1433892728);
|
||||
}
|
||||
}
|
||||
|
||||
private class MouseDownHandler extends EventMouse.Down.Handler {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
TileEntityMachine tile = (TileEntityMachine) Window.get(getWidget()).getInventory();
|
||||
if (tile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
tile.getMachine().getComponent(Designer.ComponentWoodworkerRecipe.class);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setShort("d", (short) CarpentryManager.carpentryInterface.getDesignIndex(getValue()));
|
||||
Window.get(getWidget()).sendClientAction("design", nbt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,13 +34,6 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
super(parent, tab);
|
||||
}
|
||||
|
||||
public static String tolerated(boolean t) {
|
||||
if (t) {
|
||||
return I18N.localise("binniecore.gui.tolerated");
|
||||
}
|
||||
return I18N.localise("binniecore.gui.nottolerated");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onValueChanged(IAlleleSpecies species) {
|
||||
deleteAllChildren();
|
||||
|
||||
@@ -25,10 +25,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WindowArboristDatabase extends WindowAbstractDatabase {
|
||||
protected ControlListBox<ItemStack> selectionBoxFruit;
|
||||
protected ControlListBox<ItemStack> selectionBoxWood;
|
||||
protected ControlListBox<ItemStack> selectionBoxPlanks;
|
||||
|
||||
public WindowArboristDatabase(EntityPlayer player, Side side, boolean nei) {
|
||||
super(player, side, nei, Binnie.Genetics.treeBreedingSystem, 120.0f);
|
||||
}
|
||||
|
||||
@@ -29,5 +29,6 @@ public class WindowSetSquare extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class WindowWoodworker extends Window {
|
||||
slotWood2.assign(Designer.design2Slot);
|
||||
ControlSlot slotBeeswax = new ControlSlot(this, 42.0f, 64.0f);
|
||||
slotBeeswax.assign(Designer.beeswaxSlot);
|
||||
ControlRecipeSlot slotFinished = new ControlRecipeSlot(this, 112, 34);
|
||||
new ControlRecipeSlot(this, 112, 34);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ public enum ButterflySpecies implements IAlleleButterflySpecies {
|
||||
|
||||
@Override
|
||||
public int getIconColour(int renderPass) {
|
||||
return (renderPass > 0) ? 16777215 : color;
|
||||
return (renderPass > 0) ? 0xffffff : color;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,13 +18,9 @@ import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.arboriculture.FruitProviderNone;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLog;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -103,18 +99,18 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
protected int diffB;
|
||||
protected FruitPod pod;
|
||||
protected int ripeningPeriod;
|
||||
protected int colourUnripe;
|
||||
protected int colour;
|
||||
protected int colorUnripe;
|
||||
protected int color;
|
||||
protected FruitSprite index;
|
||||
protected HashMap<ItemStack, Float> products;
|
||||
|
||||
ExtraTreeFruitGene(int time, int unripe, int colour, FruitSprite index) {
|
||||
ExtraTreeFruitGene(int time, int unripe, int color, FruitSprite index) {
|
||||
isRipening = false;
|
||||
diffB = 0;
|
||||
pod = null;
|
||||
ripeningPeriod = 0;
|
||||
products = new HashMap<>();
|
||||
this.colour = colour;
|
||||
this.color = color;
|
||||
this.index = index;
|
||||
setRipening(time, unripe);
|
||||
}
|
||||
@@ -124,7 +120,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
diffB = 0;
|
||||
this.pod = null;
|
||||
ripeningPeriod = 0;
|
||||
products = new HashMap<ItemStack, Float>();
|
||||
products = new HashMap<>();
|
||||
this.pod = pod;
|
||||
ripeningPeriod = 2;
|
||||
}
|
||||
@@ -279,32 +275,13 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getDirectionalMetadata(World world, int x, int y, int z) {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (isValidPot(world, x, y, z, i)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static boolean isValidPot(World world, int x, int y, int z, int notchDirection) {
|
||||
x += Direction.offsetX[notchDirection];
|
||||
z += Direction.offsetZ[notchDirection];
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if (block == Blocks.log || block == Blocks.log2) {
|
||||
return BlockLog.func_150165_c(world.getBlockMetadata(x, y, z)) == 3;
|
||||
}
|
||||
return block != null && block.isWood(world, x, y, z);
|
||||
}
|
||||
|
||||
public void setRipening(int time, int unripe) {
|
||||
ripeningPeriod = time;
|
||||
colourUnripe = unripe;
|
||||
colorUnripe = unripe;
|
||||
isRipening = true;
|
||||
diffR = (colour >> 16 & 0xFF) - (unripe >> 16 & 0xFF);
|
||||
diffG = (colour >> 8 & 0xFF) - (unripe >> 8 & 0xFF);
|
||||
diffB = (colour & 0xFF) - (unripe & 0xFF);
|
||||
diffR = (color >> 16 & 0xFF) - (unripe >> 16 & 0xFF);
|
||||
diffG = (color >> 8 & 0xFF) - (unripe >> 8 & 0xFF);
|
||||
diffB = (color & 0xFF) - (unripe & 0xFF);
|
||||
}
|
||||
|
||||
public void addProduct(ItemStack product, float chance) {
|
||||
@@ -353,13 +330,13 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
@Override
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime) {
|
||||
if (!isRipening) {
|
||||
return colour;
|
||||
return color;
|
||||
}
|
||||
|
||||
float stage = getRipeningStage(ripeningTime);
|
||||
int r = (colourUnripe >> 16 & 0xFF) + (int) (diffR * stage);
|
||||
int g = (colourUnripe >> 8 & 0xFF) + (int) (diffG * stage);
|
||||
int b = (colourUnripe & 0xFF) + (int) (diffB * stage);
|
||||
int r = (colorUnripe >> 16 & 0xFF) + (int) (diffR * stage);
|
||||
int g = (colorUnripe >> 8 & 0xFF) + (int) (diffG * stage);
|
||||
int b = (colorUnripe & 0xFF) + (int) (diffB * stage);
|
||||
return (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF);
|
||||
}
|
||||
|
||||
@@ -377,7 +354,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
public ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime) {
|
||||
if (pod != null) {
|
||||
if (ripeningTime >= 2) {
|
||||
List<ItemStack> product = new ArrayList<ItemStack>();
|
||||
List<ItemStack> product = new ArrayList<>();
|
||||
for (Map.Entry<ItemStack, Float> entry : products.entrySet()) {
|
||||
ItemStack single = entry.getKey().copy();
|
||||
single.stackSize = 1;
|
||||
@@ -392,7 +369,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
return new ItemStack[0];
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> product2 = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> product2 = new ArrayList<>();
|
||||
float stage = getRipeningStage(ripeningTime);
|
||||
if (stage < 0.5f) {
|
||||
return new ItemStack[0];
|
||||
@@ -426,10 +403,6 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
&& Binnie.Genetics.getTreeRoot().setFruitBlock(world, (IAlleleFruit) genome.getActiveAllele(EnumTreeChromosome.FRUITS), genome.getSappiness(), pod.getTextures(), x, y, z);
|
||||
}
|
||||
|
||||
public boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy) {
|
||||
return index.getIndex();
|
||||
|
||||
@@ -154,31 +154,6 @@ public class ExtraTreeMutation implements ITreeMutation {
|
||||
return allele;
|
||||
}
|
||||
|
||||
public ExtraTreeMutation setIsSecret() {
|
||||
isSecret = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExtraTreeMutation setTemperature(float minTemperature, float maxTemperature) {
|
||||
this.minTemperature = minTemperature;
|
||||
this.maxTemperature = maxTemperature;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExtraTreeMutation setRainfall(float minRainfall, float maxRainfall) {
|
||||
this.minRainfall = minRainfall;
|
||||
this.maxRainfall = maxRainfall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExtraTreeMutation setTemperatureRainfall(float minTemperature, float maxTemperature, float minRainfall, float maxRainfall) {
|
||||
this.minTemperature = minTemperature;
|
||||
this.maxTemperature = maxTemperature;
|
||||
this.minRainfall = minRainfall;
|
||||
this.maxRainfall = maxRainfall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExtraTreeMutation setHeight(int minHeight) {
|
||||
height = minHeight;
|
||||
return this;
|
||||
@@ -246,7 +221,7 @@ public class ExtraTreeMutation implements ITreeMutation {
|
||||
|
||||
@Override
|
||||
public Collection<String> getSpecialConditions() {
|
||||
List<String> conditions = new ArrayList<String>();
|
||||
List<String> conditions = new ArrayList<>();
|
||||
if (height > 0.0f) {
|
||||
conditions.add("Minimum height from bedrock of " + height);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user