Minor Cleanup

Fix up some null checks

Clean up redundant array creation to varargs parameter

Remove redundant type casts

Simplify arithmetic

Use foreach loops

Remove unused code

Minor cleanup
This commit is contained in:
mezz committed 2014-11-29 23:49:47 -08:00
1 parent 05a7ac6d93
commit 3884fecf77
222 files changed
+695 -1079

No files matched your search

@@ -12,7 +12,7 @@ import net.minecraftforge.common.util.ForgeDirection;
*/
public class TileEnergyHandler extends TileEntity implements IEnergyHandler {
protected EnergyStorage storage = new EnergyStorage(32000);
protected final EnergyStorage storage = new EnergyStorage(32000);
@Override
public void readFromNBT(NBTTagCompound nbt) {
@@ -32,7 +32,7 @@ import forestry.plugins.PluginApiculture;
public class BeekeepingLogic implements IBeekeepingLogic {
private static final int MAX_POLLINATION_ATTEMPTS = 20;
IBeeHousing housing;
private final IBeeHousing housing;
// Breeding
private int breedingTime;
private final int totalBreedingTime = Defaults.APIARY_BREEDING_TIME;
@@ -59,7 +59,7 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int size) {
return new StructureVillagePieces.PieceWeight(ComponentVillageBeeHouse.class, 15, MathHelper.getRandomIntegerInRange(random, 0 + size, 1 + size));
return new StructureVillagePieces.PieceWeight(ComponentVillageBeeHouse.class, 15, MathHelper.getRandomIntegerInRange(random, size, 1 + size));
}
@Override
@@ -31,8 +31,8 @@ import java.util.List;
public class CommandBeekeepingGiveBee extends SubCommand {
private String beeTypeHelpString;
private String[] beeTypeArr;
private final String beeTypeHelpString;
private final String[] beeTypeArr;
public CommandBeekeepingGiveBee() {
super("give");
@@ -25,8 +25,8 @@ import java.util.List;
public class CommandBeekeepingModeInfo extends SubCommand {
private String[] modeStringArr;
private String helpString;
private final String[] modeStringArr;
private final String helpString;
public CommandBeekeepingModeInfo() {
super("info");
@@ -21,7 +21,7 @@ import java.util.ArrayList;
import java.util.List;
public class CommandBeekeepingModeSet extends SubCommand {
private String[] modeStringArr;
private final String[] modeStringArr;
public CommandBeekeepingModeSet() {
super("set");
@@ -40,7 +40,7 @@ public class StructureLogicAlveary extends StructureLogic {
slabBlocks.add(ForestryBlock.slabs1.block());
slabBlocks.add(ForestryBlock.slabs2.block());
slabBlocks.add(ForestryBlock.slabs3.block());
if (ForestryBlock.slabs4 != null)
if (ForestryBlock.slabs4.block() != null)
slabBlocks.add(ForestryBlock.slabs4.block());
}
@@ -36,6 +36,11 @@ import java.util.LinkedList;
public abstract class TileAlveary extends TileForestry implements IAlvearyComponent {
private final IStructureLogic structureLogic;
private boolean isMaster;
protected int masterX, masterZ;
protected int masterY = -99;
protected TileInventoryAdapter inventory;
protected final int componentBlockMeta;
@@ -126,11 +131,6 @@ public abstract class TileAlveary extends TileForestry implements IAlvearyCompon
}
/* ITILESTRUCTURE */
IStructureLogic structureLogic;
private boolean isMaster;
protected int masterX, masterZ;
protected int masterY = -99;
@Override
public String getTypeUID() {
@@ -32,8 +32,8 @@ public abstract class TileAlvearyClimatiser extends TileAlveary implements IEner
this.boundaryUp = boundaryUp;
}
}
protected EnergyManager energyManager;
ClimateControl climateControl;
protected final EnergyManager energyManager;
private final ClimateControl climateControl;
private int transferTime = 0;
private int animationDelay = 0;
private final int textureOff;
@@ -59,9 +59,9 @@ public class TileAlvearyHygroregulator extends TileAlveary implements IInventory
private final HygroregulatorRecipe[] recipes;
/* MEMBERS */
InventoryAdapter canInventory = new InventoryAdapter(1, "CanInv");
private final InventoryAdapter canInventory = new InventoryAdapter(1, "CanInv");
private final TankManager tankManager;
private FilteredTank liquidTank;
private final FilteredTank liquidTank;
private HygroregulatorRecipe currentRecipe;
private int transferTime;
@@ -34,7 +34,7 @@ public class TileAlvearySieve extends TileAlveary implements ICrafter, IBeeListe
public static final int SLOTS_POLLEN_COUNT = 4;
public static final int SLOT_SIEVE = 4;
InventoryAdapter inventory = new InventoryAdapter(5, "Items", 1);
private final InventoryAdapter inventory = new InventoryAdapter(5, "Items", 1);
public TileAlvearySieve() {
super(BLOCK_META);
@@ -39,7 +39,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary;
public class TileBeehouse extends TileBase implements IBeeHousing, IClimatised {
@@ -47,15 +46,16 @@ public class TileBeehouse extends TileBase implements IBeeHousing, IClimatised {
public static final int SLOT_QUEEN = 0;
public static final int SLOT_DRONE = 1;
public static final int SLOT_INVENTORY_1 = 2;
protected static int SLOT_PRODUCT_1 = 2;
protected static int SLOT_PRODUCT_COUNT = 7;
public static final int SLOT_PRODUCT_1 = 2;
public static final int SLOT_PRODUCT_COUNT = 7;
public static final int SLOT_FRAMES_1 = 9;
public static final int SLOT_FRAMES_2 = 10;
public static final int SLOT_FRAMES_3 = 11;
public static final int SLOT_INVENTORY_COUNT = 7;
public static final int SLOT_FRAMES_COUNT = 3;
// Inventory
protected InventoryAdapter inventory = new InventoryAdapter(12, "Items");
protected final InventoryAdapter inventory = new InventoryAdapter(12, "Items");
private final IBeekeepingLogic logic;
private BiomeGenBase biome;
private int displayHealthMax = 0;
@@ -18,7 +18,7 @@ import forestry.core.utils.InventoryAdapter;
public class TileSwarm extends TileEntity {
public InventoryAdapter contained = new InventoryAdapter(2, "Contained");
public final InventoryAdapter contained = new InventoryAdapter(2, "Contained");
@Override
public boolean canUpdate() {
@@ -25,7 +25,7 @@ import forestry.core.utils.DamageSourceForestry;
public class AlleleEffectAggressive extends AlleleEffectThrottled {
public static DamageSource damageSourceBeeAggressive = new DamageSourceForestry("bee.aggressive");
public static final DamageSource damageSourceBeeAggressive = new DamageSourceForestry("bee.aggressive");
public AlleleEffectAggressive(String uid) {
super(uid, "aggressive", true, 40, false, false);
@@ -25,9 +25,9 @@ import forestry.core.genetics.EffectData;
public class AlleleEffectCreeper extends AlleleEffectThrottled {
private final int explosionChance = 50;
byte defaultForce = 12;
byte indexExplosionTimer = 1;
byte indexExplosionForce = 2;
private final byte defaultForce = 12;
private final byte indexExplosionTimer = 1;
private final byte indexExplosionForce = 2;
public AlleleEffectCreeper(String uid) {
super(uid, "creeper", true, 20, false, true);
@@ -25,8 +25,8 @@ import forestry.plugins.PluginApiculture;
public class AlleleEffectIgnition extends AlleleEffectThrottled {
int ignitionChance = 50;
int fireDuration = 500;
private final int ignitionChance = 50;
private final int fireDuration = 500;
public AlleleEffectIgnition(String uid) {
super(uid, "ignition", false, 20, false, true);
@@ -24,7 +24,7 @@ import forestry.core.utils.DamageSourceForestry;
public class AlleleEffectMisanthrope extends AlleleEffectThrottled {
public static DamageSource damageSourceBeeEnd = new DamageSourceForestry("bee.end");
public static final DamageSource damageSourceBeeEnd = new DamageSourceForestry("bee.end");
public AlleleEffectMisanthrope(String uid) {
super(uid, "misanthrope", true, 20, false, false);
@@ -32,7 +32,7 @@ import forestry.core.utils.Vect;
public class AlleleEffectRadioactive extends AlleleEffectThrottled {
public static DamageSource damageSourceBeeRadioactive = new DamageSourceForestry("bee.radioactive");
public static final DamageSource damageSourceBeeRadioactive = new DamageSourceForestry("bee.radioactive");
public AlleleEffectRadioactive(String uid) {
super(uid, "radioactive", true, 40, false, true);
@@ -16,7 +16,7 @@ import forestry.core.genetics.Allele;
public class AlleleFlowers extends Allele implements IAlleleFlowers {
IFlowerProvider provider;
private final IFlowerProvider provider;
public AlleleFlowers(String uid, IFlowerProvider provider) {
this(uid, provider, false);
@@ -69,12 +69,6 @@ public class Bee extends IndividualLiving implements IBee {
this.isIrregularMating = mate.isNatural() != this.isNatural;
}
public Bee(IBeeGenome genome, IBee mate) {
this(genome);
this.mate = mate.getGenome();
this.isIrregularMating = mate.isNatural() != this.isNatural;
}
public Bee(World world, IBeeGenome genome) {
this(world, genome, true, 0);
}
@@ -204,7 +204,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
}
/* TEMPLATES */
public static ArrayList<IBee> beeTemplates = new ArrayList<IBee>();
public static final ArrayList<IBee> beeTemplates = new ArrayList<IBee>();
@Override
public ArrayList<IBee> getIndividualTemplates() {
@@ -248,7 +248,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
}
/* BREEDING MODES */
ArrayList<IBeekeepingMode> beekeepingModes = new ArrayList<IBeekeepingMode>();
final ArrayList<IBeekeepingMode> beekeepingModes = new ArrayList<IBeekeepingMode>();
public static IBeekeepingMode activeBeekeepingMode;
@Override
@@ -23,11 +23,11 @@ import forestry.api.apiculture.IBeekeepingMode;
public class BeekeepingMode implements IBeekeepingMode {
public static IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 1.0f, false, false);
public static IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 1.0f, false, true);
public static IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 1.0f, false, true);
public static IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, 0.8f, true, true);
public static IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, 0.6f, true, true);
public static final IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 1.0f, false, false);
public static final IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 1.0f, false, true);
public static final IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 1.0f, false, true);
public static final IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, 0.8f, true, true);
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, 0.6f, true, true);
final Random rand;
final String name;
@@ -23,9 +23,9 @@ import java.util.Collections;
public class HiveDrop implements IHiveDrop {
private IAllele[] template;
private ArrayList<ItemStack> additional = new ArrayList<ItemStack>();
private int chance;
private final IAllele[] template;
private final ArrayList<ItemStack> additional = new ArrayList<ItemStack>();
private final int chance;
private float ignobleShare = 0.0f;
public HiveDrop(IAllele[] template, ItemStack[] bonus, int chance) {
@@ -24,9 +24,9 @@ import forestry.core.utils.Vect;
public class MutationEMC extends MutationReqRes {
int emcRequired = 0;
Class<?> condenserClass;
Field emcField;
private final int emcRequired;
private final Class<?> condenserClass;
private final Field emcField;
public MutationEMC(IAllele allele0, IAllele allele1, IAllele[] template, int chance, ItemStack blockRequired, Class<?> condenserClass, Field emcField,
int emcRequired) {
@@ -19,12 +19,12 @@ import forestry.api.genetics.IGenome;
public class MutationTimeLimited extends BeeMutation {
/**
* Fed up with Date and Calendar and their shinenigans
* Fed up with Date and Calendar and their shenanigans
*/
public static class DayMonth {
public int day;
public int month;
public final int day;
public final int month;
public DayMonth() {
this.day = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
@@ -93,8 +93,9 @@ public class MutationTimeLimited extends BeeMutation {
return day + "." + month;
}
}
DayMonth start;
DayMonth end;
private final DayMonth start;
private final DayMonth end;
public MutationTimeLimited(IAllele allele0, IAllele allele1, IAllele[] template, int chance, DayMonth start) {
this(allele0, allele1, template, chance, start, null);
@@ -113,7 +114,7 @@ public class MutationTimeLimited extends BeeMutation {
if (chance == 0)
return 0;
if (start == null && end == null)
if (start == null)
return chance;
DayMonth now = new DayMonth();
@@ -22,7 +22,7 @@ import forestry.core.gui.slots.SlotCustom;
public class ContainerAlveary extends ContainerForestry {
private TileAlvearyPlain tile;
private final TileAlvearyPlain tile;
public ContainerAlveary(InventoryPlayer player, TileAlvearyPlain tile) {
super(tile);
@@ -31,10 +31,10 @@ public class ContainerAlveary extends ContainerForestry {
tile.sendNetworkUpdate();
// Queen/Princess
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_QUEEN, 29, 39, new Object[] { ForestryItem.beePrincessGE, ForestryItem.beeQueenGE }));
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));
// Drone
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_DRONE, 29, 65, new Object[] { ForestryItem.beeDroneGE }));
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_DRONE, 29, 65, ForestryItem.beeDroneGE));
// Product Inventory
this.addSlot(new SlotClosed(tile, 2, 116, 52));
@@ -62,8 +62,8 @@ public class ContainerAlveary extends ContainerForestry {
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++)
tile.sendGUINetworkData(this, (ICrafting) crafters.get(i));
for (Object crafter : crafters)
tile.sendGUINetworkData(this, (ICrafting) crafter);
}
}
@@ -10,17 +10,15 @@
******************************************************************************/
package forestry.apiculture.gui;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import forestry.apiculture.gadgets.TileAlvearyHygroregulator;
import forestry.core.gui.ContainerLiquidTanks;
import forestry.core.gui.slots.SlotLiquidContainer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
public class ContainerAlvearyHygroregulator extends ContainerLiquidTanks {
TileAlvearyHygroregulator tile;
private final TileAlvearyHygroregulator tile;
public ContainerAlvearyHygroregulator(IInventory inventory, TileAlvearyHygroregulator tile) {
super(inventory, tile);
@@ -22,7 +22,7 @@ import forestry.core.gui.slots.SlotCustom;
public class ContainerAlvearySieve extends ContainerForestry {
TileAlvearySieve tile;
private final TileAlvearySieve tile;
public ContainerAlvearySieve(InventoryPlayer player, TileAlvearySieve tile) {
super(tile.getInternalInventory());
@@ -30,10 +30,10 @@ public class ContainerAlvearySieve extends ContainerForestry {
this.tile = tile;
IInventory inventory = tile.getInternalInventory();
addSlot(new SlotCustom(inventory, 0, 94, 52, new Object[0]).setCrafter(tile));
addSlot(new SlotCustom(inventory, 1, 115, 39, new Object[0]).setCrafter(tile));
addSlot(new SlotCustom(inventory, 2, 73, 39, new Object[0]).setCrafter(tile));
addSlot(new SlotCustom(inventory, 3, 94, 26, new Object[0]).setCrafter(tile));
addSlot(new SlotCustom(inventory, 0, 94, 52).setCrafter(tile));
addSlot(new SlotCustom(inventory, 1, 115, 39).setCrafter(tile));
addSlot(new SlotCustom(inventory, 2, 73, 39).setCrafter(tile));
addSlot(new SlotCustom(inventory, 3, 94, 26).setCrafter(tile));
addSlot(new SlotCustom(inventory, TileAlvearySieve.SLOT_SIEVE, 43, 39, ForestryItem.craftingMaterial.getItemStack(1, 3)).setCrafter(tile));
@@ -77,8 +77,8 @@ public class ContainerApiary extends ContainerForestry {
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
tile.sendGUINetworkData(this, (ICrafting) crafters.get(i));
for (Object crafter : crafters) {
tile.sendGUINetworkData(this, (ICrafting) crafter);
}
}
@@ -24,7 +24,7 @@ import forestry.core.proxy.Proxies;
public class ContainerHabitatLocator extends ContainerItemInventory {
public BiomefinderInventory inventory;
public final BiomefinderInventory inventory;
public ContainerHabitatLocator(InventoryPlayer inventoryplayer, BiomefinderInventory inventory) {
super(inventory, inventoryplayer.player);
@@ -32,12 +32,12 @@ public class ContainerHabitatLocator extends ContainerItemInventory {
this.inventory = inventory;
// Energy
this.addSlot(new SlotCustom(inventory, 2, 152, 8, new Object[] { ForestryItem.honeydew, ForestryItem.honeyDrop }));
this.addSlot(new SlotCustom(inventory, 2, 152, 8, ForestryItem.honeydew, ForestryItem.honeyDrop));
// Bee to analyze
this.addSlot(new SlotCustom(inventory, 0, 152, 32, new Object[] { ItemBeeGE.class }));
this.addSlot(new SlotCustom(inventory, 0, 152, 32, ItemBeeGE.class));
// Analyzed bee
this.addSlot(new SlotCustom(inventory, 1, 152, 75, new Object[] { ItemBeeGE.class }));
this.addSlot(new SlotCustom(inventory, 1, 152, 75, ItemBeeGE.class));
// Player inventory
for (int i1 = 0; i1 < 3; i1++)
@@ -28,17 +28,17 @@ import forestry.core.proxy.Proxies;
public class ContainerImprinter extends ContainerForestry implements IGuiSelectable {
public ImprinterInventory inventory;
private boolean isNetSynched = false;
public final ImprinterInventory inventory;
private boolean isNetSynced = false;
public ContainerImprinter(InventoryPlayer inventoryplayer, ImprinterInventory inventory) {
super(inventory);
this.inventory = inventory;
// Input
this.addSlot(new SlotCustom(inventory, 0, 152, 12, new Object[] { ItemBeeGE.class }));
this.addSlot(new SlotCustom(inventory, 0, 152, 12, ItemBeeGE.class));
// Output
this.addSlot(new SlotCustom(inventory, 1, 152, 72, new Object[] { ItemBeeGE.class }));
this.addSlot(new SlotCustom(inventory, 1, 152, 72, ItemBeeGE.class));
// Player inventory
for (int i1 = 0; i1 < 3; i1++)
@@ -84,7 +84,7 @@ public class ContainerImprinter extends ContainerForestry implements IGuiSelecta
private void sendSelectionChange(PacketPayload payload) {
PacketUpdate packet = new PacketUpdate(PacketIds.GUI_SELECTION_CHANGE, payload);
Proxies.net.sendToServer(packet);
isNetSynched = false;
isNetSynced = false;
}
@Override
@@ -94,8 +94,8 @@ public class ContainerImprinter extends ContainerForestry implements IGuiSelecta
}
public void updateContainer(World world) {
if (!isNetSynched && !Proxies.common.isSimulating(world)) {
isNetSynched = true;
if (!isNetSynced && !Proxies.common.isSimulating(world)) {
isNetSynced = true;
Proxies.net.sendToServer(new PacketUpdate(PacketIds.IMPRINT_SELECTION_GET));
}
}
@@ -140,7 +140,7 @@ public class GuiBeealyzer extends GuiAlyzer {
.getArea().toString(), bee, EnumBeeChromosome.TERRITORY);
drawRow(StringUtil.localize("gui.effect"), bee.getGenome().getEffect().getName(),
((IAlleleBeeEffect) bee.getGenome().getInactiveAllele(EnumBeeChromosome.EFFECT.ordinal())).getName(), bee,
bee.getGenome().getInactiveAllele(EnumBeeChromosome.EFFECT.ordinal()).getName(), bee,
EnumBeeChromosome.EFFECT);
newLine();
@@ -39,7 +39,7 @@ import java.util.List;
public class ItemBeeGE extends ItemGE {
EnumBeeType type;
private final EnumBeeType type;
public ItemBeeGE(EnumBeeType type) {
super();
@@ -141,7 +141,7 @@ public class ItemBeeGE extends ItemGE {
public int getColourFromSpecies(IAlleleSpecies species, int renderPass) {
if (species != null && species instanceof IAlleleBeeSpecies)
return ((IAlleleBeeSpecies) species).getIconColour(renderPass);
return species.getIconColour(renderPass);
else
return 0xffffff;
@@ -27,9 +27,9 @@ public class ItemHoneycomb extends ItemForestryMultiPass {
private static class CombInfo {
public String name;
public int primaryColor;
public int secondaryColor;
public final String name;
public final int primaryColor;
public final int secondaryColor;
public boolean isSecret = false;
public CombInfo(String name, int primaryColor, int secondaryColor) {
@@ -43,7 +43,8 @@ public class ItemHoneycomb extends ItemForestryMultiPass {
return this;
}
}
public CombInfo[] combs = new CombInfo[]{new CombInfo("honey", 0xe8d56a, 0xffa12b), // 0
public final CombInfo[] combs = new CombInfo[]{
new CombInfo("honey", 0xe8d56a, 0xffa12b), // 0
new CombInfo("cocoa", 0x674016, 0xffb62b).setIsSecret(), // 1
new CombInfo("simmering", 0x981919, 0xffb62b), // 2
new CombInfo("stringy", 0xc8be67, 0xbda93e), // 3
@@ -37,7 +37,7 @@ public class ItemImprinter extends ItemForestry {
private int primaryIndex = 0;
private int secondaryIndex = 0;
EntityPlayer player;
private final EntityPlayer player;
public ImprinterInventory(EntityPlayer player) {
this.player = player;
@@ -22,18 +22,18 @@ import forestry.api.apiculture.EnumBeeType;
public class ModelBee extends ModelBase {
//fields
ModelRenderer snout;
ModelRenderer torsoWing;
ModelRenderer rump;
ModelRenderer tail;
ModelRenderer tailEnd;
ModelRenderer bridge;
ModelRenderer eyeRight;
ModelRenderer eyeLeft;
ModelRenderer wingLeft;
ModelRenderer wingRight;
ModelRenderer crownQueen;
ModelRenderer crownPrincess;
private final ModelRenderer snout;
private final ModelRenderer torsoWing;
private final ModelRenderer rump;
private final ModelRenderer tail;
private final ModelRenderer tailEnd;
private final ModelRenderer bridge;
private final ModelRenderer eyeRight;
private final ModelRenderer eyeLeft;
private final ModelRenderer wingLeft;
private final ModelRenderer wingRight;
private final ModelRenderer crownQueen;
private final ModelRenderer crownPrincess;
EnumBeeType type = EnumBeeType.DRONE;
@@ -18,7 +18,7 @@ import forestry.apiculture.entities.EntityBee;
public class RenderBee extends RenderLiving {
ModelBee beeModel;
private final ModelBee beeModel;
public RenderBee() {
super(new ModelBee(), 0.15f);
@@ -42,7 +42,7 @@ public class TextureBiomefinder extends TextureAtlasSprite {
if (minecraft.theWorld != null && minecraft.thePlayer != null)
updateCompass(minecraft.theWorld, minecraft.thePlayer.posX, minecraft.thePlayer.posZ, minecraft.thePlayer.rotationYaw, false, true);
else
updateCompass((World)null, 0.0d, 0.0d, 0.0d, true, true);
updateCompass(null, 0.0d, 0.0d, 0.0d, true, true);
}
public void updateCompass(World world, double playerX, double playerZ, double playerYaw, boolean par8, boolean hasSpin) {
@@ -45,7 +45,7 @@ import forestry.plugins.PluginApiculture;
public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
protected ItemStack[] buildingBlocks = new ItemStack[]{ForestryBlock.planks1.getItemStack(1, 15), new ItemStack(Blocks.log, 1, 0),};
protected final ItemStack[] buildingBlocks = new ItemStack[]{ForestryBlock.planks1.getItemStack(1, 15), new ItemStack(Blocks.log, 1, 0),};
protected int averageGroundLevel = -1;
protected boolean isInDesert = false;
protected boolean hasChest = false;
@@ -45,7 +45,7 @@ import forestry.plugins.PluginArboriculture;
public class CommandTreekeepingMode extends CommandMC {
String[] modeStrings;
private final String[] modeStrings;
public CommandTreekeepingMode() {
modeStrings = new String[PluginArboriculture.treeInterface.getTreekeepingModes().size()];
@@ -43,7 +43,7 @@ public class PacketHandlerArboriculture implements IPacketHandler {
private void onLeafUpdate(PacketLeafUpdate packet) {
TileEntity tile = ((ILocatedPacket) packet).getTarget(Proxies.common.getRenderWorld());
TileEntity tile = packet.getTarget(Proxies.common.getRenderWorld());
if (tile instanceof TileLeaves)
((TileLeaves) tile).fromPacket(packet);
@@ -1,36 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture;
import forestry.api.arboriculture.ITree;
import forestry.api.genetics.IIndividual;
import forestry.api.world.IWorldGenInterface;
import forestry.plugins.PluginArboriculture;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.ArrayList;
import java.util.Collections;
public class WorldGenHelper implements IWorldGenInterface {
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public Class<? extends WorldGenerator>[] getTreeGenerators(String ident) {
ArrayList<Class<? extends WorldGenerator>> generators = new ArrayList<Class<? extends WorldGenerator>>();
for (IIndividual tree : PluginArboriculture.treeInterface.getIndividualTemplates())
if (tree.getIdent().equals(ident))
Collections.addAll(generators, ((ITree) tree).getGenome().getPrimary().getGeneratorClasses());
return generators.toArray(new Class[generators.size()]);
}
}
@@ -19,7 +19,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockFireproofLog extends BlockLog implements IWoodFireproof {
public static Material fireproofWood = new Material(MapColor.woodColor);
private static final Material fireproofWood = new Material(MapColor.woodColor);
public BlockFireproofLog(LogCat cat) {
super(cat, fireproofWood);
@@ -19,7 +19,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockFireproofPlanks extends BlockPlanks implements IWoodFireproof {
public static Material fireproofWood = new Material(MapColor.woodColor);
private static final Material fireproofWood = new Material(MapColor.woodColor);
public BlockFireproofPlanks(PlankCat cat) {
super(cat, fireproofWood);
@@ -16,7 +16,7 @@ import forestry.core.genetics.Allele;
public class AlleleFruit extends Allele implements IAlleleFruit {
private IFruitProvider provider;
private final IFruitProvider provider;
public AlleleFruit(String uid, IFruitProvider provider) {
this(uid, provider, false);
@@ -16,7 +16,7 @@ import forestry.core.genetics.Allele;
public class AlleleGrowth extends Allele implements IAlleleGrowth {
IGrowthProvider provider;
private final IGrowthProvider provider;
public AlleleGrowth(String uid, IGrowthProvider provider) {
this(uid, provider, false);
@@ -21,7 +21,7 @@ import forestry.core.utils.Vect;
public class AlleleLeafEffectNone extends Allele implements IAlleleLeafEffect {
int[] DEFAULT_EFFECT_AREA = new int[] { 12, 12, 12 };
private static final int[] DEFAULT_EFFECT_AREA = new int[] { 12, 12, 12 };
public AlleleLeafEffectNone(String uid) {
super(uid, true);
@@ -60,7 +60,7 @@ public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeci
}
}
private static HashMap<String, LeafType> leafTypes = new HashMap<String, LeafType>();
private static final HashMap<String, LeafType> leafTypes = new HashMap<String, LeafType>();
static {
leafTypes.put("deciduous", new LeafType("deciduous", (short) 10, (short) 11, (short) 12));
leafTypes.put("conifers", new LeafType("conifers", (short) 15, (short) 16, (short) 17));
@@ -175,7 +175,7 @@ public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeci
@SuppressWarnings("rawtypes")
public WorldGenerator getGenerator(ITree tree, World world, int x, int y, int z) {
try {
return generatorClass.getConstructor(new Class[] { ITreeGenData.class }).newInstance(new Object[] { tree });
return generatorClass.getConstructor(new Class[] { ITreeGenData.class }).newInstance(tree);
} catch (Exception ex) {
throw new RuntimeException("Failed to instantiate generator of class " + generatorClass.getName());
}
@@ -226,7 +226,7 @@ public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeci
}
@SideOnly(Side.CLIENT)
IIcon icon;
private IIcon icon;
@Override
@SideOnly(Side.CLIENT)
@@ -60,16 +60,20 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
public static final String UID = "rootTrees";
public static int treeSpeciesCount = -1;
public static ITreekeepingMode activeTreekeepingMode;
public static final ArrayList<ITree> treeTemplates = new ArrayList<ITree>();
private final ArrayList<ITreekeepingMode> treekeepingModes = new ArrayList<ITreekeepingMode>();
public TreeHelper() {
setResearchSuitability(new ItemStack(Blocks.sapling, 1, Defaults.WILDCARD), 1.0f);
}
@Override
public String getUID() {
return UID;
}
public TreeHelper() {
setResearchSuitability(new ItemStack(Blocks.sapling, 1, Defaults.WILDCARD), 1.0f);
}
@Override
public Class<? extends IIndividual> getMemberClass() {
return ITree.class;
@@ -290,8 +294,6 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
}
/* BREEDING MODES */
ArrayList<ITreekeepingMode> treekeepingModes = new ArrayList<ITreekeepingMode>();
public static ITreekeepingMode activeTreekeepingMode;
@Override
public ArrayList<ITreekeepingMode> getTreekeepingModes() {
@@ -337,7 +339,6 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
}
/* TEMPLATES */
public static ArrayList<ITree> treeTemplates = new ArrayList<ITree>();
@Override
public ArrayList<ITree> getIndividualTemplates() {
@@ -356,7 +357,7 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
}
/* MUTATIONS */
private static ArrayList<ITreeMutation> treeMutations = new ArrayList<ITreeMutation>();
private static final ArrayList<ITreeMutation> treeMutations = new ArrayList<ITreeMutation>();
@Override
public ArrayList<ITreeMutation> getMutations(boolean shuffle) {
@@ -24,7 +24,7 @@ import forestry.plugins.PluginArboriculture;
public class TreeMutation extends Mutation implements ITreeMutation {
private ITreeRoot root;
private final ITreeRoot root;
public TreeMutation(IAllele allele0, IAllele allele1, IAllele[] template, int chance) {
super(allele0, allele1, template, chance);
@@ -12,28 +12,25 @@ package forestry.arboriculture.genetics;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Random;
import forestry.api.arboriculture.ITreeGenome;
import forestry.api.arboriculture.ITreekeepingMode;
public class TreekeepingMode implements ITreekeepingMode {
public static ITreekeepingMode easy = new TreekeepingMode("EASY", 1.4f, 1.3f, 1.2f, 1.2f);
public static ITreekeepingMode normal = new TreekeepingMode("NORMAL", 1f, 1f, 1f, 1f);
public static ITreekeepingMode hard = new TreekeepingMode("HARD", 0.9f, 0.9f, 0.9f, 0.9f);
public static ITreekeepingMode hardcore = new TreekeepingMode("HARDCORE", 0.7f, 0.7f, 0.5f, 0.5f);
public static ITreekeepingMode insane = new TreekeepingMode("INSANE", 0.5f, 0.5f, 0.2f, 0.1f);
public static final ITreekeepingMode easy = new TreekeepingMode("EASY", 1.4f, 1.3f, 1.2f, 1.2f);
public static final ITreekeepingMode normal = new TreekeepingMode("NORMAL", 1f, 1f, 1f, 1f);
public static final ITreekeepingMode hard = new TreekeepingMode("HARD", 0.9f, 0.9f, 0.9f, 0.9f);
public static final ITreekeepingMode hardcore = new TreekeepingMode("HARDCORE", 0.7f, 0.7f, 0.5f, 0.5f);
public static final ITreekeepingMode insane = new TreekeepingMode("INSANE", 0.5f, 0.5f, 0.2f, 0.1f);
final Random rand;
final String name;
private float yieldModifier;
private float sappinessModifier;
private float maturationModifier;
private float mutationModifier;
private final String name;
private final float yieldModifier;
private final float sappinessModifier;
private final float maturationModifier;
private final float mutationModifier;
public TreekeepingMode(String name, float yieldModifier, float sappinessModifier, float maturationModifier, float mutationModifier) {
this.rand = new Random();
this.name = name;
this.yieldModifier = yieldModifier;
this.sappinessModifier = sappinessModifier;
@@ -17,7 +17,6 @@ import forestry.api.arboriculture.IAlleleGrowth;
import forestry.api.arboriculture.ITree;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleEffect;
import forestry.api.genetics.IAlleleFloat;
import forestry.api.genetics.IAlleleInteger;
import forestry.api.genetics.IFruitFamily;
@@ -42,8 +41,6 @@ import java.util.Locale;
public class GuiTreealyzer extends GuiAlyzer {
private ItemStack[] tempProductList;
public GuiTreealyzer(EntityPlayer player, TreealyzerInventory inventory) {
super(AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees"), player,
new ContainerTreealyzer(player.inventory, inventory), inventory, 1, inventory.getSizeInventory());
@@ -189,7 +186,7 @@ public class GuiTreealyzer extends GuiAlyzer {
newLine();
drawRow(StringUtil.localize("gui.effect"), tree.getGenome().getEffect().getName(),
((IAlleleEffect) tree.getGenome().getInactiveAllele(EnumTreeChromosome.EFFECT.ordinal())).getName(), tree,
tree.getGenome().getInactiveAllele(EnumTreeChromosome.EFFECT.ordinal()).getName(), tree,
EnumTreeChromosome.EFFECT);
newLine();
@@ -299,15 +296,13 @@ public class GuiTreealyzer extends GuiAlyzer {
private void drawAnalyticsPage3(ITree tree) {
tempProductList = tree.getProduceList();
startPage(COLUMN_0, COLUMN_1, COLUMN_2);
drawLine(StringUtil.localize("gui.beealyzer.produce") + ":", COLUMN_0);
newLine();
int x = COLUMN_0;
for (ItemStack stack : tempProductList) {
for (ItemStack stack : tree.getProduceList()) {
itemRender.renderItemIntoGUI(fontRendererObj, mc.renderEngine, stack, (int) ((guiLeft + x) * (1 / factor)),
(int) ((guiTop + getLineY()) * (1 / factor)));
x += 18;
@@ -52,10 +52,8 @@ public class LeavesRenderingHandler extends OverlayRenderingHandler implements I
// Render overlay for fruit leaves.
IIcon fruitIcon = null;
int fruitColor = 0xffffff;
if (tile != null) {
fruitIcon = tile.getFruitTexture();
fruitColor = tile.getFruitColour();
}
fruitIcon = tile.getFruitTexture();
fruitColor = tile.getFruitColour();
if (fruitIcon != null)
renderFruitOverlay(world, block, x, y, z, renderer, fruitIcon, fruitColor);
@@ -20,7 +20,7 @@ import forestry.core.worldgen.BlockType;
public class BlockTypeLeaf extends BlockType {
private GameProfile owner;
private final GameProfile owner;
public BlockTypeLeaf(GameProfile owner) {
super(ForestryBlock.leaves, 0);
@@ -24,11 +24,17 @@ import forestry.core.worldgen.WorldGenBase;
public abstract class WorldGenArboriculture extends WorldGenBase {
private static final BlockType vine = new BlockType(Blocks.vine, 0);
private static final BlockType air = new BlockTypeVoid();
protected final ITreeGenData tree;
protected int startX;
protected int startY;
protected int startZ;
protected BlockType leaf;
protected BlockType wood;
protected boolean spawnPods = false;
protected int minPodHeight = 3;
@@ -74,11 +80,6 @@ public abstract class WorldGenArboriculture extends WorldGenBase {
public abstract BlockType getWood();
BlockType leaf;
BlockType wood;
BlockType vine = new BlockType(Blocks.vine, 0);
BlockType air = new BlockTypeVoid();
public final Vect getStartVector() {
return new Vect(startX, startY, startZ);
}
@@ -26,17 +26,18 @@ import forestry.core.proxy.Proxies;
import forestry.core.utils.Utils;
public class TickHandlerCoreClient {
private static final ConcurrentLinkedQueue<String> messages = new ConcurrentLinkedQueue<String>();
private boolean naggedVersion, naggedVerify;
private boolean hasNaturalistView;
public TickHandlerCoreClient() {
FMLCommonHandler.instance().bus().register(this);
}
private static ConcurrentLinkedQueue<String> messages = new ConcurrentLinkedQueue<String>();
public void queueChatMessage(String message) {
messages.add(message);
}
private boolean naggedVersion, naggedVerify;
private boolean hasNaturalistView;
@SubscribeEvent
public void onPlayerTick(PlayerTickEvent event) {
@@ -18,9 +18,9 @@ import forestry.core.utils.StringUtil;
public abstract class Circuit implements ICircuit {
String uid;
int limit = 1;
boolean requiresDiscovery;
private final String uid;
private final boolean requiresDiscovery;
private int limit = 1;
public Circuit(String uid, boolean requiresDiscovery) {
this.uid = uid;
@@ -15,7 +15,7 @@ import forestry.core.utils.StringUtil;
public class CircuitLayout implements ICircuitLayout {
String uid;
private final String uid;
public CircuitLayout(String uid) {
this.uid = uid;
@@ -26,9 +26,9 @@ import forestry.core.config.ForestryItem;
public class CircuitRegistry implements ICircuitRegistry {
private LinkedHashMap<String, ICircuitLayout> layoutMap = new LinkedHashMap<String, ICircuitLayout>();
private LinkedHashMap<String, ICircuit> circuitMap = new LinkedHashMap<String, ICircuit>();
private HashMap<Integer, String> legacyMap = new HashMap<Integer, String>();
private final LinkedHashMap<String, ICircuitLayout> layoutMap = new LinkedHashMap<String, ICircuitLayout>();
private final LinkedHashMap<String, ICircuit> circuitMap = new LinkedHashMap<String, ICircuit>();
private final HashMap<Integer, String> legacyMap = new HashMap<Integer, String>();
@Override
public ICircuitLibrary getCircuitLibrary(World world, String playername) {
@@ -35,10 +35,10 @@ public class ContainerSolderingIron extends ContainerItemInventory implements IG
this.inventory = inventory;
// Input
this.addSlot(new SlotCustom(inventory, 0, 152, 12, new Object[] { ItemCircuitBoard.class }));
this.addSlot(new SlotCustom(inventory, 0, 152, 12, ItemCircuitBoard.class));
// Output
this.addSlot(new SlotCustom(inventory, 1, 152, 92, new Object[] { ItemCircuitBoard.class }));
this.addSlot(new SlotCustom(inventory, 1, 152, 92, ItemCircuitBoard.class));
// Ingredients
this.addSlot(new Slot(inventory, 2, 12, 32));
@@ -35,9 +35,9 @@ import forestry.core.utils.ItemInventory;
public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
public static class CircuitRecipe {
ICircuitLayout layout;
ItemStack resource;
ICircuit circuit;
private final ICircuitLayout layout;
private final ItemStack resource;
public final ICircuit circuit;
public CircuitRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit) {
this.resource = resource;
@@ -54,7 +54,7 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
}
public static class SolderManager implements ISolderManager {
public static ArrayList<CircuitRecipe> recipes = new ArrayList<CircuitRecipe>();
public static final ArrayList<CircuitRecipe> recipes = new ArrayList<CircuitRecipe>();
@Override
public void addRecipe(ICircuitLayout layout, ItemStack resource, ICircuit circuit) {
@@ -82,12 +82,12 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
// / INVENTORY MANAGMENT
public static class SolderingInventory extends ItemInventory implements IErrorSource {
ICircuitLayout layout;
EnumErrorCode errorState;
private ICircuitLayout layout;
private EnumErrorCode errorState;
short blankSlot = 0;
short finishedSlot = 1;
short ingredientSlot1 = 2;
private final short blankSlot = 0;
private final short finishedSlot = 1;
private final short ingredientSlot1 = 2;
public SolderingInventory() {
super(ItemSolderingIron.class, 6);
@@ -27,7 +27,7 @@ public abstract class SubCommand implements IForestryCommand {
public enum PermLevel {
EVERYONE(0), ADMIN(2);
int permLevel;
public final int permLevel;
private PermLevel(int permLevel) {
this.permLevel = permLevel;
@@ -32,7 +32,7 @@ public class Config {
public static String gameMode;
public static HashSet<String> disabledStructures = new HashSet<String>();
public static final HashSet<String> disabledStructures = new HashSet<String>();
public static boolean isDebug = false;
@@ -80,7 +80,7 @@ public class Config {
}
public static boolean craftingStampsEnabled = true;
public static ArrayList<String> collectorStamps = new ArrayList<String>();
public static final ArrayList<String> collectorStamps = new ArrayList<String>();
public static boolean applePickup = true;
public static boolean squareFarms = false;
@@ -90,7 +90,7 @@ public class Config {
// Hints
public static boolean disableHints = false;
public static HashMap<String, String[]> hints = new HashMap<String, String[]>();
public static final HashMap<String, String[]> hints = new HashMap<String, String[]>();
public static boolean disableEnergyStat = false;
public static void load() {
@@ -27,9 +27,9 @@ import java.util.TreeMap;
public class Configuration {
private String newLine;
private ArrayList<String> purge = new ArrayList<String>();
private TreeMap<String, ArrayList<Property>> categorized = new TreeMap<String, ArrayList<Property>>();
private final String newLine;
private final ArrayList<String> purge = new ArrayList<String>();
private final TreeMap<String, ArrayList<Property>> categorized = new TreeMap<String, ArrayList<Property>>();
public Configuration() {
newLine = System.getProperty("line.separator");
@@ -216,7 +216,6 @@ public enum ForestryItem {
cratedMulch,
cratedSilver,
cratedBrass,
cratedNikolite,
cratedCookies,
cratedHoneycombs,
cratedBeeswax,
@@ -14,7 +14,7 @@ import java.util.HashMap;
public class SessionVars {
private static HashMap<String, String> stringVars = new HashMap<String, String>();
private static final HashMap<String, String> stringVars = new HashMap<String, String>();
private static Class<?> openedLedger;
@@ -89,19 +89,19 @@ public class Version {
public static String retrieveRemoteString(String location, String defaultValue) {
try {
HttpURLConnection conn = null;
while (location != null && !location.isEmpty()) {
HttpURLConnection conn;
do {
URL url = new URL(location);
conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("User-Agent",
"Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)");
conn.connect();
location = conn.getHeaderField("Location");
}
} while (location != null && !location.isEmpty());
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = null;
String line;
if ((line = reader.readLine()) != null)
return line;
@@ -174,17 +174,16 @@ public class Version {
public static String[] grabChangelog(String version) {
try {
String location = REMOTE_CHANGELOG_ROOT + version;
HttpURLConnection conn = null;
while (location != null && !location.isEmpty()) {
do {
URL url = new URL(location);
conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("User-Agent",
"Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)");
conn.connect();
location = conn.getHeaderField("Location");
}
} while (location != null && !location.isEmpty());
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
@@ -167,7 +167,7 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
fluidAmount = fluidStack.amount;
}
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidId);
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidId);
PacketGuiInteger packet = new PacketGuiInteger(container.windowId, tankIndex * NETWORK_DATA + 1, fluidAmount);
Proxies.net.sendToPlayer(packet, (EntityPlayerMP)player);
}
@@ -192,12 +192,12 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
fluidId = fluidStack.fluidID;
fluidAmount = fluidStack.amount;
}
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidId);
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidId);
PacketGuiInteger packet = new PacketGuiInteger(container.windowId, tankIndex * NETWORK_DATA + 1, fluidAmount);
Proxies.net.sendToPlayer(packet, player);
} else if (fluidStack != null && prev != null) {
if (fluidStack.getFluid() != prev.getFluid())
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidStack.fluidID);
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidStack.fluidID);
if (fluidStack.amount != prev.amount) {
PacketGuiInteger packet = new PacketGuiInteger(container.windowId, tankIndex * NETWORK_DATA + 1, fluidStack.amount);
Proxies.net.sendToPlayer(packet, player);
@@ -78,8 +78,7 @@ public class FilteredTank extends StandardTank {
if (rarity == null)
rarity = EnumRarity.common;
FluidStack filterFluidStack = FluidRegistry.getFluidStack(filter.getName(), 0);
ToolTipLine name = new ToolTipLine(filter.getLocalizedName(filterFluidStack), rarity.rarityColor);
name.setSpacing(2);
ToolTipLine name = new ToolTipLine(filter.getLocalizedName(filterFluidStack), rarity.rarityColor, 2);
toolTip.add(name);
if (getFluid() != null)
amount = getFluid().amount;
@@ -154,8 +154,7 @@ public class StandardTank extends FluidTank {
EnumRarity rarity = fluidType.getRarity();
if (rarity == null)
rarity = EnumRarity.common;
ToolTipLine fluidName = new ToolTipLine(fluidType.getLocalizedName(getFluid()), rarity.rarityColor);
fluidName.setSpacing(2);
ToolTipLine fluidName = new ToolTipLine(fluidType.getLocalizedName(getFluid()), rarity.rarityColor, 2);
toolTip.add(fluidName);
amount = getFluid().amount;
}
@@ -28,13 +28,9 @@ import forestry.core.utils.Utils;
public abstract class BlockForestry extends BlockContainer {
protected static boolean keepInventory = false;
protected Random furnaceRand;
public BlockForestry(Material material) {
super(material);
setHardness(1.5f);
furnaceRand = new Random();
setCreativeTab(CreativeTabForestry.tabForestry);
}
@@ -25,10 +25,10 @@ import forestry.core.utils.Vect;
public abstract class StructureLogic implements IStructureLogic {
protected ITileStructure structure;
protected TileEntity structureTile;
protected final ITileStructure structure;
protected final TileEntity structureTile;
protected String uid;
protected final String uid;
protected Schemata[] schematas;
protected short activeSchemata = -1;
protected boolean isRotated = false;
@@ -62,7 +62,7 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
private int analyzeTime;
@EntityNetData
public FilteredTank resourceTank;
public final FilteredTank resourceTank;
private final TankManager tankManager;
@@ -29,7 +29,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
@Optional.Interface(iface = "buildcraft.api.tiles.IHasWork", modid = "BuildCraftAPI|tiles")
public abstract class TilePowered extends TileBase implements IRenderableMachine, IPowerHandler, IHasWork {
public static int WORK_CYCLES = 4;
public static final int WORK_CYCLES = 4;
@Override
public PacketPayload getPacketPayload() {
@@ -23,8 +23,8 @@ import forestry.core.utils.StringUtil;
public class Allele implements IAllele {
protected String uid;
boolean isDominant;
protected final String uid;
protected final boolean isDominant;
protected String name;
public Allele(String uid, boolean isDominant) {
@@ -16,7 +16,7 @@ import forestry.core.utils.Vect;
public class AlleleArea extends Allele implements IAlleleArea {
private int[] area;
private final int[] area;
public AlleleArea(String uid, int[] value) {
this(uid, value, false);
@@ -14,8 +14,7 @@ import forestry.api.genetics.IAlleleBoolean;
public class AlleleBoolean extends Allele implements IAlleleBoolean {
boolean value;
boolean isDominant;
final boolean value;
public AlleleBoolean(String uid, boolean value) {
this(uid, value, false);
@@ -15,7 +15,7 @@ import forestry.core.utils.StringUtil;
public class AlleleFloat extends Allele implements IAlleleFloat {
float value;
private final float value;
public AlleleFloat(String uid, float value) {
this(uid, value, false);
@@ -15,7 +15,7 @@ import forestry.core.utils.StringUtil;
public class AlleleInteger extends Allele implements IAlleleInteger {
int value;
private final int value;
public AlleleInteger(String uid, int value) {
this(uid, value, false);
@@ -18,7 +18,7 @@ import forestry.api.genetics.IAllelePlantType;
public class AllelePlantType extends Allele implements IAllelePlantType {
private EnumSet<EnumPlantType> types;
private final EnumSet<EnumPlantType> types;
protected AllelePlantType(String uid, EnumPlantType type) {
this(uid, type, false);
@@ -38,7 +38,7 @@ import forestry.core.genetics.ItemResearchNote.EnumNoteType;
public class AlleleRegistry implements IAlleleRegistry, ILegacyHandler {
public static final int ALLELE_ARRAY_SIZE = 2048;
private static final int ALLELE_ARRAY_SIZE = 2048;
/* SPECIES ROOT */
private final LinkedHashMap<String, ISpeciesRoot> rootMap = new LinkedHashMap<String, ISpeciesRoot>(16);
@@ -16,7 +16,7 @@ import forestry.core.utils.StringUtil;
public class AlleleTolerance extends Allele implements IAlleleTolerance {
EnumTolerance value;
private final EnumTolerance value;
public AlleleTolerance(String uid, EnumTolerance value) {
this(uid, value, false);
@@ -36,7 +36,7 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
private ArrayList<String> discoveredMutations = new ArrayList<String>();
private String modeName;
GameProfile username;
private final GameProfile username;
public BreedingTracker(String s, GameProfile username) {
super(s);
@@ -20,14 +20,14 @@ import forestry.core.utils.StringUtil;
public class Classification implements IClassification {
private EnumClassLevel level;
private String uid;
private String scientific;
private final EnumClassLevel level;
private final String uid;
private final String scientific;
private IClassification parent;
private ArrayList<IAlleleSpecies> members = new ArrayList<IAlleleSpecies>();
private ArrayList<IClassification> groups = new ArrayList<IClassification>();
private final ArrayList<IAlleleSpecies> members = new ArrayList<IAlleleSpecies>();
private final ArrayList<IClassification> groups = new ArrayList<IClassification>();
public Classification(EnumClassLevel level, String uid, String scientific) {
this.level = level;
@@ -149,16 +149,15 @@ public abstract class Genome implements IGenome {
for (int i = 0; i < chromosomes.length; i++) {
IChromosome chromosome = chromosomes[i];
if (chromosome == null && genetics[i] != null)
return false;
if (chromosome != null && genetics[i] == null)
return false;
if (chromosome == null && genetics[i] == null)
IChromosome otherChromosome = genetics[i];
if (chromosome == null && otherChromosome == null)
continue;
if (!chromosome.getPrimaryAllele().getUID().equals(genetics[i].getPrimaryAllele().getUID()))
if (chromosome == null || otherChromosome == null)
return false;
if (!chromosome.getSecondaryAllele().getUID().equals(genetics[i].getSecondaryAllele().getUID()))
if (!chromosome.getPrimaryAllele().getUID().equals(otherChromosome.getPrimaryAllele().getUID()))
return false;
if (!chromosome.getSecondaryAllele().getUID().equals(otherChromosome.getSecondaryAllele().getUID()))
return false;
}
@@ -47,7 +47,7 @@ public class ItemResearchNote extends ItemForestry {
public static enum EnumNoteType {
NONE, MUTATION, SPECIES;
public static EnumNoteType[] VALUES = values();
public static final EnumNoteType[] VALUES = values();
private IMutation getEncodedMutation(ISpeciesRoot root, NBTTagCompound compound) {
IAllele allele0 = AlleleManager.alleleRegistry.getAllele(compound.getString("AL0"));
@@ -180,9 +180,9 @@ public class ItemResearchNote extends ItemForestry {
public static class ResearchNote {
private GameProfile researcher;
private EnumNoteType type = EnumNoteType.NONE;
private NBTTagCompound inner;
private final GameProfile researcher;
private final EnumNoteType type;
private final NBTTagCompound inner;
public ResearchNote(GameProfile researcher, EnumNoteType type, NBTTagCompound inner) {
this.researcher = researcher;
@@ -193,12 +193,17 @@ public class ItemResearchNote extends ItemForestry {
public ResearchNote(NBTTagCompound compound) {
if(compound != null) {
if (compound.hasKey("res")) {
researcher = NBTUtil.func_152459_a(compound.getCompoundTag("res"));
this.researcher = NBTUtil.func_152459_a(compound.getCompoundTag("res"));
} else {
this.researcher = null;
}
this.type = EnumNoteType.VALUES[compound.getByte("TYP")];
this.inner = compound.getCompoundTag("INN");
} else
} else {
this.type = EnumNoteType.NONE;
this.researcher = null;
this.inner = new NBTTagCompound();
}
}
public void writeToNBT(NBTTagCompound compound) {
@@ -21,20 +21,20 @@ import forestry.api.genetics.IMutation;
public abstract class Mutation implements IMutation {
protected int chance;
protected final int chance;
boolean isSecret = false;
protected IAllele allele0;
protected IAllele allele1;
protected final IAllele allele0;
protected final IAllele allele1;
IAllele[] template;
private final IAllele[] template;
protected float minTemperature = 0.0f;
protected float maxTemperature = 2.0f;
protected float minRainfall = 0.0f;
protected float maxRainfall = 2.0f;
protected ArrayList<String> specialConditions = new ArrayList<String>();
protected final ArrayList<String> specialConditions = new ArrayList<String>();
public Mutation(IAllele allele0, IAllele allele1, IAllele[] template, int chance) {
this.allele0 = allele0;
@@ -28,7 +28,7 @@ import forestry.api.genetics.ISpeciesRoot;
public abstract class SpeciesRoot implements ISpeciesRoot {
/* RESEARCH */
LinkedHashMap<ItemStack, Float> researchCatalysts = new LinkedHashMap<ItemStack, Float>();
private final LinkedHashMap<ItemStack, Float> researchCatalysts = new LinkedHashMap<ItemStack, Float>();
@Override
public Map<ItemStack, Float> getResearchCatalysts() {
@@ -41,7 +41,7 @@ public abstract class SpeciesRoot implements ISpeciesRoot {
}
/* TEMPLATES */
public HashMap<String, IAllele[]> speciesTemplates = new HashMap<String, IAllele[]>();
public final HashMap<String, IAllele[]> speciesTemplates = new HashMap<String, IAllele[]>();
@Override
public Map<String, IAllele[]> getGenomeTemplates() {
@@ -20,7 +20,7 @@ import forestry.core.utils.StringUtil;
*/
public class ClimateLedger extends Ledger {
IClimatised tile;
private final IClimatised tile;
public ClimateLedger(LedgerManager manager, IClimatised tile) {
super(manager);
@@ -37,7 +37,7 @@ public class ContainerAnalyzer extends ContainerLiquidTanks {
addSlot(new SlotCustom(tile, TileAnalyzer.SLOT_INPUT_1 + i * 2 + k, 8 + k * 18, 28 + i * 18, ItemGE.class));
// Analyze slot
addSlot(new SlotCustom(tile, TileAnalyzer.SLOT_ANALYZE, 73, 59, new Object[]{}));
addSlot(new SlotCustom(tile, TileAnalyzer.SLOT_ANALYZE, 73, 59));
// Can slot
addSlot(new SlotLiquidContainer(tile, TileAnalyzer.SLOT_CAN, 143, 24, false, Fluids.HONEY.get()) {
@@ -46,7 +46,7 @@ public class ContainerEscritoire extends ContainerForestry implements IGuiSelect
addSlot(new SlotCustom(tile, TileEscritoire.SLOT_ANALYZE, 97, 67, filters.toArray()).setCrafter(tile));
for (int i = 0; i < TileEscritoire.SLOTS_INPUT_COUNT; i++) {
addSlot(new SlotCustom(tile, TileEscritoire.SLOT_INPUT_1 + i, 17, 49 + i * 18, true).setBlockedTexture("slots/blocked_2"));
addSlot(new SlotCustom(tile, TileEscritoire.SLOT_INPUT_1 + i, 17, 49 + i * 18).setExclusion(true).setBlockedTexture("slots/blocked_2"));
}
for(int i = 0; i < 3; i++)
@@ -24,13 +24,15 @@ import net.minecraft.item.ItemStack;
public class ContainerForestry extends Container {
protected IInventory inventory;
protected TileForestry inventoryForestry;
protected final IInventory inventory;
protected final TileForestry inventoryForestry;
public ContainerForestry(IInventory inventory) {
this.inventory = inventory;
if (inventory instanceof TileForestry)
this.inventoryForestry = (TileForestry)inventory;
else
this.inventoryForestry = null;
}
/**
@@ -108,7 +110,7 @@ public class ContainerForestry extends Container {
stackSlot.stackSize = stackSize;
if (stackSlot.stackSize <= 0)
slot.putStack((ItemStack) null);
slot.putStack(null);
}
protected void fillPhantomSlot(Slot slot, ItemStack stackHeld, int mouseButton, int modifier) {
@@ -28,7 +28,7 @@ import forestry.core.proxy.Proxies;
public class ContainerLiquidTanks extends ContainerForestry {
private ILiquidTankContainer tile;
private final ILiquidTankContainer tile;
public ContainerLiquidTanks(IInventory inventory, ILiquidTankContainer tile) {
super(inventory);
@@ -82,8 +82,8 @@ public class ContainerLiquidTanks extends ContainerForestry {
public void detectAndSendChanges() {
super.detectAndSendChanges();
tile.getTankManager().updateGuiData(this, crafters);
for (int i = 0; i < crafters.size(); i++)
tile.sendGUINetworkData(this, (ICrafting) crafters.get(i));
for (Object crafter : crafters)
tile.sendGUINetworkData(this, (ICrafting) crafter);
}
@Override
@@ -33,7 +33,7 @@ public class ContainerNaturalistInventory extends ContainerForestry implements I
// Inventory
for (int x = 0; x < 5; x++) {
for (int y = 0; y < 5; y++) {
addSlot(new SlotCustom(inventory, y + page * pageSize + x * 5, 100 + y * 18, 21 + x * 18, new Object[]{speciesRoot}));
addSlot(new SlotCustom(inventory, y + page * pageSize + x * 5, 100 + y * 18, 21 + x * 18, speciesRoot));
}
}
+27 -111
View File
@@ -10,32 +10,10 @@
******************************************************************************/
package forestry.core.gui;
import java.awt.Color;
import java.util.Collection;
import java.util.List;
import codechicken.nei.VisiblityData;
import codechicken.nei.api.INEIGuiHandler;
import codechicken.nei.api.TaggedInventoryArea;
import cpw.mods.fml.common.Optional;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import forestry.core.config.Config;
import forestry.core.gadgets.TileForestry;
import forestry.core.gui.slots.SlotForestry;
@@ -50,17 +28,33 @@ import forestry.core.interfaces.IOwnable;
import forestry.core.interfaces.IPowerHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.FontColour;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import java.awt.Color;
import java.util.Collection;
import java.util.List;
@Optional.Interface(iface = "codechicken.nei.api.INEIGuiHandler", modid = "NotEnoughItems")
public abstract class GuiForestry<T extends TileForestry> extends GuiContainer implements INEIGuiHandler {
/* WIDGETS */
protected WidgetManager widgetManager;
protected final WidgetManager widgetManager;
/* LEDGERS */
protected LedgerManager ledgerManager = new LedgerManager(this);
protected T tile;
public ResourceLocation textureFile;
protected FontColour fontColor;
protected final LedgerManager ledgerManager;
protected final T tile;
protected final FontColour fontColor;
public final ResourceLocation textureFile;
public GuiForestry(String texture, ContainerForestry container) {
this(new ResourceLocation("forestry", texture), container, null);
@@ -85,6 +79,8 @@ public abstract class GuiForestry<T extends TileForestry> extends GuiContainer i
if (inventory instanceof TileForestry)
this.tile = (T) inventory;
else
this.tile = null;
fontColor = new FontColour(Proxies.common.getSelectedTexturePack(Proxies.common.getClientInstance()));
initLedgers(inventory);
@@ -188,27 +184,6 @@ public abstract class GuiForestry<T extends TileForestry> extends GuiContainer i
fontRendererObj.drawSplitString(text, (int) ((guiLeft + x) * (1 / factor)), (int) ((guiTop + line) * (1 / factor)), (int) (maxWidth * (1 / factor)), color);
}
public void spinTextureIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int rotation) {
par1 += width / 2 - xSize / 2;
par2 += height / 2 - ySize / 2;
float x = par1 + par4 / 2;
float y = par2 + par5 / 2;
GL11.glPushMatrix();
GL11.glTranslatef(x, y, 0);
GL11.glRotatef(rotation, 0, 0, 1);
GL11.glTranslatef(-x, -y, 0);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
GL11.glPopMatrix();
}
/* CORE GUI HANDLING */
protected int getCenteredOffset(String string) {
return getCenteredOffset(string, xSize);
@@ -261,65 +236,6 @@ public abstract class GuiForestry<T extends TileForestry> extends GuiContainer i
return this.func_146978_c(par1Slot.xDisplayPosition, par1Slot.yDisplayPosition, 16, 16, par2, par3);
}
@SuppressWarnings("rawtypes")
protected void drawTooltip(int mouseX, int mouseY, float zLevel, List information, EnumRarity rarity) {
if (information.size() > 0) {
this.zLevel = 0f;
itemRender.zLevel = 0f;
int tooltipWidth = 0;
for (int i = 0; i < information.size(); ++i) {
int textWidth = this.fontRendererObj.getStringWidth((String) information.get(i));
if (textWidth > tooltipWidth)
tooltipWidth = textWidth;
}
int xPos = mouseX - this.guiLeft + 12;
int yPos = mouseY - this.guiTop - 12;
int var14 = 8;
if (information.size() > 1)
var14 += 2 + (information.size() - 1) * 10;
this.zLevel = zLevel;
itemRender.zLevel = zLevel;
int var15 = -267386864;
this.drawGradientRect(xPos - 3, yPos - 4, xPos + tooltipWidth + 3, yPos - 3, var15, var15);
this.drawGradientRect(xPos - 3, yPos + var14 + 3, xPos + tooltipWidth + 3, yPos + var14 + 4, var15, var15);
this.drawGradientRect(xPos - 3, yPos - 3, xPos + tooltipWidth + 3, yPos + var14 + 3, var15, var15);
this.drawGradientRect(xPos - 4, yPos - 3, xPos - 3, yPos + var14 + 3, var15, var15);
this.drawGradientRect(xPos + tooltipWidth + 3, yPos - 3, xPos + tooltipWidth + 4, yPos + var14 + 3, var15, var15);
int var16 = 1347420415;
int var17 = (var16 & 16711422) >> 1 | var16 & -16777216;
this.drawGradientRect(xPos - 3, yPos - 3 + 1, xPos - 3 + 1, yPos + var14 + 3 - 1, var16, var17);
this.drawGradientRect(xPos + tooltipWidth + 2, yPos - 3 + 1, xPos + tooltipWidth + 3, yPos + var14 + 3 - 1, var16, var17);
this.drawGradientRect(xPos - 3, yPos - 3, xPos + tooltipWidth + 3, yPos - 3 + 1, var16, var16);
this.drawGradientRect(xPos - 3, yPos + var14 + 2, xPos + tooltipWidth + 3, yPos + var14 + 3, var17, var17);
for (int i = 0; i < information.size(); ++i) {
String line = (String) information.get(i);
if (i == 0)
line = "\u00a7" + rarity.rarityColor.getFormattingCode() + line;
else
line = "\u00a77" + line;
this.fontRendererObj.drawStringWithShadow(line, xPos, yPos, -1);
if (i == 0)
yPos += 2;
yPos += 10;
}
this.zLevel = 0.0F;
itemRender.zLevel = 0.0F;
}
}
public void drawToolTips(ToolTip toolTips, int mouseX, int mouseY) {
if (toolTips == null)
return;
@@ -334,7 +250,7 @@ public abstract class GuiForestry<T extends TileForestry> extends GuiContainer i
int y;
for (ToolTipLine tip : toolTips) {
y = this.fontRendererObj.getStringWidth(tip.text);
y = this.fontRendererObj.getStringWidth(tip.getText());
height += 10 + tip.getSpacing();
if (y > length)
@@ -364,12 +280,12 @@ public abstract class GuiForestry<T extends TileForestry> extends GuiContainer i
this.drawGradientRect(x - 3, y + height, x + length + 2, y + height + 1, borderColorBottomInt, borderColorBottomInt);
for (ToolTipLine tip : toolTips) {
String line = tip.text;
String line = tip.getText();
if (tip.color == null)
if (tip.getColor() == null)
line = "\u00a77" + line;
else
line = "\u00a7" + tip.color.getFormattingCode() + line;
line = "\u00a7" + tip.getColor().getFormattingCode() + line;
this.fontRendererObj.drawStringWithShadow(line, x, y, -1);
@@ -69,21 +69,19 @@ public class GuiTextBox extends GuiTextField {
@SuppressWarnings("unchecked")
private void drawScrolledSplitString(String text, int startX, int startY, int width, int textColour) {
List<String> list = fontRendererObj.listFormattedStringToWidth(text, width);
maxLines = list.size();
List<String> lines = fontRendererObj.listFormattedStringToWidth(text, width);
maxLines = lines.size();
int count = 0;
int lineY = startY;
for (Iterator<String> iterator = list.iterator(); iterator.hasNext();) {
if(count < lineScroll) {
for (String line : lines) {
if (count < lineScroll) {
count++;
continue;
}
else if(lineY + fontRendererObj.FONT_HEIGHT - startY > height)
} else if (lineY + fontRendererObj.FONT_HEIGHT - startY > height)
break;
String line = iterator.next();
fontRendererObj.drawString(line, startX, lineY, textColour);
lineY += fontRendererObj.FONT_HEIGHT;
@@ -18,8 +18,8 @@ import forestry.core.utils.StringUtil;
public class HintLedger extends Ledger {
int position;
String[] hints;
private final int position;
private final String[] hints;
public HintLedger(LedgerManager manager, IHintSource tile) {
super(manager);
+1 -1
View File
@@ -29,7 +29,7 @@ public abstract class Ledger {
private static final int OPEN_SPEED = 8;
private static final ResourceLocation ledgerTexture = new ForestryResource(Defaults.TEXTURE_PATH_GUI + "/ledger.png");
protected LedgerManager manager;
protected final LedgerManager manager;
private boolean open;
@@ -22,10 +22,10 @@ import forestry.core.proxy.Proxies;
public class LedgerManager {
public GuiForestry<? extends TileForestry> gui;
public Minecraft minecraft;
public final GuiForestry<? extends TileForestry> gui;
public final Minecraft minecraft;
protected ArrayList<Ledger> ledgers = new ArrayList<Ledger>();
protected final ArrayList<Ledger> ledgers = new ArrayList<Ledger>();
public LedgerManager(GuiForestry<? extends TileForestry> gui) {
this.gui = gui;
@@ -52,8 +52,7 @@ public class LedgerManager {
int xShift = ((gui.width - gui.getSizeX()) / 2) + gui.getSizeX();
int yShift = ((gui.height - gui.getSizeY()) / 2) + 8;
for (int i = 0; i < ledgers.size(); i++) {
Ledger ledger = ledgers.get(i);
for (Ledger ledger : ledgers) {
if (!ledger.isVisible())
continue;
@@ -27,7 +27,7 @@ import forestry.core.utils.StringUtil;
*/
public class OwnerLedger extends Ledger {
IOwnable tile;
private final IOwnable tile;
public OwnerLedger(LedgerManager manager, IOwnable tile) {
super(manager);
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff. Show more