mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-15 01:35:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ba66123eb | ||
|
|
1d0568388a | ||
|
|
3968cc320e | ||
|
|
ed1daa1e96 | ||
|
|
ffcc5f7102 | ||
|
|
4c619fd3b2 | ||
|
|
341fea50ba | ||
|
|
e6c67df077 |
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.6.39:dev')
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.0:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.7.3:dev')
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.90-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.26-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")
|
||||
}
|
||||
+13
-1
@@ -43,6 +43,10 @@ developmentEnvironmentUserName = Developer
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = true
|
||||
@@ -96,7 +100,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 +178,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.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e1118b4c7c2858d28154d086dbff010e/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/832229f0f6f0be60ed817c5a5e5848eb/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/b96cb7670c095245220e7d01d5927b58/redirect
|
||||
toolchainVersion=25
|
||||
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-9.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -172,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -212,8 +210,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
+1
-2
@@ -70,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@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%" -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 '2.0.6'
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import binnie.core.ManagerBase;
|
||||
import binnie.core.genetics.ManagerGenetics;
|
||||
import binnie.core.item.ManagerItem;
|
||||
import binnie.core.liquid.ManagerLiquid;
|
||||
import binnie.core.machines.ManagerMachine;
|
||||
import binnie.core.resource.ManagerResource;
|
||||
@@ -16,6 +15,5 @@ public final class Binnie {
|
||||
public static ManagerGenetics Genetics = new ManagerGenetics();
|
||||
public static ManagerLiquid Liquid = new ManagerLiquid();
|
||||
public static ManagerMachine Machine = new ManagerMachine();
|
||||
public static ManagerItem Item = new ManagerItem();
|
||||
public static ManagerResource Resource = new ManagerResource();
|
||||
}
|
||||
@@ -64,32 +64,37 @@ public class Botany extends AbstractMod {
|
||||
@SidedProxy(clientSide = "binnie.botany.proxy.ProxyClient", serverSide = "binnie.botany.proxy.ProxyServer")
|
||||
public static Proxy proxy;
|
||||
|
||||
// Genetics module
|
||||
public static BlockFlower flower;
|
||||
public static Item seed;
|
||||
|
||||
public static ItemFlower flowerItem;
|
||||
public static Item pollen;
|
||||
public static Item seed;
|
||||
public static ItemDictionary database;
|
||||
|
||||
// Gardening module
|
||||
public static BlockPlant plant;
|
||||
public static ItemTrowel trowelWood;
|
||||
public static ItemTrowel trowelStone;
|
||||
public static ItemTrowel trowelIron;
|
||||
public static ItemTrowel trowelDiamond;
|
||||
public static ItemTrowel trowelGold;
|
||||
public static BlockSoil soil;
|
||||
public static BlockSoil loam;
|
||||
public static BlockSoil flowerbed;
|
||||
public static BlockSoil soilNoWeed;
|
||||
public static BlockSoil loamNoWeed;
|
||||
public static BlockSoil flowerbedNoWeed;
|
||||
public static ItemInsulatedTube insulatedTube;
|
||||
public static BlockCeramic ceramic;
|
||||
public static BlockStained stained;
|
||||
public static BlockCeramicPatterned ceramicTile;
|
||||
public static BlockCeramicBrick ceramicBrick;
|
||||
|
||||
public static ItemSoilMeter soilMeter;
|
||||
public static ItemInsulatedTube insulatedTube;
|
||||
public static ItemTrowel trowelWood;
|
||||
public static ItemTrowel trowelStone;
|
||||
public static ItemTrowel trowelIron;
|
||||
public static ItemTrowel trowelDiamond;
|
||||
public static ItemTrowel trowelGold;
|
||||
public static ItemMisc misc;
|
||||
public static ItemFlower flowerItem;
|
||||
public static ItemPigment pigment;
|
||||
public static ItemClay clay;
|
||||
public static BlockCeramic ceramic;
|
||||
public static BlockCeramicPatterned ceramicTile;
|
||||
public static BlockStained stained;
|
||||
public static BlockCeramicBrick ceramicBrick;
|
||||
|
||||
public Botany() {
|
||||
Botany.instance = this;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.flower;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -39,6 +41,8 @@ public abstract class ItemBotany extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setUnlocalizedName(name);
|
||||
hasSubtypes = true;
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.flower;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemInsulatedTube extends Item {
|
||||
setUnlocalizedName("insulatedTube");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setHasSubtypes(true);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
public static ItemStack getInsulateStack(ItemStack stack) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.gardening;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,6 +30,8 @@ public class ItemSoilMeter extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setUnlocalizedName("soilMeter");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.gardening;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,6 +30,8 @@ public class ItemTrowel extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setUnlocalizedName("trowel" + material);
|
||||
locName = "trowel" + material;
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
@@ -37,6 +36,7 @@ import binnie.core.block.ItemMetadata;
|
||||
import binnie.core.block.ItemMetadataRenderer;
|
||||
import binnie.core.block.MultipassItemRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ModuleGardening implements IInitializable {
|
||||
@@ -75,7 +75,7 @@ public class ModuleGardening implements IInitializable {
|
||||
Botany.trowelIron = new ItemTrowel(Item.ToolMaterial.IRON, "Iron");
|
||||
Botany.trowelDiamond = new ItemTrowel(Item.ToolMaterial.EMERALD, "Diamond");
|
||||
Botany.trowelGold = new ItemTrowel(Item.ToolMaterial.GOLD, "Gold");
|
||||
Botany.misc = Binnie.Item.registerMiscItems(BotanyItems.values(), CreativeTabBotany.instance);
|
||||
Botany.misc = new ItemMisc(CreativeTabBotany.instance, BotanyItems.values());
|
||||
Botany.pigment = new ItemPigment();
|
||||
Botany.clay = new ItemClay();
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemDictionary extends Item {
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setUnlocalizedName("database");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.items;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -22,6 +24,8 @@ public class ItemClay extends Item {
|
||||
setUnlocalizedName("clay");
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.botany.items;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -22,6 +24,8 @@ public class ItemPigment extends Item {
|
||||
setUnlocalizedName("pigment");
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package binnie.core;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
import binnie.core.mod.parser.FieldParser;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
import binnie.core.network.IPacketProvider;
|
||||
@@ -20,11 +16,9 @@ import cpw.mods.fml.relauncher.Side;
|
||||
public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
|
||||
private SimpleNetworkWrapper wrapper;
|
||||
private final LinkedHashSet<Field> fields;
|
||||
protected final List<IInitializable> modules;
|
||||
|
||||
public AbstractMod() {
|
||||
fields = new LinkedHashSet<>();
|
||||
modules = new ArrayList<>();
|
||||
BinnieCore.registerMod(this);
|
||||
}
|
||||
@@ -65,22 +59,6 @@ public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
for (IInitializable module : modules) {
|
||||
module.preInit();
|
||||
}
|
||||
|
||||
// TODO what does it mean?
|
||||
Collections.addAll(fields, getClass().getFields());
|
||||
for (Class<?> cls : getClass().getClasses()) {
|
||||
Collections.addAll(fields, getClass().getFields());
|
||||
}
|
||||
for (IInitializable module : modules) {
|
||||
Collections.addAll(fields, module.getClass().getFields());
|
||||
}
|
||||
for (Field field4 : fields) {
|
||||
try {
|
||||
FieldParser.preInitParse(field4, this);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,14 +74,6 @@ public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
for (IInitializable module : modules) {
|
||||
module.init();
|
||||
}
|
||||
|
||||
for (Field field : fields) {
|
||||
try {
|
||||
FieldParser.initParse(field, this);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,14 +86,6 @@ public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
for (IInitializable module : modules) {
|
||||
module.postInit();
|
||||
}
|
||||
|
||||
for (Field field : fields) {
|
||||
try {
|
||||
FieldParser.postInitParse(field, this);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void addModule(IInitializable init) {
|
||||
|
||||
@@ -22,8 +22,6 @@ import binnie.core.liquid.FluidContainer;
|
||||
import binnie.core.liquid.ItemFluidContainer;
|
||||
import binnie.core.machines.MachineGroup;
|
||||
import binnie.core.machines.storage.ModuleStorage;
|
||||
import binnie.core.mod.parser.FieldParser;
|
||||
import binnie.core.mod.parser.ItemParser;
|
||||
import binnie.core.network.BinnieCorePacketID;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
@@ -110,7 +108,6 @@ public class BinnieCore extends AbstractMod {
|
||||
Item item = new ItemFluidContainer(container);
|
||||
GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
|
||||
}
|
||||
FieldParser.parsers.add(new ItemParser());
|
||||
super.preInit();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,14 @@ 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);
|
||||
item.setItemDamage(Math.min(damage, 16387));
|
||||
item.setTagCompound(tag);
|
||||
if (0 <= damage && damage < Short.MAX_VALUE) {
|
||||
item.setItemDamage(damage);
|
||||
} else {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setInteger("meta", damage);
|
||||
item.setTagCompound(tag);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
@@ -115,12 +115,14 @@ public class WindowFieldKit extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(getName());
|
||||
CraftGUI.render.stylesheet(new StyleSheetPunnett());
|
||||
getWindowInventory().createSlot(0);
|
||||
getWindowInventory().createSlot(1);
|
||||
setupValidators();
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
IPoint handGlass = new IPoint(16.0f, 32.0f);
|
||||
GlassControl = new ControlImage(
|
||||
this,
|
||||
@@ -128,8 +130,6 @@ public class WindowFieldKit extends Window {
|
||||
handGlass.y(),
|
||||
new StandardTexture(0, 160, 96, 96, ExtraBeeTexture.GUIPunnett));
|
||||
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
new ControlSlot(this, handGlass.x() + 54.0f, handGlass.y() + 26.0f).assign(actions, InventoryType.Window, 0);
|
||||
new ControlSlot(this, 208.0f, 8.0f).assign(actions, InventoryType.Window, 1);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class WindowGenesis extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).createAndRegister();
|
||||
setTitle(getName());
|
||||
|
||||
ControlTabBar<BreedingSystem> tabSystems = new BreedingSystemControlTabBar();
|
||||
|
||||
@@ -248,13 +248,6 @@ public class ContainerCraftGUI extends Container {
|
||||
public void handleNBT(Side side, EntityPlayer player, NBTTagCompound action) {
|
||||
final String actionType = action.getString(ACTION_TYPE);
|
||||
|
||||
if (actionType.equals(ACTION_BATCH)) {
|
||||
NBTTagList actionsBatch = action.getTagList(ACTIONS, TAG_COMPOUND);
|
||||
for (int i = 0; i < actionsBatch.tagCount(); i++) {
|
||||
handleNBT(side, player, actionsBatch.getCompoundTagAt(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (side == Side.SERVER) {
|
||||
switch (actionType) {
|
||||
case TANK_CLICK -> tankClick(player, action.getByte(SLOT_ID));
|
||||
@@ -494,6 +487,13 @@ public class ContainerCraftGUI extends Container {
|
||||
|
||||
public void receiveNBT(Side side, EntityPlayer player, NBTTagCompound action) {
|
||||
String actionType = action.getString(ACTION_TYPE);
|
||||
if (actionType.equals(ACTION_BATCH)) {
|
||||
NBTTagList actionsBatch = action.getTagList(ACTIONS, TAG_COMPOUND);
|
||||
for (int i = 0; i < actionsBatch.tagCount(); i++) {
|
||||
receiveNBT(side, player, actionsBatch.getCompoundTagAt(i));
|
||||
}
|
||||
return;
|
||||
}
|
||||
handleNBT(side, player, action);
|
||||
window.receiveGuiNBT(getSide(), player, actionType, action);
|
||||
INetwork.ReceiveGuiNBT machine = Machine.getInterface(INetwork.ReceiveGuiNBT.class, window.getInventory());
|
||||
|
||||
@@ -8,6 +8,7 @@ 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 {
|
||||
@@ -24,23 +25,24 @@ 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);
|
||||
ControlSlot slot = new ControlSlot(this, (wide ? 58 : 0) + column * 18, row * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
slots.add(slot);
|
||||
}
|
||||
}
|
||||
|
||||
if (wide) {
|
||||
for (int i1 = 0; i1 < 9; ++i1) {
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 % 3 * 18, i1 / 3 * 18);
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 % 3 * 18, i1 / 3 * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
slots.add(slot2);
|
||||
}
|
||||
} else {
|
||||
for (int i1 = 0; i1 < 9; ++i1) {
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 * 18, 58.0f);
|
||||
ControlSlot slot2 = new ControlSlot(this, i1 * 18, 58.0f).setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
slots.add(slot2);
|
||||
}
|
||||
}
|
||||
create();
|
||||
}
|
||||
|
||||
public ControlPlayerInventory(IWidget parent) {
|
||||
@@ -52,16 +54,14 @@ 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);
|
||||
ControlSlot slot = new ControlSlot(this, column * 18, row * 18)
|
||||
.setSlotTexture(CraftGUITexture.SlotInventory);
|
||||
slots.add(slot);
|
||||
}
|
||||
}
|
||||
create();
|
||||
}
|
||||
|
||||
public void create() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
public ControlPlayerInventory create(NBTTagList actions) {
|
||||
for (int row = 0; row < 3; ++row) {
|
||||
for (int column = 0; column < 9; ++column) {
|
||||
ControlSlot slot = slots.get(column + row * 9);
|
||||
@@ -74,14 +74,13 @@ public class ControlPlayerInventory extends Control {
|
||||
slot2.assign(actions, InventoryType.Player, i1);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ControlPlayerInventory createAndRegister() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
create(actions);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ControlSlot getSlot(int i) {
|
||||
if (i < 0 || i >= slots.size()) {
|
||||
return null;
|
||||
}
|
||||
return slots.get(i);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,10 +49,12 @@ 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
|
||||
@@ -80,11 +82,17 @@ 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(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
CraftGUI.render.texture(slotTexture, IPoint.ZERO);
|
||||
if (slot == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,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.network.packet.MessageCraftGUI;
|
||||
|
||||
public class ControlSlotArray extends Control implements Iterable<ControlSlot> {
|
||||
|
||||
@@ -29,13 +28,7 @@ public class ControlSlotArray extends Control implements Iterable<ControlSlot> {
|
||||
return new ControlSlot(this, x, y);
|
||||
}
|
||||
|
||||
public ControlSlotArray create(int[] index) {
|
||||
return create(InventoryType.Machine, index);
|
||||
}
|
||||
|
||||
public ControlSlotArray create(InventoryType inventoryType, int[] index) {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
public ControlSlotArray create(NBTTagList actions, InventoryType inventoryType, int[] index) {
|
||||
int i = 0;
|
||||
for (ControlSlot controlSlot : slots) {
|
||||
final int slotIndex = index[i];
|
||||
@@ -43,7 +36,6 @@ public class ControlSlotArray extends Control implements Iterable<ControlSlot> {
|
||||
i++;
|
||||
}
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ public enum CraftGUITexture {
|
||||
Button("button"),
|
||||
ButtonHighlighted("button.highlighted"),
|
||||
Slot("slot"),
|
||||
SlotInventory("slot.inventory"),
|
||||
SlotBorder("slot.border"),
|
||||
SlotOverlay("slot.overlay"),
|
||||
SlotCharge("slot.charge"),
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.core.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -25,6 +27,8 @@ public class ItemGenesis extends Item {
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
setUnlocalizedName("genesis");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.core.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -16,11 +18,13 @@ public class ItemMisc extends Item {
|
||||
|
||||
private final IItemMisc[] items;
|
||||
|
||||
protected ItemMisc(CreativeTabs tab, IItemMisc[] items2) {
|
||||
public ItemMisc(CreativeTabs tab, IItemMisc[] items) {
|
||||
setCreativeTab(tab);
|
||||
setHasSubtypes(true);
|
||||
setUnlocalizedName("misc");
|
||||
items = items2;
|
||||
this.items = items;
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package binnie.core.item;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
public class ManagerItem {
|
||||
|
||||
public ItemMisc registerMiscItems(IItemMisc[] items, CreativeTabs tab) {
|
||||
return new ItemMisc(tab, items);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,11 @@ 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;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
ComponentCompartmentInventory inv = Machine.getMachine(getInventory())
|
||||
@@ -190,7 +190,11 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
for (int k = 0; k < inv.getPageSize(); ++k) {
|
||||
slotsIDs[k] = i++;
|
||||
}
|
||||
new ControlSlotArray(thisPage, 8, 8, inv.getPageSize() / 5, 5).create(slotsIDs);
|
||||
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
new ControlSlotArray(thisPage, 8, 8, inv.getPageSize() / 5, 5)
|
||||
.create(actions, InventoryType.Machine, slotsIDs);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
x += compartmentPageWidth;
|
||||
if (tabs2.length > 0) {
|
||||
@@ -248,7 +252,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
|
||||
setSize(new IPoint(Math.max(32 + compartmentWidth, 252), h()));
|
||||
controlCompartment.setPosition(new IPoint((w() - controlCompartment.w()) / 2.0f, controlCompartment.y()));
|
||||
new ControlPlayerInventory(this, true);
|
||||
new ControlPlayerInventory(this, true).createAndRegister();
|
||||
ControlSlide slide = new ControlSlide(this, 0.0f, 134.0f, 136.0f, 92.0f, Position.LEFT);
|
||||
slide.setLabel(I18N.localise("binniecore.machine.storage.tab.properties"));
|
||||
slide.setSlide(false);
|
||||
@@ -370,7 +374,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
};
|
||||
slotGrid = new Control(scroll, 1.0f, 1.0f, 108.0f, 18.0f);
|
||||
scroll.setScrollableContent(slotGrid);
|
||||
new ControlPlayerInventory(this, true);
|
||||
new ControlPlayerInventory(this, true).createAndRegister();
|
||||
new ControlTextEdit(this, 16.0f, 16.0f, 100.0f, 14.0f).addEventHandler(new EventTextEdit.Handler() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
package binnie.core.mod.parser;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
|
||||
public abstract class FieldParser {
|
||||
|
||||
public static Collection<FieldParser> parsers = new ArrayList<>();
|
||||
|
||||
public abstract boolean isHandled(Field field, AbstractMod mod);
|
||||
|
||||
public void preInit(Field field, AbstractMod mod) throws IllegalArgumentException, IllegalAccessException {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public void init(Field field, AbstractMod mod) throws IllegalArgumentException, IllegalAccessException {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public void postInit(Field field, AbstractMod mod) throws IllegalArgumentException, IllegalAccessException {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public static void preInitParse(Field field, AbstractMod mod)
|
||||
throws IllegalArgumentException, IllegalAccessException {
|
||||
for (FieldParser parser : FieldParser.parsers) {
|
||||
if (parser.isHandled(field, mod)) {
|
||||
parser.preInit(field, mod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void initParse(Field field, AbstractMod mod) throws IllegalArgumentException, IllegalAccessException {
|
||||
for (FieldParser parser : FieldParser.parsers) {
|
||||
if (parser.isHandled(field, mod)) {
|
||||
parser.init(field, mod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInitParse(Field field, AbstractMod mod)
|
||||
throws IllegalArgumentException, IllegalAccessException {
|
||||
for (FieldParser parser : FieldParser.parsers) {
|
||||
if (parser.isHandled(field, mod)) {
|
||||
parser.postInit(field, mod);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package binnie.core.mod.parser;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ItemParser extends FieldParser {
|
||||
|
||||
@Override
|
||||
public boolean isHandled(Field field, AbstractMod mod) {
|
||||
return Item.class.isAssignableFrom(field.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit(Field field, AbstractMod mod) throws IllegalArgumentException, IllegalAccessException {
|
||||
Item item = (Item) field.get(null);
|
||||
if (item != null) {
|
||||
GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package binnie.extrabees;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
@@ -11,6 +10,7 @@ import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.proxy.IProxyCore;
|
||||
import binnie.extrabees.apiary.ModuleApiary;
|
||||
@@ -18,7 +18,11 @@ import binnie.extrabees.config.EBConfig;
|
||||
import binnie.extrabees.core.ExtraBeeGUID;
|
||||
import binnie.extrabees.core.ModuleCore;
|
||||
import binnie.extrabees.genetics.ModuleGenetics;
|
||||
import binnie.extrabees.genetics.items.ItemDictionary;
|
||||
import binnie.extrabees.liquids.ModuleLiquids;
|
||||
import binnie.extrabees.products.ItemHoneyComb;
|
||||
import binnie.extrabees.products.ItemHoneyDrop;
|
||||
import binnie.extrabees.products.ItemPropolis;
|
||||
import binnie.extrabees.products.ModuleProducts;
|
||||
import binnie.extrabees.proxy.ExtraBeesProxy;
|
||||
import binnie.extrabees.worldgen.ModuleGeneration;
|
||||
@@ -58,11 +62,11 @@ public class ExtraBees extends AbstractMod {
|
||||
public static Block hive;
|
||||
public static Material materialBeehive;
|
||||
public static Block ectoplasm;
|
||||
public static Item comb;
|
||||
public static Item propolis;
|
||||
public static Item honeyDrop;
|
||||
public static Item dictionary;
|
||||
public static Item itemMisc;
|
||||
public static ItemHoneyComb comb;
|
||||
public static ItemPropolis propolis;
|
||||
public static ItemHoneyDrop honeyDrop;
|
||||
public static ItemDictionary dictionary;
|
||||
public static ItemMisc itemMisc;
|
||||
|
||||
public ExtraBees() {
|
||||
ExtraBees.instance = this;
|
||||
|
||||
@@ -6,14 +6,23 @@ 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;
|
||||
@@ -21,7 +30,7 @@ import forestry.api.multiblock.IMultiblockController;
|
||||
import forestry.api.multiblock.IMultiblockLogicAlveary;
|
||||
import forestry.api.multiblock.MultiblockManager;
|
||||
|
||||
public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyComponent.Active,
|
||||
public class TileExtraBeeAlveary extends TileEntityMachine implements IBeeHousing, IAlvearyComponent.Active,
|
||||
IAlvearyComponent.BeeModifier, IAlvearyComponent.BeeListener, IBeeListener, IBeeModifier {
|
||||
|
||||
protected IMultiblockLogicAlveary structureLogic;
|
||||
@@ -42,11 +51,51 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyCo
|
||||
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) {
|
||||
@@ -226,6 +275,26 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyCo
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binnie.extrabees.core;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
@@ -9,7 +9,7 @@ public class ModuleCore implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
ExtraBees.itemMisc = Binnie.Item.registerMiscItems(ExtraBeeItems.values(), Tabs.tabApiculture);
|
||||
ExtraBees.itemMisc = new ItemMisc(Tabs.tabApiculture, ExtraBeeItems.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extrabees.genetics.items;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemDictionary extends Item {
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
setUnlocalizedName("dictionary");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.extrabees.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.InventoryType;
|
||||
@@ -10,7 +11,7 @@ import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@@ -33,10 +34,11 @@ public class WindowAlvearyFrame extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.frame"));
|
||||
playerInventory = new ControlPlayerInventory(this);
|
||||
ControlSlot slot = new ControlSlot(this, 79.0f, 30.0f);
|
||||
slot.assignAndRegister(InventoryType.Machine, 0);
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlot(this, 79.0f, 30.0f).assign(actions, InventoryType.Machine, 0);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,14 +2,16 @@ package binnie.extrabees.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.InventoryType;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.apiary.machine.hatchery.AlvearyHatchery;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -33,10 +35,11 @@ public class WindowAlvearyHatchery extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.hatchery"));
|
||||
playerInventory = new ControlPlayerInventory(this);
|
||||
ControlSlotArray slot = new ControlSlotArray(this, 43, 30, 5, 1);
|
||||
slot.create(AlvearyHatchery.SLOT_LARVAE);
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlotArray(this, 43, 30, 5, 1).create(actions, InventoryType.Machine, AlvearyHatchery.SLOT_LARVAE);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package binnie.extrabees.gui;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.controls.ControlText;
|
||||
@@ -16,6 +17,7 @@ import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
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.mutator.AlvearyMutator;
|
||||
@@ -40,10 +42,11 @@ public class WindowAlvearyMutator extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.mutator"));
|
||||
playerInventory = new ControlPlayerInventory(this);
|
||||
ControlSlot slot = new ControlSlot(this, 79.0f, 30.0f);
|
||||
slot.assignAndRegister(InventoryType.Machine, AlvearyMutator.SLOT_MUTATOR);
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
playerInventory = new ControlPlayerInventory(this).create(actions);
|
||||
new ControlSlot(this, 79.0f, 30.0f).assign(actions, InventoryType.Machine, AlvearyMutator.SLOT_MUTATOR);
|
||||
new ControlText(
|
||||
this,
|
||||
new IArea(0.0f, 52.0f, w(), 16.0f),
|
||||
@@ -64,6 +67,8 @@ public class WindowAlvearyMutator extends Window {
|
||||
display.hastooltip = true;
|
||||
x += 17.0f;
|
||||
}
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.extrabees.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
@@ -12,7 +13,7 @@ import binnie.core.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.apiary.machine.stimulator.AlvearyStimulator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -36,11 +37,12 @@ public class WindowAlvearyStimulator extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(I18N.localise("extrabees.machine.alveay.stimulator"));
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
setTitle(machine.getPackage().getGuiDisplayName());
|
||||
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);
|
||||
ControlSlot slot = new ControlSlot(this, 41.0f, 28.0f);
|
||||
slot.assignAndRegister(InventoryType.Machine, AlvearyStimulator.SLOT_CIRCUIT);
|
||||
playerInventory = new ControlPlayerInventory(this);
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,9 +21,8 @@ public class ItemHoneyComb extends ItemProduct {
|
||||
protected IIcon icon2;
|
||||
|
||||
public ItemHoneyComb() {
|
||||
super(EnumHoneyComb.values());
|
||||
super("honeyComb", EnumHoneyComb.values());
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
setUnlocalizedName("honeyComb");
|
||||
}
|
||||
|
||||
public static void addSubtypes() {
|
||||
|
||||
@@ -15,9 +15,8 @@ public class ItemHoneyDrop extends ItemProduct {
|
||||
protected IIcon icon2;
|
||||
|
||||
public ItemHoneyDrop() {
|
||||
super(EnumHoneyDrop.values());
|
||||
super("honeyDrop", EnumHoneyDrop.values());
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
setUnlocalizedName("honeyDrop");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extrabees.products;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -12,11 +14,14 @@ public class ItemProduct extends Item {
|
||||
|
||||
protected IItemEnum[] types;
|
||||
|
||||
public ItemProduct(IItemEnum[] types) {
|
||||
public ItemProduct(String name, IItemEnum[] types) {
|
||||
this.types = types;
|
||||
setMaxStackSize(64);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
setUnlocalizedName(name);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
public IItemEnum get(ItemStack stack) {
|
||||
|
||||
@@ -11,9 +11,8 @@ import forestry.api.core.Tabs;
|
||||
public class ItemPropolis extends ItemProduct {
|
||||
|
||||
public ItemPropolis() {
|
||||
super(EnumPropolis.values());
|
||||
super("propolis", EnumPropolis.values());
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
setUnlocalizedName("propolis");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,6 @@ import static binnie.extratrees.ExtraTrees.EB_MOD_NAME;
|
||||
import static binnie.extratrees.ExtraTrees.ET_MODID;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
@@ -13,6 +12,7 @@ import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.proxy.IProxyCore;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
@@ -26,6 +26,10 @@ import binnie.extratrees.config.ETConfig;
|
||||
import binnie.extratrees.core.ExtraTreesGUID;
|
||||
import binnie.extratrees.core.ModuleCore;
|
||||
import binnie.extratrees.genetics.ModuleGenetics;
|
||||
import binnie.extratrees.item.ItemDictionary;
|
||||
import binnie.extratrees.item.ItemFood;
|
||||
import binnie.extratrees.item.ItemHammer;
|
||||
import binnie.extratrees.item.ItemMothDatabase;
|
||||
import binnie.extratrees.item.ModuleItems;
|
||||
import binnie.extratrees.machines.ModuleMachine;
|
||||
import binnie.extratrees.nei.IMCForNEI;
|
||||
@@ -61,10 +65,13 @@ public class ExtraTrees extends AbstractMod {
|
||||
}
|
||||
}
|
||||
|
||||
public static Item itemDictionary;
|
||||
public static Item itemDictionaryLepi;
|
||||
public static Item itemMisc;
|
||||
public static Item itemFood;
|
||||
public static ItemDictionary itemDictionary;
|
||||
public static ItemMothDatabase itemDictionaryLepi;
|
||||
public static ItemMisc itemMisc;
|
||||
public static ItemFood itemFood;
|
||||
public static ItemHammer itemHammer;
|
||||
public static ItemHammer itemDurableHammer;
|
||||
|
||||
public static Block blockStairs;
|
||||
public static Block blockLog;
|
||||
public static BlockCarpentry blockCarpentry;
|
||||
@@ -75,13 +82,12 @@ public class ExtraTrees extends AbstractMod {
|
||||
public static BlockCarpentry blockPanel;
|
||||
public static Block blockSlab;
|
||||
public static Block blockDoubleSlab;
|
||||
public static Item itemHammer;
|
||||
public static Item itemDurableHammer;
|
||||
public static Block blockGate;
|
||||
public static Block blockDoor;
|
||||
public static BlockMultiFence blockMultiFence;
|
||||
public static BlockHedge blockHedge;
|
||||
public static BlockStainedDesign blockStained;
|
||||
|
||||
public static int doorRenderId;
|
||||
public static int branchRenderId;
|
||||
public static int fenceID;
|
||||
|
||||
@@ -43,15 +43,16 @@ public class WindowLumbermill extends Window {
|
||||
public void initialiseClient() {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
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);
|
||||
new ControlSlot(this, 172.0f, 58.0f).assign(actions, InventoryType.Machine, Lumbermill.SLOT_SAWDUST);
|
||||
|
||||
new ControlLumbermillProgress(this, 70.0f, 43.0f);
|
||||
new ControlLiquidTank(this, 16, 32);
|
||||
new ControlEnergyBar(this, 8, 112, 16, 60, Position.BOTTOM);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
new ControlErrorState(this, 95.0f, 73.0f);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
|
||||
@@ -51,7 +51,9 @@ public class WindowWoodworker extends Window {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getDisplayName());
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
setTitle(Machine.getMachine(getInventory()).getPackage().getGuiDisplayName());
|
||||
new ControlText(
|
||||
this,
|
||||
new IArea(190.0f, 36.0f, 114.0f, 10.0f),
|
||||
@@ -61,11 +63,14 @@ public class WindowWoodworker extends Window {
|
||||
textEdit = new ControlTextEdit(this, 188.0f, 178.0f, 118.0f, 12.0f);
|
||||
ControlScrollableContent scroll = new ControlScrollableContent(this, 190.0f, 50.0f, 114.0f, 122.0f, 12.0f);
|
||||
scroll.setScrollableContent(tileSelect = new ControlTileSelect(scroll, 0.0f, 0.0f));
|
||||
new ControlPlayerInventory(this).setPosition(new IPoint(14.0f, 96.0f));
|
||||
|
||||
ControlPlayerInventory controlPlayerInventory = new ControlPlayerInventory(this);
|
||||
controlPlayerInventory.setPosition(new IPoint(14.0f, 96.0f));
|
||||
controlPlayerInventory.create(actions);
|
||||
|
||||
new ControlErrorState(this, 76.0f, 65.0f);
|
||||
|
||||
if (getInventory() != null) {
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
ControlSlot slotWood1 = new ControlSlot(this, 22.0f, 34.0f);
|
||||
slotWood1.assign(actions, InventoryType.Machine, Designer.DESIGN_1_SLOT);
|
||||
@@ -74,9 +79,9 @@ public class WindowWoodworker extends Window {
|
||||
ControlSlot slotBeeswax = new ControlSlot(this, 42.0f, 64.0f);
|
||||
slotBeeswax.assign(actions, InventoryType.Machine, Designer.GLUE_SLOT);
|
||||
new ControlRecipeSlot(this, 112, 34);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extratrees.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemDictionary extends Item {
|
||||
setCreativeTab(Tabs.tabArboriculture);
|
||||
setUnlocalizedName("database");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extratrees.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -24,6 +26,8 @@ public class ItemFood extends net.minecraft.item.ItemFood {
|
||||
setCreativeTab(Tabs.tabArboriculture);
|
||||
setHasSubtypes(true);
|
||||
items = Food.values();
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extratrees.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -22,6 +24,8 @@ public class ItemHammer extends Item implements IToolHammer {
|
||||
setUnlocalizedName(durable ? "durableHammer" : "hammer");
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(durable ? 1562 : 251);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.extratrees.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemMothDatabase extends Item {
|
||||
setCreativeTab(Tabs.tabLepidopterology);
|
||||
setUnlocalizedName("databaseMoth");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ModuleItems implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
ExtraTrees.itemMisc = Binnie.Item.registerMiscItems(ExtraTreeItems.values(), Tabs.tabArboriculture);
|
||||
ExtraTrees.itemMisc = new ItemMisc(Tabs.tabArboriculture, ExtraTreeItems.values());
|
||||
ExtraTrees.itemDictionary = new ItemDictionary();
|
||||
if (BinnieCore.isLepidopteryActive()) {
|
||||
ExtraTrees.itemDictionaryLepi = new ItemMothDatabase();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package binnie.genetics;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.machines.MachineGroup;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
@@ -13,6 +12,10 @@ import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsPacket;
|
||||
import binnie.genetics.item.ItemAnalyst;
|
||||
import binnie.genetics.item.ItemDatabase;
|
||||
import binnie.genetics.item.ItemMasterRegistry;
|
||||
import binnie.genetics.item.ItemRegistry;
|
||||
import binnie.genetics.item.ItemSequence;
|
||||
import binnie.genetics.item.ItemSerum;
|
||||
import binnie.genetics.item.ItemSerumArray;
|
||||
import binnie.genetics.item.ModuleItem;
|
||||
import binnie.genetics.machine.ModuleMachine;
|
||||
@@ -38,18 +41,20 @@ public class Genetics extends AbstractMod {
|
||||
@SidedProxy(clientSide = "binnie.genetics.proxy.ProxyClient", serverSide = "binnie.genetics.proxy.ProxyServer")
|
||||
public static Proxy proxy;
|
||||
|
||||
public static ItemSerumArray itemSerumArray = null;
|
||||
public static final String CHANNEL = "GEN";
|
||||
public static Item itemGenetics;
|
||||
public static Item itemSerum;
|
||||
public static Item itemSequencer;
|
||||
|
||||
public static ItemSerumArray itemSerumArray = null;
|
||||
public static ItemMisc itemGenetics;
|
||||
public static ItemSerum itemSerum;
|
||||
public static ItemSequence itemSequencer;
|
||||
public static ItemDatabase database;
|
||||
public static ItemAnalyst analyst;
|
||||
public static ItemRegistry registry;
|
||||
public static ItemMasterRegistry masterRegistry;
|
||||
|
||||
public static MachineGroup packageGenetic;
|
||||
public static MachineGroup packageAdvGenetic;
|
||||
public static MachineGroup packageLabMachine;
|
||||
public static ItemDatabase database;
|
||||
public static ItemAnalyst analyst;
|
||||
public static Item registry;
|
||||
public static Item masterRegistry;
|
||||
|
||||
public Genetics() {
|
||||
Genetics.instance = this;
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.genetics.craftgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
@@ -14,6 +15,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
@@ -41,22 +43,28 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
int x = 59;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.SLOT_RESERVE);
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(actions, InventoryType.Machine, Acclimatiser.SLOT_RESERVE);
|
||||
x += 54;
|
||||
new ControlSlot(this, x + 18, y).assignAndRegister(InventoryType.Machine, Acclimatiser.SLOT_TARGET);
|
||||
new ControlSlotArray(this, x, y + 18 + 18, 3, 1).create(Acclimatiser.SLOT_ACCLIMATISER);
|
||||
new ControlSlot(this, x + 18, y).assign(actions, InventoryType.Machine, Acclimatiser.SLOT_TARGET);
|
||||
new ControlSlotArray(this, x, y + 18 + 18, 3, 1)
|
||||
.create(actions, InventoryType.Machine, Acclimatiser.SLOT_ACCLIMATISER);
|
||||
x += 72;
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.SLOT_DONE);
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(actions, InventoryType.Machine, Acclimatiser.SLOT_DONE);
|
||||
new ControlEnergyBar(this, 21, 115, 16, 60, Position.BOTTOM);
|
||||
new ControlErrorState(this, 181.0f, 83.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.labMachine.acclimatiser");
|
||||
return I18N.localise("gui.genetics.machine.labMachine.acclimatiser.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,7 +57,7 @@ public class WindowAnalyser extends WindowMachine {
|
||||
WindowAnalyser.progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_RESERVE);
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(actions, InventoryType.Machine, Analyser.SLOT_RESERVE);
|
||||
x += 28;
|
||||
new ControlSlot(this, x, y + 54 + 8).assign(actions, InventoryType.Machine, 13);
|
||||
new ControlSlotCharge(this, x + 20, y + 54 + 8, 13).setColor(10040319);
|
||||
@@ -71,15 +71,15 @@ public class WindowAnalyser extends WindowMachine {
|
||||
new ControlSlot(this, x + 38 - 9, y + 25 - 9).assign(actions, InventoryType.Machine, Analyser.SLOT_TARGET);
|
||||
new ControlIconDisplay(this, x + 76 + 2, y + 18, GUIIcon.ArrowRight.getIcon());
|
||||
x += 96;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_FINISHED);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(actions, InventoryType.Machine, Analyser.SLOT_FINISHED);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.labMachine.analyser");
|
||||
return I18N.localise("gui.genetics.machine.labMachine.analyser.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -97,7 +97,7 @@ public class WindowGeneBank extends WindowMachine {
|
||||
int boxX;
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlPlayerInventory(this, x, y);
|
||||
new ControlPlayerInventory(this, x, y).createAndRegister();
|
||||
x += 124;
|
||||
boxX = x;
|
||||
int geneBoxWidth = 200;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class WindowGenepool extends WindowMachine {
|
||||
new ControlLiquidTank(this, x, y).setTankID(Genepool.TANK_ETHANOL);
|
||||
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.SLOT_RESERVE);
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(actions, InventoryType.Machine, Genepool.SLOT_RESERVE);
|
||||
|
||||
x += 38;
|
||||
new ControlIconDisplay(this, x, y + 22, GUIIcon.ArrowRight.getIcon());
|
||||
@@ -68,14 +68,14 @@ public class WindowGenepool extends WindowMachine {
|
||||
new ControlSlot(this, 121.0f, 82.0f).assign(actions, InventoryType.Machine, Genepool.SLOT_ENZYME);
|
||||
new ControlSlotCharge(this, 143, 82, 7).setColor(0xefe8af);
|
||||
new ControlErrorState(this, 181.0f, 83.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.labMachine.genepool");
|
||||
return I18N.localise("gui.genetics.machine.labMachine.genepool.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.genetics.craftgui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.geometry.Position;
|
||||
@@ -18,6 +19,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
@@ -40,11 +42,14 @@ public class WindowIncubator extends WindowMachine {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
|
||||
final NBTTagList actions = new NBTTagList();
|
||||
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(Incubator.TANK_INPUT);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.SLOT_QUEUE);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(actions, InventoryType.Machine, Incubator.SLOT_QUEUE);
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
@@ -55,22 +60,24 @@ public class WindowIncubator extends WindowMachine {
|
||||
WindowIncubator.progressBase,
|
||||
WindowIncubator.progress,
|
||||
Position.LEFT);
|
||||
new ControlSlot(this, x + 10, y + 3 + 10).assignAndRegister(InventoryType.Machine, Incubator.SLOT_INCUBATOR);
|
||||
new ControlSlot(this, x + 10, y + 3 + 10).assign(actions, InventoryType.Machine, Incubator.SLOT_INCUBATOR);
|
||||
x += 40;
|
||||
new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.SLOT_OUTPUT);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(actions, InventoryType.Machine, Incubator.SLOT_OUTPUT);
|
||||
x += 26;
|
||||
new ControlLiquidTank(this, x, y).setTankID(Incubator.TANK_OUTPUT);
|
||||
x += 34;
|
||||
new ControlEnergyBar(this, x, y + 3, 16, 54, Position.BOTTOM);
|
||||
new ControlErrorState(this, 91.0f, 82.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.labMachine.incubator");
|
||||
return I18N.localise("gui.genetics.machine.labMachine.incubator.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,11 +53,13 @@ public class WindowInoculator extends WindowMachine {
|
||||
CraftGUIUtil.horizontalGrid(
|
||||
x,
|
||||
y,
|
||||
new ControlSlotArray(this, 0, 0, 2, 1).create(Inoculator.SLOT_SERUM_RESERVE),
|
||||
new ControlSlotArray(this, 0, 0, 2, 1)
|
||||
.create(actions, InventoryType.Machine, Inoculator.SLOT_SERUM_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
new ControlSlot(this, 0.0f, 0.0f).assign(actions, InventoryType.Machine, 0),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
new ControlSlotArray(this, 0, 0, 2, 1).create(Inoculator.SLOT_SERUM_EXPENDED));
|
||||
new ControlSlotArray(this, 0, 0, 2, 1)
|
||||
.create(actions, InventoryType.Machine, Inoculator.SLOT_SERUM_EXPENDED));
|
||||
x += 18;
|
||||
new ControlMachineProgress(
|
||||
this,
|
||||
@@ -74,19 +76,20 @@ public class WindowInoculator extends WindowMachine {
|
||||
y,
|
||||
TextJustification.MIDDLE_LEFT,
|
||||
8.0f,
|
||||
new ControlSlotArray(this, x, y, 4, 1).create(Inoculator.SLOT_RESERVE),
|
||||
new ControlSlotArray(this, x, y, 4, 1).create(actions, InventoryType.Machine, Inoculator.SLOT_RESERVE),
|
||||
new ControlSlot(this, x, y + 18 + 8).assign(actions, InventoryType.Machine, 9),
|
||||
new ControlSlotArray(this, x, y + 18 + 8 + 18 + 8, 4, 1).create(Inoculator.SLOT_FINISHED));
|
||||
new ControlSlotArray(this, x, y + 18 + 8 + 18 + 8, 4, 1)
|
||||
.create(actions, InventoryType.Machine, Inoculator.SLOT_FINISHED));
|
||||
new ControlIconDisplay(this, x + 18, y + 18 + 2, GUIIcon.ArrowUpLeft.getIcon());
|
||||
new ControlIconDisplay(this, x + 18, y + 18 + 18, GUIIcon.ArrowLeftDown.getIcon());
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.machine.inoculator");
|
||||
return I18N.localise("gui.genetics.machine.machine.inoculator.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class WindowIsolator extends WindowMachine {
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(Isolator.TANK_ETHANOL);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Isolator.SLOT_RESERVE);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(actions, InventoryType.Machine, Isolator.SLOT_RESERVE);
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
@@ -66,17 +66,17 @@ public class WindowIsolator extends WindowMachine {
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Isolator.SLOT_FINISHED);
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(actions, InventoryType.Machine, Isolator.SLOT_FINISHED);
|
||||
new ControlEnergyBar(this, 260, 130, 16, 60, Position.BOTTOM);
|
||||
new ControlErrorState(this, 153.0f, 81.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.machine.isolator");
|
||||
return I18N.localise("gui.genetics.machine.machine.isolator.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,7 +53,7 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
|
||||
int x = 16;
|
||||
int y = 38;
|
||||
new ControlSlotArray(this, x, y, 1, 4).create(Polymeriser.SLOT_SERUM_RESERVE);
|
||||
new ControlSlotArray(this, x, y, 1, 4).create(actions, InventoryType.Machine, Polymeriser.SLOT_SERUM_RESERVE);
|
||||
new ControlIconDisplay(this, x + 18, y + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 34;
|
||||
new ControlMachineProgress(this, x + 18, y - 6, progressBase, progress, Position.LEFT);
|
||||
@@ -65,16 +65,17 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
new ControlSlot(this, x + 30, y + 18 + 8).assign(actions, InventoryType.Machine, Polymeriser.SLOT_GOLD);
|
||||
new ControlSlotCharge(this, x + 30 + 20, y + 18 + 8, 1).setColor(0xffd800);
|
||||
x += 138;
|
||||
new ControlSlotArray(this, x, y + 9, 2, 2).create(Polymeriser.SLOT_SERUM_FINISHED);
|
||||
new ControlSlotArray(this, x, y + 9, 2, 2)
|
||||
.create(actions, InventoryType.Machine, Polymeriser.SLOT_SERUM_FINISHED);
|
||||
new ControlErrorState(this, 244.0f, 97.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.machine.polymeriser");
|
||||
return I18N.localise("gui.genetics.machine.machine.polymeriser.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,7 +74,7 @@ public class WindowSequencer extends WindowMachine {
|
||||
y,
|
||||
TextJustification.MIDDLE_CENTER,
|
||||
2.0f,
|
||||
new ControlSlotArray(this, 0, 0, 2, 2).create(Sequencer.SLOT_RESERVE),
|
||||
new ControlSlotArray(this, 0, 0, 2, 2).create(actions, InventoryType.Machine, Sequencer.SLOT_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
new ControlSequencerProgress(this, 0, 0),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
@@ -97,14 +97,14 @@ public class WindowSequencer extends WindowMachine {
|
||||
new ControlEnergyBar(this, x, y, 60, 16, Position.LEFT);
|
||||
x += 92;
|
||||
new ControlErrorState(this, x, y + 1);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.machine.sequencer");
|
||||
return I18N.localise("gui.genetics.machine.machine.sequencer.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,10 +56,12 @@ public class WindowSplicer extends WindowMachine {
|
||||
CraftGUIUtil.horizontalGrid(
|
||||
x,
|
||||
62.0f,
|
||||
new ControlSlotArray(this, 0, 0, 2, 1).create(Splicer.SLOT_SERUM_RESERVE),
|
||||
new ControlSlotArray(this, 0, 0, 2, 1)
|
||||
.create(actions, InventoryType.Machine, Splicer.SLOT_SERUM_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
new ControlSlot(this, 0.0f, 0.0f).assign(actions, InventoryType.Machine, Splicer.SLOT_SERUM_VIAL));
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1).create(Splicer.SLOT_SERUM_EXPENDED);
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1)
|
||||
.create(actions, InventoryType.Machine, Splicer.SLOT_SERUM_EXPENDED);
|
||||
new ControlIconDisplay(this, x + 12 + 36 + 4, 86.0f, GUIIcon.ArrowUpLeft.getIcon());
|
||||
new ControlEnergyBar(this, 196, 64, 60, 16, Position.LEFT);
|
||||
new ControlErrorState(this, 218.0f, 86.0f);
|
||||
@@ -68,19 +70,20 @@ public class WindowSplicer extends WindowMachine {
|
||||
32.0f,
|
||||
TextJustification.MIDDLE_CENTER,
|
||||
4.0f,
|
||||
new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.SLOT_RESERVE),
|
||||
new ControlSlotArray(this, 0, 0, 4, 1).create(actions, InventoryType.Machine, Inoculator.SLOT_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()),
|
||||
new ControlSlot(this, 0.0f, 0.0f).assign(actions, InventoryType.Machine, Splicer.SLOT_TARGET),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()),
|
||||
new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.SLOT_FINISHED));
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlSlotArray(this, 0, 0, 4, 1)
|
||||
.create(actions, InventoryType.Machine, Inoculator.SLOT_FINISHED));
|
||||
new ControlPlayerInventory(this).create(actions);
|
||||
|
||||
MessageCraftGUI.sendToServer(actions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("genetics.machine.advMachine.splicer");
|
||||
return I18N.localise("gui.genetics.machine.advMachine.splicer.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -123,12 +123,12 @@ public class WindowAnalyst extends Window {
|
||||
public void initialiseClient() {
|
||||
if (isDatabase) {
|
||||
if (isMaster) {
|
||||
setTitle(I18N.localise("genetics.item.registry.1.name"));
|
||||
setTitle(I18N.localise("genetics.gui.registry.1.title"));
|
||||
} else {
|
||||
setTitle(I18N.localise("genetics.item.registry.0.name"));
|
||||
setTitle(I18N.localise("genetics.gui.registry.title"));
|
||||
}
|
||||
} else {
|
||||
setTitle(I18N.localise("genetics.item.analyst.name"));
|
||||
setTitle(I18N.localise("genetics.gui.analyst.title"));
|
||||
}
|
||||
|
||||
getWindowInventory().createSlot(0);
|
||||
@@ -279,7 +279,7 @@ public class WindowAnalyst extends Window {
|
||||
244.0f,
|
||||
80.0f,
|
||||
Position.BOTTOM);
|
||||
new ControlPlayerInventory(slideUpInv, true);
|
||||
new ControlPlayerInventory(slideUpInv, true).createAndRegister();
|
||||
slideUpInv.setSlide(false);
|
||||
}
|
||||
addEventHandler(new EventKey.Down.Handler() {
|
||||
@@ -301,7 +301,7 @@ public class WindowAnalyst extends Window {
|
||||
@Override
|
||||
public void initialise() {
|
||||
new ControlTextCentered(this, 20.0f, I18N.localise("genetics.gui.analyst.info")).setColor(0x444444);
|
||||
new ControlPlayerInventory(this);
|
||||
new ControlPlayerInventory(this).createAndRegister();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,9 +56,6 @@ public enum GeneticsItems implements IItemMisc {
|
||||
|
||||
@Override
|
||||
public ItemStack get(int count) {
|
||||
if (Genetics.itemGenetics == null) {
|
||||
return null;
|
||||
}
|
||||
return new ItemStack(Genetics.itemGenetics, count, ordinal());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -19,6 +21,8 @@ public class ItemAnalyst extends Item {
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setUnlocalizedName("analyst");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,6 +27,8 @@ public class ItemDatabase extends Item {
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setUnlocalizedName("database");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -29,6 +31,8 @@ public class ItemFieldKit extends Item {
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(64);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -26,6 +28,8 @@ public abstract class ItemGene extends Item {
|
||||
setMaxDamage(16);
|
||||
setUnlocalizedName(unlocName);
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -19,6 +21,8 @@ public class ItemMasterRegistry extends Item {
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setUnlocalizedName("masterRegistry");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -19,6 +21,8 @@ public class ItemRegistry extends Item {
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setUnlocalizedName("registry");
|
||||
setMaxStackSize(1);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.genetics.item;
|
||||
|
||||
import static cpw.mods.fml.common.registry.GameRegistry.registerItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -31,6 +33,8 @@ public class ItemSequence extends Item implements IItemAnalysable, IItemChargabl
|
||||
setMaxDamage(5);
|
||||
setUnlocalizedName("sequence");
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
public static ItemStack create(IGene gene) {
|
||||
@@ -116,4 +120,9 @@ 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;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import binnie.botany.Botany;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.liquid.ItemFluidContainer;
|
||||
import binnie.core.resource.BinnieIcon;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
@@ -44,7 +45,7 @@ public class ModuleItem implements IInitializable {
|
||||
Genetics.itemSerum = new ItemSerum();
|
||||
Genetics.itemSerumArray = new ItemSerumArray();
|
||||
Genetics.itemSequencer = new ItemSequence();
|
||||
Genetics.itemGenetics = Binnie.Item.registerMiscItems(GeneticsItems.values(), GeneticsCreativeTab.instance);
|
||||
Genetics.itemGenetics = new ItemMisc(GeneticsCreativeTab.instance, GeneticsItems.values());
|
||||
Genetics.database = new ItemDatabase();
|
||||
Genetics.analyst = new ItemAnalyst();
|
||||
Genetics.registry = new ItemRegistry();
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
"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.9 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -36,6 +36,10 @@ 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
|
||||
@@ -59,6 +63,7 @@ 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
|
||||
@@ -67,6 +72,7 @@ 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
|
||||
@@ -78,6 +84,7 @@ 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
|
||||
@@ -88,6 +95,7 @@ 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
|
||||
@@ -105,6 +113,7 @@ 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
|
||||
@@ -115,6 +124,7 @@ 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
|
||||
@@ -125,6 +135,7 @@ 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
|
||||
@@ -132,6 +143,7 @@ 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
|
||||
@@ -140,6 +152,7 @@ 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