mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 12:59:44 +00:00
Simple Cleanup
This commit is contained in:
1 parent
09df969bcf
commit
e2fff11ea8
141 files changed
+545
-859
No files matched your search
@@ -40,10 +40,7 @@ public class FlowerProviderCacti implements IFlowerProvider {
|
||||
}
|
||||
|
||||
private boolean checkFlowerPot(int meta) {
|
||||
if (meta == 9)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return meta == 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,10 +43,7 @@ public class FlowerProviderJungle implements IFlowerProvider {
|
||||
}
|
||||
|
||||
private boolean checkFlowerPot(int meta) {
|
||||
if (meta == 11)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return meta == 11;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,10 +42,7 @@ public class FlowerProviderMushroom implements IFlowerProvider {
|
||||
}
|
||||
|
||||
private boolean checkFlowerPot(int meta) {
|
||||
if (meta == 7 || meta == 8)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return meta == 7 || meta == 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,10 +53,7 @@ public class FlowerProviderVanilla implements IFlowerProvider {
|
||||
}
|
||||
|
||||
private boolean checkFlowerPot(int meta) {
|
||||
if (meta == 1 || meta == 2)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return meta == 1 || meta == 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -107,7 +107,7 @@ public class BlockCandle extends BlockTorch {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getTextureFromPassAndMeta(int meta, int pass) {
|
||||
IIcon i = this.unlitStump;
|
||||
IIcon i;
|
||||
if (pass == 0) {
|
||||
if (isLit(meta)) {
|
||||
i = this.litTip;
|
||||
|
||||
@@ -221,9 +221,6 @@ public class TileBeehouse extends TileBase implements IBeeHousing, IClimatised,
|
||||
|
||||
/**
|
||||
* Returns scaled queen health or breeding progress
|
||||
*
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
public int getHealthScaled(int i) {
|
||||
if (getMaxHealthDisplay() == 0)
|
||||
|
||||
@@ -51,7 +51,7 @@ public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies
|
||||
private final int primaryColour;
|
||||
private final int secondaryColour;
|
||||
|
||||
private final String iconType = "default";
|
||||
private static final String iconType = "default";
|
||||
|
||||
public AlleleBeeSpecies(String uid, boolean dominant, String name, IClassification branch, int primaryColor, int secondaryColor) {
|
||||
this(uid, dominant, name, branch, null, primaryColor, secondaryColor);
|
||||
|
||||
@@ -22,8 +22,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public class AlleleEffectCreeper extends AlleleEffectThrottled {
|
||||
|
||||
private final int explosionChance = 50;
|
||||
private final byte defaultForce = 12;
|
||||
private static final int explosionChance = 50;
|
||||
private static final byte defaultForce = 12;
|
||||
private final byte indexExplosionTimer = 1;
|
||||
private final byte indexExplosionForce = 2;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class AlleleEffectFungification extends AlleleEffectThrottled {
|
||||
}
|
||||
|
||||
private void doMushroomGrowth(Block block, World world, int blockX, int blockY, int blockZ) {
|
||||
WorldGenBigMushroom giantMushroomGenerator = null;
|
||||
WorldGenBigMushroom giantMushroomGenerator;
|
||||
|
||||
if (block == Blocks.brown_mushroom) {
|
||||
giantMushroomGenerator = new WorldGenBigMushroom(0);
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public class AlleleEffectIgnition extends AlleleEffectThrottled {
|
||||
|
||||
private final int ignitionChance = 50;
|
||||
private final int fireDuration = 500;
|
||||
private static final int ignitionChance = 50;
|
||||
private static final int fireDuration = 500;
|
||||
|
||||
public AlleleEffectIgnition(String uid) {
|
||||
super(uid, "ignition", false, 20, false, true);
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class AlleleEffectMiasmic extends AlleleEffectThrottled {
|
||||
|
||||
private final int infectionChance = 50;
|
||||
private static final int infectionChance = 50;
|
||||
|
||||
public AlleleEffectMiasmic(String uid) {
|
||||
super(uid, "misasmic", false, 50, false, false);
|
||||
|
||||
@@ -10,8 +10,21 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.genetics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
@@ -35,16 +48,6 @@ import forestry.apiculture.gadgets.StructureLogicAlveary;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.genetics.SpeciesRoot;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BeeHelper extends SpeciesRoot implements IBeeRoot {
|
||||
|
||||
@@ -65,9 +68,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
|
||||
public int getSpeciesCount() {
|
||||
if (beeSpeciesCount < 0) {
|
||||
beeSpeciesCount = 0;
|
||||
Iterator<Entry<String, IAllele> > it = AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Entry<String, IAllele> entry = it.next();
|
||||
for (Entry<String, IAllele> entry : AlleleManager.alleleRegistry.getRegisteredAlleles().entrySet()) {
|
||||
if (entry.getValue() instanceof IAlleleBeeSpecies)
|
||||
if (((IAlleleBeeSpecies) entry.getValue()).isCounted())
|
||||
beeSpeciesCount++;
|
||||
@@ -97,7 +98,7 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
|
||||
if (!isMember(bee))
|
||||
return null;
|
||||
|
||||
Item beeItem = null;
|
||||
Item beeItem;
|
||||
switch (EnumBeeType.VALUES[type]) {
|
||||
case QUEEN:
|
||||
beeItem = ForestryItem.beeQueenGE.item();
|
||||
@@ -113,7 +114,6 @@ public class BeeHelper extends SpeciesRoot implements IBeeRoot {
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Cannot instantiate a bee of type " + type);
|
||||
|
||||
}
|
||||
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
||||
@@ -141,10 +141,7 @@ public class BeekeepingMode implements IBeekeepingMode {
|
||||
|
||||
@Override
|
||||
public boolean isNaturalOffspring(IBee queen) {
|
||||
if (!queen.isNatural())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return queen.isNatural();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,10 +28,7 @@ public class JubilanceProviderHermit extends JubilanceDefault {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
List list = housing.getWorld().getEntitiesWithinAABB(EntityLiving.class, bounding);
|
||||
if (list.size() > 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return list.size() <= 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class JubilanceReqRes implements IJubilanceProvider {
|
||||
|
||||
@@ -31,12 +32,11 @@ public class JubilanceReqRes implements IJubilanceProvider {
|
||||
if (blockRequired == null)
|
||||
return true;
|
||||
|
||||
Block block = housing.getWorld().getBlock(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
int meta = housing.getWorld().getBlockMetadata(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
if (StackUtils.equals(block, blockRequired) && meta == blockRequired.getItemDamage())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
World world = housing.getWorld();
|
||||
|
||||
Block block = world.getBlock(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
int meta = world.getBlockMetadata(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
return StackUtils.equals(block, meta, blockRequired);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,27 +30,27 @@ public class ContainerAlveary extends ContainerForestry {
|
||||
tile.sendNetworkUpdate();
|
||||
|
||||
// Queen/Princess
|
||||
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));
|
||||
this.addSlotToContainer(new SlotCustom(tile, TileAlvearyPlain.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));
|
||||
|
||||
// Drone
|
||||
this.addSlot(new SlotCustom(tile, TileAlvearyPlain.SLOT_DRONE, 29, 65, ForestryItem.beeDroneGE));
|
||||
this.addSlotToContainer(new SlotCustom(tile, TileAlvearyPlain.SLOT_DRONE, 29, 65, ForestryItem.beeDroneGE));
|
||||
|
||||
// Product Inventory
|
||||
this.addSlot(new SlotClosed(tile, 2, 116, 52));
|
||||
this.addSlot(new SlotClosed(tile, 3, 137, 39));
|
||||
this.addSlot(new SlotClosed(tile, 4, 137, 65));
|
||||
this.addSlot(new SlotClosed(tile, 5, 116, 78));
|
||||
this.addSlot(new SlotClosed(tile, 6, 95, 65));
|
||||
this.addSlot(new SlotClosed(tile, 7, 95, 39));
|
||||
this.addSlot(new SlotClosed(tile, 8, 116, 26));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 2, 116, 52));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 3, 137, 39));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 4, 137, 65));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 5, 116, 78));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 6, 95, 65));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 7, 95, 39));
|
||||
this.addSlotToContainer(new SlotClosed(tile, 8, 116, 26));
|
||||
|
||||
// Player inventory
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int j = 0; j < 9; j++)
|
||||
addSlot(new Slot(player, j + i * 9 + 9, 8 + j * 18, 108 + i * 18));
|
||||
addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 108 + i * 18));
|
||||
// Player hotbar
|
||||
for (int i = 0; i < 9; i++)
|
||||
addSlot(new Slot(player, i, 8 + i * 18, 166));
|
||||
addSlotToContainer(new Slot(player, i, 8 + i * 18, 166));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,20 +18,17 @@ import net.minecraft.inventory.Slot;
|
||||
|
||||
public class ContainerAlvearyHygroregulator extends ContainerLiquidTanks {
|
||||
|
||||
private final TileAlvearyHygroregulator tile;
|
||||
|
||||
public ContainerAlvearyHygroregulator(IInventory inventory, TileAlvearyHygroregulator tile) {
|
||||
super(inventory, tile);
|
||||
|
||||
this.tile = tile;
|
||||
this.addSlot(new SlotLiquidContainer(tile, 0, 56, 38));
|
||||
this.addSlotToContainer(new SlotLiquidContainer(tile, 0, 56, 38));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
for (int var4 = 0; var4 < 9; ++var4)
|
||||
this.addSlot(new Slot(inventory, var4 + i * 9 + 9, 8 + var4 * 18, 84 + i * 18));
|
||||
this.addSlotToContainer(new Slot(inventory, var4 + i * 9 + 9, 8 + var4 * 18, 84 + i * 18));
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
this.addSlot(new Slot(inventory, i, 8 + i * 18, 142));
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,40 +10,38 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.gui;
|
||||
|
||||
import forestry.apiculture.gadgets.TileAlvearySieve;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.gui.ContainerForestry;
|
||||
import forestry.core.gui.slots.SlotCustom;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class ContainerAlvearySieve extends ContainerForestry {
|
||||
import forestry.apiculture.gadgets.TileAlvearySieve;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.gui.ContainerForestry;
|
||||
import forestry.core.gui.slots.SlotCustom;
|
||||
|
||||
private final TileAlvearySieve tile;
|
||||
public class ContainerAlvearySieve extends ContainerForestry {
|
||||
|
||||
public ContainerAlvearySieve(InventoryPlayer player, TileAlvearySieve tile) {
|
||||
super(tile.getInternalInventory());
|
||||
|
||||
this.tile = tile;
|
||||
IInventory inventory = tile.getInternalInventory();
|
||||
|
||||
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));
|
||||
addSlotToContainer(new SlotCustom(inventory, 0, 94, 52).setCrafter(tile));
|
||||
addSlotToContainer(new SlotCustom(inventory, 1, 115, 39).setCrafter(tile));
|
||||
addSlotToContainer(new SlotCustom(inventory, 2, 73, 39).setCrafter(tile));
|
||||
addSlotToContainer(new SlotCustom(inventory, 3, 94, 26).setCrafter(tile));
|
||||
|
||||
addSlot(new SlotCustom(inventory, TileAlvearySieve.SLOT_SIEVE, 43, 39, ForestryItem.craftingMaterial.getItemStack(1, 3)).setCrafter(tile));
|
||||
addSlotToContainer(new SlotCustom(inventory, TileAlvearySieve.SLOT_SIEVE, 43, 39, ForestryItem.craftingMaterial.getItemStack(1, 3)).setCrafter(tile));
|
||||
|
||||
// Player inventory
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 9; j++) {
|
||||
addSlot(new Slot(player, j + i * 9 + 9, 8 + j * 18, 87 + i * 18));
|
||||
addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 87 + i * 18));
|
||||
}
|
||||
}
|
||||
// Player hotbar
|
||||
for (int i = 0; i < 9; i++) {
|
||||
addSlot(new Slot(player, i, 8 + i * 18, 145));
|
||||
addSlotToContainer(new Slot(player, i, 8 + i * 18, 145));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,18 +24,18 @@ public class ContainerAlvearySwarmer extends ContainerForestry {
|
||||
public ContainerAlvearySwarmer(InventoryPlayer player, TileAlvearySwarmer tile) {
|
||||
super(tile);
|
||||
|
||||
this.addSlot(new SlotCustom(tile, 0, 79, 52, getInducerItems()));
|
||||
this.addSlot(new SlotCustom(tile, 1, 100, 39, getInducerItems()));
|
||||
this.addSlot(new SlotCustom(tile, 2, 58, 39, getInducerItems()));
|
||||
this.addSlot(new SlotCustom(tile, 3, 79, 26, getInducerItems()));
|
||||
this.addSlotToContainer(new SlotCustom(tile, 0, 79, 52, getInducerItems()));
|
||||
this.addSlotToContainer(new SlotCustom(tile, 1, 100, 39, getInducerItems()));
|
||||
this.addSlotToContainer(new SlotCustom(tile, 2, 58, 39, getInducerItems()));
|
||||
this.addSlotToContainer(new SlotCustom(tile, 3, 79, 26, getInducerItems()));
|
||||
|
||||
// Player inventory
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int j = 0; j < 9; j++)
|
||||
addSlot(new Slot(player, j + i * 9 + 9, 8 + j * 18, 87 + i * 18));
|
||||
addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 87 + i * 18));
|
||||
// Player hotbar
|
||||
for (int i = 0; i < 9; i++)
|
||||
addSlot(new Slot(player, i, 8 + i * 18, 145));
|
||||
addSlotToContainer(new Slot(player, i, 8 + i * 18, 145));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -33,36 +33,36 @@ public class ContainerApiary extends ContainerForestry {
|
||||
IInventory inv = tile.getInternalInventory();
|
||||
|
||||
// Queen/Princess
|
||||
this.addSlot(new SlotCustom(inv, TileBeehouse.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));
|
||||
this.addSlotToContainer(new SlotCustom(inv, TileBeehouse.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));
|
||||
|
||||
// Drone
|
||||
this.addSlot(new SlotCustom(inv, TileBeehouse.SLOT_DRONE, 29, 65, ForestryItem.beeDroneGE));
|
||||
this.addSlotToContainer(new SlotCustom(inv, TileBeehouse.SLOT_DRONE, 29, 65, ForestryItem.beeDroneGE));
|
||||
|
||||
// Frames
|
||||
if (hasFrames) {
|
||||
this.addSlot(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1, 66, 23, IHiveFrame.class));
|
||||
this.addSlot(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1 + 1, 66, 52, IHiveFrame.class));
|
||||
this.addSlot(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1 + 2, 66, 81, IHiveFrame.class));
|
||||
this.addSlotToContainer(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1, 66, 23, IHiveFrame.class));
|
||||
this.addSlotToContainer(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1 + 1, 66, 52, IHiveFrame.class));
|
||||
this.addSlotToContainer(new SlotCustom(inv, TileBeehouse.SLOT_FRAMES_1 + 2, 66, 81, IHiveFrame.class));
|
||||
}
|
||||
|
||||
// Product Inventory
|
||||
this.addSlot(new SlotClosed(inv, 2, 116, 52));
|
||||
this.addSlot(new SlotClosed(inv, 3, 137, 39));
|
||||
this.addSlot(new SlotClosed(inv, 4, 137, 65));
|
||||
this.addSlot(new SlotClosed(inv, 5, 116, 78));
|
||||
this.addSlot(new SlotClosed(inv, 6, 95, 65));
|
||||
this.addSlot(new SlotClosed(inv, 7, 95, 39));
|
||||
this.addSlot(new SlotClosed(inv, 8, 116, 26));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 2, 116, 52));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 3, 137, 39));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 4, 137, 65));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 5, 116, 78));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 6, 95, 65));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 7, 95, 39));
|
||||
this.addSlotToContainer(new SlotClosed(inv, 8, 116, 26));
|
||||
|
||||
// Player inventory
|
||||
for (int i1 = 0; i1 < 3; i1++) {
|
||||
for (int l1 = 0; l1 < 9; l1++) {
|
||||
addSlot(new Slot(player, l1 + i1 * 9 + 9, 8 + l1 * 18, 108 + i1 * 18));
|
||||
addSlotToContainer(new Slot(player, l1 + i1 * 9 + 9, 8 + l1 * 18, 108 + i1 * 18));
|
||||
}
|
||||
}
|
||||
// Player hotbar
|
||||
for (int j1 = 0; j1 < 9; j1++) {
|
||||
addSlot(new Slot(player, j1, 8 + j1 * 18, 166));
|
||||
addSlotToContainer(new Slot(player, j1, 8 + j1 * 18, 166));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ public class ContainerHabitatLocator extends ContainerItemInventory {
|
||||
this.inventory = inventory;
|
||||
|
||||
// Energy
|
||||
this.addSlot(new SlotCustom(inventory, 2, 152, 8, ForestryItem.honeydew, ForestryItem.honeyDrop));
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 2, 152, 8, ForestryItem.honeydew, ForestryItem.honeyDrop));
|
||||
|
||||
// Bee to analyze
|
||||
this.addSlot(new SlotCustom(inventory, 0, 152, 32, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 0, 152, 32, ItemBeeGE.class));
|
||||
// Analyzed bee
|
||||
this.addSlot(new SlotCustom(inventory, 1, 152, 75, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 1, 152, 75, ItemBeeGE.class));
|
||||
|
||||
// Player inventory
|
||||
for (int i1 = 0; i1 < 3; i1++)
|
||||
|
||||
@@ -35,17 +35,17 @@ public class ContainerImprinter extends ContainerForestry implements IGuiSelecta
|
||||
|
||||
this.inventory = inventory;
|
||||
// Input
|
||||
this.addSlot(new SlotCustom(inventory, 0, 152, 12, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 0, 152, 12, ItemBeeGE.class));
|
||||
// Output
|
||||
this.addSlot(new SlotCustom(inventory, 1, 152, 72, ItemBeeGE.class));
|
||||
this.addSlotToContainer(new SlotCustom(inventory, 1, 152, 72, ItemBeeGE.class));
|
||||
|
||||
// Player inventory
|
||||
for (int i1 = 0; i1 < 3; i1++)
|
||||
for (int l1 = 0; l1 < 9; l1++)
|
||||
addSlot(new Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18, 103 + i1 * 18));
|
||||
addSlotToContainer(new Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18, 103 + i1 * 18));
|
||||
// Player hotbar
|
||||
for (int j1 = 0; j1 < 9; j1++)
|
||||
addSlot(new Slot(inventoryplayer, j1, 8 + j1 * 18, 161));
|
||||
addSlotToContainer(new Slot(inventoryplayer, j1, 8 + j1 * 18, 161));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,8 +40,6 @@ public class GuiBeealyzer extends GuiAlyzer {
|
||||
((ItemBeeGE) ForestryItem.beeDroneGE.item()).addCreativeItems(beeList, false);
|
||||
for (ItemStack beeStack : beeList)
|
||||
iconStacks.put(BeeGenome.getSpecies(beeStack).getUID(), beeStack);
|
||||
|
||||
breedingTracker = PluginApiculture.beeInterface.getBreedingTracker(player.worldObj, player.getGameProfile());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -102,8 +102,8 @@ public class GuiImprinter extends GuiForestry<TileForestry> {
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
|
||||
int slot = 0;
|
||||
if ((slot = getHabitatSlotAtPosition(i - cornerX, j - cornerY)) < 0)
|
||||
int slot = getHabitatSlotAtPosition(i - cornerX, j - cornerY);
|
||||
if (slot < 0)
|
||||
return;
|
||||
|
||||
if (k == 0)
|
||||
|
||||
@@ -44,7 +44,7 @@ public class BeeItemRenderer implements IItemRenderer {
|
||||
|
||||
public static float getIrregularWingYaw(long flapping, float flap) {
|
||||
long irregular = flapping / 1000;
|
||||
float wingYaw = 1f;
|
||||
float wingYaw;
|
||||
|
||||
if(irregular % 11 == 0) {
|
||||
wingYaw = 0.75f;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class TextureBiomefinder extends TextureAtlasSprite {
|
||||
|
||||
public void updateCompass(World world, double playerX, double playerZ, double playerYaw, boolean par8, boolean hasSpin) {
|
||||
|
||||
double targetAngle = 0.0d;
|
||||
double targetAngle;
|
||||
|
||||
if(world == null || targetBiome == null) {
|
||||
// No target has the locator spinning wildly.
|
||||
|
||||
@@ -322,11 +322,8 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
|
||||
EnumTolerance temperatureTolerance = genome.getToleranceTemp();
|
||||
|
||||
Collection<EnumTemperature> toleratedTemperatures = AlleleManager.climateHelper.getToleratedTemperature(beeTemperature, temperatureTolerance);
|
||||
boolean validTemp = false;
|
||||
|
||||
validTemp = toleratedTemperatures.contains(EnumTemperature.getFromValue(temperature));
|
||||
|
||||
if (!validTemp)
|
||||
if (!toleratedTemperatures.contains(EnumTemperature.getFromValue(temperature)))
|
||||
return false;
|
||||
|
||||
EnumHumidity beeHumidity = genome.getPrimary().getHumidity();
|
||||
@@ -334,11 +331,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
|
||||
|
||||
Collection<EnumHumidity> toleratedHumidity = AlleleManager.climateHelper.getToleratedHumidity(beeHumidity, humidityTolerance);
|
||||
|
||||
boolean validHumidity = false;
|
||||
|
||||
validHumidity = toleratedHumidity.contains(EnumHumidity.getFromValue(humidity));
|
||||
|
||||
return validHumidity;
|
||||
return toleratedHumidity.contains(EnumHumidity.getFromValue(humidity));
|
||||
}
|
||||
|
||||
protected void fillBoxWith(World world, StructureBoundingBox box, int par3, int par4, int par5, int par6, int par7, int par8, ItemStack buildingBlock,
|
||||
|
||||
Reference in new issue
Block a user