mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 17:24:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b312261db | ||
|
|
bd0746583a | ||
|
|
b4143fb0ef | ||
|
|
77c47e9071 | ||
|
|
f27b66c53f |
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ dependencies {
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.12:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.9.48:dev')
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.88-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.97-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.57:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
|
||||
@@ -240,12 +240,16 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
NEIHook.lastKeyTyped(key, c);
|
||||
boolean noFocusedWidget = window.getFocusedWidget() == null;
|
||||
|
||||
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
|
||||
if (noFocusedWidget) {
|
||||
NEIHook.lastKeyTyped(key, c);
|
||||
}
|
||||
|
||||
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && noFocusedWidget)) {
|
||||
mc.thePlayer.closeScreen();
|
||||
}
|
||||
IWidget origin = (window.getFocusedWidget() == null) ? window : window.getFocusedWidget();
|
||||
IWidget origin = noFocusedWidget ? window : window.getFocusedWidget();
|
||||
window.callEvent(new EventKey.Down(origin, c, key));
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,9 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
entityInventory = inventory;
|
||||
}
|
||||
|
||||
public void onClose() {}
|
||||
public void onClose() {
|
||||
CraftGUI.render = null;
|
||||
}
|
||||
|
||||
public boolean isServer() {
|
||||
return !isClient();
|
||||
|
||||
@@ -256,8 +256,8 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
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);
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties.desc"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties.desc"));
|
||||
Panel tabPropertyPanel = new Panel(slide, 16.0f, 8.0f, 112.0f, 76.0f, MinecraftGUI.PanelType.Gray);
|
||||
int y2 = 4;
|
||||
new ControlText(tabPropertyPanel, new IPoint(4.0f, y2), I18N.localise("binniecore.machine.storage.tab.name"));
|
||||
|
||||
@@ -54,7 +54,8 @@ public class Lumbermill {
|
||||
|
||||
private static Collection<ItemStack> getRecipeResult(ItemStack output) {
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
for (IRecipe iRecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
List<IRecipe> iRecipes = new ArrayList<>(CraftingManager.getInstance().getRecipeList());
|
||||
for (IRecipe iRecipe : iRecipes) {
|
||||
if (iRecipe instanceof ShapelessRecipes shapeless) {
|
||||
if (shapeless.recipeItems.size() != 1 || !(shapeless.recipeItems.get(0) instanceof ItemStack)) {
|
||||
continue;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package binnie.genetics;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
@@ -8,6 +11,7 @@ import binnie.core.machines.MachineGroup;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
import binnie.core.proxy.IProxyCore;
|
||||
import binnie.genetics.config.GeneticsConfig;
|
||||
import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsPacket;
|
||||
import binnie.genetics.item.ItemAnalyst;
|
||||
@@ -28,19 +32,29 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Mod(
|
||||
modid = "Genetics",
|
||||
modid = Genetics.GENETICS_MODID,
|
||||
name = "Genetics",
|
||||
version = Tags.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:BinnieCore")
|
||||
public class Genetics extends AbstractMod {
|
||||
|
||||
public static final String GENETICS_MODID = "Genetics";
|
||||
|
||||
@Mod.Instance("Genetics")
|
||||
public static Genetics instance;
|
||||
|
||||
@SidedProxy(clientSide = "binnie.genetics.proxy.ProxyClient", serverSide = "binnie.genetics.proxy.ProxyServer")
|
||||
public static Proxy proxy;
|
||||
|
||||
static {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(GeneticsConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static final String CHANNEL = "GEN";
|
||||
|
||||
public static ItemSerumArray itemSerumArray = null;
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package binnie.extrabees.config;
|
||||
package binnie.genetics.config;
|
||||
|
||||
import static binnie.extrabees.ExtraBees.EB_MODID;
|
||||
import static binnie.genetics.Genetics.GENETICS_MODID;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
|
||||
@Config(modid = EB_MODID)
|
||||
public class EBConfigMachines {
|
||||
@Config(modid = GENETICS_MODID)
|
||||
public class GeneticsConfig {
|
||||
|
||||
@Config.Comment("Percentage chance of Isolator consuming bee. 0 never consumes, 1 always does.")
|
||||
@Config.RangeFloat(min = 0f, max = 1f)
|
||||
@@ -13,7 +13,7 @@ import binnie.core.machines.power.ComponentProcessSetCost;
|
||||
import binnie.core.machines.power.ErrorState;
|
||||
import binnie.core.machines.power.IProcess;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.config.EBConfigMachines;
|
||||
import binnie.genetics.config.GeneticsConfig;
|
||||
import binnie.genetics.item.ItemSequence;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
@@ -100,7 +100,7 @@ public class IsolatorComponentLogic extends ComponentProcessSetCost implements I
|
||||
ItemStack serum = ItemSequence.create(gene);
|
||||
getUtil().setStack(Isolator.SLOT_RESULT, serum);
|
||||
getUtil().decreaseStack(Isolator.SLOT_SEQUENCER_VIAL, 1);
|
||||
if (rand.nextFloat() < EBConfigMachines.isolatorConsumptionChance) {
|
||||
if (rand.nextFloat() < GeneticsConfig.isolatorConsumptionChance) {
|
||||
getUtil().decreaseStack(Isolator.SLOT_TARGET, 1);
|
||||
}
|
||||
getUtil().drainTank(Isolator.TANK_ETHANOL, (int) ethanolPerProcess);
|
||||
|
||||
Reference in new issue
Block a user