Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5960bad61 | ||
|
|
e96a8452b9 | ||
|
|
eeeb37fce7 | ||
|
|
44f648549f | ||
|
|
c6b3a66707 | ||
|
|
edb7622056 | ||
|
|
49646337b3 |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main, release/** ]
|
branches: [ master, main ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main, release/** ]
|
branches: [ master, main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
name: Optimize images
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [ master, main, release/** ]
|
|
||||||
paths:
|
|
||||||
- "**/*.png"
|
|
||||||
|
|
||||||
push:
|
|
||||||
branches: [ master, main, release/** ]
|
|
||||||
paths:
|
|
||||||
- "**/*.png"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
optimize-images:
|
|
||||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
|
||||||
secrets: inherit
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-999-GTNH:dev")
|
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-731-GTNH-pre:dev")
|
||||||
|
|
||||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev")
|
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev")
|
||||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev")
|
|
||||||
compileOnly("curse.maven:cofh-core-69162:2388751")
|
compileOnly("curse.maven:cofh-core-69162:2388751")
|
||||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.91-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.26-GTNH:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.23:dev") { transitive = false }
|
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
|
||||||
|
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.3:dev") { transitive = false }
|
||||||
}
|
}
|
||||||
@@ -39,33 +39,9 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
|
|||||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||||
developmentEnvironmentUserName = Developer
|
developmentEnvironmentUserName = Developer
|
||||||
|
|
||||||
# Enables modern Java syntax support. Valid values:
|
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||||
# - false: No modern syntax, Java 8 only
|
# See https://github.com/bsideup/jabel for details on how this works.
|
||||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
enableModernJavaSyntax = true
|
||||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
|
||||||
# - modern: Native modern Java bytecode, no downgrading
|
|
||||||
enableModernJavaSyntax = jabel
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
|
||||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
|
||||||
# downgradeTargetVersion = 8
|
|
||||||
|
|
||||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
|
||||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
|
||||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
|
||||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
|
||||||
|
|
||||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
|
||||||
# - shade: Shade minimized stubs into the jar
|
|
||||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
|
||||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
|
||||||
# - (empty): Warning reminding you to configure stubs
|
|
||||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
|
||||||
# jvmDowngraderStubsProvider =
|
|
||||||
|
|
||||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
# 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.
|
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||||
@@ -233,6 +209,3 @@ customArchiveBaseName = WirelessCraftingTerminal
|
|||||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||||
# ideaCheckSpotlessOnBuild = true
|
# ideaCheckSpotlessOnBuild = true
|
||||||
|
|
||||||
# Non-GTNH properties
|
|
||||||
org.gradle.configuration-cache = true
|
|
||||||
org.gradle.parallel = true
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#This file is generated by updateDaemonJvm
|
|
||||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
|
||||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
|
||||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
|
||||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
|
||||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
|
||||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/faa12903720d410b387cc69ccafb1a74/redirect
|
|
||||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
|
||||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
|
||||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
|
|
||||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
|
||||||
toolchainVersion=25
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -114,6 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -171,6 +172,7 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@@ -210,6 +212,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
|||||||
@@ -70,10 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ public class GuiMagnet extends GuiContainer {
|
|||||||
public boolean ignoreNBT = false;
|
public boolean ignoreNBT = false;
|
||||||
public boolean ignoreMeta = false;
|
public boolean ignoreMeta = false;
|
||||||
public boolean useOreDict = false;
|
public boolean useOreDict = false;
|
||||||
private final ItemStack magnetItem;
|
private ItemStack magnetItem;
|
||||||
private WCTGuiCheckBox ignoreNBTBox;
|
private WCTGuiCheckBox ignoreNBTBox;
|
||||||
private WCTGuiCheckBox ignoreMetaBox;
|
private WCTGuiCheckBox ignoreMetaBox;
|
||||||
private WCTGuiCheckBox useOreDictBox;
|
private WCTGuiCheckBox useOreDictBox;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package net.p455w0rd.wirelesscraftingterminal.client.gui;
|
|||||||
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
@@ -12,6 +13,7 @@ import net.p455w0rd.wirelesscraftingterminal.common.container.slot.SlotTrash;
|
|||||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
|
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketEmptyTrash;
|
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketEmptyTrash;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketInventoryAction;
|
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketInventoryAction;
|
||||||
|
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||||
|
|
||||||
import appeng.api.config.ActionItems;
|
import appeng.api.config.ActionItems;
|
||||||
@@ -20,14 +22,17 @@ import appeng.api.parts.ICraftingTerminal;
|
|||||||
import appeng.client.gui.implementations.GuiMEMonitorable;
|
import appeng.client.gui.implementations.GuiMEMonitorable;
|
||||||
import appeng.client.gui.slots.VirtualMEPinSlot;
|
import appeng.client.gui.slots.VirtualMEPinSlot;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
|
import appeng.client.gui.widgets.GuiTabButton;
|
||||||
import appeng.container.slot.AppEngSlot;
|
import appeng.container.slot.AppEngSlot;
|
||||||
import appeng.container.slot.SlotCraftingMatrix;
|
import appeng.container.slot.SlotCraftingMatrix;
|
||||||
import appeng.container.slot.SlotFakeCraftingMatrix;
|
import appeng.container.slot.SlotFakeCraftingMatrix;
|
||||||
import appeng.core.localization.ColorUtils;
|
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.helpers.InventoryAction;
|
import appeng.helpers.InventoryAction;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
import yalter.mousetweaks.api.IMTModGuiContainer;
|
||||||
|
|
||||||
public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
@Optional.Interface(modid = "MouseTweaks", iface = "yalter.mousetweaks.api.IMTModGuiContainer")
|
||||||
|
public class GuiWirelessCraftingTerminal extends GuiMEMonitorable implements IMTModGuiContainer {
|
||||||
|
|
||||||
private float xSize_lo;
|
private float xSize_lo;
|
||||||
private float ySize_lo;
|
private float ySize_lo;
|
||||||
@@ -39,14 +44,16 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
public static int craftingGridOffsetX = 80;
|
public static int craftingGridOffsetX = 80;
|
||||||
public static int craftingGridOffsetY;
|
public static int craftingGridOffsetY;
|
||||||
|
|
||||||
|
private GuiTabButton craftingStatusBtn;
|
||||||
private GuiImgButton clearBtn;
|
private GuiImgButton clearBtn;
|
||||||
private GuiTrashButton trashBtn;
|
private GuiTrashButton trashBtn;
|
||||||
|
|
||||||
private final GuiText hostName;
|
private int currentMouseX = 0;
|
||||||
|
private int currentMouseY = 0;
|
||||||
|
private final int lowerTextureOffset = 0;
|
||||||
|
|
||||||
public GuiWirelessCraftingTerminal(final InventoryPlayer inventoryPlayer, ICraftingTerminal host) {
|
public GuiWirelessCraftingTerminal(final InventoryPlayer inventoryPlayer, ICraftingTerminal host) {
|
||||||
super(inventoryPlayer, host, new ContainerWirelessCraftingTerminal(inventoryPlayer, host));
|
super(inventoryPlayer, host, new ContainerWirelessCraftingTerminal(inventoryPlayer, host));
|
||||||
this.hostName = host.getHostName();
|
|
||||||
this.setReservedSpace(73);
|
this.setReservedSpace(73);
|
||||||
this.offsetRepoX -= 1;
|
this.offsetRepoX -= 1;
|
||||||
|
|
||||||
@@ -56,6 +63,9 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(final GuiButton btn) {
|
protected void actionPerformed(final GuiButton btn) {
|
||||||
|
// if (btn == this.craftingStatusBtn) {
|
||||||
|
// NetworkHandler.instance.sendToServer(new PacketSwitchGuis(Reference.GUI_CRAFTING_STATUS));
|
||||||
|
// } else
|
||||||
if (this.clearBtn == btn) {
|
if (this.clearBtn == btn) {
|
||||||
Slot s = null;
|
Slot s = null;
|
||||||
final Container c = this.inventorySlots;
|
final Container c = this.inventorySlots;
|
||||||
@@ -106,6 +116,15 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
this.buttonList.add(this.trashBtn = new GuiTrashButton(this.guiLeft + 98, this.guiTop + this.ySize - 104));
|
this.buttonList.add(this.trashBtn = new GuiTrashButton(this.guiLeft + 98, this.guiTop + this.ySize - 104));
|
||||||
this.clearBtn.setHalfSize(true);
|
this.clearBtn.setHalfSize(true);
|
||||||
|
|
||||||
|
this.buttonList.add(
|
||||||
|
this.craftingStatusBtn = new GuiTabButton(
|
||||||
|
this.guiLeft + 169,
|
||||||
|
this.guiTop - 4,
|
||||||
|
2 + 11 * 16,
|
||||||
|
GuiText.CraftingStatus.getLocal(),
|
||||||
|
itemRender));
|
||||||
|
this.craftingStatusBtn.setHideEdge(13);
|
||||||
|
|
||||||
craftingGridOffsetX = Integer.MAX_VALUE;
|
craftingGridOffsetX = Integer.MAX_VALUE;
|
||||||
craftingGridOffsetY = Integer.MAX_VALUE;
|
craftingGridOffsetY = Integer.MAX_VALUE;
|
||||||
|
|
||||||
@@ -141,21 +160,11 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
this.ySize_lo = (float) mouseY;
|
this.ySize_lo = (float) mouseY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
protected String getGuiDisplayName(String in) {
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
String s = LocaleHandler.WirelessTermLabel.getLocal();
|
||||||
* Same as {@link GuiMEMonitorable#drawFG} but without the "Inventory" label, which overlaps the player model.
|
this.mc.fontRenderer.drawString(s, 7, 5, 4210752);
|
||||||
*/
|
this.mc.fontRenderer.drawString(I18n.format("container.inventory"), 7, this.ySize - 172 + 3, 4210752);
|
||||||
@Override
|
|
||||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
|
||||||
this.fontRendererObj.drawString(
|
|
||||||
this.getGuiDisplayName(this.hostName.getLocal()),
|
|
||||||
8,
|
|
||||||
6,
|
|
||||||
ColorUtils.guiTextColorGray.getColor());
|
|
||||||
|
|
||||||
VirtualMEPinSlot.drawSlotsBackground(this.pinSlots, this.mc, this.zLevel);
|
VirtualMEPinSlot.drawSlotsBackground(this.pinSlots, this.mc, this.zLevel);
|
||||||
|
|
||||||
@@ -163,7 +172,6 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
this.currentMouseY = mouseY;
|
this.currentMouseY = mouseY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||||
// draw "over inventory area"
|
// draw "over inventory area"
|
||||||
this.mc.getTextureManager().bindTexture(BackgroundTexture);
|
this.mc.getTextureManager().bindTexture(BackgroundTexture);
|
||||||
@@ -177,11 +185,11 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
// draw player inv
|
// draw player inv
|
||||||
this.drawTexturedModalRect(
|
this.drawTexturedModalRect(
|
||||||
offsetX,
|
offsetX,
|
||||||
offsetY + 16 + this.rows * 18,
|
offsetY + 16 + this.rows * 18 + this.lowerTextureOffset,
|
||||||
0,
|
0,
|
||||||
106 - 18 - 18,
|
106 - 18 - 18,
|
||||||
x_width,
|
x_width,
|
||||||
99 + this.getReservedSpace());
|
99 + this.getReservedSpace() - this.lowerTextureOffset);
|
||||||
|
|
||||||
// draw view cells background
|
// draw view cells background
|
||||||
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, 32, 104);
|
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, 32, 104);
|
||||||
@@ -201,4 +209,69 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable {
|
|||||||
|
|
||||||
this.updateViewCells();
|
this.updateViewCells();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MouseTweaks compat
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public int getAPIVersion() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public String getModName() {
|
||||||
|
return Reference.NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public boolean isMouseTweaksDisabled() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public boolean isWheelTweakDisabled() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public boolean isCraftingOutputSlot(Object modContainer, Object slot) {
|
||||||
|
return slot == containerWCT.getSlot(ContainerWirelessCraftingTerminal.CRAFT_RESULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public Object getModContainer() {
|
||||||
|
return containerWCT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public int getModSlotCount(Object modContainer) {
|
||||||
|
return containerWCT.inventorySlots.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public Object getModSlot(Object modContainer, int slotNumber) {
|
||||||
|
return slotNumber < containerWCT.inventorySlots.size() ? containerWCT.inventorySlots.get(slotNumber) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public Object getModSelectedSlot(Object modContainer, int slotCount) {
|
||||||
|
Slot s = getSlot(currentMouseX, currentMouseY);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public void clickModSlot(Object modContainer, Object slotO, int mouseButton, boolean shiftPressed) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Optional.Method(modid = "MouseTweaks")
|
||||||
|
public void disableRMBDragIfRequired(Object modContainer, Object firstSlot, boolean shouldClick) {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package net.p455w0rd.wirelesscraftingterminal.common;
|
package net.p455w0rd.wirelesscraftingterminal.common;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
||||||
@@ -17,7 +16,6 @@ import appeng.api.AEApi;
|
|||||||
import appeng.container.AEBaseContainer;
|
import appeng.container.AEBaseContainer;
|
||||||
import appeng.container.ContainerOpenContext;
|
import appeng.container.ContainerOpenContext;
|
||||||
import cpw.mods.fml.common.network.IGuiHandler;
|
import cpw.mods.fml.common.network.IGuiHandler;
|
||||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
|
||||||
|
|
||||||
public class WCTGuiHandler implements IGuiHandler {
|
public class WCTGuiHandler implements IGuiHandler {
|
||||||
|
|
||||||
@@ -35,8 +33,14 @@ public class WCTGuiHandler implements IGuiHandler {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
final WTCGuiObject term = new WTCGuiObject(
|
||||||
final WTCGuiObject term = new WTCGuiObject(wh, termItem.second(), player, world, x, y, z, termItem.firstInt());
|
wh,
|
||||||
|
RandomUtils.getWirelessTerm(player.inventory),
|
||||||
|
player,
|
||||||
|
world,
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
z);
|
||||||
|
|
||||||
return switch (guiId) {
|
return switch (guiId) {
|
||||||
case Reference.GUI_WCT -> updateGui(
|
case Reference.GUI_WCT -> updateGui(
|
||||||
@@ -56,16 +60,14 @@ public class WCTGuiHandler implements IGuiHandler {
|
|||||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries().wireless()
|
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries().wireless()
|
||||||
.getWirelessTerminalHandler(RandomUtils.getWirelessTerm(player.inventory));
|
.getWirelessTerminalHandler(RandomUtils.getWirelessTerm(player.inventory));
|
||||||
if (wh != null && guiId == Reference.GUI_WCT) {
|
if (wh != null && guiId == Reference.GUI_WCT) {
|
||||||
final IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
|
||||||
final WTCGuiObject obj = new WTCGuiObject(
|
final WTCGuiObject obj = new WTCGuiObject(
|
||||||
wh,
|
wh,
|
||||||
termItem.second(),
|
RandomUtils.getWirelessTerm(player.inventory),
|
||||||
player,
|
player,
|
||||||
world,
|
world,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
z,
|
z);
|
||||||
termItem.firstInt());
|
|
||||||
return new GuiWirelessCraftingTerminal(player.inventory, obj);
|
return new GuiWirelessCraftingTerminal(player.inventory, obj);
|
||||||
}
|
}
|
||||||
if (guiId == Reference.GUI_MAGNET) {
|
if (guiId == Reference.GUI_MAGNET) {
|
||||||
|
|||||||
@@ -42,9 +42,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||||||
+ '.' // revisionVersion
|
+ '.' // revisionVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.buildVersion
|
+ net.minecraftforge.common.ForgeVersion.buildVersion
|
||||||
+ ",);"
|
+ ",);"
|
||||||
+ "required-after:"
|
+ "required-after:appliedenergistics2@[rv3-beta-328,);after:NotEnoughItems;")
|
||||||
+ "appliedenergistics2@[rv3-beta-754,);after:"
|
|
||||||
+ "NotEnoughItems;")
|
|
||||||
public class WirelessCraftingTerminal {
|
public class WirelessCraftingTerminal {
|
||||||
|
|
||||||
private static LoaderState WCTState = LoaderState.NOINIT;
|
private static LoaderState WCTState = LoaderState.NOINIT;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package net.p455w0rd.wirelesscraftingterminal.common.container;
|
package net.p455w0rd.wirelesscraftingterminal.common.container;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@@ -9,6 +7,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.item.ItemArmor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.CraftingManager;
|
import net.minecraft.item.crafting.CraftingManager;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
@@ -29,6 +28,8 @@ import net.p455w0rd.wirelesscraftingterminal.common.inventory.WCTInventoryTrash;
|
|||||||
import net.p455w0rd.wirelesscraftingterminal.common.inventory.WCTInventoryViewCell;
|
import net.p455w0rd.wirelesscraftingterminal.common.inventory.WCTInventoryViewCell;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.helpers.WTCGuiObject;
|
import net.p455w0rd.wirelesscraftingterminal.helpers.WTCGuiObject;
|
||||||
|
import net.p455w0rd.wirelesscraftingterminal.items.ItemInfinityBooster;
|
||||||
|
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
@@ -54,9 +55,6 @@ import appeng.tile.inventory.InvOperation;
|
|||||||
public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
||||||
implements IAEAppEngInventory, IContainerCraftingPacket, IViewCellStorage {
|
implements IAEAppEngInventory, IContainerCraftingPacket, IViewCellStorage {
|
||||||
|
|
||||||
public static final int CRAFTING_SLOT_X_POS = 80;
|
|
||||||
public static final int CRAFTING_SLOT_Y_POS = 83;
|
|
||||||
|
|
||||||
private final ItemStack containerstack;
|
private final ItemStack containerstack;
|
||||||
public final WCTInventoryCrafting craftingGrid;
|
public final WCTInventoryCrafting craftingGrid;
|
||||||
public final WCTInventoryViewCell viewCellInventory;
|
public final WCTInventoryViewCell viewCellInventory;
|
||||||
@@ -66,13 +64,24 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
public final InventoryPlayer inventoryPlayer;
|
public final InventoryPlayer inventoryPlayer;
|
||||||
public ItemStack[] craftMatrixInventory;
|
public ItemStack[] craftMatrixInventory;
|
||||||
private final EntityPlayer player;
|
private final EntityPlayer player;
|
||||||
|
public static final int HOTBAR_START = 2, HOTBAR_END = HOTBAR_START + 8, INV_START = HOTBAR_END + 1,
|
||||||
|
INV_END = INV_START + 26, ARMOR_START = INV_END + 1, ARMOR_END = ARMOR_START + 3,
|
||||||
|
CRAFT_GRID_START = ARMOR_END + 1, CRAFT_GRID_END = CRAFT_GRID_START + 8, CRAFT_RESULT = CRAFT_GRID_END + 1,
|
||||||
|
VIEW_CELL_START = CRAFT_RESULT + 1, VIEW_CELL_END = VIEW_CELL_START + 4, BOOSTER_INDEX = 1,
|
||||||
|
MAGNET_INDEX = VIEW_CELL_END + 1;
|
||||||
|
public static int CRAFTING_SLOT_X_POS = 80, CRAFTING_SLOT_Y_POS = 83;
|
||||||
|
private SlotBooster boosterSlot;
|
||||||
|
private final SlotMagnet magnetSlot;
|
||||||
|
private final Slot[] hotbarSlot;
|
||||||
|
private final Slot[] inventorySlot;
|
||||||
|
private final SlotArmor[] armorSlot;
|
||||||
private final SlotCraftingMatrix[] craftMatrixSlot;
|
private final SlotCraftingMatrix[] craftMatrixSlot;
|
||||||
private final SlotCraftingTerm craftingSlot;
|
private final SlotCraftingTerm craftingSlot;
|
||||||
public SlotTrash trashSlot;
|
public SlotTrash trashSlot;
|
||||||
|
|
||||||
private final ICraftingTerminal ct;
|
private final ICraftingTerminal ct;
|
||||||
|
|
||||||
|
private final AppEngInternalInventory output = new AppEngInternalInventory(this, 1);
|
||||||
private final IWirelessCraftingTerminalItem thisItem;
|
private final IWirelessCraftingTerminalItem thisItem;
|
||||||
private IRecipe currentRecipe;
|
private IRecipe currentRecipe;
|
||||||
|
|
||||||
@@ -88,25 +97,26 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
|
|
||||||
this.setCustomName("WCTContainer");
|
this.setCustomName("WCTContainer");
|
||||||
|
|
||||||
final ItemStack wirelessTerminal = RandomUtils.getWirelessTerm(inventoryPlayer);
|
this.boosterInventory = new WCTInventoryBooster(RandomUtils.getWirelessTerm(inventoryPlayer));
|
||||||
|
this.magnetInventory = new WCTInventoryMagnet(RandomUtils.getWirelessTerm(inventoryPlayer));
|
||||||
this.boosterInventory = new WCTInventoryBooster(wirelessTerminal);
|
this.trashInventory = new WCTInventoryTrash(RandomUtils.getWirelessTerm(inventoryPlayer));
|
||||||
this.magnetInventory = new WCTInventoryMagnet(wirelessTerminal);
|
this.containerstack = RandomUtils.getWirelessTerm(inventoryPlayer);
|
||||||
this.trashInventory = new WCTInventoryTrash(wirelessTerminal);
|
|
||||||
this.containerstack = wirelessTerminal;
|
|
||||||
this.thisItem = (IWirelessCraftingTerminalItem) this.containerstack.getItem();
|
this.thisItem = (IWirelessCraftingTerminalItem) this.containerstack.getItem();
|
||||||
this.craftingGrid = new WCTInventoryCrafting(this, 3, 3, containerstack);
|
this.craftingGrid = new WCTInventoryCrafting(this, 3, 3, containerstack);
|
||||||
this.viewCellInventory = new WCTInventoryViewCell(wirelessTerminal);
|
this.viewCellInventory = new WCTInventoryViewCell(RandomUtils.getWirelessTerm(inventoryPlayer));
|
||||||
this.inventoryPlayer = inventoryPlayer;
|
this.inventoryPlayer = inventoryPlayer;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.craftMatrixInventory = new ItemStack[9];
|
craftMatrixInventory = new ItemStack[9];
|
||||||
this.craftMatrixSlot = new SlotCraftingMatrix[9];
|
hotbarSlot = new Slot[9];
|
||||||
|
inventorySlot = new Slot[27];
|
||||||
|
armorSlot = new SlotArmor[4];
|
||||||
|
craftMatrixSlot = new SlotCraftingMatrix[9];
|
||||||
|
|
||||||
// Dummy slot at index 0 to work around ME slots all having their slot number set to 0.
|
// Dummy slot at index 0 to work around ME slots all having their slot number set to 0.
|
||||||
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
||||||
|
|
||||||
if (Reference.WCT_BOOSTER_ENABLED) {
|
if (Reference.WCT_BOOSTER_ENABLED) {
|
||||||
SlotBooster boosterSlot = new SlotBooster(this.boosterInventory, 0, 134, -20);
|
boosterSlot = new SlotBooster(this.boosterInventory, 0, 134, -20);
|
||||||
this.addSlotToContainer(boosterSlot);
|
this.addSlotToContainer(boosterSlot);
|
||||||
} else {
|
} else {
|
||||||
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
||||||
@@ -114,58 +124,51 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
|
|
||||||
// Add hotbar slots
|
// Add hotbar slots
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (int i = 0; i < 9; ++i) {
|
||||||
ItemStack stack = this.player.inventory.getStackInSlot(i);
|
if (player.inventory.getStackInSlot(i) != null
|
||||||
Slot slot;
|
&& player.inventory.getStackInSlot(i).getItem() == this.thisItem) {
|
||||||
if (stack != null && stack.getItem() == this.thisItem) {
|
hotbarSlot[i] = new SlotDisabled(this.inventoryPlayer, i, i * 18 + 8, 58);
|
||||||
slot = new SlotDisabled(this.inventoryPlayer, i, i * 18 + 8, 58);
|
|
||||||
} else {
|
} else {
|
||||||
slot = new SlotPlayerHotBar(this.inventoryPlayer, i, i * 18 + 8, 58);
|
hotbarSlot[i] = new SlotPlayerHotBar(this.inventoryPlayer, i, i * 18 + 8, 58);
|
||||||
}
|
}
|
||||||
this.addSlotToContainer(slot);
|
this.addSlotToContainer(hotbarSlot[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int k = 0;
|
||||||
|
|
||||||
// Add player inventory slots
|
// Add player inventory slots
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
for (int j = 0; j < 9; ++j) {
|
for (int j = 0; j < 9; ++j) {
|
||||||
int slotIndex = j + i * 9 + 9;
|
if (player.inventory.getStackInSlot(j + i * 9 + 9) != null
|
||||||
ItemStack stack = this.player.inventory.getStackInSlot(slotIndex);
|
&& player.inventory.getStackInSlot(j + i * 9 + 9).getItem() == this.thisItem) {
|
||||||
Slot slot;
|
inventorySlot[k] = new SlotDisabled(this.inventoryPlayer, j + i * 9 + 9, j * 18 + 8, i * 18);
|
||||||
if (stack != null && stack.getItem() == this.thisItem) {
|
|
||||||
slot = new SlotDisabled(this.inventoryPlayer, slotIndex, j * 18 + 8, i * 18);
|
|
||||||
} else {
|
} else {
|
||||||
slot = new SlotPlayerInv(this.inventoryPlayer, slotIndex, j * 18 + 8, i * 18);
|
inventorySlot[k] = new SlotPlayerInv(this.inventoryPlayer, j + i * 9 + 9, j * 18 + 8, i * 18);
|
||||||
}
|
}
|
||||||
this.addSlotToContainer(slot);
|
this.addSlotToContainer(inventorySlot[k]);
|
||||||
|
k++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add armor slots
|
// Add armor slots
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
this.addSlotToContainer(
|
armorSlot[i] = new SlotArmor(this.player, this.inventoryPlayer, 39 - i, (int) 8.5, (i * 18) - 76, i);
|
||||||
new SlotArmor(
|
this.addSlotToContainer(armorSlot[i]);
|
||||||
this.player,
|
|
||||||
this.inventoryPlayer,
|
|
||||||
this.inventoryPlayer.getSizeInventory() - 1 - i,
|
|
||||||
(int) 8.5,
|
|
||||||
(i * 18) - 76,
|
|
||||||
i));
|
|
||||||
}
|
}
|
||||||
int matrixIndex = 0;
|
k = 0;
|
||||||
// Add crafting grid slots
|
// Add crafting grid slots
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
for (int j = 0; j < 3; ++j) {
|
for (int j = 0; j < 3; ++j) {
|
||||||
craftMatrixSlot[matrixIndex] = new SlotCraftingMatrix(
|
craftMatrixSlot[k] = new SlotCraftingMatrix(
|
||||||
this,
|
this,
|
||||||
this.craftingGrid,
|
this.craftingGrid,
|
||||||
j + i * 3,
|
j + i * 3,
|
||||||
80 + j * 18,
|
80 + j * 18,
|
||||||
(i * 18) - 76);
|
(i * 18) - 76);
|
||||||
this.addSlotToContainer(craftMatrixSlot[matrixIndex]);
|
this.addSlotToContainer(craftMatrixSlot[k]);
|
||||||
matrixIndex++;
|
k++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AppEngInternalInventory output = new AppEngInternalInventory(this, 1);
|
|
||||||
craftingSlot = new SlotCraftingTerm(
|
craftingSlot = new SlotCraftingTerm(
|
||||||
this.getPlayerInv().player,
|
this.getPlayerInv().player,
|
||||||
this.getActionSource(),
|
this.getActionSource(),
|
||||||
@@ -173,14 +176,14 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
this.ct,
|
this.ct,
|
||||||
this.craftingGrid,
|
this.craftingGrid,
|
||||||
this.craftingGrid,
|
this.craftingGrid,
|
||||||
output,
|
this.output,
|
||||||
174,
|
174,
|
||||||
-58,
|
-58,
|
||||||
this);
|
this);
|
||||||
// Add crafting result slot
|
// Add crafting result slot
|
||||||
this.addSlotToContainer(craftingSlot);
|
this.addSlotToContainer(craftingSlot);
|
||||||
|
|
||||||
SlotMagnet magnetSlot = new SlotMagnet(this.magnetInventory, 152, -20);
|
magnetSlot = new SlotMagnet(this.magnetInventory, 152, -20);
|
||||||
this.addSlotToContainer(magnetSlot);
|
this.addSlotToContainer(magnetSlot);
|
||||||
|
|
||||||
trashSlot = new SlotTrash(this.trashInventory, 80, -20, player);
|
trashSlot = new SlotTrash(this.trashInventory, 80, -20, player);
|
||||||
@@ -198,6 +201,23 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
thisItem.checkForBooster(containerstack);
|
thisItem.checkForBooster(containerstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Slot addSlotToContainer(final Slot newSlot) {
|
||||||
|
if (newSlot instanceof AppEngSlot) {
|
||||||
|
final AppEngSlot s = (AppEngSlot) newSlot;
|
||||||
|
s.setContainer(this);
|
||||||
|
return super.addSlotToContainer(newSlot);
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Invalid Slot [" + newSlot + "] for WCT Container instead of AppEngSlot.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canDragIntoSlot(final Slot s) {
|
||||||
|
return ((AppEngSlot) s).isDraggable();
|
||||||
|
}
|
||||||
|
|
||||||
private IRecipe findMatchingRecipe(InventoryCrafting craftMatrix, World worldIn) {
|
private IRecipe findMatchingRecipe(InventoryCrafting craftMatrix, World worldIn) {
|
||||||
for (Object recipe : CraftingManager.getInstance().getRecipeList()) {
|
for (Object recipe : CraftingManager.getInstance().getRecipeList()) {
|
||||||
if (((IRecipe) recipe).matches(craftMatrix, worldIn)) {
|
if (((IRecipe) recipe).matches(craftMatrix, worldIn)) {
|
||||||
@@ -272,12 +292,12 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static WTCGuiObject getGuiObject(final ItemStack it, final EntityPlayer player, final World w, final int x,
|
public static WTCGuiObject getGuiObject(final ItemStack it, final EntityPlayer player, final World w, final int x,
|
||||||
final int y, final int z, final int slotIndex) {
|
final int y, final int z) {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries()
|
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries()
|
||||||
.wireless().getWirelessTerminalHandler(it);
|
.wireless().getWirelessTerminalHandler(it);
|
||||||
if (wh != null) {
|
if (wh != null) {
|
||||||
return new WTCGuiObject(wh, it, player, w, x, y, z, slotIndex);
|
return new WTCGuiObject(wh, it, player, w, x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,11 +363,76 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nonnull
|
public ItemStack transferStackInSlot(final EntityPlayer p, final int idx) {
|
||||||
public List<AppEngSlot> getValidDestinationSlots(boolean isPlayerSideSlot, @Nonnull ItemStack stackInSlot) {
|
final AppEngSlot clickSlot = (AppEngSlot) this.inventorySlots.get(idx); // require AE SLots!
|
||||||
List<AppEngSlot> list = super.getValidDestinationSlots(isPlayerSideSlot, stackInSlot);
|
ItemStack tis = clickSlot.getStack();
|
||||||
list.removeIf(slot -> slot instanceof SlotTrash);
|
if (tis == null || tis == containerstack) {
|
||||||
return list;
|
return null;
|
||||||
|
}
|
||||||
|
// Try to place armor in armor slot/booster in booster slot first
|
||||||
|
if (isInInventory(idx) || isInHotbar(idx)) {
|
||||||
|
if (tis.getItem() instanceof ItemArmor) {
|
||||||
|
int type = ((ItemArmor) tis.getItem()).armorType;
|
||||||
|
if (this.mergeItemStack(tis, ARMOR_START + type, ARMOR_START + type + 1, false)) {
|
||||||
|
clickSlot.clearStack();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if (tis.getItem() instanceof ItemInfinityBooster) {
|
||||||
|
if (this.mergeItemStack(tis, BOOSTER_INDEX, BOOSTER_INDEX + 1, false)) {
|
||||||
|
clickSlot.clearStack();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if (tis.getItem() instanceof ItemMagnet) {
|
||||||
|
if (this.mergeItemStack(tis, MAGNET_INDEX, MAGNET_INDEX + 1, false)) {
|
||||||
|
clickSlot.clearStack();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if (AEApi.instance().definitions().items().viewCell().isSameAs(tis)) {
|
||||||
|
if (mergeItemStack(tis.copy(), VIEW_CELL_START, VIEW_CELL_END + 1, false)) {
|
||||||
|
if (tis.stackSize > 1) {
|
||||||
|
tis.stackSize--;
|
||||||
|
} else {
|
||||||
|
clickSlot.clearStack();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.transferStackInSlot(p, idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInHotbar(@Nonnull int index) {
|
||||||
|
return (index >= HOTBAR_START && index <= HOTBAR_END);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInInventory(@Nonnull int index) {
|
||||||
|
return (index >= INV_START && index <= INV_END);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private boolean isInArmorSlot(@Nonnull int index) {
|
||||||
|
return (index >= ARMOR_START && index <= ARMOR_END);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private boolean isInBoosterSlot(@Nonnull int index) {
|
||||||
|
return (index == BOOSTER_INDEX);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private boolean isCraftResult(@Nonnull int index) {
|
||||||
|
return (index == CRAFT_RESULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private boolean isInCraftMatrix(@Nonnull int index) {
|
||||||
|
return (index >= CRAFT_GRID_START && index <= CRAFT_GRID_END);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private boolean notArmorOrBooster(ItemStack is) {
|
||||||
|
return (!(is.getItem() instanceof ItemInfinityBooster)) && (!(is.getItem() instanceof ItemArmor));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -364,8 +449,85 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles shift-clicking of items whose maxStackSize is 1
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PrimaryGui createPrimaryGui() {
|
protected boolean mergeItemStack(ItemStack stack, int start, int end, boolean backwards) {
|
||||||
|
boolean flag1 = false;
|
||||||
|
int k = (backwards ? end - 1 : start);
|
||||||
|
Slot slot;
|
||||||
|
ItemStack itemstack1;
|
||||||
|
|
||||||
|
if (stack.isStackable()) {
|
||||||
|
while (stack.stackSize > 0 && (!backwards && k < end || backwards && k >= start)) {
|
||||||
|
slot = (Slot) inventorySlots.get(k);
|
||||||
|
itemstack1 = slot.getStack();
|
||||||
|
|
||||||
|
if (!slot.isItemValid(stack)) {
|
||||||
|
k += (backwards ? -1 : 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemstack1 != null && itemstack1.getItem() == stack.getItem()
|
||||||
|
&& (!stack.getHasSubtypes() || stack.getItemDamage() == itemstack1.getItemDamage())
|
||||||
|
&& ItemStack.areItemStackTagsEqual(stack, itemstack1)) {
|
||||||
|
int l = itemstack1.stackSize + stack.stackSize;
|
||||||
|
|
||||||
|
if (l <= stack.getMaxStackSize() && l <= slot.getSlotStackLimit()) {
|
||||||
|
stack.stackSize = 0;
|
||||||
|
itemstack1.stackSize = l;
|
||||||
|
boosterInventory.markDirty();
|
||||||
|
flag1 = true;
|
||||||
|
} else if (itemstack1.stackSize < stack.getMaxStackSize() && l < slot.getSlotStackLimit()) {
|
||||||
|
stack.stackSize -= stack.getMaxStackSize() - itemstack1.stackSize;
|
||||||
|
itemstack1.stackSize = stack.getMaxStackSize();
|
||||||
|
boosterInventory.markDirty();
|
||||||
|
flag1 = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
k += (backwards ? -1 : 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stack.stackSize > 0) {
|
||||||
|
k = (backwards ? end - 1 : start);
|
||||||
|
while (!backwards && k < end || backwards && k >= start) {
|
||||||
|
slot = (Slot) inventorySlots.get(k);
|
||||||
|
itemstack1 = slot.getStack();
|
||||||
|
|
||||||
|
if (!slot.isItemValid(stack)) {
|
||||||
|
k += (backwards ? -1 : 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemstack1 == null) {
|
||||||
|
int l = stack.stackSize;
|
||||||
|
if (l <= slot.getSlotStackLimit()) {
|
||||||
|
slot.putStack(stack.copy());
|
||||||
|
stack.stackSize = 0;
|
||||||
|
boosterInventory.markDirty();
|
||||||
|
flag1 = true;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
putStackInSlot(
|
||||||
|
k,
|
||||||
|
new ItemStack(stack.getItem(), slot.getSlotStackLimit(), stack.getItemDamage()));
|
||||||
|
stack.stackSize -= slot.getSlotStackLimit();
|
||||||
|
boosterInventory.markDirty();
|
||||||
|
flag1 = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
k += (backwards ? -1 : 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PrimaryGui getPrimaryGui() {
|
||||||
ContainerOpenContext context = getOpenContext();
|
ContainerOpenContext context = getOpenContext();
|
||||||
return new WCTPrimaryGui(
|
return new WCTPrimaryGui(
|
||||||
Reference.GUI_WCT,
|
Reference.GUI_WCT,
|
||||||
|
|||||||
@@ -25,11 +25,6 @@ public class SlotTrash extends appeng.container.slot.AppEngSlot {
|
|||||||
return itemStack;
|
return itemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack getDisplayStack() {
|
|
||||||
return this.getStack();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getHasStack() {
|
public boolean getHasStack() {
|
||||||
return itemStack != null;
|
return itemStack != null;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package net.p455w0rd.wirelesscraftingterminal.common.utils;
|
package net.p455w0rd.wirelesscraftingterminal.common.utils;
|
||||||
|
|
||||||
import static appeng.util.Platform.baublesSlotsOffset;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -15,8 +13,6 @@ import baubles.api.BaublesApi;
|
|||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import it.unimi.dsi.fastutil.ints.IntObjectImmutablePair;
|
|
||||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
|
||||||
|
|
||||||
public class RandomUtils {
|
public class RandomUtils {
|
||||||
|
|
||||||
@@ -90,48 +86,6 @@ public class RandomUtils {
|
|||||||
return wirelessTerm;
|
return wirelessTerm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IntObjectPair<ItemStack> getWirelessTermWithSlot(InventoryPlayer playerInv) {
|
|
||||||
if (playerInv.player.getHeldItem() != null
|
|
||||||
&& playerInv.player.getHeldItem().getItem() instanceof IWirelessCraftingTerminalItem) {
|
|
||||||
return new IntObjectImmutablePair<>(playerInv.player.inventory.currentItem, playerInv.player.getHeldItem());
|
|
||||||
}
|
|
||||||
IntObjectPair<ItemStack> wirelessTerm = null;
|
|
||||||
|
|
||||||
int invSize = playerInv.getSizeInventory();
|
|
||||||
if (invSize <= 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < invSize; ++i) {
|
|
||||||
ItemStack item = playerInv.getStackInSlot(i);
|
|
||||||
if (item == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
|
||||||
wirelessTerm = new IntObjectImmutablePair<>(i, item);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isBaublesLoaded) {
|
|
||||||
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
|
||||||
if (handler != null) {
|
|
||||||
invSize = handler.getSizeInventory();
|
|
||||||
for (int i = 0; i < invSize; ++i) {
|
|
||||||
ItemStack item = handler.getStackInSlot(i);
|
|
||||||
if (item == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
|
||||||
wirelessTerm = new IntObjectImmutablePair<>(i + baublesSlotsOffset, item);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return wirelessTerm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getMagnet(InventoryPlayer playerInv) {
|
public static ItemStack getMagnet(InventoryPlayer playerInv) {
|
||||||
// Is player holding a Magnet Card?
|
// Is player holding a Magnet Card?
|
||||||
if (playerInv.player.getHeldItem() != null && playerInv.player.getHeldItem().getItem() instanceof ItemMagnet) {
|
if (playerInv.player.getHeldItem() != null && playerInv.player.getHeldItem().getItem() instanceof ItemMagnet) {
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import appeng.util.item.AEItemStack;
|
|||||||
import appeng.util.prioitylist.IPartitionList;
|
import appeng.util.prioitylist.IPartitionList;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
|
||||||
|
|
||||||
public class PacketNEIRecipe extends WCTPacket {
|
public class PacketNEIRecipe extends WCTPacket {
|
||||||
|
|
||||||
@@ -94,15 +93,13 @@ public class PacketNEIRecipe extends WCTPacket {
|
|||||||
IGridNode node = cct.getNetworkNode();
|
IGridNode node = cct.getNetworkNode();
|
||||||
|
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
|
||||||
WTCGuiObject obj = ContainerWirelessCraftingTerminal.getGuiObject(
|
WTCGuiObject obj = ContainerWirelessCraftingTerminal.getGuiObject(
|
||||||
termItem.second(),
|
RandomUtils.getWirelessTerm(player.inventory),
|
||||||
player,
|
player,
|
||||||
player.worldObj,
|
player.worldObj,
|
||||||
(int) player.posX,
|
(int) player.posX,
|
||||||
(int) player.posY,
|
(int) player.posY,
|
||||||
(int) player.posZ,
|
(int) player.posZ);
|
||||||
termItem.firstInt());
|
|
||||||
node = obj.getActionableNode(true);
|
node = obj.getActionableNode(true);
|
||||||
}
|
}
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
|
|||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ChatComponentTranslation;
|
import net.minecraft.util.ChatComponentText;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
|
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
|
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
|
||||||
|
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
@@ -40,14 +41,14 @@ public class PacketSetMagnet extends WCTPacket {
|
|||||||
if (magnetItem.getItemDamage() == 2) {
|
if (magnetItem.getItemDamage() == 2) {
|
||||||
RandomUtils.getWirelessTerm(player.inventory).getTagCompound().getTagList("MagnetSlot", 10)
|
RandomUtils.getWirelessTerm(player.inventory).getTagCompound().getTagList("MagnetSlot", 10)
|
||||||
.getCompoundTagAt(0).setShort("Damage", (short) 0);
|
.getCompoundTagAt(0).setShort("Damage", (short) 0);
|
||||||
player.addChatMessage(new ChatComponentTranslation("chatmessages.ae2wct.MagnetMode1"));
|
player.addChatMessage(new ChatComponentText(LocaleHandler.MagnetMode1.getLocal()));
|
||||||
} else {
|
} else {
|
||||||
RandomUtils.getWirelessTerm(player.inventory).getTagCompound().getTagList("MagnetSlot", 10)
|
RandomUtils.getWirelessTerm(player.inventory).getTagCompound().getTagList("MagnetSlot", 10)
|
||||||
.getCompoundTagAt(0).setShort("Damage", (short) (magnetItem.getItemDamage() + 1));
|
.getCompoundTagAt(0).setShort("Damage", (short) (magnetItem.getItemDamage() + 1));
|
||||||
if (magnetItem.getItemDamage() == 0) {
|
if (magnetItem.getItemDamage() == 0) {
|
||||||
player.addChatMessage(new ChatComponentTranslation("chatmessages.ae2wct.MagnetMode2"));
|
player.addChatMessage(new ChatComponentText(LocaleHandler.MagnetMode2.getLocal()));
|
||||||
} else {
|
} else {
|
||||||
player.addChatMessage(new ChatComponentTranslation("chatmessages.ae2wct.MagnetMode3"));
|
player.addChatMessage(new ChatComponentText(LocaleHandler.MagnetMode3.getLocal()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,12 +11,8 @@ import appeng.items.contents.WirelessCraftingTerminalGuiObject;
|
|||||||
|
|
||||||
public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements WCTIActionHost {
|
public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements WCTIActionHost {
|
||||||
|
|
||||||
private final int slotIndex;
|
public WTCGuiObject(IWirelessTermHandler wh, ItemStack is, EntityPlayer ep, World w, int x, int y, int z) {
|
||||||
|
|
||||||
public WTCGuiObject(IWirelessTermHandler wh, ItemStack is, EntityPlayer ep, World w, int x, int y, int z,
|
|
||||||
final int slotIndex) {
|
|
||||||
super(wh, is, ep, w, x, y, z);
|
super(wh, is, ep, w, x, y, z);
|
||||||
this.slotIndex = slotIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -28,9 +24,4 @@ public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements W
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getInventorySlot() {
|
|
||||||
return this.slotIndex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ package net.p455w0rd.wirelesscraftingterminal.implementation;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.common.util.FakePlayer;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.api.IWCTInteractionHelper;
|
import net.p455w0rd.wirelesscraftingterminal.api.IWCTInteractionHelper;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||||
@@ -18,7 +19,8 @@ public class WCTInteractionHelper implements IWCTInteractionHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openWirelessCraftingTerminalGui(final EntityPlayer player) {
|
public void openWirelessCraftingTerminalGui(final EntityPlayer player) {
|
||||||
if (player == null || player instanceof EntityPlayerMP
|
if ((player == null) || (player instanceof FakePlayer)
|
||||||
|
|| (player instanceof EntityPlayerMP)
|
||||||
|| FMLCommonHandler.instance().getSide() == Side.SERVER) {
|
|| FMLCommonHandler.instance().getSide() == Side.SERVER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import net.p455w0rd.wirelesscraftingterminal.integration.IntegrationHelper;
|
|||||||
import net.p455w0rd.wirelesscraftingterminal.integration.abstraction.INEI;
|
import net.p455w0rd.wirelesscraftingterminal.integration.abstraction.INEI;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
|
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
|
||||||
|
|
||||||
|
import appeng.api.AEApi;
|
||||||
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.container.slot.SlotCraftingMatrix;
|
import appeng.container.slot.SlotCraftingMatrix;
|
||||||
import appeng.container.slot.SlotFakeCraftingMatrix;
|
import appeng.container.slot.SlotFakeCraftingMatrix;
|
||||||
import appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler;
|
import appeng.integration.modules.NEIHelpers.NEIAEShapelessRecipeHandler;
|
||||||
@@ -112,6 +114,28 @@ public class NEI implements INEI, IContainerTooltipHandler, IIntegrationModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> handleTooltip(final GuiContainer arg0, final int arg1, final int arg2,
|
||||||
|
final List<String> current) {
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> handleItemDisplayName(final GuiContainer arg0, final ItemStack arg1,
|
||||||
|
final List<String> current) {
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> handleItemTooltip(final GuiContainer guiScreen, final ItemStack stack, final int mouseX,
|
||||||
|
final int mouseY, final List<String> currentToolTip) {
|
||||||
|
if (guiScreen instanceof GuiWirelessCraftingTerminal) {
|
||||||
|
return ((GuiWirelessCraftingTerminal) guiScreen).handleItemTooltip(stack, mouseX, mouseY, currentToolTip);
|
||||||
|
}
|
||||||
|
|
||||||
|
return currentToolTip;
|
||||||
|
}
|
||||||
|
|
||||||
static final int NEI_REGULAR_SLOT_OFFSET_X = 25;
|
static final int NEI_REGULAR_SLOT_OFFSET_X = 25;
|
||||||
static final int NEI_REGULAR_SLOT_OFFSET_Y = 6;
|
static final int NEI_REGULAR_SLOT_OFFSET_Y = 6;
|
||||||
|
|
||||||
@@ -136,6 +160,42 @@ public class NEI implements INEI, IContainerTooltipHandler, IIntegrationModule {
|
|||||||
|
|
||||||
public class WCTOverlayHandler implements IOverlayHandler {
|
public class WCTOverlayHandler implements IOverlayHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reduces regular slot offsets to 0, 1, or 2
|
||||||
|
*/
|
||||||
|
private static final int REGULAR_SLOT_INDEX_DIVISOR = 18;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds NEI ingredients to the WCT crafting grid.
|
||||||
|
*
|
||||||
|
* @param ingredient
|
||||||
|
* @param overlayItems
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean addCraftingItems(final PositionedStack ingredient, final IAEItemStack[] overlayItems) {
|
||||||
|
// Calculate the slot positions
|
||||||
|
int slotX = (ingredient.relx - NEI.NEI_REGULAR_SLOT_OFFSET_X)
|
||||||
|
/ WCTOverlayHandler.REGULAR_SLOT_INDEX_DIVISOR;
|
||||||
|
int slotY = (ingredient.rely - NEI.NEI_REGULAR_SLOT_OFFSET_Y)
|
||||||
|
/ WCTOverlayHandler.REGULAR_SLOT_INDEX_DIVISOR;
|
||||||
|
// Calculate the slot index
|
||||||
|
int slotIndex = slotX + (slotY * 3);
|
||||||
|
// Add the item to the list
|
||||||
|
overlayItems[slotIndex] = AEApi.instance().storage().createItemStack(ingredient.item);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean addIngredientToItems(final PositionedStack ingredient, final IAEItemStack[] overlayItems) {
|
||||||
|
// Pass to regular handler
|
||||||
|
return this.addCraftingItems(ingredient, overlayItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addItemsToGUI(final IAEItemStack[] overlayItems) {
|
||||||
|
// Send the list to the server
|
||||||
|
// Packet_S_WCT.sendSetCrafting_NEI(Minecraft.getMinecraft().thePlayer,
|
||||||
|
// overlayItems);
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
@Override
|
@Override
|
||||||
public void overlayRecipe(final GuiContainer gui, final IRecipeHandler recipe, final int recipeIndex,
|
public void overlayRecipe(final GuiContainer gui, final IRecipeHandler recipe, final int recipeIndex,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import net.minecraft.nbt.NBTTagList;
|
|||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
|
import net.p455w0rd.wirelesscraftingterminal.api.WCTApi;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||||
import net.p455w0rd.wirelesscraftingterminal.integration.EnderIO;
|
import net.p455w0rd.wirelesscraftingterminal.integration.EnderIO;
|
||||||
@@ -25,6 +25,7 @@ import org.lwjgl.input.Keyboard;
|
|||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
import appeng.api.config.AccessRestriction;
|
import appeng.api.config.AccessRestriction;
|
||||||
|
import appeng.api.config.PowerMultiplier;
|
||||||
import appeng.api.config.PowerUnits;
|
import appeng.api.config.PowerUnits;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.SortDir;
|
import appeng.api.config.SortDir;
|
||||||
@@ -39,6 +40,7 @@ import appeng.util.IConfigManagerHost;
|
|||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import baubles.api.BaubleType;
|
import baubles.api.BaubleType;
|
||||||
import baubles.api.expanded.IBaubleExpanded;
|
import baubles.api.expanded.IBaubleExpanded;
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
@@ -47,13 +49,14 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBaubleExpanded {
|
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBaubleExpanded {
|
||||||
|
|
||||||
public static final String LINK_KEY_STRING = "key";
|
public static final String LINK_KEY_STRING = "key";
|
||||||
|
public static double GLOBAL_POWER_MULTIPLIER = PowerMultiplier.CONFIG.multiplier;
|
||||||
private static final String POWER_NBT_KEY = "internalCurrentPower";
|
private static final String POWER_NBT_KEY = "internalCurrentPower";
|
||||||
private static final String BOOSTER_SLOT_NBT = "BoosterSlot";
|
private static final String BOOSTER_SLOT_NBT = "BoosterSlot";
|
||||||
private static final String MAGNET_SLOT_NBT = "MagnetSlot";
|
private static final String MAGNET_SLOT_NBT = "MagnetSlot";
|
||||||
private EntityPlayer entityPlayer;
|
private EntityPlayer entityPlayer;
|
||||||
|
|
||||||
public ItemWirelessCraftingTerminal() {
|
public ItemWirelessCraftingTerminal() {
|
||||||
super(Reference.WCT_MAX_POWER, Optional.absent());
|
super(Reference.WCT_MAX_POWER, Optional.<String>absent());
|
||||||
setUnlocalizedName("wirelessCraftingTerminal");
|
setUnlocalizedName("wirelessCraftingTerminal");
|
||||||
setTextureName(Reference.MODID + ":wirelessCraftingTerminal");
|
setTextureName(Reference.MODID + ":wirelessCraftingTerminal");
|
||||||
setMaxStackSize(1);
|
setMaxStackSize(1);
|
||||||
@@ -146,16 +149,16 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate(final ItemStack is, final World w, final Entity e, int i, boolean f) {
|
public void onUpdate(final ItemStack is, final World w, final Entity e, int i, boolean f) {
|
||||||
if (!(e instanceof EntityPlayer p)) {
|
if (!(e instanceof EntityPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
EntityPlayer p = (EntityPlayer) e;
|
||||||
if (entityPlayer == null) {
|
if (entityPlayer == null) {
|
||||||
entityPlayer = p;
|
entityPlayer = p;
|
||||||
}
|
}
|
||||||
|
ItemStack wirelessTerminal = null;
|
||||||
InventoryPlayer inv = p.inventory;
|
InventoryPlayer inv = p.inventory;
|
||||||
ItemStack wirelessTerminal = RandomUtils.getWirelessTerm(inv);
|
wirelessTerminal = RandomUtils.getWirelessTerm(inv);
|
||||||
if (wirelessTerminal == null || !(wirelessTerminal.getItem() instanceof IWirelessCraftingTerminalItem)) {
|
if (wirelessTerminal == null || !(wirelessTerminal.getItem() instanceof IWirelessCraftingTerminalItem)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -164,16 +167,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer player) {
|
public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer player) {
|
||||||
if (!world.isRemote) {
|
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||||
WCTGuiHandler.launchGui(
|
// Open the gui
|
||||||
Reference.GUI_WCT,
|
WCTApi.instance().interact().openWirelessCraftingTerminalGui(player);
|
||||||
player,
|
|
||||||
player.worldObj,
|
|
||||||
(int) player.posX,
|
|
||||||
(int) player.posY,
|
|
||||||
(int) player.posZ);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemStack;
|
return itemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +216,11 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
return getAECurrentPower(is) >= amt;
|
return getAECurrentPower(is) >= amt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasInfinityPower(ItemStack is) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasInfinityRange(ItemStack is) {
|
public boolean hasInfinityRange(ItemStack is) {
|
||||||
return this.checkForBooster(is);
|
return this.checkForBooster(is);
|
||||||
@@ -229,7 +231,9 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
final ConfigManager out = new ConfigManager(new IConfigManagerHost() {
|
final ConfigManager out = new ConfigManager(new IConfigManagerHost() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
public void updateSetting(final IConfigManager manager,
|
||||||
|
@SuppressWarnings("rawtypes") final Enum settingName,
|
||||||
|
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||||
final NBTTagCompound data = Platform.openNbtData(target);
|
final NBTTagCompound data = Platform.openNbtData(target);
|
||||||
manager.writeToNBT(data);
|
manager.writeToNBT(data);
|
||||||
}
|
}
|
||||||
@@ -243,39 +247,44 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
@Override
|
@Override
|
||||||
public void getCheckedSubItems(Item item, CreativeTabs creativeTab, List itemList) {
|
public void getCheckedSubItems(Item item, CreativeTabs creativeTab, List itemList) {
|
||||||
itemList.add(new ItemStack(item));
|
List itemList2 = itemList;
|
||||||
|
itemList2.add(new ItemStack(item));
|
||||||
ItemStack is = new ItemStack(item);
|
ItemStack is = new ItemStack(item);
|
||||||
injectAEPower(is, Reference.WCT_MAX_POWER);
|
injectAEPower(is, Reference.WCT_MAX_POWER);
|
||||||
itemList.add(is);
|
itemList2.add(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean showDurabilityBar(ItemStack is) {
|
public boolean showDurabilityBar(ItemStack is) {
|
||||||
double aeCurrPower = getAECurrentPower(is);
|
double aeCurrPower = getAECurrentPower(is);
|
||||||
double aeMaxPower = getAEMaxPower(is);
|
double aeMaxPower = getAEMaxPower(is);
|
||||||
return (int) aeCurrPower < (int) aeMaxPower;
|
if ((int) aeCurrPower >= (int) aeMaxPower) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@Override
|
@Override
|
||||||
public void addCheckedInformation(ItemStack is, EntityPlayer player, List list, boolean displayMore) {
|
public void addCheckedInformation(ItemStack is, EntityPlayer player, List list, boolean displayMore) {
|
||||||
String shift = LocaleHandler.PressShift.getLocal()
|
String shift = LocaleHandler.PressShift.getLocal().replace(
|
||||||
.replace("Shift", color("yellow") + color("bold") + color("italics") + "Shift" + color("gray"));
|
"Shift",
|
||||||
|
color("yellow") + "" + color("bold") + "" + color("italics") + "Shift" + color("gray"));
|
||||||
final NBTTagCompound tag = ensureTagCompound(is);
|
final NBTTagCompound tag = ensureTagCompound(is);
|
||||||
|
|
||||||
String encKey = tag.getString("key");
|
String encKey = tag.getString("key");
|
||||||
String pctTxtColor = color("white");
|
String pctTxtColor = color("white") + "";
|
||||||
double aeCurrPower = getAECurrentPower(is);
|
double aeCurrPower = getAECurrentPower(is);
|
||||||
double aeCurrPowerPct = (int) Math.floor(aeCurrPower / Reference.WCT_MAX_POWER * 1e4) / 1e2;
|
double aeCurrPowerPct = (int) Math.floor(aeCurrPower / Reference.WCT_MAX_POWER * 1e4) / 1e2;
|
||||||
if ((int) aeCurrPowerPct >= 75) {
|
if ((int) aeCurrPowerPct >= 75) {
|
||||||
pctTxtColor = color("green");
|
pctTxtColor = color("green") + "";
|
||||||
}
|
}
|
||||||
if ((int) aeCurrPowerPct <= 5) {
|
if ((int) aeCurrPowerPct <= 5) {
|
||||||
pctTxtColor = color("red");
|
pctTxtColor = color("red") + "";
|
||||||
}
|
}
|
||||||
list.add(color("aqua") + "==============================");
|
list.add(color("aqua") + "==============================");
|
||||||
list.add(
|
list.add(
|
||||||
@@ -291,10 +300,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
linked = color("blue") + StatCollector.translateToLocal("gui.appliedenergistics2.Linked");
|
linked = color("blue") + StatCollector.translateToLocal("gui.appliedenergistics2.Linked");
|
||||||
}
|
}
|
||||||
list.add(LocaleHandler.LinkStatus.getLocal() + ": " + linked);
|
list.add(LocaleHandler.LinkStatus.getLocal() + ": " + linked);
|
||||||
String boosterStatus = (checkForBooster(is) ? color("green") + LocaleHandler.Installed.getLocal()
|
String boosterStatus = (checkForBooster(is) ? color("green") + "" + LocaleHandler.Installed.getLocal()
|
||||||
: color("red") + LocaleHandler.NotInstalled.getLocal());
|
: color("red") + "" + LocaleHandler.NotInstalled.getLocal());
|
||||||
String magnetStatus = (isMagnetInstalled(is) ? color("green") + LocaleHandler.Installed.getLocal()
|
String magnetStatus = (isMagnetInstalled(is) ? color("green") + "" + LocaleHandler.Installed.getLocal()
|
||||||
: color("red") + LocaleHandler.NotInstalled.getLocal());
|
: color("red") + "" + LocaleHandler.NotInstalled.getLocal());
|
||||||
if (Reference.WCT_BOOSTER_ENABLED) {
|
if (Reference.WCT_BOOSTER_ENABLED) {
|
||||||
list.add(getItemName("infinityBoosterCard") + ": " + boosterStatus);
|
list.add(getItemName("infinityBoosterCard") + ": " + boosterStatus);
|
||||||
}
|
}
|
||||||
@@ -356,7 +365,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private NBTTagCompound ensureTagCompound(ItemStack is) {
|
private NBTTagCompound ensureTagCompound(ItemStack is) {
|
||||||
return RandomUtils.getTag(is);
|
if (!is.hasTagCompound()) {
|
||||||
|
is.setTagCompound(new NBTTagCompound());
|
||||||
|
}
|
||||||
|
return is.getTagCompound();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
|||||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
|
||||||
|
|
||||||
public class CommonProxy {
|
public class CommonProxy {
|
||||||
|
|
||||||
@@ -205,8 +204,7 @@ public class CommonProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (RandomUtils.getWirelessTerm(playerInv) != null) {
|
if (RandomUtils.getWirelessTerm(playerInv) != null) {
|
||||||
IntObjectPair<ItemStack> termItemPair = RandomUtils.getWirelessTermWithSlot(playerInv);
|
ItemStack WCTStack = RandomUtils.getWirelessTerm(playerInv);
|
||||||
ItemStack WCTStack = termItemPair.second();
|
|
||||||
if (RandomUtils.isMagnetInstalled(playerInv)) {
|
if (RandomUtils.isMagnetInstalled(playerInv)) {
|
||||||
ItemStack magnetStack = RandomUtils.getMagnet(playerInv);
|
ItemStack magnetStack = RandomUtils.getMagnet(playerInv);
|
||||||
if (magnetStack.getItem() instanceof ItemMagnet) {
|
if (magnetStack.getItem() instanceof ItemMagnet) {
|
||||||
@@ -218,8 +216,7 @@ public class CommonProxy {
|
|||||||
world,
|
world,
|
||||||
(int) player.posX,
|
(int) player.posX,
|
||||||
(int) player.posY,
|
(int) player.posY,
|
||||||
(int) player.posZ,
|
(int) player.posZ);
|
||||||
termItemPair.firstInt());
|
|
||||||
magnet.civ = magnet.obj;
|
magnet.civ = magnet.obj;
|
||||||
magnet.powerSrc = magnet.civ;
|
magnet.powerSrc = magnet.civ;
|
||||||
magnet.monitor = magnet.civ.getItemInventory();
|
magnet.monitor = magnet.civ.getItemInventory();
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
#Items
|
|
||||||
item.wirelessCraftingTerminal.name=Беспроводной терминал создания
|
|
||||||
item.infinityBoosterCard.name=Бесконечная карта усиления
|
|
||||||
item.magnetCard.name=Магнитная карта
|
|
||||||
itemGroup.ae2wct=§9AE2 Wireless Crafting Terminal
|
|
||||||
|
|
||||||
#Tooltips
|
|
||||||
gui.tooltips.ae2wct.PressShift=Удерживайте Shift для информации
|
|
||||||
gui.tooltips.ae2wct.OnlyWorks=Работает только, когда в слоте беспроводного терминала создания!
|
|
||||||
gui.tooltips.ae2wct.TitleDesc=Описание
|
|
||||||
gui.tooltips.ae2wct.InfinityBoosterDesc=Позволяет использовать привязанный беспроводной терминал создания на любом растоянии и через разные измерения.
|
|
||||||
gui.tooltips.ae2wct.MagnetDesc=Магнит, который автомагически вставляет предметы в АЕ систему.
|
|
||||||
gui.tooltips.ae2wct.MagnetDesc2=ПКМ, чтобы установить фильтр
|
|
||||||
gui.tooltips.ae2wct.LinkStatus=Статус привязки
|
|
||||||
gui.tooltips.ae2wct.Installed=Установлено
|
|
||||||
gui.tooltips.ae2wct.NotInstalled=Не установлено
|
|
||||||
gui.tooltips.ae2wct.Active=Активен
|
|
||||||
gui.tooltips.ae2wct.Inactive=Неактивен
|
|
||||||
gui.tooltips.ae2wct.Status=Статус
|
|
||||||
gui.tooltips.ae2wct.EmptyTrash=Опустошить мусорку
|
|
||||||
gui.tooltips.ae2wct.EmptyTrashDesc=Удалить содержимое слота для мусора
|
|
||||||
gui.tooltips.ae2wct.MagnetFilterTitle=Фильтр магнита
|
|
||||||
gui.tooltips.ae2wct.FilterMode=Режим фильтра
|
|
||||||
gui.tooltips.ae2wct.Whitelisting=Белый список
|
|
||||||
gui.tooltips.ae2wct.Blacklisting=Чёрный список
|
|
||||||
gui.tooltips.ae2wct.MagnetActiveDesc1=Лишние предметы добавлены в инвентарь
|
|
||||||
gui.tooltips.ae2wct.MagnetActiveDesc2=Лишние предметы оставлены на земле
|
|
||||||
gui.tooltips.ae2wct.Not=Нет
|
|
||||||
gui.tooltips.ae2wct.Using=Используя
|
|
||||||
gui.tooltips.ae2wct.Ignore=Игнорировать
|
|
||||||
gui.tooltips.ae2wct.Ignoring=Игнорируя
|
|
||||||
gui.tooltips.ae2wct.NBTData=NBT данные
|
|
||||||
gui.tooltips.ae2wct.MetaData=Метаданные
|
|
||||||
gui.tooltips.ae2wct.OreDict=Словарь руд
|
|
||||||
gui.tooltips.ae2wct.FilteredItems=Отфильтрованные предметы
|
|
||||||
gui.tooltips.ae2wct.OrPress=или нажмите
|
|
||||||
gui.tooltips.ae2wct.Press=Нажмите
|
|
||||||
gui.tooltips.ae2wct.ToSwitchMode=чтобы переключить режим магнита
|
|
||||||
|
|
||||||
#Labels
|
|
||||||
gui.labels.ae2wct.WirelessTermLabel=Беспроводной терминал
|
|
||||||
|
|
||||||
#Config Descriptions
|
|
||||||
config.ae2wct.MaxPowerDesc=Максимальное количество энергии в единицах AE, которое может хранить беспроводной терминал
|
|
||||||
config.ae2wct.InfinityBoosterCfgDesc=Включить улучшение бесконечного усилителя дальности
|
|
||||||
config.ae2wct.EasyModeDesc=Включить лёгкий режим (легче рецепты+рецепт бесконечного усилителя)
|
|
||||||
config.ae2wct.BoosterDropChance=Шанс, что из визера выпадет бесконечная карта усиления (в %-100=всегда выпадет)
|
|
||||||
config.ae2wct.DisableBoosterDrop=Включить выпадение карты усиления в сложном режиме (true=включено)
|
|
||||||
config.ae2wct.MineTweakerOverride=Включить переопределение MineTweaker (true=отключает все рецепты)
|
|
||||||
config.ae2wct.DoVersionCheck=Проверка обновлений
|
|
||||||
config.ae2wct.NewVersionAvailable=Доступна новая версия Wireless Crafting Terminal!
|
|
||||||
config.ae2wct.ClickString=["Нажмите здесь, чтобы перейти на страницу загрузки [",{"text":"Скачать","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Нажмите это, чтобы скачать последнюю версию","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
|
|
||||||
config.ae2wct.SaveSearchString=Сохранять строку поиска терминала между сеансами
|
|
||||||
|
|
||||||
#Achievements
|
|
||||||
achievement.wctAchievement=Цифровое создание через WiFi
|
|
||||||
achievement.wctAchievement.desc=Создать беспроводной терминал создания
|
|
||||||
achievement.boosterAchievement=Межпространственный мешок создания
|
|
||||||
achievement.boosterAchievement.desc=Получите бесконечную карту усиления
|
|
||||||
achievement.magnetAchievement=Цифровой пылесос
|
|
||||||
achievement.magnetAchievement.desc=Создать магнитную карту
|
|
||||||
|
|
||||||
#Chat Messages
|
|
||||||
chatmessages.ae2wct.NoNetworkPower=В системе нет энергии!
|
|
||||||
chatmessages.ae2wct.MagnetMode1=Магнитная карта деактивирована
|
|
||||||
chatmessages.ae2wct.MagnetMode2=Магнитная карта активирована - предметы, не хранящиеся в АЕ системе, будут помещены в инвентарь
|
|
||||||
chatmessages.ae2wct.MagnetMode3=Магнитная карта активирована - предметы, не хранящиеся в АЕ системе, останутся на земле
|
|
||||||
chatmessages.ae2wct.InitializeMagnet=Прежде чем использовать привязанную клавишу, вы должны сначала щелкнуть ПКМ, держа магнитную карту в руке!
|
|
||||||
|
|
||||||
#Keybindings
|
|
||||||
ae2wct.OpenTerminal=Открыть беспроводной терминал создания
|
|
||||||
ae2wct.OpenMagnetFilter=Открыть интерфейс фильтра магнитной карты
|
|
||||||
ae2wct.SwitchMagnetMode=Активировать/деактивировать магнитную карту
|
|
||||||
key.categories.ae2wct=Wireless Crafting Terminal
|
|
||||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |