mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 19:29:17 +00:00
Updated to ForestryMC/master
This commit is contained in:
commit
c95c527fb4
22 files changed
+132
-94
No files matched your search
@@ -21,14 +21,10 @@ public abstract class Circuit implements ICircuit {
|
||||
String uid;
|
||||
int limit = 1;
|
||||
boolean requiresDiscovery;
|
||||
String name;
|
||||
String[] descriptions;
|
||||
|
||||
public Circuit(String uid, boolean requiresDiscovery, String name, String[] descriptions) {
|
||||
public Circuit(String uid, boolean requiresDiscovery) {
|
||||
this.uid = uid;
|
||||
this.requiresDiscovery = requiresDiscovery;
|
||||
this.name = name;
|
||||
this.descriptions = descriptions;
|
||||
|
||||
ChipsetManager.circuitRegistry.registerCircuit(this);
|
||||
}
|
||||
@@ -54,14 +50,23 @@ public abstract class Circuit implements ICircuit {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "circuit." + this.name;
|
||||
return "circuit." + this.uid;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void addTooltip(List list) {
|
||||
for (String description : descriptions)
|
||||
list.add(" - " + StringUtil.localize(description));
|
||||
list.add(StringUtil.localize(getName()));
|
||||
|
||||
int i = 1;
|
||||
while (true) {
|
||||
String unlocalizedDescription = getName() + ".description." + i;
|
||||
String description = StringUtil.localize(unlocalizedDescription);
|
||||
if (description.endsWith(unlocalizedDescription))
|
||||
break;
|
||||
list.add(" - " + description);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
public static ICircuit energyElectricChoke1;
|
||||
|
||||
@@ -264,13 +264,6 @@ public abstract class TileForestry extends TileEntity implements INetworkedEntit
|
||||
return owner;
|
||||
}
|
||||
|
||||
public EntityPlayer getOwnerEntity() {
|
||||
if (owner != null)
|
||||
return worldObj.func_152378_a(owner.getId());
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOwner(EntityPlayer player) {
|
||||
this.owner = player.getGameProfile();
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
|
||||
import forestry.Forestry;
|
||||
import forestry.core.config.Defaults;
|
||||
@@ -38,7 +39,7 @@ public class ProxyNetwork {
|
||||
}
|
||||
|
||||
public void sendToPlayer(ForestryPacket packet, EntityPlayer entityplayer) {
|
||||
if (!(entityplayer instanceof EntityPlayerMP))
|
||||
if (!(entityplayer instanceof EntityPlayerMP) || (entityplayer instanceof FakePlayer))
|
||||
return;
|
||||
|
||||
EntityPlayerMP player = (EntityPlayerMP) entityplayer;
|
||||
|
||||
@@ -207,7 +207,7 @@ public class InventoryAdapter implements IInventory, INBTTagable {
|
||||
ItemStack[] condensedSet = StackUtils.condenseStacks(set, -1, false);
|
||||
|
||||
ItemStack[] stock = getStacks(firstSlotIndex, slotCount);
|
||||
if (StackUtils.containsSets(condensedSet, stock, null, oreDictionary, craftingTools) < count)
|
||||
if (StackUtils.containsSets(condensedSet, stock, oreDictionary, craftingTools) < count)
|
||||
return false;
|
||||
|
||||
for (ItemStack stackToRemove : condensedSet) {
|
||||
|
||||
@@ -255,7 +255,7 @@ public class StackUtils {
|
||||
* @return
|
||||
*/
|
||||
public static int containsSets(ItemStack[] set, ItemStack[] stock) {
|
||||
return containsSets(set, stock, null, false, false);
|
||||
return containsSets(set, stock, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -265,7 +265,7 @@ public class StackUtils {
|
||||
* @param stock
|
||||
* @return
|
||||
*/
|
||||
public static int containsSets(ItemStack[] set, ItemStack[] stock, ItemStack exclude, boolean oreDictionary, boolean craftingTools) {
|
||||
public static int containsSets(ItemStack[] set, ItemStack[] stock, boolean oreDictionary, boolean craftingTools) {
|
||||
int count = 0;
|
||||
|
||||
ItemStack[] condensedRequired = StackUtils.condenseStacks(set, -1, oreDictionary);
|
||||
@@ -276,9 +276,6 @@ public class StackUtils {
|
||||
boolean matched = false;
|
||||
for (ItemStack offer : condensedOffered) {
|
||||
|
||||
if (exclude != null && isIdenticalItem(offer, exclude))
|
||||
continue;
|
||||
|
||||
if (isCraftingEquivalent(req, offer, oreDictionary, craftingTools)) {
|
||||
matched = true;
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ package forestry.energy.circuits;
|
||||
|
||||
public class CircuitElectricBoost extends CircuitElectricChange {
|
||||
|
||||
public CircuitElectricBoost(String uid, int limit, int eu, int mj, String name, String[] description) {
|
||||
super(uid, false, name, description);
|
||||
public CircuitElectricBoost(String uid, int limit, int eu, int mj) {
|
||||
super(uid, false);
|
||||
this.setLimit(limit);
|
||||
this.configureChange(eu, mj);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ public abstract class CircuitElectricChange extends Circuit {
|
||||
int euChange = 7;
|
||||
int mjChange = 2;
|
||||
|
||||
public CircuitElectricChange(String uid, boolean requiresDiscovery, String name, String[] descriptions) {
|
||||
super(uid, requiresDiscovery, name, descriptions);
|
||||
public CircuitElectricChange(String uid, boolean requiresDiscovery) {
|
||||
super(uid, requiresDiscovery);
|
||||
}
|
||||
|
||||
protected void configureChange(int euChange, int mjChange) {
|
||||
|
||||
@@ -13,7 +13,7 @@ package forestry.energy.circuits;
|
||||
public class CircuitElectricChoke extends CircuitElectricChange {
|
||||
|
||||
public CircuitElectricChoke(String uid) {
|
||||
super(uid, false, "electric.choke.1", new String[] { "Reduces ouput by 1 MJ/t", "Reduces intake by 2 EU/t" });
|
||||
super(uid, false);
|
||||
this.configureChange(-2, -1);
|
||||
this.setLimit(1);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ package forestry.energy.circuits;
|
||||
public class CircuitElectricEfficiency extends CircuitElectricChange {
|
||||
|
||||
public CircuitElectricEfficiency(String uid) {
|
||||
super(uid, false, "electric.efficiency.1", new String[] { "Reduces intake by 1 EU/t" });
|
||||
super(uid, false);
|
||||
this.setLimit(1);
|
||||
this.configureChange(-1, 0);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import forestry.energy.gadgets.EngineCopper;
|
||||
public class CircuitFireDampener extends Circuit {
|
||||
|
||||
public CircuitFireDampener(String uid) {
|
||||
super(uid, false, "dampener.1", new String[] { "Reduces maximum output to 1 MJ/t", "Preserves fuel output" });
|
||||
super(uid, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -434,7 +434,9 @@ public class MachineCarpenter extends TilePowered implements ISidedInventory, IL
|
||||
return false;
|
||||
|
||||
// Need at least one matched set
|
||||
return StackUtils.containsSets(craftingInventory.getStacks(SLOT_CRAFTING_1, 9), accessibleInventory.getStacks(SLOT_INVENTORY_1, SLOT_INVENTORY_COUNT), null, true, false) > 0;
|
||||
ItemStack[] set = craftingInventory.getStacks(SLOT_CRAFTING_1, 9);
|
||||
ItemStack[] stock = accessibleInventory.getStacks(SLOT_INVENTORY_1, SLOT_INVENTORY_COUNT);
|
||||
return StackUtils.containsSets(set, stock, true, false) > 0;
|
||||
}
|
||||
|
||||
private boolean removeResources(Recipe recipe) {
|
||||
|
||||
@@ -84,7 +84,7 @@ public class MachineSqueezer extends TilePowered implements ISpecialInventory, I
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack[] res) {
|
||||
return StackUtils.containsSets(resources, res, null, true, true) > 0;
|
||||
return StackUtils.containsSets(resources, res, true, true) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -461,10 +461,61 @@ public class TileWorktable extends TileBase implements ICrafter {
|
||||
craftingInventory.setInventorySlotContents(SLOT_CRAFTING_RESULT, null);
|
||||
}
|
||||
|
||||
private boolean validateResources() {
|
||||
private boolean canCraftCurrentRecipe() {
|
||||
if (currentRecipe == null)
|
||||
return false;
|
||||
|
||||
// Need at least one matched set
|
||||
ItemStack[] set = craftingInventory.getStacks(SLOT_CRAFTING_1, 9);
|
||||
ItemStack[] stock = accessibleInventory.getStacks(SLOT_INVENTORY_1, SLOT_INVENTORY_COUNT);
|
||||
return StackUtils.containsSets(set, stock, currentRecipe.getRecipeOutput(), true, true) > 0;
|
||||
if (StackUtils.containsSets(set, stock, true, true) == 0)
|
||||
return false;
|
||||
|
||||
// Check that it doesn't make a different recipe.
|
||||
// For example:
|
||||
// Wood Logs are all ore dictionary equivalent with each other,
|
||||
// but an Oak Log shouldn't be able to make Ebony Wood Planks
|
||||
// because it makes Oak Wood Planks using the same recipe.
|
||||
// Strategy:
|
||||
// Create a fake crafting inventory using items we have in stock
|
||||
// in place of the ones in the saved crafting inventory.
|
||||
// Check that the recipe it makes is the same as the currentRecipe.
|
||||
InventoryCrafting crafting = new InventoryCrafting(DUMMY_CONTAINER, 3, 3);
|
||||
InventoryAdapter recipeMatrix = currentRecipe.getMatrix();
|
||||
ItemStack[] stockCopy = StackUtils.condenseStacks(stock);
|
||||
|
||||
for (int slot = 0; slot < recipeMatrix.getSizeInventory(); slot++) {
|
||||
ItemStack recipeStack = recipeMatrix.getStackInSlot(slot);
|
||||
if (recipeStack == null)
|
||||
continue;
|
||||
|
||||
// Use crafting equivalent (not oredict) items first
|
||||
for (ItemStack stockStack : stockCopy) {
|
||||
if (stockStack.stackSize > 0 && StackUtils.isCraftingEquivalent(recipeStack, stockStack, false, false)) {
|
||||
ItemStack stack = new ItemStack(stockStack.getItem(), 1, stockStack.getItemDamage());
|
||||
stockStack.stackSize--;
|
||||
crafting.setInventorySlotContents(slot, stack);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Use oredict items if crafting equivalent items aren't available
|
||||
if (crafting.getStackInSlot(slot) == null) {
|
||||
for (ItemStack stockStack : stockCopy) {
|
||||
if (stockStack.stackSize > 0 && StackUtils.isCraftingEquivalent(recipeStack, stockStack, true, true)) {
|
||||
ItemStack stack = new ItemStack(stockStack.getItem(), 1, stockStack.getItemDamage());
|
||||
stockStack.stackSize--;
|
||||
crafting.setInventorySlotContents(slot, stack);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
IRecipe recipe = RECIPE_BRIDGE.getRecipe(crafting, worldObj);
|
||||
if (recipe == null)
|
||||
return false;
|
||||
|
||||
return recipe.getRecipeOutput().isItemEqual(currentRecipe.getRecipeOutput());
|
||||
}
|
||||
|
||||
private boolean removeResources(EntityPlayer player) {
|
||||
@@ -474,7 +525,9 @@ public class TileWorktable extends TileBase implements ICrafter {
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack(int slotIndex) {
|
||||
return validateResources();
|
||||
if (slotIndex == SLOT_CRAFTING_RESULT)
|
||||
return canCraftCurrentRecipe();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,8 @@ public class CircuitFarmLogic extends Circuit {
|
||||
private Class<? extends FarmLogic> logicClass;
|
||||
private boolean isManual = false;
|
||||
|
||||
public CircuitFarmLogic(String uid, Class<? extends FarmLogic> logicClass, String[] descriptions) {
|
||||
super(uid, false, uid, descriptions);
|
||||
public CircuitFarmLogic(String uid, Class<? extends FarmLogic> logicClass) {
|
||||
super(uid, false);
|
||||
this.logicClass = logicClass;
|
||||
setLimit(4);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -80,25 +81,15 @@ public class MachineMailbox extends TileBase implements IMailContainer, ISpecial
|
||||
@Override
|
||||
public void updateServerSide() {
|
||||
if (!isLinked) {
|
||||
getOrCreateMailInventory();
|
||||
getOrCreateMailInventory(worldObj, getOwnerProfile());
|
||||
isLinked = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* MAIL HANDLING */
|
||||
public IInventory getOrCreateMailInventory() {
|
||||
return getOrCreateMailInventory(null);
|
||||
}
|
||||
public IInventory getOrCreateMailInventory(EntityPlayer player) {
|
||||
|
||||
GameProfile playerProfile;
|
||||
if (player != null) {
|
||||
playerProfile = player.getGameProfile();
|
||||
} else {
|
||||
playerProfile = getOwnerProfile();
|
||||
}
|
||||
|
||||
if (playerProfile == null)
|
||||
public IInventory getOrCreateMailInventory(World world, GameProfile playerProfile) {
|
||||
if (!Proxies.common.isSimulating(world))
|
||||
return new InventoryAdapter(POBox.SLOT_SIZE, "Letters");
|
||||
|
||||
IMailAddress address = PostManager.postRegistry.getMailAddress(playerProfile);
|
||||
@@ -121,7 +112,7 @@ public class MachineMailbox extends TileBase implements IMailContainer, ISpecial
|
||||
@Override
|
||||
public boolean hasMail() {
|
||||
|
||||
IInventory mailInventory = getOrCreateMailInventory();
|
||||
IInventory mailInventory = getOrCreateMailInventory(worldObj, getOwnerProfile());
|
||||
for (int i = 0; i < mailInventory.getSizeInventory(); i++)
|
||||
if (mailInventory.getStackInSlot(i) != null)
|
||||
return true;
|
||||
@@ -137,19 +128,6 @@ public class MachineMailbox extends TileBase implements IMailContainer, ISpecial
|
||||
return res;
|
||||
}
|
||||
|
||||
/* ISIDEDINVENTORY */
|
||||
private static int[] slotIndices;
|
||||
|
||||
public int[] getSizeInventorySide(int side) {
|
||||
IInventory inventory = getOrCreateMailInventory();
|
||||
if(slotIndices == null) {
|
||||
slotIndices = new int[inventory.getSizeInventory()];
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++)
|
||||
slotIndices[i] = i;
|
||||
}
|
||||
return slotIndices;
|
||||
}
|
||||
|
||||
/* ISPECIALINVENTORY */
|
||||
@Override
|
||||
public int addItem(ItemStack stack, boolean doAdd, ForgeDirection from) {
|
||||
@@ -168,7 +146,7 @@ public class MachineMailbox extends TileBase implements IMailContainer, ISpecial
|
||||
public ItemStack[] extractItem(boolean doRemove, ForgeDirection from, int maxItemCount) {
|
||||
|
||||
ItemStack product = null;
|
||||
IInventory mailInventory = getOrCreateMailInventory();
|
||||
IInventory mailInventory = getOrCreateMailInventory(worldObj, getOwnerProfile());
|
||||
|
||||
for (int i = 0; i < mailInventory.getSizeInventory(); i++) {
|
||||
ItemStack slotStack = mailInventory.getStackInSlot(i);
|
||||
|
||||
@@ -27,6 +27,9 @@ import forestry.plugins.PluginMail;
|
||||
|
||||
public class ContainerMailbox extends ContainerForestry {
|
||||
|
||||
public static final short SLOT_LETTERS = 0;
|
||||
public static final short SLOT_LETTERS_COUNT = 7 * 12;
|
||||
|
||||
MachineMailbox mailbox;
|
||||
POBox mailinventory;
|
||||
|
||||
@@ -36,7 +39,7 @@ public class ContainerMailbox extends ContainerForestry {
|
||||
// Mailbox contents
|
||||
this.mailbox = tile;
|
||||
|
||||
IInventory inv = mailbox.getOrCreateMailInventory(player.player);
|
||||
IInventory inv = mailbox.getOrCreateMailInventory(player.player.worldObj, player.player.getGameProfile());
|
||||
if (inv instanceof POBox)
|
||||
mailinventory = (POBox) inv;
|
||||
|
||||
@@ -58,9 +61,11 @@ public class ContainerMailbox extends ContainerForestry {
|
||||
public ItemStack slotClick(int slotIndex, int button, int par3, EntityPlayer player) {
|
||||
ItemStack stack = super.slotClick(slotIndex, button, par3, player);
|
||||
|
||||
if (Proxies.common.isSimulating(player.worldObj) && mailinventory != null) {
|
||||
IMailAddress address = PostManager.postRegistry.getMailAddress(mailbox.getOwnerProfile());
|
||||
PluginMail.proxy.setPOBoxInfo(mailbox.getWorldObj(), address, mailinventory.getPOBoxInfo());
|
||||
if (slotIndex >= SLOT_LETTERS && slotIndex < SLOT_LETTERS + SLOT_LETTERS_COUNT) {
|
||||
if (Proxies.common.isSimulating(player.worldObj) && mailinventory != null) {
|
||||
IMailAddress address = PostManager.postRegistry.getMailAddress(player.getGameProfile());
|
||||
PluginMail.proxy.setPOBoxInfo(mailbox.getWorldObj(), address, mailinventory.getPOBoxInfo());
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
||||
@@ -156,13 +156,11 @@ public class PluginEnergy extends NativePlugin {
|
||||
GeneratorFuel biomassFuel = new GeneratorFuel(biomass, (int) (8 * GameMode.getGameMode().getFloatSetting("fuel.biomass.generator")), 1);
|
||||
FuelManager.generatorFuel.put(biomass.getFluid(), biomassFuel);
|
||||
|
||||
Circuit.energyElectricChoke1 = new CircuitElectricChoke("energyChoke1");
|
||||
Circuit.energyFireDampener1 = new CircuitFireDampener("energyDampener1");
|
||||
Circuit.energyElectricEfficiency1 = new CircuitElectricEfficiency("energyEfficiency1");
|
||||
Circuit.energyElectricBoost1 = new CircuitElectricBoost("energyBoost1", 2, 7, 2, "electric.boost.1", new String[]{"Increases output by 2 MJ/t",
|
||||
"Increases intake by 7 EU/t"});
|
||||
Circuit.energyElectricBoost2 = new CircuitElectricBoost("energyBoost2", 2, 15, 4, "electric.boost.2", new String[]{"Increases output by 4 MJ/t",
|
||||
"Increases intake by 15 EU/t"});
|
||||
Circuit.energyElectricChoke1 = new CircuitElectricChoke("electric.choke.1");
|
||||
Circuit.energyFireDampener1 = new CircuitFireDampener("dampener.1");
|
||||
Circuit.energyElectricEfficiency1 = new CircuitElectricEfficiency("electric.efficiency.1");
|
||||
Circuit.energyElectricBoost1 = new CircuitElectricBoost("electric.boost.1", 2, 7, 2);
|
||||
Circuit.energyElectricBoost2 = new CircuitElectricBoost("electric.boost.2", 2, 15, 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -171,24 +171,24 @@ public class PluginFarming extends NativePlugin {
|
||||
GameRegistry.registerTileEntity(TileValve.class, "forestry.FarmValve");
|
||||
GameRegistry.registerTileEntity(TileControl.class, "forestry.FarmControl");
|
||||
|
||||
Circuit.farmArborealManaged = new CircuitFarmLogic("managedArboreal", FarmLogicArboreal.class, new String[]{"Arboreal Plants"});
|
||||
Circuit.farmShroomManaged = new CircuitFarmLogic("managedShroom", FarmLogicShroom.class, new String[]{"Mushrooms"});
|
||||
Circuit.farmPeatManaged = new CircuitFarmLogic("managedPeat", FarmLogicPeat.class, new String[]{"Peat Bog"});
|
||||
Circuit.farmCerealManaged = new CircuitFarmLogic("managedCereal", FarmLogicCereal.class, new String[]{"Crops"});
|
||||
Circuit.farmVegetableManaged = new CircuitFarmLogic("managedVegetable", FarmLogicVegetable.class, new String[]{"Vegetables"});
|
||||
Circuit.farmInfernalManaged = new CircuitFarmLogic("managedInfernal", FarmLogicInfernal.class, new String[]{"Infernal Crops"});
|
||||
Circuit.farmArborealManaged = new CircuitFarmLogic("managedArboreal", FarmLogicArboreal.class);
|
||||
Circuit.farmShroomManaged = new CircuitFarmLogic("managedShroom", FarmLogicShroom.class);
|
||||
Circuit.farmPeatManaged = new CircuitFarmLogic("managedPeat", FarmLogicPeat.class);
|
||||
Circuit.farmCerealManaged = new CircuitFarmLogic("managedCereal", FarmLogicCereal.class);
|
||||
Circuit.farmVegetableManaged = new CircuitFarmLogic("managedVegetable", FarmLogicVegetable.class);
|
||||
Circuit.farmInfernalManaged = new CircuitFarmLogic("managedInfernal", FarmLogicInfernal.class);
|
||||
|
||||
Circuit.farmPeatManual = new CircuitFarmLogic("manualPeat", FarmLogicPeat.class, new String[]{"Peat Bog"}).setManual();
|
||||
Circuit.farmShroomManual = new CircuitFarmLogic("manualShroom", FarmLogicShroom.class, new String[]{"Mushrooms"}).setManual();
|
||||
Circuit.farmCerealManual = new CircuitFarmLogic("manualCereal", FarmLogicCereal.class, new String[]{"Crops"}).setManual();
|
||||
Circuit.farmVegetableManual = new CircuitFarmLogic("manualVegetable", FarmLogicVegetable.class, new String[]{"Vegetables"}).setManual();
|
||||
Circuit.farmSucculentManual = new CircuitFarmLogic("manualSucculent", FarmLogicSucculent.class, new String[]{"Succulents"}).setManual();
|
||||
Circuit.farmPoalesManual = new CircuitFarmLogic("manualPoales", FarmLogicPoale.class, new String[]{"Reeds"}).setManual();
|
||||
Circuit.farmGourdManual = new CircuitFarmLogic("manualGourd", FarmLogicGourd.class, new String[]{"Gourds"}).setManual();
|
||||
Circuit.farmCocoaManual = new CircuitFarmLogic("manualCocoa", FarmLogicCocoa.class, new String[]{"Cocoa Plantation"}).setManual();
|
||||
Circuit.farmPeatManual = new CircuitFarmLogic("manualPeat", FarmLogicPeat.class).setManual();
|
||||
Circuit.farmShroomManual = new CircuitFarmLogic("manualShroom", FarmLogicShroom.class).setManual();
|
||||
Circuit.farmCerealManual = new CircuitFarmLogic("manualCereal", FarmLogicCereal.class).setManual();
|
||||
Circuit.farmVegetableManual = new CircuitFarmLogic("manualVegetable", FarmLogicVegetable.class).setManual();
|
||||
Circuit.farmSucculentManual = new CircuitFarmLogic("manualSucculent", FarmLogicSucculent.class).setManual();
|
||||
Circuit.farmPoalesManual = new CircuitFarmLogic("manualPoales", FarmLogicPoale.class).setManual();
|
||||
Circuit.farmGourdManual = new CircuitFarmLogic("manualGourd", FarmLogicGourd.class).setManual();
|
||||
Circuit.farmCocoaManual = new CircuitFarmLogic("manualCocoa", FarmLogicCocoa.class).setManual();
|
||||
|
||||
Circuit.farmOrchardManual = new CircuitFarmLogic("manualOrchard", FarmLogicOrchard.class, new String[]{"Orchard"});
|
||||
Circuit.farmRubberManual = new CircuitFarmLogic("manualRubber", FarmLogicRubber.class, new String[]{"Rubber Plantation"});
|
||||
Circuit.farmOrchardManual = new CircuitFarmLogic("manualOrchard", FarmLogicOrchard.class);
|
||||
Circuit.farmRubberManual = new CircuitFarmLogic("manualRubber", FarmLogicRubber.class);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandlerFarming());
|
||||
}
|
||||
|
||||
@@ -589,6 +589,12 @@ public class PluginStorage extends NativePlugin implements IOreDictionaryHandler
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("crystal"))
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("cluster"))
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("shard"))
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("clump"))
|
||||
minerItems.add(ore);
|
||||
else if (name.matches("dropUranium"))
|
||||
minerItems.add(ore);
|
||||
else if (name.equals("treeLeaves") || name.equals("treeSapling") || name.equals("logWood"))
|
||||
|
||||
Reference in new issue
Block a user