mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-15 01:35:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65f1627a97 | ||
|
|
dde6c79f9e |
No files matched your search
+4
-4
@@ -1,12 +1,12 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.7.0:dev')
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.2:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.8.6:dev')
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.0-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.37-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.44:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.45:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
|
||||
}
|
||||
+9
-1
@@ -96,7 +96,9 @@ usesMixinDebug = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this or the build will fail.
|
||||
mixinsPackage =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
@@ -172,6 +174,12 @@ curseForgeRelations =
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = binnie-mods
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+2
-2
@@ -70,11 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||
}
|
||||
@@ -76,14 +76,12 @@ public class TileEntityMetadata extends TileEntity {
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(Block block, int damage) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setInteger("meta", damage);
|
||||
|
||||
ItemStack item = new ItemStack(block, 1, 0);
|
||||
if (0 <= damage && damage < Short.MAX_VALUE) {
|
||||
item.setItemDamage(damage);
|
||||
} else {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setInteger("meta", damage);
|
||||
item.setTagCompound(tag);
|
||||
}
|
||||
item.setItemDamage(Math.min(damage, 16387));
|
||||
item.setTagCompound(tag);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.controls.core.Control;
|
||||
import binnie.core.craftgui.minecraft.InventoryType;
|
||||
import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
|
||||
public class ControlPlayerInventory extends Control {
|
||||
@@ -25,21 +24,19 @@ public class ControlPlayerInventory extends Control {
|
||||
slots = new ArrayList<>();
|
||||
for (int row = 0; row < 3; ++row) {
|
||||
for (int column = 0; column < 9; ++column) {
|
||||
ControlSlot slot = new ControlSlot(this, (wide ? 58 : 0) + column * 18, row * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
ControlSlot slot = new ControlSlot(this, (wide ? 58 : 0) + column * 18, row * 18);
|
||||
slots.add(slot);
|
||||
}
|
||||
}
|
||||
|
||||
if (wide) {
|
||||
for (int i1 = 0; i1 < 9; ++i1) {
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 % 3 * 18, i1 / 3 * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 % 3 * 18, i1 / 3 * 18);
|
||||
slots.add(slot2);
|
||||
}
|
||||
} else {
|
||||
for (int i1 = 0; i1 < 9; ++i1) {
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 * 18, 58.0f).setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 * 18, 58.0f);
|
||||
slots.add(slot2);
|
||||
}
|
||||
}
|
||||
@@ -54,8 +51,7 @@ public class ControlPlayerInventory extends Control {
|
||||
slots = new ArrayList<>();
|
||||
for (int row = 0; row < 6; ++row) {
|
||||
for (int column = 0; column < 6; ++column) {
|
||||
ControlSlot slot = new ControlSlot(this, column * 18, row * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
ControlSlot slot = new ControlSlot(this, column * 18, row * 18);
|
||||
slots.add(slot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,10 @@ public class ControlSlot extends ControlSlotBase {
|
||||
}
|
||||
|
||||
public Slot slot;
|
||||
private CraftGUITexture slotTexture;
|
||||
|
||||
public ControlSlot(IWidget parent, float x, float y) {
|
||||
super(parent, x, y);
|
||||
slot = null;
|
||||
slotTexture = CraftGUITexture.Slot;
|
||||
addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
|
||||
@Override
|
||||
@@ -82,17 +80,11 @@ public class ControlSlot extends ControlSlotBase {
|
||||
public ControlSlot(IWidget parent, int x, int y, Slot slot) {
|
||||
super(parent, x, y);
|
||||
this.slot = slot;
|
||||
slotTexture = CraftGUITexture.Slot;
|
||||
}
|
||||
|
||||
public ControlSlot setSlotTexture(CraftGUITexture texture) {
|
||||
slotTexture = texture == null ? CraftGUITexture.Slot : texture;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.render.texture(slotTexture, IPoint.ZERO);
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
if (slot == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ public enum CraftGUITexture {
|
||||
Button("button"),
|
||||
ButtonHighlighted("button.highlighted"),
|
||||
Slot("slot"),
|
||||
SlotInventory("slot.inventory"),
|
||||
SlotBorder("slot.border"),
|
||||
SlotOverlay("slot.overlay"),
|
||||
SlotCharge("slot.charge"),
|
||||
|
||||
@@ -32,11 +32,6 @@ public abstract class MachinePackage {
|
||||
return I18N.localise(group.getMod().getModID() + ".machine." + group.getShortUID() + "." + getUID());
|
||||
}
|
||||
|
||||
public String getGuiDisplayName() {
|
||||
String guiKey = group.getMod().getModID() + ".machine." + group.getShortUID() + "." + getUID() + ".title";
|
||||
return I18N.canLocalise(guiKey) ? I18N.localise(guiKey) : getDisplayName();
|
||||
}
|
||||
|
||||
public Integer getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,11 @@ public interface IProcess extends IErrorStateSource {
|
||||
boolean isInProgress();
|
||||
|
||||
ProcessInfo getInfo();
|
||||
|
||||
/***
|
||||
* Returns true if the current target got worked on at least once.
|
||||
*/
|
||||
default boolean workedOnTarget() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
ComponentCompartmentInventory inv = Machine.getMachine(getInventory())
|
||||
|
||||
@@ -6,23 +6,14 @@ import java.util.List;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.extrabees.apiary.machine.AlvearyMachine;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeHousingInventory;
|
||||
import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.apiculture.IBeekeepingLogic;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.IErrorLogic;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.multiblock.IAlvearyComponent;
|
||||
import forestry.api.multiblock.IMultiblockComponent;
|
||||
@@ -30,7 +21,7 @@ import forestry.api.multiblock.IMultiblockController;
|
||||
import forestry.api.multiblock.IMultiblockLogicAlveary;
|
||||
import forestry.api.multiblock.MultiblockManager;
|
||||
|
||||
public class TileExtraBeeAlveary extends TileEntityMachine implements IBeeHousing, IAlvearyComponent.Active,
|
||||
public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyComponent.Active,
|
||||
IAlvearyComponent.BeeModifier, IAlvearyComponent.BeeListener, IBeeListener, IBeeModifier {
|
||||
|
||||
protected IMultiblockLogicAlveary structureLogic;
|
||||
@@ -51,51 +42,11 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IBeeHousin
|
||||
return new ChunkCoordinates(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<IBeeModifier> getBeeModifiers() {
|
||||
return getMultiblockLogic().getController().getBeeModifiers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<IBeeListener> getBeeListeners() {
|
||||
return getMultiblockLogic().getController().getBeeListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBeeHousingInventory getBeeInventory() {
|
||||
return getMultiblockLogic().getController().getBeeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBeekeepingLogic getBeekeepingLogic() {
|
||||
return getMultiblockLogic().getController().getBeekeepingLogic();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockLightValue() {
|
||||
return getMultiblockLogic().getController().getBlockLightValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockSeeTheSky() {
|
||||
return getMultiblockLogic().getController().canBlockSeeTheSky();
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameProfile getOwner() {
|
||||
return getMachine().getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getBeeFXCoordinates() {
|
||||
return getMultiblockLogic().getController().getBeeFXCoordinates();
|
||||
}
|
||||
|
||||
public List<TileEntity> getAlvearyBlocks() {
|
||||
LinkedList<TileEntity> tiles = new LinkedList<>();
|
||||
if (min == null || max == null) {
|
||||
@@ -275,26 +226,6 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IBeeHousin
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeGenBase getBiome() {
|
||||
return getMultiblockLogic().getController().getBiome();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumTemperature getTemperature() {
|
||||
return getMultiblockLogic().getController().getTemperature();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumHumidity getHumidity() {
|
||||
return getMultiblockLogic().getController().getHumidity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IErrorLogic getErrorLogic() {
|
||||
return getMultiblockLogic().getController().getErrorLogic();
|
||||
}
|
||||
|
||||
// TODO why its commented?
|
||||
// boolean init;
|
||||
// //IStructureLogic structureLogic;
|
||||
|
||||
@@ -12,6 +12,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@@ -34,7 +35,7 @@ public class WindowAlvearyFrame extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.frame"));
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlot(this, 79.0f, 30.0f).assign(actions, InventoryType.Machine, 0);
|
||||
|
||||
@@ -12,6 +12,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.apiary.machine.hatchery.AlvearyHatchery;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -36,7 +37,7 @@ public class WindowAlvearyHatchery extends Window {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.hatchery"));
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlotArray(this, 43, 30, 5, 1).create(actions, InventoryType.Machine, AlvearyHatchery.SLOT_LARVAE);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
|
||||
@@ -44,7 +44,7 @@ public class WindowAlvearyMutator extends Window {
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.mutator"));
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlot(this, 79.0f, 30.0f).assign(actions, InventoryType.Machine, AlvearyMutator.SLOT_MUTATOR);
|
||||
new ControlText(
|
||||
|
||||
@@ -14,6 +14,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.apiary.machine.stimulator.AlvearyStimulator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -38,7 +39,7 @@ public class WindowAlvearyStimulator extends Window {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.stimulator"));
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlot(this, 41.0f, 28.0f).assign(actions, InventoryType.Machine, AlvearyStimulator.SLOT_CIRCUIT);
|
||||
new ControlEnergyBar(this, 75, 29, 60, 16, Position.LEFT);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class WindowLumbermill extends Window {
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
new ControlSlot(this, 42.0f, 43.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_WOOD);
|
||||
new ControlSlot(this, 148.0f, 43.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_PLANKS);
|
||||
new ControlSlot(this, 172.0f, 28.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_BARK);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class WindowWoodworker extends Window {
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
new ControlText(
|
||||
this,
|
||||
new IArea(190.0f, 36.0f, 114.0f, 10.0f),
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.labMachine.acclimatiser.title");
|
||||
return I18N.localise("genetics.machine.labMachine.acclimatiser");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -79,7 +79,7 @@ public class WindowAnalyser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.labMachine.analyser.title");
|
||||
return I18N.localise("genetics.machine.labMachine.analyser");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,7 +75,7 @@ public class WindowGenepool extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.labMachine.genepool.title");
|
||||
return I18N.localise("genetics.machine.labMachine.genepool");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public class WindowIncubator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.labMachine.incubator.title");
|
||||
return I18N.localise("genetics.machine.labMachine.incubator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,7 +89,7 @@ public class WindowInoculator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.machine.inoculator.title");
|
||||
return I18N.localise("genetics.machine.machine.inoculator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,7 +76,7 @@ public class WindowIsolator extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.machine.isolator.title");
|
||||
return I18N.localise("genetics.machine.machine.isolator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,7 +75,7 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.machine.polymeriser.title");
|
||||
return I18N.localise("genetics.machine.machine.polymeriser");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,7 +104,7 @@ public class WindowSequencer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.machine.sequencer.title");
|
||||
return I18N.localise("genetics.machine.machine.sequencer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,7 +83,7 @@ public class WindowSplicer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("gui.genetics.machine.advMachine.splicer.title");
|
||||
return I18N.localise("genetics.machine.advMachine.splicer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -123,12 +123,12 @@ public class WindowAnalyst extends Window {
|
||||
public void initialiseClient() {
|
||||
if (isDatabase) {
|
||||
if (isMaster) {
|
||||
setTitle(I18N.localise("genetics.gui.registry.1.title"));
|
||||
setTitle(I18N.localise("genetics.item.registry.1.name"));
|
||||
} else {
|
||||
setTitle(I18N.localise("genetics.gui.registry.title"));
|
||||
setTitle(I18N.localise("genetics.item.registry.0.name"));
|
||||
}
|
||||
} else {
|
||||
setTitle(I18N.localise("genetics.gui.analyst.title"));
|
||||
setTitle(I18N.localise("genetics.item.analyst.name"));
|
||||
}
|
||||
|
||||
getWindowInventory().createSlot(0);
|
||||
|
||||
@@ -116,9 +116,4 @@ public class ItemSequence extends Item implements IItemAnalysable, IItemChargabl
|
||||
public int getCharges(ItemStack stack) {
|
||||
return stack.getItem().getMaxDamage() - stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepairable() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,10 @@ import forestry.api.genetics.IIndividual;
|
||||
|
||||
public class SplicerComponentLogic extends ComponentProcessSetCost implements IProcess {
|
||||
|
||||
// Needed to keep stack. If user takes out target slot and it gets automatically refilled, this happens in the same
|
||||
// tick
|
||||
private ItemStack workedOnStack = null;
|
||||
|
||||
public int nOfGenes;
|
||||
|
||||
public SplicerComponentLogic(Machine machine) {
|
||||
@@ -50,6 +54,11 @@ public class SplicerComponentLogic extends ComponentProcessSetCost implements IP
|
||||
public void onInventoryUpdate() {
|
||||
super.onInventoryUpdate();
|
||||
nOfGenes = getGenesToUse();
|
||||
ItemStack newTarget = getUtil().getStack(Splicer.SLOT_TARGET);
|
||||
|
||||
if (newTarget == null || !ItemStack.areItemStacksEqual(workedOnStack, newTarget)) {
|
||||
workedOnStack = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected int getGenesToUse() {
|
||||
@@ -190,5 +199,31 @@ public class SplicerComponentLogic extends ComponentProcessSetCost implements IP
|
||||
Splicer.setGene(gene, target, 1);
|
||||
}
|
||||
getUtil().damageItem(Splicer.SLOT_SERUM_VIAL, 1);
|
||||
workedOnStack = getUtil().getStack(Splicer.SLOT_TARGET).copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean workedOnTarget() {
|
||||
return ItemStack.areItemStacksEqual(workedOnStack, getUtil().getStack(Splicer.SLOT_TARGET));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagCompound tagWorkedOnStack = (NBTTagCompound) nbt.getTag("workedOnStack");
|
||||
if (tagWorkedOnStack != null) {
|
||||
workedOnStack = ItemStack.loadItemStackFromNBT(tagWorkedOnStack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
if (workedOnStack != null) {
|
||||
NBTTagCompound tagWorkedOnStack = new NBTTagCompound();
|
||||
workedOnStack.writeToNBT(tagWorkedOnStack);
|
||||
// Need to save, in case inventory is full it might need to get moved out way later.
|
||||
nbt.setTag("workedOnStack", tagWorkedOnStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package binnie.genetics.machine.splicer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import binnie.core.craftgui.minecraft.IMachineInformation;
|
||||
import binnie.core.machines.IMachine;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.inventory.ComponentInventorySlots;
|
||||
import binnie.core.machines.inventory.ComponentInventoryTransfer;
|
||||
@@ -79,8 +80,20 @@ public class SplicerPackage extends AdvGeneticMachine.PackageAdvGeneticBase impl
|
||||
|
||||
@Override
|
||||
public boolean fufilled(ItemStack stack) {
|
||||
return stack != null && transfer.getMachine().getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null
|
||||
&& transfer.getMachine().getInterface(SplicerComponentLogic.class).isValidSerum() != null;
|
||||
if (stack == null) {
|
||||
return false;
|
||||
}
|
||||
IMachine machine = transfer.getMachine();
|
||||
boolean hasSerum = machine.getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null;
|
||||
|
||||
if (hasSerum) {
|
||||
// Move item if it can't be processed anymore with current serum.
|
||||
boolean validSerum = machine.getInterface(SplicerComponentLogic.class).isValidSerum() == null;
|
||||
return !validSerum;
|
||||
} else {
|
||||
// Move item if there is no serum and item got processed already
|
||||
return machine.getMachineUtil().getProcess().workedOnTarget();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -69,12 +69,6 @@
|
||||
"uv": "4 4 18 18",
|
||||
"padding": "2"
|
||||
},
|
||||
{
|
||||
"name": "slot.inventory",
|
||||
"sheet": "slots",
|
||||
"uv": "76 4 18 18",
|
||||
"padding": "2"
|
||||
},
|
||||
{
|
||||
"name": "slot.border",
|
||||
"sheet": "slots",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -36,10 +36,6 @@ genetics.item.registry.1.name=Master Registry
|
||||
genetics.item.serum.name=%s Serum
|
||||
genetics.item.serumArray.name=%s Serum Array
|
||||
|
||||
genetics.gui.registry.title=Registry
|
||||
genetics.gui.registry.1.title=Master Registry
|
||||
genetics.gui.analyst.title=Analyst
|
||||
|
||||
genetics.item.sequence=DNA Sequence
|
||||
genetics.item.sequence.0=Very Faint
|
||||
genetics.item.sequence.1=Faint
|
||||
@@ -63,7 +59,6 @@ genetics.sequence.partially=Partially Sequenced (%d%%)
|
||||
|
||||
tile.machine.name=Isolator
|
||||
genetics.machine.machine.isolator=Isolator
|
||||
gui.genetics.machine.machine.isolator.title=Isolator
|
||||
genetics.machine.machine.isolator.info=The Isolator takes a random allele from a bee, tree or other individual and copies it into an empty sequence vial. This requires the use of ethanol as a solvent and an enzyme to cut up the DNA. The unsequenced serums can then be amplified in a Polymeriser and sequenced in a Sequencer. This process has a small chance to destroy the individual.
|
||||
genetics.machine.isolator.error.noIndividual=No individual to isolate
|
||||
genetics.machine.isolator.error.noRoom=No room for DNA sequences
|
||||
@@ -72,7 +67,6 @@ genetics.machine.isolator.error.noLiquid=Insufficient ethanol
|
||||
genetics.machine.isolator.error.noEnzyme=No enzyme
|
||||
|
||||
genetics.machine.machine.sequencer=Sequencer
|
||||
gui.genetics.machine.machine.sequencer.title=Sequencer
|
||||
genetics.machine.machine.sequencer.info=The Sequencer takes unsequenced serums and determines which allele is present in them. This process is slow and requires the use of fluorescent dye.
|
||||
genetics.machine.sequencer.unsequencedDNA=Unsequenced DNA
|
||||
genetics.machine.sequencer.error.noSequence=No DNA sequence
|
||||
@@ -84,7 +78,6 @@ genetics.machine.sequencer.gui.sequensedBy=Genes will be sequenced by %s
|
||||
genetics.machine.sequencer.gui.willNotSave=Userless. Will not save sequences
|
||||
|
||||
genetics.machine.machine.polymeriser=Polymeriser
|
||||
gui.genetics.machine.machine.polymeriser.title=Polymeriser
|
||||
genetics.machine.machine.polymeriser.info=The Polymeriser fills empty serums with Raw DNA and replicating bacteria. This process can be accelerated using gold nuggets.
|
||||
genetics.machine.polymeriser.error.noItem=No item to replicate
|
||||
genetics.machine.polymeriser.error.itemFilled=Item Filled
|
||||
@@ -95,7 +88,6 @@ genetics.machine.polymeriser.replicatingWithGenes=Replicating with %d genes
|
||||
genetics.machine.polymeriser.unfilledSerum=Unfilled Serum
|
||||
|
||||
genetics.machine.machine.inoculator=Inoculator
|
||||
gui.genetics.machine.machine.inoculator.title=Inoculator
|
||||
genetics.machine.machine.inoculator.info=The Inoculator uses serums to add genes to breedable individuals. This process is very slow and requires a Bacteria Vector, but is always successful.
|
||||
genetics.machine.inoculator.error.noIndividual=No Individual to Inoculate
|
||||
genetics.machine.inoculator.error.noSerum=No Serum
|
||||
@@ -113,7 +105,6 @@ genetics.machine.inoculator.inoculableIndividual=Inoculable Individual
|
||||
genetics.machine.inoculator.serums=Serum Vials & Arrays
|
||||
|
||||
genetics.machine.labMachine.genepool=Genepool
|
||||
gui.genetics.machine.labMachine.genepool.title=Genepool
|
||||
genetics.machine.labMachine.genepool.info=The Genepool uses enzymes and ethanol to break down living things into DNA. During this process, all genetic information is lost and the source of the DNA is destroyed.
|
||||
genetics.machine.genepool.error.noIndividual=No Individual
|
||||
genetics.machine.genepool.error.noRoom=Not enough room in Tank
|
||||
@@ -124,7 +115,6 @@ tile.labMachine.name=Lab Stand
|
||||
genetics.machine.labMachine.labMachine=Lab Stand
|
||||
|
||||
genetics.machine.labMachine.analyser=Analyzer
|
||||
gui.genetics.machine.labMachine.analyser.title=Analyzer
|
||||
genetics.machine.labMachine.analyser.info=The Analyzer takes breedable individuals and DNA sequencers and analyzes them to determine the genes present. This requires DNA Dye, created from purple dye and glowstone
|
||||
genetics.machine.analyser.dnaDye=DNA Dye
|
||||
genetics.machine.analyser.unanalysedItem=Unanalyzed Item
|
||||
@@ -135,7 +125,6 @@ genetics.machine.analyser.error.insufficientDye=Not enough DNA dye to analyze
|
||||
genetics.machine.analyser.error.noItem=No item to analyze
|
||||
|
||||
genetics.machine.labMachine.incubator=Incubator
|
||||
gui.genetics.machine.labMachine.incubator.title=Incubator
|
||||
genetics.machine.labMachine.incubator.info=The Incubator combines liquids and items and allows them to sit at an ideal temperature to encourage bacterial growth.
|
||||
genetics.machine.incubator.error.noRecipe.title=No Recipe
|
||||
genetics.machine.incubator.error.noRecipe=There is no valid recipe
|
||||
@@ -143,7 +132,6 @@ genetics.machine.incubator.error.noLiquid=Not enough incubation liquid
|
||||
genetics.machine.incubator.error.noRoom=No room for output
|
||||
|
||||
genetics.machine.labMachine.acclimatiser=Acclimatiser
|
||||
gui.genetics.machine.labMachine.acclimatiser.title=Acclimatiser
|
||||
genetics.machine.labMachine.acclimatiser.info=The Acclimatiser uses acclimatizing items to adjust the temperature and humidity tolerance of individuals. This process has only a small chance to succeed.
|
||||
genetics.machine.acclimatiser.acclimatizingItems=Acclimatizing Items
|
||||
genetics.machine.acclimatiser.error.noIndividual=No Individual to Acclimatise
|
||||
@@ -152,7 +140,6 @@ genetics.machine.acclimatiser.error.invalidAcclimatizingItems=Cannot Acclimatise
|
||||
|
||||
tile.advMachine.name=Splicer
|
||||
genetics.machine.advMachine.splicer=Splicer
|
||||
gui.genetics.machine.advMachine.splicer.title=Splicer
|
||||
genetics.machine.advMachine.splicer.info=The Splicer is an incredibly powerful machine that is used to insert genes into individuals. This process is fast, but requires monumental amounts of power.
|
||||
genetics.machine.splicer.error.noIndividual=No Individual to Splice
|
||||
genetics.machine.splicer.error.noSerum=No Serum
|
||||
|
||||
Reference in new issue
Block a user