mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 17:14:46 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aad6dbaa3f | ||
|
|
ca6cc89015 | ||
|
|
7a22f1d939 | ||
|
|
feda84fbc6 | ||
|
|
f7b36e11d1 | ||
|
|
cfbab6b988 |
No files matched your search
@@ -2,4 +2,4 @@ mcversion=1.7.10
|
||||
forgeversion=10.13.2.1286
|
||||
version_major=3
|
||||
version_minor=5
|
||||
version_patch=2
|
||||
version_patch=5
|
||||
@@ -29,6 +29,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
@@ -126,7 +127,7 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
|
||||
StandardTank tank = tanks.get(tankIndex);
|
||||
FluidStack fluidStack = tank.getFluid();
|
||||
if (fluidStack != null) {
|
||||
data.writeShort(fluidStack.fluidID);
|
||||
data.writeShort(fluidStack.getFluid().getID());
|
||||
data.writeInt(fluidStack.amount);
|
||||
data.writeInt(fluidStack.getFluid().getColor(fluidStack));
|
||||
} else {
|
||||
@@ -146,8 +147,11 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
|
||||
}
|
||||
StandardTank tank = tanks.get(tankIndex);
|
||||
int fluidId = data.readShort();
|
||||
if (fluidId != -1) {
|
||||
tank.setFluid(new FluidStack(fluidId, data.readInt()));
|
||||
Fluid fluid = FluidRegistry.getFluid(fluidId);
|
||||
if (fluid != null) {
|
||||
int amount = data.readInt();
|
||||
FluidStack fluidStack = new FluidStack(fluid, amount);
|
||||
tank.setFluid(fluidStack);
|
||||
tank.colorCache = data.readInt();
|
||||
} else {
|
||||
tank.setFluid(null);
|
||||
@@ -195,7 +199,7 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
|
||||
int fluidId = -1;
|
||||
int fluidAmount = 0;
|
||||
if (fluidStack != null) {
|
||||
fluidId = fluidStack.fluidID;
|
||||
fluidId = fluidStack.getFluid().getID();
|
||||
fluidAmount = fluidStack.amount;
|
||||
}
|
||||
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidId);
|
||||
@@ -203,7 +207,7 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
|
||||
Proxies.net.sendToPlayer(packet, player);
|
||||
} else if (fluidStack != null && prev != null) {
|
||||
if (fluidStack.getFluid() != prev.getFluid()) {
|
||||
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidStack.fluidID);
|
||||
player.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA, fluidStack.getFluid().getID());
|
||||
}
|
||||
if (fluidStack.amount != prev.amount) {
|
||||
PacketGuiInteger packet = new PacketGuiInteger(container.windowId, tankIndex * NETWORK_DATA + 1, fluidStack.amount);
|
||||
@@ -227,33 +231,28 @@ public class TankManager extends ForwardingList<StandardTank> implements IFluidH
|
||||
return;
|
||||
}
|
||||
StandardTank tank = tanks.get(tankIndex);
|
||||
FluidStack fluidStack = tank.getFluid();
|
||||
if (fluidStack == null) {
|
||||
fluidStack = new FluidStack(-1, 0);
|
||||
tank.setFluid(fluidStack);
|
||||
}
|
||||
int fluidId = fluidStack.fluidID;
|
||||
int amount = fluidStack.amount;
|
||||
int color = tank.colorCache;
|
||||
boolean newLiquid = false;
|
||||
|
||||
switch (messageId % NETWORK_DATA) {
|
||||
case 0:
|
||||
fluidId = data;
|
||||
newLiquid = true;
|
||||
case 0: {
|
||||
int amount = tank.getFluidAmount();
|
||||
Fluid fluid = FluidRegistry.getFluid(data);
|
||||
if (fluid != null) {
|
||||
FluidStack fluidStack = new FluidStack(fluid, amount);
|
||||
tank.setFluid(fluidStack);
|
||||
}
|
||||
}
|
||||
case 1: {
|
||||
FluidStack fluidStack = tank.getFluid();
|
||||
if (fluidStack != null) {
|
||||
fluidStack.amount = data;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
amount = data;
|
||||
break;
|
||||
case 2:
|
||||
color = data;
|
||||
}
|
||||
case 2: {
|
||||
tank.colorCache = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (newLiquid) {
|
||||
fluidStack = new FluidStack(fluidId, 0);
|
||||
tank.setFluid(fluidStack);
|
||||
}
|
||||
fluidStack.amount = amount;
|
||||
tank.colorCache = color;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ItemPipette extends ItemForestry implements IToolPipette {
|
||||
return false;
|
||||
}
|
||||
|
||||
return contents.fluidID > 0 && contents.amount >= limit;
|
||||
return contents.getFluid().getID() > 0 && contents.amount >= limit;
|
||||
}
|
||||
|
||||
public void addTooltip(List<String> list) {
|
||||
@@ -108,7 +108,7 @@ public class ItemPipette extends ItemForestry implements IToolPipette {
|
||||
filled = liquid.amount;
|
||||
}
|
||||
|
||||
contained.contents = new FluidStack(liquid.fluidID, filled);
|
||||
contained.contents = new FluidStack(liquid, filled);
|
||||
filled = liquid.amount;
|
||||
|
||||
} else {
|
||||
@@ -174,7 +174,7 @@ public class ItemPipette extends ItemForestry implements IToolPipette {
|
||||
@Override
|
||||
public FluidStack drain(ItemStack pipette, int maxDrain, boolean doDrain) {
|
||||
PipetteContents contained = new PipetteContents(pipette.getTagCompound());
|
||||
if (contained.contents == null || contained.contents.fluidID <= 0) {
|
||||
if (contained.contents == null || contained.contents.getFluid().getID() <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public class ItemPipette extends ItemForestry implements IToolPipette {
|
||||
}
|
||||
}
|
||||
|
||||
return new FluidStack(contained.contents.fluidID, drained);
|
||||
return new FluidStack(contained.contents, drained);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.Stack;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -23,7 +22,6 @@ import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -59,9 +57,9 @@ import buildcraft.api.statements.ITriggerExternal;
|
||||
public class MachineBottler extends TilePowered implements ISidedInventory, ILiquidTankContainer {
|
||||
|
||||
/* CONSTANTS */
|
||||
public static final short SLOT_RESOURCE = 0;
|
||||
public static final short SLOT_PRODUCT = 1;
|
||||
public static final short SLOT_CAN = 2;
|
||||
public static final short SLOT_INPUT_EMPTY_CAN = 0;
|
||||
public static final short SLOT_OUTPUT = 1;
|
||||
public static final short SLOT_INPUT_FULL_CAN = 2;
|
||||
|
||||
public static final short CYCLES_FILLING_DEFAULT = 5;
|
||||
|
||||
@@ -98,7 +96,7 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
*/
|
||||
public static Recipe findMatchingRecipe(FluidStack res, ItemStack empty) {
|
||||
// We need both ingredients
|
||||
if (res == null || empty == null) {
|
||||
if (res == null || empty == null || !FluidHelper.isEmptyContainer(empty)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -109,13 +107,11 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
}
|
||||
|
||||
// No recipe matched. See if the liquid dictionary has anything.
|
||||
if (FluidHelper.isEmptyContainer(empty)) {
|
||||
ItemStack filled = FluidHelper.getFilledContainer(res, empty);
|
||||
if (filled != null) {
|
||||
Recipe recipe = new Recipe(CYCLES_FILLING_DEFAULT, res, empty, filled);
|
||||
recipes.add(recipe);
|
||||
return recipe;
|
||||
}
|
||||
ItemStack filled = FluidHelper.getFilledContainer(res, empty);
|
||||
if (filled != null) {
|
||||
Recipe recipe = new Recipe(CYCLES_FILLING_DEFAULT, res, empty, filled);
|
||||
recipes.add(recipe);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -146,33 +142,14 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
public final StandardTank resourceTank;
|
||||
private final TankManager tankManager;
|
||||
|
||||
private boolean productPending = false;
|
||||
|
||||
private Recipe currentRecipe;
|
||||
private final Stack<ItemStack> pendingProducts = new Stack<ItemStack>();
|
||||
private int fillingTime;
|
||||
private int fillingTotalTime;
|
||||
|
||||
public MachineBottler() {
|
||||
super(1100, 50, 4000);
|
||||
|
||||
setInternalInventory(new TileInventoryAdapter(this, 3, "Items") {
|
||||
@Override
|
||||
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
|
||||
if (slotIndex == SLOT_RESOURCE) {
|
||||
return FluidContainerRegistry.isEmptyContainer(itemStack);
|
||||
} else if (slotIndex == SLOT_CAN) {
|
||||
FluidStack fluidStack = FluidHelper.getFluidStackInContainer(itemStack);
|
||||
return RecipeManager.isInput(fluidStack);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemstack, int side) {
|
||||
return slotIndex == SLOT_PRODUCT;
|
||||
}
|
||||
});
|
||||
setInternalInventory(new BottlerInventoryAdapter(this));
|
||||
|
||||
setHints(Config.hints.get("bottler"));
|
||||
resourceTank = new StandardTank(Defaults.PROCESSOR_TANK_CAPACITY);
|
||||
@@ -191,21 +168,8 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
|
||||
nbttagcompound.setInteger("FillingTime", fillingTime);
|
||||
nbttagcompound.setInteger("FillingTotalTime", fillingTotalTime);
|
||||
nbttagcompound.setBoolean("ProductPending", productPending);
|
||||
|
||||
tankManager.writeTanksToNBT(nbttagcompound);
|
||||
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
ItemStack[] offspring = pendingProducts.toArray(new ItemStack[pendingProducts.size()]);
|
||||
for (int i = 0; i < offspring.length; i++) {
|
||||
if (offspring[i] != null) {
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
nbttagcompound1.setByte("Slot", (byte) i);
|
||||
offspring[i].writeToNBT(nbttagcompound1);
|
||||
nbttaglist.appendTag(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
nbttagcompound.setTag("PendingProducts", nbttaglist);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -214,16 +178,9 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
|
||||
fillingTime = nbttagcompound.getInteger("FillingTime");
|
||||
fillingTotalTime = nbttagcompound.getInteger("FillingTotalTime");
|
||||
productPending = nbttagcompound.getBoolean("ProductPending");
|
||||
|
||||
tankManager.readTanksFromNBT(nbttagcompound);
|
||||
|
||||
NBTTagList nbttaglist = nbttagcompound.getTagList("PendingProducts", 10);
|
||||
for (int i = 0; i < nbttaglist.tagCount(); i++) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||
pendingProducts.add(ItemStack.loadItemStackFromNBT(nbttagcompound1));
|
||||
}
|
||||
|
||||
checkRecipe();
|
||||
}
|
||||
|
||||
@@ -233,75 +190,56 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
return;
|
||||
}
|
||||
|
||||
IInventoryAdapter inventory = getInternalInventory();
|
||||
|
||||
// Check if we have suitable items waiting in the item slot
|
||||
if (inventory.getStackInSlot(SLOT_CAN) != null) {
|
||||
FluidHelper.drainContainers(tankManager, inventory, SLOT_CAN);
|
||||
if (getStackInSlot(SLOT_INPUT_FULL_CAN) != null) {
|
||||
FluidHelper.drainContainers(tankManager, this, SLOT_INPUT_FULL_CAN);
|
||||
}
|
||||
|
||||
checkRecipe();
|
||||
if (getErrorState() == EnumErrorCode.NORECIPE && currentRecipe != null) {
|
||||
setErrorState(EnumErrorCode.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean workCycle() {
|
||||
|
||||
checkRecipe();
|
||||
|
||||
// If we add pending products, we skip to the next work cycle.
|
||||
if (tryAddPending()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pendingProducts.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Continue work if nothing needs to be added
|
||||
if (fillingTime <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentRecipe == null) {
|
||||
setErrorState(EnumErrorCode.NORECIPE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!InvTools.tryAddStack(this, currentRecipe.bottled, SLOT_OUTPUT, 1, true, false)) {
|
||||
setErrorState(EnumErrorCode.NOSPACE);
|
||||
return false;
|
||||
}
|
||||
|
||||
fillingTime--;
|
||||
// Still not done, return
|
||||
if (fillingTime > 0) {
|
||||
setErrorState(EnumErrorCode.OK);
|
||||
return true;
|
||||
}
|
||||
|
||||
// We are done, add products to queue and remove resources
|
||||
pendingProducts.push(currentRecipe.bottled.copy());
|
||||
FluidHelper.fillContainers(tankManager, this, SLOT_INPUT_EMPTY_CAN, SLOT_OUTPUT, currentRecipe.input.getFluid());
|
||||
|
||||
IInventoryAdapter inventory = getInternalInventory();
|
||||
inventory.decrStackSize(SLOT_RESOURCE, 1);
|
||||
resourceTank.drain(currentRecipe.input.amount, true);
|
||||
checkRecipe();
|
||||
resetRecipe();
|
||||
|
||||
while (tryAddPending()) {
|
||||
;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void checkRecipe() {
|
||||
IInventoryAdapter inventory = getInternalInventory();
|
||||
Recipe sameRec = RecipeManager.findMatchingRecipe(resourceTank.getFluid(), inventory.getStackInSlot(SLOT_RESOURCE));
|
||||
ItemStack emptyCan = getStackInSlot(SLOT_INPUT_EMPTY_CAN);
|
||||
Recipe recipe = RecipeManager.findMatchingRecipe(resourceTank.getFluid(), emptyCan);
|
||||
|
||||
if (sameRec == null) {
|
||||
if (recipe == null) {
|
||||
setErrorState(EnumErrorCode.NORECIPE);
|
||||
} else {
|
||||
setErrorState(EnumErrorCode.OK);
|
||||
}
|
||||
|
||||
if (currentRecipe != sameRec) {
|
||||
currentRecipe = sameRec;
|
||||
if (currentRecipe != recipe) {
|
||||
currentRecipe = recipe;
|
||||
resetRecipe();
|
||||
}
|
||||
}
|
||||
@@ -317,25 +255,6 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
fillingTotalTime = currentRecipe.cyclesPerUnit;
|
||||
}
|
||||
|
||||
private boolean tryAddPending() {
|
||||
if (pendingProducts.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemStack next = pendingProducts.peek();
|
||||
if (addProduct(next, true)) {
|
||||
pendingProducts.pop();
|
||||
return true;
|
||||
}
|
||||
|
||||
setErrorState(EnumErrorCode.NOSPACE);
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean addProduct(ItemStack product, boolean all) {
|
||||
return InvTools.tryAddStack(getInternalInventory(), product, SLOT_PRODUCT, 1, all);
|
||||
}
|
||||
|
||||
// / STATE INFORMATION
|
||||
@Override
|
||||
public boolean isWorking() {
|
||||
@@ -345,11 +264,11 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
@Override
|
||||
public boolean hasResourcesMin(float percentage) {
|
||||
IInventoryAdapter inventory = getInternalInventory();
|
||||
if (inventory.getStackInSlot(SLOT_RESOURCE) == null) {
|
||||
if (inventory.getStackInSlot(SLOT_INPUT_EMPTY_CAN) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((float) inventory.getStackInSlot(SLOT_RESOURCE).stackSize / (float) inventory.getStackInSlot(SLOT_RESOURCE).getMaxStackSize()) > percentage;
|
||||
return ((float) inventory.getStackInSlot(SLOT_INPUT_EMPTY_CAN).stackSize / (float) inventory.getStackInSlot(SLOT_INPUT_EMPTY_CAN).getMaxStackSize()) > percentage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -442,4 +361,25 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
|
||||
return res;
|
||||
}
|
||||
|
||||
private static class BottlerInventoryAdapter extends TileInventoryAdapter {
|
||||
public BottlerInventoryAdapter(MachineBottler machineBottler) {
|
||||
super(machineBottler, 3, "Items");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
|
||||
if (slotIndex == SLOT_INPUT_EMPTY_CAN) {
|
||||
return FluidContainerRegistry.isEmptyContainer(itemStack);
|
||||
} else if (slotIndex == SLOT_INPUT_FULL_CAN) {
|
||||
FluidStack fluidStack = FluidHelper.getFluidStackInContainer(itemStack);
|
||||
return RecipeManager.isInput(fluidStack);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemstack, int side) {
|
||||
return slotIndex == SLOT_OUTPUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public class MachineStill extends TilePowered implements ISidedInventory, ILiqui
|
||||
// Start next cycle if enough bio mass is available
|
||||
distillationTime = distillationTotalTime = resourceRequired;
|
||||
resourceTank.drain(resourceRequired, true);
|
||||
bufferedLiquid = new FluidStack(currentRecipe.input.fluidID, resourceRequired);
|
||||
bufferedLiquid = new FluidStack(currentRecipe.input, resourceRequired);
|
||||
|
||||
setErrorState(EnumErrorCode.OK);
|
||||
return true;
|
||||
@@ -257,7 +257,7 @@ public class MachineStill extends TilePowered implements ISidedInventory, ILiqui
|
||||
Recipe sameRec = RecipeManager.findMatchingRecipe(resourceTank.getFluid());
|
||||
|
||||
if (sameRec == null && bufferedLiquid != null && distillationTime > 0) {
|
||||
sameRec = RecipeManager.findMatchingRecipe(new FluidStack(bufferedLiquid.fluidID, distillationTime));
|
||||
sameRec = RecipeManager.findMatchingRecipe(new FluidStack(bufferedLiquid, distillationTime));
|
||||
}
|
||||
|
||||
if (sameRec == null) {
|
||||
|
||||
@@ -27,9 +27,9 @@ public class ContainerBottler extends ContainerLiquidTanks {
|
||||
|
||||
this.tile = tile;
|
||||
|
||||
this.addSlotToContainer(new SlotFiltered(tile, MachineBottler.SLOT_RESOURCE, 116, 19));
|
||||
this.addSlotToContainer(new SlotOutput(tile, MachineBottler.SLOT_PRODUCT, 116, 55));
|
||||
this.addSlotToContainer(new SlotFiltered(tile, MachineBottler.SLOT_CAN, 26, 38));
|
||||
this.addSlotToContainer(new SlotFiltered(tile, MachineBottler.SLOT_INPUT_EMPTY_CAN, 116, 19));
|
||||
this.addSlotToContainer(new SlotOutput(tile, MachineBottler.SLOT_OUTPUT, 116, 55));
|
||||
this.addSlotToContainer(new SlotFiltered(tile, MachineBottler.SLOT_INPUT_FULL_CAN, 26, 38));
|
||||
|
||||
int var3;
|
||||
for (var3 = 0; var3 < 3; ++var3) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotCopper",
|
||||
'X', Blocks.glass,
|
||||
'X', "blockGlass",
|
||||
'Y', "gearCopper",
|
||||
'V', Blocks.piston)));
|
||||
definitionEngineBronze = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINEBRONZE_META, "forestry.EngineBronze", EngineBronze.class,
|
||||
@@ -64,7 +64,7 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotBronze",
|
||||
'X', Blocks.glass,
|
||||
'X', "blockGlass",
|
||||
'Y', "gearBronze",
|
||||
'V', Blocks.piston)));
|
||||
|
||||
@@ -76,9 +76,9 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
" X ",
|
||||
"ZVY",
|
||||
'#', "plankWood",
|
||||
'X', Blocks.glass,
|
||||
'X', "blockGlass",
|
||||
'Y', Items.clock,
|
||||
'Z', ForestryItem.gearCopper,
|
||||
'Z', "gearCopper",
|
||||
'V', Blocks.piston);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,14 +88,14 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
super.setupAPI();
|
||||
|
||||
AlleleManager.alleleRegistry.registerSpeciesRoot(PluginLepidopterology.butterflyInterface = new ButterflyHelper());
|
||||
createAlleles();
|
||||
registerTemplates();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
ForestryBlock.lepidopterology.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "lepidopterology");
|
||||
ForestryBlock.lepidopterology.block().setCreativeTab(Tabs.tabLepidopterology);
|
||||
|
||||
createAlleles();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,6 +128,8 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
Utils.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
|
||||
proxy.initializeRendering();
|
||||
|
||||
registerTemplates();
|
||||
|
||||
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
|
||||
definitionChest = lepidopterology.addDefinition((new MachineDefinition(Defaults.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class,
|
||||
ShapedRecipeCustom.createShapedRecipe(
|
||||
|
||||
Reference in new issue
Block a user