Rename files to be more consistent. Add missing headers, tidy up Utils

This commit is contained in:
mezz committed 2015-09-25 15:09:54 -07:00
1 parent 37dd0efee2
commit 1e89bab556
576 files changed
+3811 -3923

No files matched your search

+12 -12
View File
@@ -38,14 +38,14 @@ import forestry.api.fuels.GeneratorFuel;
import forestry.api.fuels.MoistenerFuel;
import forestry.api.fuels.RainSubstrate;
import forestry.core.ForestryCore;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.Version;
import forestry.core.network.PacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.FluidMap;
import forestry.core.utils.ItemStackMap;
import forestry.core.utils.Log;
import forestry.core.utils.StringUtil;
import forestry.core.utils.datastructures.FluidMap;
import forestry.core.utils.datastructures.ItemStackMap;
/**
* Forestry Minecraft Mod
@@ -53,7 +53,7 @@ import forestry.core.utils.StringUtil;
* @author SirSengir
*/
@Mod(
modid = Defaults.MOD,
modid = Constants.MOD,
name = "Forestry",
version = Version.VERSION,
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
@@ -66,7 +66,7 @@ import forestry.core.utils.StringUtil;
+ "after:HardcoreEnderExpansion;")
public class Forestry {
@Mod.Instance(Defaults.MOD)
@Mod.Instance(Constants.MOD)
public static Forestry instance;
private File configFolder;
@@ -128,7 +128,7 @@ public class Forestry {
}
/*@EventHandler
public void fingerprintWarning(FMLFingerprintViolationEvent event) {
Proxies.log.info("Fingerprint of the mod jar is invalid. The jar file was tampered with.");
Log.info("Fingerprint of the mod jar is invalid. The jar file was tampered with.");
FMLInterModComms.sendMessage("Railcraft", "securityViolation", "Fingerprint of jar file did not match.");
FMLInterModComms.sendMessage("Thaumcraft", "securityViolation", "Fingerprint of jar file did not match.");
FMLInterModComms.sendMessage("IC2", "securityViolation", "Fingerprint of jar file did not match.");
@@ -143,21 +143,21 @@ public class Forestry {
public void missingMapping(FMLMissingMappingsEvent event) {
for (MissingMapping mapping : event.get()) {
if (mapping.type == Type.BLOCK) {
Block block = GameRegistry.findBlock(Defaults.MOD, StringUtil.cleanTags(mapping.name));
Block block = GameRegistry.findBlock(Constants.MOD, StringUtil.cleanTags(mapping.name));
if (block != null) {
mapping.remap(block);
Proxies.log.warning("Remapping block " + mapping.name + " to " + StringUtil.cleanBlockName(block));
Log.warning("Remapping block " + mapping.name + " to " + StringUtil.cleanBlockName(block));
}
} else {
Block block = GameRegistry.findBlock(Defaults.MOD, StringUtil.cleanTags(mapping.name));
Block block = GameRegistry.findBlock(Constants.MOD, StringUtil.cleanTags(mapping.name));
if (block != null) {
mapping.remap(Item.getItemFromBlock(block));
Proxies.log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanBlockName(block));
Log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanBlockName(block));
} else {
ForestryItem mappedItem = mappedItems.get(mapping.name);
if (mappedItem != null) {
mapping.remap(mappedItem.item());
Proxies.log.warning("Remapping item " + mapping.name + " to " + mappedItem.name());
Log.warning("Remapping item " + mapping.name + " to " + mappedItem.name());
}
}
}
@@ -21,7 +21,7 @@ public class ArmorApiaristHelper implements IArmorApiaristHelper {
@Override
public boolean isArmorApiarist(ItemStack stack, EntityPlayer player, String cause, boolean doProtect) {
if(stack == null) {
if (stack == null) {
return false;
}
@@ -15,10 +15,10 @@ import net.minecraft.item.ItemStack;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IBeeHousingInventory;
import forestry.core.interfaces.IAccessHandler;
import forestry.core.inventory.InvTools;
import forestry.core.access.IAccessHandler;
import forestry.core.inventory.InventoryAdapterRestricted;
import forestry.core.utils.Utils;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.SlotUtil;
public class BeeHousingInventory extends InventoryAdapterRestricted implements IBeeHousingInventory {
public static final int SLOT_QUEEN = 0;
@@ -47,7 +47,7 @@ public class BeeHousingInventory extends InventoryAdapterRestricted implements I
if (!super.canExtractItem(slotIndex, itemstack, side)) {
return false;
}
return Utils.isIndexInRange(slotIndex, SLOT_PRODUCT_1, SLOT_PRODUCT_COUNT);
return SlotUtil.isSlotInRange(slotIndex, SLOT_PRODUCT_1, SLOT_PRODUCT_COUNT);
}
@Override
@@ -72,7 +72,7 @@ public class BeeHousingInventory extends InventoryAdapterRestricted implements I
@Override
public final boolean addProduct(ItemStack product, boolean all) {
return InvTools.tryAddStack(this, product, SLOT_PRODUCT_1, SLOT_PRODUCT_COUNT, all, true);
return InventoryUtil.tryAddStack(this, product, SLOT_PRODUCT_1, SLOT_PRODUCT_COUNT, all, true);
}
}
@@ -36,18 +36,19 @@ import forestry.api.core.IErrorState;
import forestry.api.genetics.IEffectData;
import forestry.api.genetics.IIndividual;
import forestry.apiculture.network.PacketBeekeepingLogicActive;
import forestry.core.EnumErrorCode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.errors.EnumErrorCode;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.IStreamable;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
import forestry.plugins.PluginApiculture;
public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
private static final int totalBreedingTime = Defaults.APIARY_BREEDING_TIME;
private static final int totalBreedingTime = Constants.APIARY_BREEDING_TIME;
private final IBeeHousing housing;
private final IBeeModifier beeModifier;
@@ -351,7 +352,7 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
beeInventory.getQueen().stackSize = 0;
beeInventory.setQueen(null);
} else {
Proxies.log.warning("Tried to spawn offspring off an unmated queen. Devolving her to a princess.");
Log.warning("Tried to spawn offspring off an unmated queen. Devolving her to a princess.");
ItemStack convert = ForestryItem.beePrincessGE.getItemStack();
NBTTagCompound nbttagcompound = new NBTTagCompound();
@@ -15,8 +15,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import forestry.api.apiculture.BeeManager;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.gadgets.TileBeehouse;
import forestry.apiculture.genetics.BeeHelper;
import forestry.apiculture.gui.ContainerAlveary;
import forestry.apiculture.gui.ContainerAlvearyHygroregulator;
@@ -40,6 +38,8 @@ import forestry.apiculture.multiblock.TileAlvearyHygroregulator;
import forestry.apiculture.multiblock.TileAlvearyPlain;
import forestry.apiculture.multiblock.TileAlvearySieve;
import forestry.apiculture.multiblock.TileAlvearySwarmer;
import forestry.apiculture.tiles.TileApiary;
import forestry.apiculture.tiles.TileBeeHouse;
import forestry.core.GuiHandlerBase;
import forestry.core.gui.ContainerAlyzer;
import forestry.core.network.GuiId;
@@ -82,7 +82,7 @@ public class GuiHandlerApiculture extends GuiHandlerBase {
return new GuiBeealyzer(player, new BeealyzerInventory(player, equipped));
case BeehouseGUI:
return new GuiBeeHousing(player.inventory, getTile(world, x, y, z, player, TileBeehouse.class));
return new GuiBeeHousing(player.inventory, getTile(world, x, y, z, player, TileBeeHouse.class));
case HabitatLocatorGUI:
equipped = player.getCurrentEquippedItem();
@@ -148,7 +148,7 @@ public class GuiHandlerApiculture extends GuiHandlerBase {
case BeehouseGUI:
synchApiaristTracker(world, player);
return new ContainerBeeHousing(player.inventory, getTile(world, x, y, z, player, TileBeehouse.class), false);
return new ContainerBeeHousing(player.inventory, getTile(world, x, y, z, player, TileBeeHouse.class), false);
case HabitatLocatorGUI:
equipped = player.getCurrentEquippedItem();
@@ -13,7 +13,7 @@ package forestry.apiculture;
import net.minecraft.world.World;
import forestry.api.apiculture.BeeManager;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.ISaveEventHandler;
public class SaveEventHandlerApiculture implements ISaveEventHandler {
@@ -30,10 +30,10 @@ import forestry.api.apiculture.EnumBeeType;
import forestry.apiculture.genetics.BeeDefinition;
import forestry.apiculture.items.ItemHoneycomb;
import forestry.apiculture.worldgen.ComponentVillageBeeHouse;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
public class VillageHandlerApiculture implements IVillageCreationHandler, IVillageTradeHandler {
@@ -41,18 +41,18 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
try {
MapGenStructureIO.func_143031_a(ComponentVillageBeeHouse.class, "Forestry:BeeHouse");
} catch (Throwable e) {
Proxies.log.severe("Failed to register village beehouse.");
Log.severe("Failed to register village beehouse.");
}
}
@SuppressWarnings("unchecked")
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
recipeList.add(new MerchantRecipe(ForestryItem.beePrincessGE.getItemStack(1, Defaults.WILDCARD), new ItemStack(Items.emerald, 1)));
recipeList.add(new MerchantRecipe(ForestryItem.beePrincessGE.getItemStack(1, Constants.WILDCARD), new ItemStack(Items.emerald, 1)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.wheat, 2), ItemHoneycomb.getRandomComb(1, random, false)));
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, Defaults.WILDCARD), ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_APIARY_META)));
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, Constants.WILDCARD), ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1), ForestryItem.frameProven.getItemStack(6)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 12), ForestryItem.beePrincessGE.getItemStack(1, Defaults.WILDCARD), BeeDefinition.MONASTIC.getMemberStack(EnumBeeType.DRONE)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 12), ForestryItem.beePrincessGE.getItemStack(1, Constants.WILDCARD), BeeDefinition.MONASTIC.getMemberStack(EnumBeeType.DRONE)));
}
@Override
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.blocks;
import java.util.ArrayList;
import java.util.List;
@@ -36,7 +36,7 @@ import forestry.apiculture.multiblock.TileAlvearyPlain;
import forestry.apiculture.multiblock.TileAlvearySieve;
import forestry.apiculture.multiblock.TileAlvearyStabiliser;
import forestry.apiculture.multiblock.TileAlvearySwarmer;
import forestry.core.gadgets.BlockStructure;
import forestry.core.blocks.BlockStructure;
import forestry.core.multiblock.MultiblockRegistry;
import forestry.core.render.TextureManager;
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.blocks;
import java.util.ArrayList;
import java.util.Collections;
@@ -32,11 +32,12 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.IHiveDrop;
import forestry.api.core.Tabs;
import forestry.apiculture.MaterialBeehive;
import forestry.apiculture.tiles.TileSwarm;
import forestry.apiculture.worldgen.HiveRegistry;
import forestry.core.config.Config;
import forestry.core.inventory.InvTools;
import forestry.core.render.TextureManager;
import forestry.core.utils.StackUtils;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginApiculture;
public class BlockBeehives extends BlockContainer {
@@ -68,9 +69,9 @@ public class BlockBeehives extends BlockContainer {
if (tile instanceof TileSwarm) {
TileSwarm swarm = (TileSwarm) tile;
if (swarm.containsBees()) {
for (ItemStack beeStack : InvTools.getStacks(swarm.contained)) {
for (ItemStack beeStack : InventoryUtil.getStacks(swarm.contained)) {
if (beeStack != null) {
StackUtils.dropItemStackAsEntity(beeStack, world, x, y, z);
ItemStackUtil.dropItemStackAsEntity(beeStack, world, x, y, z);
}
}
}
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.blocks;
import com.google.common.collect.ImmutableMap;
@@ -43,9 +43,10 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.apiculture.tiles.TileCandle;
import forestry.core.ForestryClient;
import forestry.core.render.TextureManager;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.StringUtil;
public class BlockCandle extends BlockTorch {
@@ -174,13 +175,13 @@ public class BlockCandle extends BlockTorch {
if (!isLit) {
if (heldItem == null || !lightingItems.contains(heldItem.getItem())) {
toggleLitState = false;
} else if (StackUtils.equals(this, heldItem) && isLit(heldItem)) {
} else if (ItemStackUtil.equals(this, heldItem) && isLit(heldItem)) {
toggleLitState = true;
}
}
if (heldItem != null) {
if (StackUtils.equals(this, heldItem)) {
if (ItemStackUtil.equals(this, heldItem)) {
if (!isLit(heldItem)) {
// Copy the colour of an unlit, coloured candle.
if (heldItem.hasTagCompound() && heldItem.getTagCompound().hasKey(colourTagName)) {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.blocks;
import java.util.List;
import java.util.Random;
@@ -27,10 +27,11 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.core.config.Defaults;
import forestry.apiculture.tiles.TileCandle;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.render.TextureManager;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.StringUtil;
public class BlockStump extends BlockTorch {
@@ -61,8 +62,8 @@ public class BlockStump extends BlockTorch {
if (held != null &&
(held.getItem() == Items.flint_and_steel ||
held.getItem() == Items.flint ||
StackUtils.equals(Blocks.torch, held))) {
world.setBlock(x, y, z, ForestryBlock.candle.block(), world.getBlockMetadata(x, y, z) | 0x08, Defaults.FLAG_BLOCK_SYNCH);
ItemStackUtil.equals(Blocks.torch, held))) {
world.setBlock(x, y, z, ForestryBlock.candle.block(), world.getBlockMetadata(x, y, z) | 0x08, Constants.FLAG_BLOCK_SYNCH);
TileCandle tc = new TileCandle();
tc.setColour(0); // default to white
world.setTileEntity(x, y, z, tc);
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.entities;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.ai.EntityAIBase;
@@ -22,12 +22,12 @@ import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBee;
import forestry.core.config.Defaults;
import forestry.core.utils.ForestryResource;
import forestry.core.config.Constants;
import forestry.core.render.ForestryResource;
public class EntityBee extends EntityCreature implements IAnimals {
private static final String DEFAULT_TEXTURE = Defaults.TEXTURE_PATH_ENTITIES + "/bees/honeyBee.png";
private static final String DEFAULT_TEXTURE = Constants.TEXTURE_PATH_ENTITIES + "/bees/honeyBee.png";
private IBee contained;
private IAlleleBeeSpecies species;
@@ -8,14 +8,14 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.render;
package forestry.apiculture.entities;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
public class EntityBeeFX extends EntityFX {
public EntityBeeFX(World world, double x, double y, double z, int color) {
public class EntityFXBee extends EntityFX {
public EntityFXBee(World world, double x, double y, double z, int color) {
super(world, x, y, z, 0.0D, 0.0D, 0.0D);
particleRed = (color >> 16 & 255) / 255.0F;
@@ -48,8 +48,8 @@ import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.apiculture.BeeHousingModifier;
import forestry.core.vect.MutableVect;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.MutableVect;
import forestry.core.utils.vect.Vect;
import forestry.plugins.PluginManager;
public final class FlowerRegistry implements IFlowerRegistry {
@@ -18,7 +18,7 @@ import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
public class VanillaDirtGrassGrowthRule implements IFlowerGrowthRule {
@@ -34,7 +34,7 @@ public class VanillaDirtGrassGrowthRule implements IFlowerGrowthRule {
}
IFlower flower = flowerRegistry.getRandomPlantableFlower(flowerType, world.rand);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Defaults.FLAG_BLOCK_SYNCH);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Constants.FLAG_BLOCK_SYNCH);
}
}
@@ -18,7 +18,7 @@ import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
public class VanillaMyceliumGrowthRule implements IFlowerGrowthRule {
@@ -34,7 +34,7 @@ public class VanillaMyceliumGrowthRule implements IFlowerGrowthRule {
}
IFlower flower = fr.getRandomPlantableFlower(flowerType, world.rand);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Defaults.FLAG_BLOCK_SYNCH);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Constants.FLAG_BLOCK_SYNCH);
}
}
@@ -18,7 +18,7 @@ import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerGrowthRule;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.genetics.IIndividual;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
public class VanillaSnowGrowthRule implements IFlowerGrowthRule {
@@ -34,7 +34,7 @@ public class VanillaSnowGrowthRule implements IFlowerGrowthRule {
}
IFlower flower = fr.getRandomPlantableFlower(flowerType, world.rand);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Defaults.FLAG_BLOCK_SYNCH);
return world.setBlock(x, y, z, flower.getBlock(), flower.getMeta(), Constants.FLAG_BLOCK_SYNCH);
}
}
@@ -53,18 +53,18 @@ import forestry.api.genetics.IIndividual;
import forestry.api.genetics.IMutation;
import forestry.api.genetics.IPollinatable;
import forestry.apiculture.BeeHousingModifier;
import forestry.arboriculture.genetics.FakePollinatable;
import forestry.arboriculture.genetics.ICheckPollinatable;
import forestry.core.EnumErrorCode;
import forestry.arboriculture.genetics.pollination.FakePollinatable;
import forestry.arboriculture.genetics.pollination.ICheckPollinatable;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.errors.EnumErrorCode;
import forestry.core.genetics.Chromosome;
import forestry.core.genetics.GenericRatings;
import forestry.core.genetics.IndividualLiving;
import forestry.core.proxy.Proxies;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.Log;
import forestry.core.utils.StringUtil;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class Bee extends IndividualLiving implements IBee {
@@ -269,7 +269,7 @@ public class Bee extends IndividualLiving implements IBee {
errorStates.add(EnumErrorCode.NOTDAY);
}
if (housing.getBlockLightValue() > Defaults.APIARY_MIN_LEVEL_LIGHT) {
if (housing.getBlockLightValue() > Constants.APIARY_MIN_LEVEL_LIGHT) {
if (!canWorkDuringDay()) {
errorStates.add(EnumErrorCode.NOTGLOOMY);
}
@@ -439,12 +439,12 @@ public class Bee extends IndividualLiving implements IBee {
@Override
public ItemStack[] produceStacks(IBeeHousing housing) {
if (housing == null) {
Proxies.log.warning("Failed to produce in an apiary because the beehousing was null.");
Log.warning("Failed to produce in an apiary because the beehousing was null.");
return null;
}
IBeekeepingMode mode = BeeManager.beeRoot.getBeekeepingMode(housing.getWorld());
if (mode == null) {
Proxies.log.warning("Failed to produce in an apiary because the beekeeping mode was null.");
Log.warning("Failed to produce in an apiary because the beekeeping mode was null.");
return null;
}
@@ -14,6 +14,7 @@ import forestry.api.apiculture.IAlleleBeeSpeciesCustom;
import forestry.api.apiculture.IBeeFactory;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.apiculture.genetics.alleles.AlleleBeeSpecies;
public class BeeFactory implements IBeeFactory {
@Override
@@ -15,7 +15,6 @@ import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import javax.annotation.Nonnull;
import java.util.concurrent.TimeUnit;
import net.minecraft.item.ItemStack;
@@ -38,7 +37,7 @@ import forestry.core.genetics.Genome;
import forestry.core.genetics.alleles.AlleleArea;
import forestry.core.genetics.alleles.AlleleBoolean;
import forestry.core.genetics.alleles.AlleleTolerance;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class BeeGenome extends Genome implements IBeeGenome {
/**
@@ -22,7 +22,7 @@ import forestry.api.apiculture.IBeeMutationCustom;
import forestry.api.apiculture.IBeeRoot;
import forestry.api.genetics.IAllele;
import forestry.apiculture.BeeHousingModifier;
import forestry.core.genetics.Mutation;
import forestry.core.genetics.mutations.Mutation;
public class BeeMutation extends Mutation implements IBeeMutationCustom {
@@ -19,7 +19,7 @@ import net.minecraft.util.ChunkCoordinates;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
/**
* Hermits will not produce if there are any other living creatures nearby.
@@ -19,7 +19,7 @@ import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IJubilanceProvider;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
public class JubilanceRequiresResource implements IJubilanceProvider {
@@ -36,7 +36,7 @@ public class JubilanceRequiresResource implements IJubilanceProvider {
Block block = world.getBlock(housingCoords.posX, housingCoords.posY - 1, housingCoords.posZ);
int meta = world.getBlockMetadata(housingCoords.posX, housingCoords.posY - 1, housingCoords.posZ);
return StackUtils.equals(block, meta, blockRequired);
return ItemStackUtil.equals(block, meta, blockRequired);
}
}
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.ArrayList;
import java.util.Collections;
@@ -38,10 +38,11 @@ import forestry.api.apiculture.IJubilanceProvider;
import forestry.api.core.IIconProvider;
import forestry.api.genetics.IClassification;
import forestry.api.genetics.IIndividual;
import forestry.apiculture.genetics.JubilanceDefault;
import forestry.core.genetics.alleles.AlleleSpecies;
import forestry.core.render.TextureManager;
import forestry.core.utils.GeneticsUtil;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpeciesCustom {
private final Map<ItemStack, Float> productChances = new HashMap<ItemStack, Float>();
@@ -141,11 +142,11 @@ public class AlleleBeeSpecies extends AlleleSpecies implements IAlleleBeeSpecies
if (bountyLevel > 10) {
for (ItemStack stack : specialtyChances.keySet()) {
bounty.add(StackUtils.copyWithRandomSize(stack, (int) ((float) bountyLevel / 2), world.rand));
bounty.add(ItemStackUtil.copyWithRandomSize(stack, (int) ((float) bountyLevel / 2), world.rand));
}
}
for (ItemStack stack : productChances.keySet()) {
bounty.add(StackUtils.copyWithRandomSize(stack, (int) ((float) bountyLevel / 2), world.rand));
bounty.add(ItemStackUtil.copyWithRandomSize(stack, (int) ((float) bountyLevel / 2), world.rand));
}
return bounty.toArray(new ItemStack[bounty.size()]);
}
@@ -8,16 +8,16 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import forestry.api.apiculture.BeeManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
@@ -8,16 +8,16 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import forestry.api.apiculture.BeeManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.Random;
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.core.vect.IVect;
import forestry.core.utils.vect.IVect;
public class AlleleEffectFertile extends AlleleEffectThrottled {
@@ -1,4 +1,4 @@
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import java.util.Random;
@@ -16,7 +16,7 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.core.genetics.EffectData;
import forestry.core.vect.IVect;
import forestry.core.utils.vect.IVect;
public class AlleleEffectFungification extends AlleleEffectThrottled {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@@ -19,7 +19,7 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumTemperature;
import forestry.api.genetics.IEffectData;
import forestry.core.proxy.Proxies;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class AlleleEffectGlacial extends AlleleEffectThrottled {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
@@ -8,16 +8,16 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import forestry.api.apiculture.BeeManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
@@ -8,15 +8,15 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import forestry.api.apiculture.BeeManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import net.minecraft.util.AxisAlignedBB;
@@ -19,8 +19,8 @@ import forestry.api.apiculture.IBeeModifier;
import forestry.api.genetics.IEffectData;
import forestry.apiculture.BeeHousingModifier;
import forestry.core.genetics.alleles.AlleleCategorized;
import forestry.core.vect.MutableVect;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.MutableVect;
import forestry.core.utils.vect.Vect;
import forestry.plugins.PluginApiculture;
public class AlleleEffectNone extends AlleleCategorized implements IAlleleBeeEffect {
@@ -8,13 +8,12 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import forestry.api.apiculture.BeeManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@@ -25,10 +24,12 @@ import net.minecraft.world.World;
import cpw.mods.fml.relauncher.ReflectionHelper;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
public class AlleleEffectPotion extends AlleleEffectThrottled {
@@ -97,7 +98,7 @@ public class AlleleEffectPotion extends AlleleEffectThrottled {
try {
return (Boolean) ReflectionHelper.getPrivateValue(Potion.class, potion, "field_76418_K", "isBadEffect");
} catch (ReflectionHelper.UnableToFindFieldException e) {
Proxies.log.severe("Could not access potion field isBadEffect.");
Log.severe("Could not access potion field isBadEffect.");
return false;
}
}
@@ -8,12 +8,11 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
import java.util.Random;
import forestry.api.apiculture.BeeManager;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -22,13 +21,14 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.apiculture.multiblock.TileAlveary;
import forestry.core.utils.DamageSourceForestry;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class AlleleEffectRadioactive extends AlleleEffectThrottled {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.List;
@@ -19,6 +19,7 @@ import net.minecraft.util.AxisAlignedBB;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.apiculture.entities.AIAvoidPlayers;
public class AlleleEffectRepulsion extends AlleleEffectThrottled {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import java.util.ArrayList;
import java.util.Collections;
@@ -33,8 +33,8 @@ import net.minecraft.util.AxisAlignedBB;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
import forestry.core.utils.StackUtils;
import forestry.core.utils.Utils;
import forestry.core.utils.EntityUtil;
import forestry.core.utils.ItemStackUtil;
public class AlleleEffectResurrection extends AlleleEffectThrottled {
@@ -96,8 +96,8 @@ public class AlleleEffectResurrection extends AlleleEffectThrottled {
ItemStack contained = item.getEntityItem();
for (Resurrectable entry : resurrectables) {
if (StackUtils.isIdenticalItem(entry.res, contained)) {
Utils.spawnEntity(housing.getWorld(), entry.risen, item.posX, item.posY, item.posZ);
if (ItemStackUtil.isIdenticalItem(entry.res, contained)) {
EntityUtil.spawnEntity(housing.getWorld(), entry.risen, item.posX, item.posY, item.posZ);
contained.stackSize--;
if (contained.stackSize <= 0) {
item.setDead();
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@@ -21,9 +21,9 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumTemperature;
import forestry.api.genetics.IEffectData;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class AlleleEffectSnowing extends AlleleEffectThrottled {
@@ -66,7 +66,7 @@ public class AlleleEffectSnowing extends AlleleEffectThrottled {
if (block == Blocks.snow_layer) {
int meta = world.getBlockMetadata(posBlock.x, posBlock.y, posBlock.z);
if (meta < 7) {
world.setBlockMetadataWithNotify(posBlock.x, posBlock.y, posBlock.z, meta + 1, Defaults.FLAG_BLOCK_SYNCH_AND_UPDATE);
world.setBlockMetadataWithNotify(posBlock.x, posBlock.y, posBlock.z, meta + 1, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
}
} else if (block.isReplaceable(world, posBlock.x, posBlock.y, posBlock.z)) {
Proxies.common.setBlockWithNotify(world, posBlock.x, posBlock.y, posBlock.z, Blocks.snow_layer);
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.genetics;
package forestry.apiculture.genetics.alleles;
import forestry.api.genetics.IAlleleFlowers;
import forestry.api.genetics.IFlowerProvider;
@@ -14,15 +14,15 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ICrafting;
import forestry.apiculture.BeeHousingInventory;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.gadgets.TileBeeHousing;
import forestry.apiculture.tiles.TileAbstractBeeHousing;
import forestry.apiculture.tiles.TileApiary;
import forestry.core.gui.ContainerTile;
import forestry.core.gui.slots.SlotFiltered;
import forestry.core.gui.slots.SlotOutput;
public class ContainerBeeHousing extends ContainerTile<TileBeeHousing> {
public class ContainerBeeHousing extends ContainerTile<TileAbstractBeeHousing> {
public ContainerBeeHousing(InventoryPlayer player, TileBeeHousing tile, boolean hasFrames) {
public ContainerBeeHousing(InventoryPlayer player, TileAbstractBeeHousing tile, boolean hasFrames) {
super(tile, player, 8, 108);
// Queen/Princess
@@ -14,16 +14,15 @@ import net.minecraft.entity.player.InventoryPlayer;
import forestry.apiculture.multiblock.IAlvearyController;
import forestry.apiculture.multiblock.TileAlvearyPlain;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
import forestry.core.gui.ledgers.OwnerLedger;
import forestry.core.utils.EnumTankLevel;
import forestry.core.utils.Utils;
import forestry.core.render.EnumTankLevel;
public class GuiAlveary extends GuiForestryTitled<ContainerAlveary, TileAlvearyPlain> {
public GuiAlveary(InventoryPlayer inventory, TileAlvearyPlain tile) {
super(Defaults.TEXTURE_PATH_GUI + "/alveary.png", new ContainerAlveary(inventory, tile), tile);
super(Constants.TEXTURE_PATH_GUI + "/alveary.png", new ContainerAlveary(inventory, tile), tile);
ySize = 190;
}
@@ -33,7 +32,7 @@ public class GuiAlveary extends GuiForestryTitled<ContainerAlveary, TileAlvearyP
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
IAlvearyController alvearyController = inventory.getAlvearyController();
drawHealthMeter(guiLeft + 20, guiTop + 37, alvearyController.getHealthScaled(46), Utils.rateTankLevel(alvearyController.getHealthScaled(100)));
drawHealthMeter(guiLeft + 20, guiTop + 37, alvearyController.getHealthScaled(46), EnumTankLevel.rateTankLevel(alvearyController.getHealthScaled(100)));
}
private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
@@ -13,14 +13,14 @@ package forestry.apiculture.gui;
import net.minecraft.entity.player.InventoryPlayer;
import forestry.apiculture.multiblock.TileAlvearyHygroregulator;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
import forestry.core.gui.widgets.TankWidget;
public class GuiAlvearyHygroregulator extends GuiForestryTitled<ContainerAlvearyHygroregulator, TileAlvearyHygroregulator> {
public GuiAlvearyHygroregulator(InventoryPlayer inventory, TileAlvearyHygroregulator tile) {
super(Defaults.TEXTURE_PATH_GUI + "/hygroregulator.png", new ContainerAlvearyHygroregulator(inventory, tile), tile);
super(Constants.TEXTURE_PATH_GUI + "/hygroregulator.png", new ContainerAlvearyHygroregulator(inventory, tile), tile);
widgetManager.add(new TankWidget(this.widgetManager, 104, 17, 0));
}
@@ -13,13 +13,13 @@ package forestry.apiculture.gui;
import net.minecraft.entity.player.InventoryPlayer;
import forestry.apiculture.multiblock.TileAlvearySieve;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
public class GuiAlvearySieve extends GuiForestryTitled<ContainerAlvearySieve, TileAlvearySieve> {
public GuiAlvearySieve(InventoryPlayer inventory, TileAlvearySieve tile) {
super(Defaults.TEXTURE_PATH_GUI + "/sieve.png", new ContainerAlvearySieve(inventory, tile), tile);
super(Constants.TEXTURE_PATH_GUI + "/sieve.png", new ContainerAlvearySieve(inventory, tile), tile);
}
}
@@ -13,13 +13,13 @@ package forestry.apiculture.gui;
import net.minecraft.entity.player.InventoryPlayer;
import forestry.apiculture.multiblock.TileAlvearySwarmer;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
public class GuiAlvearySwarmer extends GuiForestryTitled<ContainerAlvearySwarmer, TileAlvearySwarmer> {
public GuiAlvearySwarmer(InventoryPlayer inventory, TileAlvearySwarmer tile) {
super(Defaults.TEXTURE_PATH_GUI + "/swarmer.png", new ContainerAlvearySwarmer(inventory, tile), tile);
super(Constants.TEXTURE_PATH_GUI + "/swarmer.png", new ContainerAlvearySwarmer(inventory, tile), tile);
}
}
@@ -12,24 +12,23 @@ package forestry.apiculture.gui;
import net.minecraft.entity.player.InventoryPlayer;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.gadgets.TileBeeHousing;
import forestry.apiculture.gadgets.TileBeehouse;
import forestry.core.config.Defaults;
import forestry.apiculture.tiles.TileAbstractBeeHousing;
import forestry.apiculture.tiles.TileApiary;
import forestry.apiculture.tiles.TileBeeHouse;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestryTitled;
import forestry.core.utils.EnumTankLevel;
import forestry.core.utils.Utils;
import forestry.core.render.EnumTankLevel;
public class GuiBeeHousing extends GuiForestryTitled<ContainerBeeHousing, TileBeeHousing> {
public class GuiBeeHousing extends GuiForestryTitled<ContainerBeeHousing, TileAbstractBeeHousing> {
public GuiBeeHousing(InventoryPlayer inventory, TileApiary tile) {
super(Defaults.TEXTURE_PATH_GUI + "/apiary.png", new ContainerBeeHousing(inventory, tile, true), tile);
super(Constants.TEXTURE_PATH_GUI + "/apiary.png", new ContainerBeeHousing(inventory, tile, true), tile);
ySize = 190;
}
public GuiBeeHousing(InventoryPlayer inventory, TileBeehouse tile) {
super(Defaults.TEXTURE_PATH_GUI + "/alveary.png", new ContainerBeeHousing(inventory, tile, false), tile);
public GuiBeeHousing(InventoryPlayer inventory, TileBeeHouse tile) {
super(Constants.TEXTURE_PATH_GUI + "/alveary.png", new ContainerBeeHousing(inventory, tile, false), tile);
ySize = 190;
}
@@ -38,7 +37,7 @@ public class GuiBeeHousing extends GuiForestryTitled<ContainerBeeHousing, TileBe
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), Utils.rateTankLevel(inventory.getHealthScaled(100)));
drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100)));
}
private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
@@ -32,7 +32,7 @@ import forestry.core.genetics.alleles.AlleleBoolean;
import forestry.core.gui.ContainerAlyzer;
import forestry.core.gui.GuiAlyzer;
import forestry.core.utils.StringUtil;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class GuiBeealyzer extends GuiAlyzer {
@@ -27,7 +27,7 @@ import net.minecraftforge.common.BiomeDictionary;
import org.lwjgl.opengl.GL11;
import forestry.apiculture.items.ItemHabitatLocator.HabitatLocatorInventory;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.gui.GuiForestry;
import forestry.core.gui.widgets.Widget;
import forestry.core.proxy.Proxies;
@@ -55,7 +55,7 @@ public class GuiHabitatLocator extends GuiForestry<ContainerHabitatLocator, Habi
private int startY;
public GuiHabitatLocator(EntityPlayer player, HabitatLocatorInventory item) {
super(Defaults.TEXTURE_PATH_GUI + "/biomefinder.png", new ContainerHabitatLocator(player, item), item);
super(Constants.TEXTURE_PATH_GUI + "/biomefinder.png", new ContainerHabitatLocator(player, item), item);
xSize = 176;
ySize = 184;
@@ -23,7 +23,7 @@ import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.apiculture.genetics.BeeGenome;
import forestry.apiculture.items.ItemBeeGE;
import forestry.apiculture.items.ItemImprinter.ImprinterInventory;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.gui.GuiForestry;
import forestry.core.proxy.Proxies;
@@ -37,7 +37,7 @@ public class GuiImprinter extends GuiForestry<ContainerImprinter, ImprinterInven
private final Map<String, ItemStack> iconStacks = new HashMap<String, ItemStack>();
public GuiImprinter(InventoryPlayer inventoryplayer, ImprinterInventory inventory) {
super(Defaults.TEXTURE_PATH_GUI + "/imprinter.png", new ContainerImprinter(inventoryplayer, inventory), inventory);
super(Constants.TEXTURE_PATH_GUI + "/imprinter.png", new ContainerImprinter(inventoryplayer, inventory), inventory);
xSize = 176;
ySize = 185;
@@ -23,7 +23,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.IArmorApiarist;
import forestry.api.core.IArmorNaturalist;
import forestry.api.core.Tabs;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.render.TextureManager;
import forestry.core.utils.StringUtil;
@@ -39,9 +39,9 @@ public class ItemArmorApiarist extends ItemArmor implements IArmorApiarist, IArm
@Override
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
if (ForestryItem.apiaristLegs.isItemEqual(stack)) {
return Defaults.ID + ":" + Defaults.TEXTURE_APIARIST_ARMOR_SECONDARY;
return Constants.ID + ":" + Constants.TEXTURE_APIARIST_ARMOR_SECONDARY;
} else {
return Defaults.ID + ":" + Defaults.TEXTURE_APIARIST_ARMOR_PRIMARY;
return Constants.ID + ":" + Constants.TEXTURE_APIARIST_ARMOR_PRIMARY;
}
}
@@ -20,13 +20,27 @@ import forestry.api.apiculture.IBee;
import forestry.api.core.ForestryAPI;
import forestry.api.core.Tabs;
import forestry.core.config.Config;
import forestry.core.interfaces.IHintSource;
import forestry.core.inventory.AlyzerInventory;
import forestry.core.items.ItemInventoried;
import forestry.core.gui.IHintSource;
import forestry.core.items.ItemAlyzer;
import forestry.core.network.GuiId;
import forestry.core.proxy.Proxies;
public class ItemBeealyzer extends ItemInventoried {
public class ItemBeealyzer extends ItemAlyzer {
public ItemBeealyzer() {
super();
setMaxStackSize(1);
setCreativeTab(Tabs.tabApiculture);
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {
if (Proxies.common.isSimulating(world)) {
entityplayer.openGui(ForestryAPI.instance, GuiId.BeealyzerGUI.ordinal(), world, (int) entityplayer.posX, (int) entityplayer.posY, (int) entityplayer.posZ);
}
return itemstack;
}
public static class BeealyzerInventory extends AlyzerInventory implements IHintSource {
@@ -90,18 +104,4 @@ public class ItemBeealyzer extends ItemInventoried {
}
}
public ItemBeealyzer() {
super();
setMaxStackSize(1);
setCreativeTab(Tabs.tabApiculture);
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {
if (Proxies.common.isSimulating(world)) {
entityplayer.openGui(ForestryAPI.instance, GuiId.BeealyzerGUI.ordinal(), world, (int) entityplayer.posX, (int) entityplayer.posY, (int) entityplayer.posZ);
}
return itemstack;
}
}
@@ -12,15 +12,15 @@ package forestry.apiculture.items;
import net.minecraft.block.Block;
import forestry.core.gadgets.IStructureBlockItem;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.IStructureBlockItem;
import forestry.core.items.ItemBlockForestry;
/**
* @author CovertJaguar <http://www.railcraft.info/>
*/
public class ItemAlvearyBlock extends ItemForestryBlock implements IStructureBlockItem {
public class ItemBlockAlveary extends ItemBlockForestry implements IStructureBlockItem {
public ItemAlvearyBlock(Block block) {
public ItemBlockAlveary(Block block) {
super(block);
}
}
@@ -18,12 +18,12 @@ import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.apiculture.gadgets.BlockCandle;
import forestry.core.items.ItemForestryBlock;
import forestry.apiculture.blocks.BlockCandle;
import forestry.core.items.ItemBlockForestry;
public class ItemCandleBlock extends ItemForestryBlock {
public class ItemBlockCandle extends ItemBlockForestry {
public ItemCandleBlock(Block block) {
public ItemBlockCandle(Block block) {
super(block);
}
@@ -44,16 +44,16 @@ import forestry.api.core.IErrorState;
import forestry.api.core.Tabs;
import forestry.api.genetics.AlleleManager;
import forestry.apiculture.render.TextureHabitatLocator;
import forestry.core.EnumErrorCode;
import forestry.core.config.Config;
import forestry.core.config.ForestryItem;
import forestry.core.interfaces.IHintSource;
import forestry.core.errors.EnumErrorCode;
import forestry.core.gui.IHintSource;
import forestry.core.inventory.ItemInventory;
import forestry.core.items.ItemInventoried;
import forestry.core.network.GuiId;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StringUtil;
import forestry.core.vect.Vect;
import forestry.core.utils.vect.Vect;
public class ItemHabitatLocator extends ItemInventoried {
@@ -12,7 +12,7 @@ package forestry.apiculture.items;
import net.minecraft.item.ItemStack;
import forestry.core.interfaces.ICraftingPlan;
import forestry.core.items.ICraftingPlan;
import forestry.core.items.ItemForestry;
public class ItemWaxCast extends ItemForestry implements ICraftingPlan {
@@ -36,6 +36,7 @@ import forestry.api.core.EnumTemperature;
import forestry.api.core.IClimateControlled;
import forestry.apiculture.BeeHousingInventory;
import forestry.apiculture.BeeHousingModifier;
import forestry.core.access.EnumAccess;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.multiblock.CoordTriplet;
import forestry.core.multiblock.IMultiblockPart;
@@ -47,8 +48,7 @@ import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.PacketGuiUpdate;
import forestry.core.proxy.Proxies;
import forestry.core.utils.EnumAccess;
import forestry.core.utils.Utils;
import forestry.core.utils.BlockUtil;
public class AlvearyController extends RectangularMultiblockControllerBase implements IAlvearyController, IClimateControlled {
@@ -179,7 +179,7 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
for (int slabX = minimumCoord.x; slabX <= maximumCoord.x; slabX++) {
for (int slabZ = minimumCoord.z; slabZ <= maximumCoord.z; slabZ++) {
Block block = worldObj.getBlock(slabX, slabY, slabZ);
if (!Utils.isWoodSlabBlock(block)) {
if (!BlockUtil.isWoodSlabBlock(block)) {
throw new MultiblockValidationException(StatCollector.translateToLocal("for.multiblock.alveary.error.needSlabs"));
}
@@ -29,14 +29,14 @@ import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IErrorLogic;
import forestry.apiculture.FakeBeekeepingLogic;
import forestry.core.delegates.FakeAccessHandler;
import forestry.core.delegates.FakeErrorLogic;
import forestry.core.interfaces.IAccessHandler;
import forestry.core.access.EnumAccess;
import forestry.core.access.FakeAccessHandler;
import forestry.core.access.IAccessHandler;
import forestry.core.errors.FakeErrorLogic;
import forestry.core.inventory.FakeInventoryAdapter;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.utils.EnumAccess;
public class FakeAlvearyController implements IAlvearyController {
public static final FakeAlvearyController instance = new FakeAlvearyController();
@@ -12,9 +12,9 @@ package forestry.apiculture.multiblock;
import forestry.api.apiculture.IAlvearyComponent;
import forestry.api.apiculture.IBeeHousing;
import forestry.core.interfaces.IClimatised;
import forestry.core.interfaces.IRestrictedAccessTile;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.tiles.IClimatised;
import forestry.core.tiles.IRestrictedAccessTile;
public interface IAlvearyController extends IBeeHousing, IClimatised, IRestrictedAccessTile {
IInventoryAdapter getInternalInventory();
@@ -12,7 +12,7 @@ package forestry.apiculture.multiblock;
import net.minecraft.util.StatCollector;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.core.multiblock.MultiblockControllerBase;
import forestry.core.multiblock.MultiblockValidationException;
import forestry.core.multiblock.rectangular.RectangularMultiblockTileEntityBase;
@@ -18,8 +18,8 @@ import net.minecraftforge.common.util.ForgeDirection;
import forestry.api.apiculture.IAlvearyComponent;
import forestry.api.core.IClimateControlled;
import forestry.apiculture.network.PacketActiveUpdate;
import forestry.core.interfaces.IActivatable;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IActivatable;
import forestry.energy.EnergyManager;
import cofh.api.energy.IEnergyHandler;
@@ -10,7 +10,7 @@
******************************************************************************/
package forestry.apiculture.multiblock;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
public class TileAlvearyFan extends TileAlvearyClimatiser {
@@ -10,7 +10,7 @@
******************************************************************************/
package forestry.apiculture.multiblock;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
public class TileAlvearyHeater extends TileAlvearyClimatiser {
@@ -23,18 +23,18 @@ import net.minecraftforge.fluids.FluidTankInfo;
import forestry.api.apiculture.IAlvearyComponent;
import forestry.api.core.IClimateControlled;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.core.config.Defaults;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.core.config.Constants;
import forestry.core.fluids.FluidHelper;
import forestry.core.fluids.Fluids;
import forestry.core.fluids.TankManager;
import forestry.core.fluids.tanks.FilteredTank;
import forestry.core.interfaces.ILiquidTankContainer;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.inventory.TileInventoryAdapter;
import forestry.core.network.GuiId;
import forestry.core.tiles.ILiquidTankTile;
public class TileAlvearyHygroregulator extends TileAlvearyWithGui implements IInventory, ILiquidTankContainer, IAlvearyComponent.Climatiser {
public class TileAlvearyHygroregulator extends TileAlvearyWithGui implements IInventory, ILiquidTankTile, IAlvearyComponent.Climatiser {
private final HygroregulatorRecipe[] recipes;
@@ -55,7 +55,7 @@ public class TileAlvearyHygroregulator extends TileAlvearyWithGui implements IIn
Fluid lava = Fluids.LAVA.getFluid();
Fluid liquidIce = Fluids.ICE.getFluid();
this.liquidTank = new FilteredTank(Defaults.PROCESSOR_TANK_CAPACITY, water, lava, liquidIce);
this.liquidTank = new FilteredTank(Constants.PROCESSOR_TANK_CAPACITY, water, lava, liquidIce);
this.tankManager = new TankManager(liquidTank);
this.recipes = new HygroregulatorRecipe[]{new HygroregulatorRecipe(new FluidStack(water, 1), 1, 0.01f, -0.005f),
@@ -35,9 +35,7 @@ import forestry.api.core.ForestryAPI;
import forestry.api.core.IErrorLogic;
import forestry.apiculture.trigger.ApicultureTriggers;
import forestry.core.config.Config;
import forestry.core.interfaces.IClimatised;
import forestry.core.interfaces.IHintSource;
import forestry.core.interfaces.ITitled;
import forestry.core.gui.IHintSource;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.multiblock.MultiblockControllerBase;
import forestry.core.multiblock.rectangular.PartPosition;
@@ -45,7 +43,9 @@ import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.GuiId;
import forestry.core.network.IStreamableGui;
import forestry.core.utils.Utils;
import forestry.core.tiles.IClimatised;
import forestry.core.tiles.ITitled;
import forestry.core.utils.BlockUtil;
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.ITriggerExternal;
@@ -62,7 +62,7 @@ public class TileAlvearyPlain extends TileAlveary implements IBeeHousing, IClima
if (!worldObj.isRemote) {
// set alveary entrance block meta
if (getPartPosition() == PartPosition.Frame) {
if (Utils.isWoodSlabBlock(worldObj.getBlock(xCoord, yCoord + 1, zCoord))) {
if (BlockUtil.isWoodSlabBlock(worldObj.getBlock(xCoord, yCoord + 1, zCoord))) {
this.worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, TileAlveary.ENTRANCE_META, 2);
}
}
@@ -20,13 +20,13 @@ import forestry.api.arboriculture.EnumGermlingType;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.ISpeciesRoot;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.core.config.ForestryItem;
import forestry.core.interfaces.ICrafter;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.inventory.TileInventoryAdapter;
import forestry.core.network.GuiId;
import forestry.core.utils.StackUtils;
import forestry.core.tiles.ICrafter;
import forestry.core.utils.ItemStackUtil;
public class TileAlvearySieve extends TileAlvearyWithGui implements ICrafter, IAlvearyComponent.BeeListener {
@@ -109,7 +109,7 @@ public class TileAlvearySieve extends TileAlvearyWithGui implements ICrafter, IA
@Override
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
return StackUtils.isIdenticalItem(ForestryItem.craftingMaterial.getItemStack(1, 3), itemStack);
return ItemStackUtil.isIdenticalItem(ForestryItem.craftingMaterial.getItemStack(1, 3), itemStack);
}
private boolean canStorePollen() {
@@ -14,7 +14,7 @@ import forestry.api.apiculture.DefaultBeeModifier;
import forestry.api.apiculture.IAlvearyComponent;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeModifier;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
public class TileAlvearyStabiliser extends TileAlveary implements IAlvearyComponent.BeeModifier {
@@ -22,20 +22,20 @@ import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IAlvearyComponent;
import forestry.api.apiculture.IBee;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.apiculture.network.PacketActiveUpdate;
import forestry.apiculture.worldgen.Hive;
import forestry.apiculture.worldgen.HiveDecorator;
import forestry.apiculture.worldgen.HiveDescriptionSwarmer;
import forestry.core.interfaces.IActivatable;
import forestry.core.access.EnumAccess;
import forestry.core.inventory.IInventoryAdapter;
import forestry.core.inventory.TileInventoryAdapter;
import forestry.core.inventory.wrappers.IInvSlot;
import forestry.core.inventory.wrappers.InventoryIterator;
import forestry.core.network.GuiId;
import forestry.core.proxy.Proxies;
import forestry.core.utils.EnumAccess;
import forestry.core.utils.StackUtils;
import forestry.core.tiles.IActivatable;
import forestry.core.utils.ItemStackUtil;
public class TileAlvearySwarmer extends TileAlvearyWithGui implements ISidedInventory, IActivatable, IAlvearyComponent.Active {
@@ -118,7 +118,7 @@ public class TileAlvearySwarmer extends TileAlvearyWithGui implements ISidedInve
for (IInvSlot slot : InventoryIterator.getIterable(getInternalInventory())) {
ItemStack stack = slot.getStackInSlot();
for (Entry<ItemStack, Integer> entry : BeeManager.inducers.entrySet()) {
if (StackUtils.isIdenticalItem(entry.getKey(), stack)) {
if (ItemStackUtil.isIdenticalItem(entry.getKey(), stack)) {
slot.decreaseStackInSlot();
return entry.getValue();
}
@@ -235,7 +235,7 @@ public class TileAlvearySwarmer extends TileAlvearyWithGui implements ISidedInve
@Override
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
return StackUtils.containsItemStack(BeeManager.inducers.keySet(), itemStack);
return ItemStackUtil.containsItemStack(BeeManager.inducers.keySet(), itemStack);
}
}
}
@@ -17,14 +17,14 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChunkCoordinates;
import forestry.api.core.ForestryAPI;
import forestry.core.delegates.AccessHandler;
import forestry.core.interfaces.IAccessHandler;
import forestry.core.interfaces.IRestrictedAccessTile;
import forestry.core.interfaces.ITitled;
import forestry.core.access.AccessHandler;
import forestry.core.access.EnumAccess;
import forestry.core.access.IAccessHandler;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.GuiId;
import forestry.core.utils.EnumAccess;
import forestry.core.tiles.IRestrictedAccessTile;
import forestry.core.tiles.ITitled;
public abstract class TileAlvearyWithGui extends TileAlveary implements ITitled, IRestrictedAccessTile {
@@ -14,12 +14,12 @@ import java.io.IOException;
import net.minecraft.tileentity.TileEntity;
import forestry.core.interfaces.IActivatable;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.PacketCoordinates;
import forestry.core.network.PacketId;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IActivatable;
public class PacketActiveUpdate extends PacketCoordinates {
@@ -15,8 +15,8 @@ import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import forestry.apiculture.gadgets.TileCandle;
import forestry.apiculture.gui.ContainerImprinter;
import forestry.apiculture.tiles.TileCandle;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.IPacketHandler;
import forestry.core.network.PacketCoordinates;
@@ -2,7 +2,7 @@ package forestry.apiculture.network;
import java.io.IOException;
import forestry.apiculture.gadgets.TileCandle;
import forestry.apiculture.tiles.TileCandle;
import forestry.core.network.DataInputStreamForestry;
import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.PacketCoordinates;
@@ -13,7 +13,7 @@ package forestry.apiculture.proxy;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
import forestry.core.interfaces.IBlockRenderer;
import forestry.core.render.IBlockRenderer;
public class ProxyApiculture {
public void addBeeHiveFX(String texture, World world, ChunkCoordinates coordinates, int color) {
@@ -19,58 +19,58 @@ import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.RenderingRegistry;
import forestry.apiculture.entities.EntityBee;
import forestry.apiculture.render.BeeItemRenderer;
import forestry.apiculture.render.EntityBeeFX;
import forestry.apiculture.entities.EntityFXBee;
import forestry.apiculture.render.ParticleRenderer;
import forestry.apiculture.render.RenderBee;
import forestry.apiculture.render.RenderBeeEntity;
import forestry.apiculture.render.RenderBeeItem;
import forestry.core.config.ForestryItem;
import forestry.core.interfaces.IBlockRenderer;
import forestry.core.proxy.ClientProxyRender;
import forestry.core.proxy.ProxyRenderClient;
import forestry.core.render.IBlockRenderer;
import forestry.core.render.RenderAnalyzer;
import forestry.core.render.TextureManager;
import forestry.plugins.PluginApiculture;
public class ClientProxyApiculture extends ProxyApiculture {
public class ProxyApicultureClient extends ProxyApiculture {
@Override
public void initializeRendering() {
if (PluginApiculture.fancyRenderedBees) {
RenderingRegistry.registerEntityRenderingHandler(EntityBee.class, new RenderBee());
RenderingRegistry.registerEntityRenderingHandler(EntityBee.class, new RenderBeeEntity());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beeDroneGE.item(), new BeeItemRenderer());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beePrincessGE.item(), new BeeItemRenderer());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beeQueenGE.item(), new BeeItemRenderer());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beeDroneGE.item(), new RenderBeeItem());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beePrincessGE.item(), new RenderBeeItem());
MinecraftForgeClient.registerItemRenderer(ForestryItem.beeQueenGE.item(), new RenderBeeItem());
}
}
@Override
public void addBeeHiveFX(String icon, World world, ChunkCoordinates coordinates, int color) {
if (!ClientProxyRender.shouldSpawnParticle(world)) {
if (!ProxyRenderClient.shouldSpawnParticle(world)) {
return;
}
EntityFX fx = new EntityBeeFX(world, coordinates.posX + 0.5D, coordinates.posY + 0.5D, coordinates.posZ + 0.5D, color);
EntityFX fx = new EntityFXBee(world, coordinates.posX + 0.5D, coordinates.posY + 0.5D, coordinates.posZ + 0.5D, color);
fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
ParticleRenderer.getInstance().addEffect(fx);
}
@Override
public void addBeeSwarmFX(String icon, World world, double xCoord, double yCoord, double zCoord, int color) {
if (!ClientProxyRender.shouldSpawnParticle(world)) {
if (!ProxyRenderClient.shouldSpawnParticle(world)) {
return;
}
EntityFX fx;
if (world.rand.nextBoolean()) {
fx = new EntityBeeFX(world, xCoord, yCoord, zCoord, color);
fx = new EntityFXBee(world, xCoord, yCoord, zCoord, color);
} else {
double spawnX = xCoord + world.rand.nextInt(4) - 2;
double spawnY = yCoord + world.rand.nextInt(4) - 2;
double spawnZ = zCoord + world.rand.nextInt(4) - 2;
fx = new EntityBeeFX(world, spawnX, spawnY, spawnZ, color);
fx = new EntityFXBee(world, spawnX, spawnY, spawnZ, color);
}
fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
@@ -19,7 +19,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ForestryResource;
import forestry.core.render.ForestryResource;
public class ModelAnalyzer extends ModelBase {
@@ -16,11 +16,11 @@ import net.minecraft.util.ResourceLocation;
import forestry.apiculture.entities.EntityBee;
public class RenderBee extends RenderLiving {
public class RenderBeeEntity extends RenderLiving {
private final ModelBee beeModel;
public RenderBee() {
public RenderBeeEntity() {
super(new ModelBee(), 0.15f);
beeModel = (ModelBee) mainModel;
}
@@ -25,7 +25,7 @@ import forestry.api.apiculture.IBee;
import forestry.apiculture.entities.EntityBee;
import forestry.core.proxy.Proxies;
public class BeeItemRenderer implements IItemRenderer {
public class RenderBeeItem implements IItemRenderer {
private EntityBee entity;
@@ -19,11 +19,11 @@ import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import forestry.apiculture.gadgets.BlockCandle;
import forestry.apiculture.gadgets.TileCandle;
import forestry.apiculture.blocks.BlockCandle;
import forestry.apiculture.tiles.TileCandle;
import forestry.core.ForestryClient;
public class BlockCandleRenderer implements ISimpleBlockRenderingHandler {
public class RenderCandleBlock implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
@@ -26,18 +26,18 @@ import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.apiculture.BeeHousingInventory;
import forestry.core.config.Config;
import forestry.core.gadgets.TileBase;
import forestry.core.interfaces.IClimatised;
import forestry.core.proxy.Proxies;
import forestry.core.tiles.IClimatised;
import forestry.core.tiles.TileBase;
public abstract class TileBeeHousing extends TileBase implements IBeeHousing, IClimatised {
public abstract class TileAbstractBeeHousing extends TileBase implements IBeeHousing, IClimatised {
private final IBeekeepingLogic beeLogic;
private BiomeGenBase cachedBiome;
// CLIENT
private int breedingProgressPercent = 0;
protected TileBeeHousing() {
protected TileAbstractBeeHousing() {
setHints(Config.hints.get("apiary"));
this.beeLogic = BeeManager.beeRoot.createBeekeepingLogic(this);
}
@@ -167,9 +167,9 @@ public abstract class TileBeeHousing extends TileBase implements IBeeHousing, IC
}
public static class TileBeeHousingInventory extends BeeHousingInventory {
private final TileBeeHousing tile;
private final TileAbstractBeeHousing tile;
public TileBeeHousingInventory(TileBeeHousing tile, int size, String name) {
public TileBeeHousingInventory(TileAbstractBeeHousing tile, int size, String name) {
super(size, name, tile.getAccessHandler());
this.tile = tile;
}
@@ -8,19 +8,19 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import net.minecraft.block.Block;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import forestry.api.apiculture.BeeManager;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.gadgets.TileNaturalistChest;
import forestry.core.inventory.InventoryPlain;
import forestry.core.network.GuiId;
import forestry.core.utils.PlainInventory;
import forestry.core.utils.Utils;
import forestry.core.tiles.TileNaturalistChest;
import forestry.core.tiles.TileUtil;
public class TileApiaristChest extends TileNaturalistChest {
@@ -43,7 +43,7 @@ public class TileApiaristChest extends TileNaturalistChest {
}
private void migrateFromLegacyBlock() {
IInventory inventoryCopy = new PlainInventory(getInternalInventory());
IInventory inventoryCopy = new InventoryPlain(getInternalInventory());
// clear the inventory so it isn't dropped when the block is replaced
for (int i = 0; i < getSizeInventory(); i++) {
@@ -51,9 +51,9 @@ public class TileApiaristChest extends TileNaturalistChest {
}
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
worldObj.setBlock(xCoord, yCoord, zCoord, ForestryBlock.apicultureChest.block(), Defaults.DEFINITION_APIARISTCHEST_META, Defaults.FLAG_BLOCK_SYNCH_AND_UPDATE);
worldObj.setBlock(xCoord, yCoord, zCoord, ForestryBlock.apicultureChest.block(), Constants.DEFINITION_APIARISTCHEST_META, Constants.FLAG_BLOCK_SYNCH_AND_UPDATE);
TileApiaristChest tile = Utils.getTile(worldObj, xCoord, yCoord, zCoord, TileApiaristChest.class);
TileApiaristChest tile = TileUtil.getTile(worldObj, xCoord, yCoord, zCoord, TileApiaristChest.class);
for (int i = 0; i < getSizeInventory(); i++) {
ItemStack stack = inventoryCopy.getStackInSlot(i);
tile.setInventorySlotContents(i, stack);
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import java.util.ArrayList;
import java.util.Collection;
@@ -40,11 +40,11 @@ import forestry.api.core.ForestryAPI;
import forestry.apiculture.trigger.ApicultureTriggers;
import forestry.core.inventory.wrappers.InventoryMapper;
import forestry.core.network.GuiId;
import forestry.core.utils.Utils;
import forestry.core.utils.SlotUtil;
import buildcraft.api.statements.ITriggerExternal;
public class TileApiary extends TileBeeHousing {
public class TileApiary extends TileAbstractBeeHousing {
private static final IBeeModifier beeModifier = new ApiaryBeeModifier();
private final IBeeListener beeListener;
@@ -138,7 +138,7 @@ public class TileApiary extends TileBeeHousing {
@Override
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
if (Utils.isIndexInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null);
}
@@ -148,7 +148,7 @@ public class TileApiary extends TileBeeHousing {
// override for pipe automation
@Override
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
if (Utils.isIndexInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
return false;
}
return super.isItemValidForSlot(slotIndex, itemStack);
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import java.util.Collections;
@@ -23,13 +23,13 @@ import forestry.api.apiculture.IBeeModifier;
import forestry.api.core.ForestryAPI;
import forestry.core.network.GuiId;
public class TileBeehouse extends TileBeeHousing {
public class TileBeeHouse extends TileAbstractBeeHousing {
private static final IBeeModifier beeModifier = new BeehouseBeeModifier();
private final IBeeListener beeListener;
private final IBeeHousingInventory beeInventory;
public TileBeehouse() {
public TileBeeHouse() {
this.beeListener = new DefaultBeeListener();
TileBeeHousingInventory beeHousingInventory = new TileBeeHousingInventory(this, 12, "Items");
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
@@ -8,15 +8,15 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.apiculture.gadgets;
package forestry.apiculture.tiles;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.EnumSkyBlock;
import forestry.core.inventory.InvTools;
import forestry.core.inventory.InventoryAdapter;
import forestry.core.utils.InventoryUtil;
public class TileSwarm extends TileEntity {
@@ -43,7 +43,7 @@ public class TileSwarm extends TileEntity {
public TileSwarm setContained(ItemStack[] bees) {
for (ItemStack itemstack : bees) {
InvTools.addStack(contained, itemstack, true);
InventoryUtil.addStack(contained, itemstack, true);
}
return this;
@@ -15,7 +15,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import forestry.api.core.IErrorLogicSource;
import forestry.core.EnumErrorCode;
import forestry.core.errors.EnumErrorCode;
import forestry.core.triggers.Trigger;
import buildcraft.api.statements.IStatementContainer;
@@ -15,7 +15,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import forestry.api.core.IErrorLogicSource;
import forestry.core.EnumErrorCode;
import forestry.core.errors.EnumErrorCode;
import forestry.core.triggers.Trigger;
import buildcraft.api.statements.IStatementContainer;
@@ -14,7 +14,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.tiles.TileApiary;
import forestry.core.triggers.Trigger;
import buildcraft.api.statements.IStatementContainer;
@@ -37,13 +37,13 @@ import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IFlower;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.tiles.TileApiary;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.worldgen.BlockTypeLog;
import forestry.arboriculture.worldgen.BlockTypeVanillaStairs;
import forestry.arboriculture.worldgen.BlockTypeWood;
import forestry.arboriculture.worldgen.BlockTypeWoodStairs;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.worldgen.BlockType;
@@ -176,7 +176,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
// Escritoire
if (random.nextInt(2) == 0) {
IBlockType escritoireBlock = new BlockTypeTileForestry(ForestryBlock.core, Defaults.DEFINITION_ESCRITOIRE_META);
IBlockType escritoireBlock = new BlockTypeTileForestry(ForestryBlock.core, Constants.DEFINITION_ESCRITOIRE_META);
escritoireBlock.setDirection(getRotatedDirection(ForgeDirection.EAST));
placeBlockAtCurrentPosition(world, escritoireBlock, 1, 1, 3, structBoundingBox);
}
@@ -208,7 +208,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
}
generateStructureChestContents(world, structBoundingBox, random, 7, 1, 4,
ChestGenHooks.getItems(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, random),
ChestGenHooks.getItems(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, random),
random.nextInt(4) + random.nextInt(4) + 5);
spawnVillagers(world, boundingBox, 7, 1, 1, 2);
@@ -284,7 +284,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
return;
}
world.setBlock(xCoord, yCoord, zCoord, ForestryBlock.apiculture.block(), Defaults.DEFINITION_APIARY_META, Defaults.FLAG_BLOCK_SYNCH);
world.setBlock(xCoord, yCoord, zCoord, ForestryBlock.apiculture.block(), Constants.DEFINITION_APIARY_META, Constants.FLAG_BLOCK_SYNCH);
ForestryBlock.apiculture.block().onBlockAdded(world, xCoord, yCoord, zCoord);
TileEntity tile = world.getTileEntity(xCoord, yCoord, zCoord);
@@ -388,9 +388,9 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
@Override
protected int getVillagerType(int villagerCount) {
if (villagerCount <= 0) {
return Defaults.ID_VILLAGER_BEEKEEPER;
return Constants.ID_VILLAGER_BEEKEEPER;
} else {
return Defaults.ID_VILLAGER_LUMBERJACK;
return Constants.ID_VILLAGER_LUMBERJACK;
}
}
@@ -26,7 +26,7 @@ import net.minecraftforge.event.terraingen.TerrainGen;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.plugins.PluginApiculture;
public abstract class HiveDecorator {
@@ -132,7 +132,7 @@ public abstract class HiveDecorator {
private static boolean setHive(World world, int x, int y, int z, Hive hive) {
Block hiveBlock = hive.getHiveBlock();
boolean placed = world.setBlock(x, y, z, hiveBlock, hive.getHiveMeta(), Defaults.FLAG_BLOCK_SYNCH);
boolean placed = world.setBlock(x, y, z, hiveBlock, hive.getHiveMeta(), Constants.FLAG_BLOCK_SYNCH);
if (!placed) {
return false;
}
@@ -21,7 +21,7 @@ import forestry.api.apiculture.hives.IHiveDescription;
import forestry.api.apiculture.hives.IHiveGen;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.apiculture.gadgets.TileSwarm;
import forestry.apiculture.tiles.TileSwarm;
import forestry.core.config.ForestryBlock;
public class HiveDescriptionSwarmer implements IHiveDescription {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.ArrayList;
import java.util.List;
@@ -38,6 +38,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.arboriculture.IWoodTyped;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.tiles.TileWood;
import forestry.plugins.PluginArboriculture;
public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntityProvider {
@@ -83,11 +84,6 @@ public class BlockArbFence extends BlockFence implements IWoodTyped, ITileEntity
}
}
@Override
public int getRenderType() {
return PluginArboriculture.modelIdFences;
}
/* ICONS */
@SideOnly(Side.CLIENT)
@Override
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.ArrayList;
import java.util.List;
@@ -34,6 +34,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.arboriculture.IWoodTyped;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.tiles.TileWood;
public class BlockArbStairs extends BlockStairs implements IWoodTyped, ITileEntityProvider {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import javax.annotation.Nullable;
import java.util.ArrayList;
@@ -52,16 +52,17 @@ import forestry.api.lepidopterology.EnumFlutterType;
import forestry.api.lepidopterology.IButterfly;
import forestry.arboriculture.LeafDecayHelper;
import forestry.arboriculture.genetics.TreeDefinition;
import forestry.arboriculture.items.ItemLeavesBlock;
import forestry.arboriculture.render.LeafTexture;
import forestry.arboriculture.items.ItemBlockLeaves;
import forestry.arboriculture.render.TextureLeaves;
import forestry.arboriculture.tiles.TileLeaves;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginArboriculture;
import forestry.plugins.PluginLepidopterology;
public class ForestryBlockLeaves extends BlockNewLeaf implements ITileEntityProvider, IGrowable {
public class BlockForestryLeaves extends BlockNewLeaf implements ITileEntityProvider, IGrowable {
public ForestryBlockLeaves() {
public BlockForestryLeaves() {
this.setCreativeTab(Tabs.tabArboriculture);
}
@@ -191,7 +192,7 @@ public class ForestryBlockLeaves extends BlockNewLeaf implements ITileEntityProv
leaves.writeToNBTDecorative(shearedLeavesNBT);
for (ItemStack stack : ret) {
if (stack.getItem() instanceof ItemLeavesBlock) {
if (stack.getItem() instanceof ItemBlockLeaves) {
stack.setTagCompound(shearedLeavesNBT);
}
}
@@ -283,8 +284,8 @@ public class ForestryBlockLeaves extends BlockNewLeaf implements ITileEntityProv
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister register) {
LeafTexture.registerAllIcons(register);
defaultIcon = LeafTexture.get(EnumLeafType.DECIDUOUS).getFancy();
TextureLeaves.registerAllIcons(register);
defaultIcon = TextureLeaves.get(EnumLeafType.DECIDUOUS).getFancy();
}
@SideOnly(Side.CLIENT)
@@ -340,7 +341,7 @@ public class ForestryBlockLeaves extends BlockNewLeaf implements ITileEntityProv
IButterfly caterpillar = tile instanceof TileLeaves ? ((TileLeaves) tile).getCaterpillar() : null;
if (heldItem != null && (heldItem.getItem() instanceof IToolScoop) && caterpillar != null) {
ItemStack butterfly = PluginLepidopterology.butterflyInterface.getMemberStack(caterpillar, EnumFlutterType.CATERPILLAR.ordinal());
StackUtils.dropItemStackAsEntity(butterfly, world, x, y, z);
ItemStackUtil.dropItemStackAsEntity(butterfly, world, x, y, z);
((TileLeaves) tile).setCaterpillar(null);
return true;
}
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.ArrayList;
import java.util.Random;
@@ -26,10 +26,11 @@ import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.arboriculture.tiles.TileFruitPod;
import forestry.core.proxy.Proxies;
import forestry.core.render.TextureManager;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginArboriculture;
public class BlockFruitPod extends BlockCocoa {
@@ -70,7 +71,7 @@ public class BlockFruitPod extends BlockCocoa {
TileFruitPod tile = getPodTile(world, x, y, z);
if (tile != null) {
for (ItemStack drop : tile.getDrop()) {
StackUtils.dropItemStackAsEntity(drop, world, x, y, z);
ItemStackUtil.dropItemStackAsEntity(drop, world, x, y, z);
}
}
}
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.List;
@@ -26,6 +26,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.tiles.TileWood;
public class BlockLog extends BlockWood {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.List;
@@ -21,6 +21,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.tiles.TileWood;
public class BlockPlanks extends BlockWood {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.ArrayList;
import java.util.Random;
@@ -35,16 +35,17 @@ import forestry.api.arboriculture.IAlleleTreeSpecies;
import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.arboriculture.tiles.TileSapling;
import forestry.core.proxy.Proxies;
import forestry.core.render.TextureManager;
import forestry.core.utils.StackUtils;
import forestry.core.utils.Utils;
import forestry.core.tiles.TileUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.plugins.PluginArboriculture;
public class BlockSapling extends BlockTreeContainer implements IGrowable {
public static TileSapling getSaplingTile(IBlockAccess world, int x, int y, int z) {
return Utils.getTile(world, x, y, z, TileSapling.class);
return TileUtil.getTile(world, x, y, z, TileSapling.class);
}
public BlockSapling() {
@@ -181,7 +182,7 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable {
TileSapling sapling = getSaplingTile(world, x, y, z);
if (sapling != null && sapling.getTree() != null) {
ItemStack saplingStack = TreeManager.treeRoot.getMemberStack(sapling.getTree(), EnumGermlingType.SAPLING.ordinal());
StackUtils.dropItemStackAsEntity(saplingStack, world, x, y, z);
ItemStackUtil.dropItemStackAsEntity(saplingStack, world, x, y, z);
}
}
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.ArrayList;
import java.util.List;
@@ -38,6 +38,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.arboriculture.IWoodTyped;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.tiles.TileWood;
public class BlockSlab extends net.minecraft.block.BlockSlab implements IWoodTyped, ITileEntityProvider {
@@ -8,7 +8,7 @@
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.arboriculture.gadgets;
package forestry.arboriculture.blocks;
import java.util.Random;
@@ -17,6 +17,8 @@ import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import forestry.arboriculture.tiles.TileTreeContainer;
public abstract class BlockTreeContainer extends BlockContainer {
protected BlockTreeContainer(Material material) {
Loaded 100 of 576 files, more files were not shown because too many files have changed in this diff. Show more