Merge branch 'upstream' into bugfix

This commit is contained in:
Yang Xizhi authored and GitHub committed 2022-07-30 22:36:03 +08:00
commit 63d12aa759
23 files changed
+556 -272

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
name: Build and test
on:
pull_request:
branches: [ master, main ]
push:
branches: [ master, main ]
jobs:
build-and-test:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
secrets: inherit
+14
View File
@@ -0,0 +1,14 @@
name: Release tagged build
on:
push:
tags: [ '*' ]
permissions:
contents: write
jobs:
release-tags:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
secrets: inherit
+74 -20
View File
@@ -1,4 +1,4 @@
//version: 1644894948 //version: 1650343995
/* /*
DO NOT CHANGE THIS FILE! DO NOT CHANGE THIS FILE!
@@ -6,12 +6,11 @@ Also, you may replace this file at any time if there is an update available.
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates. Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates.
*/ */
import org.gradle.internal.logging.text.StyledTextOutput
import org.gradle.internal.logging.text.StyledTextOutputFactory
import org.gradle.internal.logging.text.StyledTextOutput.Style
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.internal.logging.text.StyledTextOutput.Style
import org.gradle.internal.logging.text.StyledTextOutputFactory
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@@ -104,6 +103,7 @@ checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName") checkPropertyExists("developmentEnvironmentUserName")
boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean()
String javaSourceDir = "src/main/java/" String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/" String scalaSourceDir = "src/main/scala/"
@@ -180,6 +180,11 @@ catch (Exception ignored) {
} }
// Pulls version first from the VERSION env and then git tag // Pulls version first from the VERSION env and then git tag
String identifiedVersion
String versionOverride = System.getenv("VERSION") ?: null
try {
identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
}
catch (Exception ignored) { catch (Exception ignored) {
out.style(Style.Failure).text( out.style(Style.Failure).text(
'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' + 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
@@ -187,11 +192,15 @@ catch (Exception ignored) {
'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)' 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
) )
versionOverride = 'NO-GIT-TAG-SET' versionOverride = 'NO-GIT-TAG-SET'
identifiedVersion = versionOverride
} }
String versionTag = gitVersion().split("-")[gitVersion().split("-").length - 1] version = minecraftVersion + '-' + identifiedVersion
version = minecraftVersion + '-' + versionTag
ext { ext {
modVersion = versionTag modVersion = identifiedVersion
}
if(identifiedVersion == versionOverride) {
out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
} }
group = modGroup group = modGroup
@@ -205,13 +214,17 @@ else {
def arguments = [] def arguments = []
def jvmArguments = [] def jvmArguments = []
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
arguments += [ arguments += [
"--tweakClass org.spongepowered.asm.launch.MixinTweaker" "--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
jvmArguments += [
"-Dmixin.debug.countInjections=true", "-Dmixin.debug.verbose=true", "-Dmixin.debug.export=true"
] ]
if (usesMixinDebug.toBoolean()) {
jvmArguments += [
"-Dmixin.debug.countInjections=true",
"-Dmixin.debug.verbose=true",
"-Dmixin.debug.export=true"
]
}
} }
minecraft { minecraft {
@@ -303,18 +316,23 @@ def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfig
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
task generateAssets { task generateAssets {
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
getFile("/src/main/resources/mixins." + modId + ".json").text = """{ def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json");
if (!mixinConfigFile.exists()) {
mixinConfigFile.text = """{
"required": true, "required": true,
"minVersion": "0.7.11", "minVersion": "0.7.11",
"package": "${modGroup}.${mixinsPackage}", "package": "${modGroup}.${mixinsPackage}",
"plugin": "${modGroup}.${mixinPlugin}", "plugin": "${modGroup}.${mixinPlugin}",
"refmap": "${mixingConfigRefMap}", "refmap": "${mixingConfigRefMap}",
"target": "@env(DEFAULT)", "target": "@env(DEFAULT)",
"compatibilityLevel": "JAVA_8" "compatibilityLevel": "JAVA_8",
"mixins": [],
"client": [],
"server": []
} }
""" """
}
} }
} }
@@ -453,7 +471,7 @@ def getManifestAttributes() {
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
from (sourceSets.main.allJava) from (sourceSets.main.allSource)
from (file("$projectDir/LICENSE")) from (file("$projectDir/LICENSE"))
getArchiveClassifier().set('sources') getArchiveClassifier().set('sources')
} }
@@ -508,7 +526,7 @@ task devJar(type: Jar) {
} }
task apiJar(type: Jar) { task apiJar(type: Jar) {
from (sourceSets.main.allJava) { from (sourceSets.main.allSource) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
} }
@@ -550,7 +568,7 @@ publishing {
artifact source: shadowJar, classifier: "" artifact source: shadowJar, classifier: ""
} }
if(!noPublishedSources) { if(!noPublishedSources) {
artifact source: sourcesJar, classifier: "src" artifact source: sourcesJar, classifier: "sources"
} }
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev" artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
if (apiPackage) { if (apiPackage) {
@@ -560,7 +578,7 @@ publishing {
groupId = System.getenv("ARTIFACT_GROUP_ID") ?: "com.github.GTNewHorizons" groupId = System.getenv("ARTIFACT_GROUP_ID") ?: "com.github.GTNewHorizons"
artifactId = System.getenv("ARTIFACT_ID") ?: project.name artifactId = System.getenv("ARTIFACT_ID") ?: project.name
// Using the identified version, not project.version as it has the prepended 1.7.10 // Using the identified version, not project.version as it has the prepended 1.7.10
version = System.getenv("RELEASE_VERSION") ?: versionTag version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
// remove extra garbage from minecraft and minecraftDeps configuration // remove extra garbage from minecraft and minecraftDeps configuration
pom.withXml { pom.withXml {
@@ -597,10 +615,46 @@ publishing {
// Updating // Updating
task updateBuildScript { task updateBuildScript {
doLast { doLast {
if (performBuildScriptUpdate(projectDir.toString())) return
print("Build script already up-to-date!") print("Build script already up-to-date!")
} }
} }
if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
if (autoUpdateBuildScript.toBoolean()) {
performBuildScriptUpdate(projectDir.toString())
} else {
out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'")
}
}
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle")
}
boolean performBuildScriptUpdate(String projectDir) {
if (isNewBuildScriptVersionAvailable(projectDir)) {
def buildscriptFile = getFile("build.gradle")
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
return true
}
return false
}
boolean isNewBuildScriptVersionAvailable(String projectDir) {
Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
String currentBuildScript = getFile("build.gradle").getText()
String currentBuildScriptHash = getVersionHash(currentBuildScript)
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
String availableBuildScriptHash = getVersionHash(availableBuildScript)
boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
return !isUpToDate
}
static String getVersionHash(String buildScriptContent) { static String getVersionHash(String buildScriptContent) {
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
if(versionLine != null) { if(versionLine != null) {
+4 -3
View File
@@ -1,13 +1,13 @@
// Add your dependencies here // Add your dependencies here
dependencies { dependencies {
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.12-GTNH:dev') compile('com.github.GTNewHorizons:NotEnoughItems:2.2.17-GTNH:dev')
compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-75-GTNH:dev') compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-87-GTNH:dev')
compile('curse.maven:cofh-core-69162:2388751') compile('curse.maven:cofh-core-69162:2388751')
compile('com.github.GTNewHorizons:ExtraCells2:2.5.9:dev') {transitive = false} compile('com.github.GTNewHorizons:ExtraCells2:2.5.9:dev') {transitive = false}
compile("com.github.GTNewHorizons:WirelessCraftingTerminal:1.8.8.5:dev") compile("com.github.GTNewHorizons:WirelessCraftingTerminal:1.8.8.5:dev")
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.4:dev") compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.7:dev")
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.27:dev") compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.27:dev")
compileOnly("com.github.GTNewHorizons:EnderCore:0.2.6:dev") compileOnly("com.github.GTNewHorizons:EnderCore:0.2.6:dev")
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.40.41:dev') compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.40.41:dev')
@@ -20,6 +20,7 @@ dependencies {
compileOnly('com.github.GTNewHorizons:OpenComputers:1.7.5.23-GTNH:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:OpenComputers:1.7.5.23-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.3.19-GTNH:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.3.19-GTNH:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.29:dev") {transitive = false} compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.29:dev") {transitive = false}
compileOnly("com.github.GTNewHorizons:GTplusplus:1.7.49:dev") {transitive = false}
runtime("com.github.GTNewHorizons:Baubles:1.0.1.14:dev") runtime("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
@@ -2,9 +2,11 @@ package com.glodblock.github.client.gui;
import appeng.api.config.ActionItems; import appeng.api.config.ActionItems;
import appeng.api.config.ItemSubstitution; import appeng.api.config.ItemSubstitution;
import appeng.api.config.PatternSlotConfig;
import appeng.api.config.Settings; import appeng.api.config.Settings;
import appeng.api.storage.ITerminalHost; import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiImgButton; import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiScrollbar;
import appeng.container.slot.AppEngSlot; import appeng.container.slot.AppEngSlot;
import com.glodblock.github.FluidCraft; import com.glodblock.github.FluidCraft;
import com.glodblock.github.client.gui.container.FCBasePartContainerEx; import com.glodblock.github.client.gui.container.FCBasePartContainerEx;
@@ -16,6 +18,7 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor { public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
@@ -27,17 +30,22 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
private GuiImgButton substitutionsEnabledBtn; private GuiImgButton substitutionsEnabledBtn;
private GuiImgButton substitutionsDisabledBtn; private GuiImgButton substitutionsDisabledBtn;
private GuiImgButton encodeBtn; private GuiImgButton encodeBtn;
private GuiImgButton invertBtn;
private GuiImgButton clearBtn; private GuiImgButton clearBtn;
private GuiImgButton doubleBtn; private GuiImgButton doubleBtn;
private GuiFCImgButton combineEnableBtn; private GuiFCImgButton combineEnableBtn;
private GuiFCImgButton combineDisableBtn; private GuiFCImgButton combineDisableBtn;
private final GuiScrollbar processingScrollBar = new GuiScrollbar();
public GuiBaseFluidPatternTerminalEx(final InventoryPlayer inventoryPlayer, final ITerminalHost te ) public GuiBaseFluidPatternTerminalEx(final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{ {
super( inventoryPlayer, te, new FCBasePartContainerEx( inventoryPlayer, te ) ); super( inventoryPlayer, te, new FCBasePartContainerEx( inventoryPlayer, te ) );
this.container = (FCBasePartContainerEx) this.inventorySlots; this.container = (FCBasePartContainerEx) this.inventorySlots;
setReservedSpace(81); setReservedSpace(81);
processingScrollBar.setHeight(70).setWidth(7).setLeft(6).setRange(0, 1, 1);
processingScrollBar.setTexture(FluidCraft.MODID, "gui/pattern3.png", 242, 0);
} }
@Override @Override
@@ -47,23 +55,27 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
if( this.encodeBtn == btn ) if( this.encodeBtn == btn )
{ {
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Encode", isShiftKeyDown() ? "2" : "1" ) ); FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Encode", isShiftKeyDown() ? "2" : "1" ) );
} }
else if( this.clearBtn == btn ) else if( this.clearBtn == btn )
{ {
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Clear", "1" ) ); FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Clear", "1" ) );
} }
else if( this.substitutionsEnabledBtn == btn || this.substitutionsDisabledBtn == btn ) else if( this.substitutionsEnabledBtn == btn || this.substitutionsDisabledBtn == btn )
{ {
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) ); FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) );
}
else if( this.invertBtn == btn )
{
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Invert", container.inverted ? "0" : "1" ) );
} }
else if( this.combineDisableBtn == btn || this.combineEnableBtn == btn ) else if( this.combineDisableBtn == btn || this.combineEnableBtn == btn )
{ {
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Combine", this.combineDisableBtn == btn ? "1" : "0" ) ); FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Combine", this.combineDisableBtn == btn ? "1" : "0" ) );
} }
else if (ModAndClassUtil.isDoubleButton && doubleBtn == btn) else if (ModAndClassUtil.isDoubleButton && doubleBtn == btn)
{ {
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Double", Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) ? "1": "0") ); FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Double", Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) ? "1": "0") );
} }
} }
@@ -81,6 +93,10 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
this.substitutionsDisabledBtn.setHalfSize( true ); this.substitutionsDisabledBtn.setHalfSize( true );
this.buttonList.add( this.substitutionsDisabledBtn ); this.buttonList.add( this.substitutionsDisabledBtn );
invertBtn = new GuiImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 153, Settings.ACTIONS, container.inverted ? PatternSlotConfig.C_4_16 : PatternSlotConfig.C_16_4);
invertBtn.setHalfSize( true );
this.buttonList.add( this.invertBtn );
this.clearBtn = new GuiImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE ); this.clearBtn = new GuiImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE );
this.clearBtn.setHalfSize( true ); this.clearBtn.setHalfSize( true );
this.buttonList.add( this.clearBtn ); this.buttonList.add( this.clearBtn );
@@ -94,13 +110,15 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
this.buttonList.add( this.doubleBtn ); this.buttonList.add( this.doubleBtn );
} }
this.combineEnableBtn = new GuiFCImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 153, "FORCE_COMBINE", "DO_COMBINE" ); this.combineEnableBtn = new GuiFCImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 143, "FORCE_COMBINE", "DO_COMBINE" );
this.combineEnableBtn.setHalfSize( true ); this.combineEnableBtn.setHalfSize( true );
this.buttonList.add( this.combineEnableBtn ); this.buttonList.add( this.combineEnableBtn );
this.combineDisableBtn = new GuiFCImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 153, "NOT_COMBINE", "DONT_COMBINE" ); this.combineDisableBtn = new GuiFCImgButton( this.guiLeft + 87, this.guiTop + this.ySize - 143, "NOT_COMBINE", "DONT_COMBINE" );
this.combineDisableBtn.setHalfSize( true ); this.combineDisableBtn.setHalfSize( true );
this.buttonList.add( this.combineDisableBtn ); this.buttonList.add( this.combineDisableBtn );
processingScrollBar.setTop(this.ySize - 164);
} }
@Override @Override
@@ -133,12 +151,13 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
super.drawFG( offsetX, offsetY, mouseX, mouseY ); super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( StatCollector.translateToLocal(NameConst.GUI_FLUID_PATTERN_TERMINAL_EX), 8, this.ySize - 96 + 2 - getReservedSpace(), 4210752 ); this.fontRendererObj.drawString( StatCollector.translateToLocal(NameConst.GUI_FLUID_PATTERN_TERMINAL_EX), 8, this.ySize - 96 + 2 - getReservedSpace(), 4210752 );
this.processingScrollBar.draw(this);
} }
@Override @Override
protected String getBackground() protected String getBackground()
{ {
return "gui/pattern3.png"; return container.inverted ? "gui/pattern4.png" : "gui/pattern3.png";
} }
@Override @Override
@@ -154,4 +173,84 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
} }
} }
@Override
public void drawScreen( final int mouseX, final int mouseY, final float btn )
{
if (container.substitute) {
substitutionsEnabledBtn.visible = true;
substitutionsDisabledBtn.visible = false;
} else {
substitutionsEnabledBtn.visible = false;
substitutionsDisabledBtn.visible = true;
}
final int offset = container.inverted? 18 * -3: 0;
substitutionsEnabledBtn.xPosition = this.guiLeft + 97 + offset;
substitutionsDisabledBtn.xPosition = this.guiLeft + 97 + offset;
doubleBtn.xPosition = this.guiLeft + 97 + offset;
clearBtn.xPosition = this.guiLeft + 87 + offset;
invertBtn.xPosition = this.guiLeft + 87 + offset;
combineEnableBtn.xPosition = this.guiLeft + 87 + offset;
combineDisableBtn.xPosition = this.guiLeft + 87 + offset;
processingScrollBar.setCurrentScroll(container.activePage);
super.drawScreen(mouseX, mouseY, btn);
}
@Override
protected void mouseClicked( final int xCoord, final int yCoord, final int btn )
{
final int currentScroll = this.processingScrollBar.getCurrentScroll();
this.processingScrollBar.click(this, xCoord - this.guiLeft, yCoord - this.guiTop);
super.mouseClicked(xCoord, yCoord, btn);
if (currentScroll != this.processingScrollBar.getCurrentScroll()) {
changeActivePage();
}
}
@Override
protected void mouseClickMove( final int x, final int y, final int c, final long d )
{
final int currentScroll = this.processingScrollBar.getCurrentScroll();
this.processingScrollBar.click(this, x - this.guiLeft, y - this.guiTop );
super.mouseClickMove(x, y, c, d);
if (currentScroll != this.processingScrollBar.getCurrentScroll()) {
changeActivePage();
}
}
@Override
public void handleMouseInput()
{
super.handleMouseInput();
final int wheel = Mouse.getEventDWheel();
if (wheel != 0) {
final int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
final int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight;
if (this.processingScrollBar.contains(x - this.guiLeft, y - this.guiTop)) {
final int currentScroll = this.processingScrollBar.getCurrentScroll();
this.processingScrollBar.wheel(wheel);
if (currentScroll != this.processingScrollBar.getCurrentScroll()) {
changeActivePage();
}
}
}
}
private void changeActivePage()
{
FluidCraft.proxy.netHandler.sendToServer(new CPacketFluidPatternTermBtns("PatternTerminalEx.ActivePage", String.valueOf(this.processingScrollBar.getCurrentScroll())));
}
} }
@@ -30,6 +30,7 @@ import appeng.util.IConfigManagerHost;
import appeng.util.Platform; import appeng.util.Platform;
import com.glodblock.github.FluidCraft; import com.glodblock.github.FluidCraft;
import com.glodblock.github.client.gui.container.FCBaseMonitorContain; import com.glodblock.github.client.gui.container.FCBaseMonitorContain;
import com.glodblock.github.client.gui.container.FCBasePartContainer;
import com.glodblock.github.network.CPacketInventoryAction; import com.glodblock.github.network.CPacketInventoryAction;
import com.glodblock.github.util.Ae2ReflectClient; import com.glodblock.github.util.Ae2ReflectClient;
import com.glodblock.github.util.ModAndClassUtil; import com.glodblock.github.util.ModAndClassUtil;
@@ -85,14 +86,9 @@ public class GuiFCBaseMonitor extends AEBaseMEGui implements ISortSource, IConfi
this.setScrollBar( scrollbar ); this.setScrollBar( scrollbar );
this.repo = new ItemRepo( scrollbar, this ); this.repo = new ItemRepo( scrollbar, this );
this.xSize = 185; this.xSize = 195;
this.ySize = 204; this.ySize = 204;
if( te instanceof IViewCellStorage)
{
this.xSize += 33;
}
this.standardSize = this.xSize; this.standardSize = this.xSize;
this.configSrc = ( (IConfigurableObject) this.inventorySlots ).getConfigManager(); this.configSrc = ( (IConfigurableObject) this.inventorySlots ).getConfigManager();
@@ -304,7 +300,7 @@ public class GuiFCBaseMonitor extends AEBaseMEGui implements ISortSource, IConfi
{ {
if( s instanceof AppEngSlot) if( s instanceof AppEngSlot)
{ {
if( ( (Slot) s ).xDisplayPosition < 197 ) if( ( (Slot) s ).xDisplayPosition < 195 )
{ {
this.repositionSlot( (AppEngSlot) s ); this.repositionSlot( (AppEngSlot) s );
} }
@@ -581,7 +577,7 @@ public class GuiFCBaseMonitor extends AEBaseMEGui implements ISortSource, IConfi
{ {
this.bindTextureBack( this.getBackground() ); this.bindTextureBack( this.getBackground() );
final int x_width = 197; final int x_width = 195;
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
if( this.viewCell ) if( this.viewCell )
@@ -751,4 +747,31 @@ public class GuiFCBaseMonitor extends AEBaseMEGui implements ISortSource, IConfi
{ {
return searchField.isMouseIn(x,y); return searchField.isMouseIn(x,y);
} }
public boolean hideItemPanelSlot(int tx, int ty, int tw, int th)
{
if (this.viewCell) {
int rw = 33;
int rh = 14 + myCurrentViewCells.length * 18;
if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
return false;
}
int rx = this.guiLeft + this.xSize;
int ry = this.guiTop + 0;
rw += rx;
rh += ry;
tw += tx;
th += ty;
// overflow || intersect
return (rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry);
}
return false;
}
} }
@@ -23,9 +23,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidContainerItem;
import java.util.ArrayList;
import java.util.List;
public class ContainerFluidPatternTerminal extends FCBasePartContainer implements PatternConsumer { public class ContainerFluidPatternTerminal extends FCBasePartContainer implements PatternConsumer {
public ContainerFluidPatternTerminal(InventoryPlayer ip, ITerminalHost monitorable) { public ContainerFluidPatternTerminal(InventoryPlayer ip, ITerminalHost monitorable) {
@@ -112,23 +109,22 @@ public class ContainerFluidPatternTerminal extends FCBasePartContainer implement
private static IAEItemStack[] collectInventory(Slot[] slots) { private static IAEItemStack[] collectInventory(Slot[] slots) {
// see note at top of FluidPatternDetails // see note at top of FluidPatternDetails
List<IAEItemStack> acc = new ArrayList<>(); IAEItemStack[] stacks = new IAEItemStack[slots.length];
for (Slot slot : slots) { for (int i = 0; i < stacks.length; i++) {
ItemStack stack = slot.getStack(); ItemStack stack = slots[i].getStack();
if (stack == null) { if (stack != null) {
continue; if (stack.getItem() instanceof ItemFluidPacket) {
} IAEItemStack dropStack = ItemFluidDrop.newAeStack(ItemFluidPacket.getFluidStack(stack));
if (stack.getItem() instanceof ItemFluidPacket) { if (dropStack != null) {
IAEItemStack dropStack = ItemFluidDrop.newAeStack(ItemFluidPacket.getFluidStack(stack)); stacks[i] = dropStack;
if (dropStack != null) { continue;
acc.add(dropStack); }
continue;
} }
} }
IAEItemStack aeStack = AEItemStack.create(stack); IAEItemStack aeStack = AEItemStack.create(stack);
acc.add(aeStack); stacks[i] = aeStack;
} }
return acc.toArray(new IAEItemStack[0]); return stacks;
} }
@Override @Override
@@ -4,8 +4,7 @@ import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions; import appeng.api.definitions.IDefinitions;
import appeng.api.storage.ITerminalHost; import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.container.slot.SlotFakeCraftingMatrix; import appeng.container.slot.OptionalSlotFake;
import appeng.container.slot.SlotPatternOutputs;
import appeng.helpers.InventoryAction; import appeng.helpers.InventoryAction;
import appeng.util.item.AEItemStack; import appeng.util.item.AEItemStack;
import com.glodblock.github.common.item.ItemFluidDrop; import com.glodblock.github.common.item.ItemFluidDrop;
@@ -23,9 +22,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidContainerItem;
import java.util.ArrayList;
import java.util.List;
public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx implements PatternConsumer { public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx implements PatternConsumer {
public ContainerFluidPatternTerminalEx(InventoryPlayer ip, ITerminalHost monitorable) { public ContainerFluidPatternTerminalEx(InventoryPlayer ip, ITerminalHost monitorable) {
@@ -109,23 +105,22 @@ public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx imple
private static IAEItemStack[] collectInventory(Slot[] slots) { private static IAEItemStack[] collectInventory(Slot[] slots) {
// see note at top of FluidPatternDetails // see note at top of FluidPatternDetails
List<IAEItemStack> acc = new ArrayList<>(); IAEItemStack[] stacks = new IAEItemStack[slots.length];
for (Slot slot : slots) { for (int i = 0; i < stacks.length; i++) {
ItemStack stack = slot.getStack(); ItemStack stack = slots[i].getStack();
if (stack == null) { if (stack != null) {
continue; if (stack.getItem() instanceof ItemFluidPacket) {
} IAEItemStack dropStack = ItemFluidDrop.newAeStack(ItemFluidPacket.getFluidStack(stack));
if (stack.getItem() instanceof ItemFluidPacket) { if (dropStack != null) {
IAEItemStack dropStack = ItemFluidDrop.newAeStack(ItemFluidPacket.getFluidStack(stack)); stacks[i] = dropStack;
if (dropStack != null) { continue;
acc.add(dropStack); }
continue;
} }
} }
IAEItemStack aeStack = AEItemStack.create(stack); IAEItemStack aeStack = AEItemStack.create(stack);
acc.add(aeStack); stacks[i] = aeStack;
} }
return acc.toArray(new IAEItemStack[0]); return stacks;
} }
@Override @Override
@@ -155,8 +150,7 @@ public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx imple
super.doAction(player, action, slotId, id); super.doAction(player, action, slotId, id);
return; return;
} }
if ((slot instanceof SlotFakeCraftingMatrix || slot instanceof SlotPatternOutputs) && stack != null if ((slot instanceof OptionalSlotFake) && stack != null && (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack))) {
&& (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack))) {
FluidStack fluid = null; FluidStack fluid = null;
switch (action) { switch (action) {
case PICKUP_OR_SET_DOWN: case PICKUP_OR_SET_DOWN:
@@ -568,7 +568,7 @@ public class FCBasePartContainer extends FCBaseMonitorContain implements IAEAppE
List<SlotFake> enabledSlots = Arrays.stream(slots).filter(SlotFake::isEnabled).collect(Collectors.toList()); List<SlotFake> enabledSlots = Arrays.stream(slots).filter(SlotFake::isEnabled).collect(Collectors.toList());
long emptyStots = enabledSlots.stream().filter(s -> s.getStack() == null).count(); long emptyStots = enabledSlots.stream().filter(s -> s.getStack() == null).count();
long fullSlots = enabledSlots.stream().filter(s-> s.getStack() != null && s.getStack().stackSize * 2 > 127).count(); long fullSlots = enabledSlots.stream().filter(s-> s.getStack() != null && s.getStack().stackSize * 2 > 127).count();
return fullSlots <= emptyStots; return fullSlots <= emptyStots && emptyStots < enabledSlots.size();
} }
static void doubleStacksInternal(SlotFake[] slots) static void doubleStacksInternal(SlotFake[] slots)
@@ -32,38 +32,64 @@ import java.util.stream.Collectors;
public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAppEngInventory, IOptionalSlotHost, IContainerCraftingPacket { public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAppEngInventory, IOptionalSlotHost, IContainerCraftingPacket {
private static final int CRAFTING_GRID_PAGES = 2;
private static final int CRAFTING_GRID_WIDTH = 4;
private static final int CRAFTING_GRID_HEIGHT = 4;
private static final int CRAFTING_GRID_SLOTS = CRAFTING_GRID_WIDTH * CRAFTING_GRID_HEIGHT;
private static class ProcessingSlotFake extends OptionalSlotFake {
private static final int POSITION_SHIFT = 9000;
private boolean hidden = false;
public ProcessingSlotFake(IInventory inv, IOptionalSlotHost containerBus, int idx, int x, int y, int offX, int offY, int groupNum) {
super(inv, containerBus, idx, x, y, offX, offY, groupNum);
this.setRenderDisabled(false);
}
public void setHidden(boolean hide) {
if (this.hidden != hide) {
this.hidden = hide;
this.xDisplayPosition += (hide ? -1 : 1) * POSITION_SHIFT;
}
}
}
private final PartFluidPatternTerminalEx patternTerminal; private final PartFluidPatternTerminalEx patternTerminal;
protected final SlotFakeCraftingMatrix[] craftingSlots = new SlotFakeCraftingMatrix[16]; protected final ProcessingSlotFake[] craftingSlots = new ProcessingSlotFake[CRAFTING_GRID_SLOTS * CRAFTING_GRID_PAGES];
protected final OptionalSlotFake[] outputSlots = new OptionalSlotFake[4]; protected final ProcessingSlotFake[] outputSlots = new ProcessingSlotFake[CRAFTING_GRID_SLOTS * CRAFTING_GRID_PAGES];
protected final SlotRestrictedInput patternSlotIN; protected final SlotRestrictedInput patternSlotIN;
protected final SlotRestrictedInput patternSlotOUT; protected final SlotRestrictedInput patternSlotOUT;
@GuiSync( 96 ) @GuiSync( 96 + (17-9) + 11 )
public boolean substitute = false;
@GuiSync( 95 )
public boolean combine = false; public boolean combine = false;
@GuiSync( 96 + (17-9) + 12 )
public boolean substitute = false;
@GuiSync( 96 + (17-9) + 16 )
public boolean inverted;
@GuiSync( 96 + (17-9) + 17 )
public int activePage = 0;
public FCBasePartContainerEx(final InventoryPlayer ip, final ITerminalHost monitorable ) public FCBasePartContainerEx(final InventoryPlayer ip, final ITerminalHost monitorable )
{ {
super( ip, monitorable, false ); super( ip, monitorable, false );
this.patternTerminal = (PartFluidPatternTerminalEx) monitorable; this.patternTerminal = (PartFluidPatternTerminalEx) monitorable;
this.inverted = patternTerminal.isInverted();
final IInventory patternInv = this.getPatternTerminal().getInventoryByName( "pattern" ); final IInventory patternInv = this.getPatternTerminal().getInventoryByName( "pattern" );
final IInventory output = this.getPatternTerminal().getInventoryByName( "output" ); final IInventory output = this.getPatternTerminal().getInventoryByName( "output" );
IInventory crafting = this.getPatternTerminal().getInventoryByName("crafting"); IInventory crafting = this.getPatternTerminal().getInventoryByName("crafting");
for( int y = 0; y < 4; y++ ) for (int page = 0; page < CRAFTING_GRID_PAGES; page++) {
{ for (int y = 0; y < CRAFTING_GRID_HEIGHT; y++) {
for( int x = 0; x < 4; x++ ) for (int x = 0; x < CRAFTING_GRID_WIDTH; x++) {
{ this.addSlotToContainer(this.craftingSlots[x + y * CRAFTING_GRID_WIDTH + page * CRAFTING_GRID_SLOTS] = new ProcessingSlotFake(crafting, this, x + y * CRAFTING_GRID_WIDTH + page * CRAFTING_GRID_SLOTS, 15, -83, x, y, x + 4));
this.addSlotToContainer( this.craftingSlots[x + y * 4] = new SlotFakeCraftingMatrix(crafting, x + y * 4, 15 + x * 18, -83 + y * 18 ) ); }
}
for (int x = 0; x < CRAFTING_GRID_WIDTH; x++) {
for (int y = 0; y < CRAFTING_GRID_HEIGHT; y++) {
this.addSlotToContainer(this.outputSlots[x * CRAFTING_GRID_HEIGHT + y + page * CRAFTING_GRID_SLOTS] = new ProcessingSlotFake(output, this, x * CRAFTING_GRID_HEIGHT + y + page * CRAFTING_GRID_SLOTS, 112, -83, -x, y, x));
}
} }
}
for( int y = 0; y < 4; y++ )
{
this.addSlotToContainer( this.outputSlots[y] = new SlotPatternOutputs( output, this, y, 112, -83, 0, y, 1 ) );
this.outputSlots[y].setRenderDisabled( false );
} }
this.addSlotToContainer( this.patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, this.getInventoryPlayer() ) ); this.addSlotToContainer( this.patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, this.getInventoryPlayer() ) );
@@ -186,7 +212,7 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
private ItemStack[] getInputs() private ItemStack[] getInputs()
{ {
final ItemStack[] input = new ItemStack[16]; final ItemStack[] input = new ItemStack[CRAFTING_GRID_SLOTS * CRAFTING_GRID_PAGES];
boolean hasValue = false; boolean hasValue = false;
for( int x = 0; x < this.craftingSlots.length; x++ ) for( int x = 0; x < this.craftingSlots.length; x++ )
@@ -208,7 +234,7 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
private ItemStack[] getOutputs() private ItemStack[] getOutputs()
{ {
final List<ItemStack> list = new ArrayList<>( 4 ); final List<ItemStack> list = new ArrayList<>( CRAFTING_GRID_SLOTS * CRAFTING_GRID_PAGES );
boolean hasValue = false; boolean hasValue = false;
for( final OptionalSlotFake outputSlot : this.outputSlots ) for( final OptionalSlotFake outputSlot : this.outputSlots )
@@ -262,17 +288,14 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
@Override @Override
public boolean isSlotEnabled( final int idx ) public boolean isSlotEnabled( final int idx )
{ {
if( idx == 1 ) if (idx < 4) // outputs
{ {
Platform.isServer(); return inverted || idx == 0;
return true;
} }
else if( idx == 2 ) else
{ {
Platform.isServer(); return !inverted || idx == 4;
return false;
} }
return false;
} }
@Override @Override
@@ -283,6 +306,32 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
{ {
this.substitute = this.patternTerminal.isSubstitution(); this.substitute = this.patternTerminal.isSubstitution();
this.combine = this.patternTerminal.shouldCombine(); this.combine = this.patternTerminal.shouldCombine();
if (inverted != patternTerminal.isInverted() || activePage != patternTerminal.getActivePage()) {
inverted = patternTerminal.isInverted();
activePage = patternTerminal.getActivePage();
offsetSlots();
}
}
}
private void offsetSlots()
{
for (int page = 0; page < CRAFTING_GRID_PAGES; page++) {
for (int y = 0; y < CRAFTING_GRID_HEIGHT; y++) {
for (int x = 0; x < CRAFTING_GRID_WIDTH; x++) {
this.craftingSlots[x + y * CRAFTING_GRID_WIDTH + page * CRAFTING_GRID_SLOTS].setHidden(page != activePage || x > 0 && inverted);
this.outputSlots[x * CRAFTING_GRID_HEIGHT + y + page * CRAFTING_GRID_SLOTS].setHidden(page != activePage || x > 0 && !inverted);
}
}
}
}
@Override
public void onUpdate(String field, Object oldValue, Object newValue) {
super.onUpdate( field, oldValue, newValue );
if (field.equals( "inverted" ) || field.equals( "activePage" )) {
offsetSlots();
} }
} }
@@ -291,13 +340,15 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
{ {
if( s == this.patternSlotOUT && Platform.isServer() ) if( s == this.patternSlotOUT && Platform.isServer() )
{ {
inverted = patternTerminal.isInverted();
for( final Object crafter : this.crafters ) for( final Object crafter : this.crafters )
{ {
final ICrafting icrafting = (ICrafting) crafter; final ICrafting icrafting = (ICrafting) crafter;
for( final Object g : this.inventorySlots ) for( final Object g : this.inventorySlots )
{ {
if( g instanceof OptionalSlotFake || g instanceof SlotFakeCraftingMatrix ) if( g instanceof OptionalSlotFake )
{ {
final Slot sri = (Slot) g; final Slot sri = (Slot) g;
icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() ); icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() );
@@ -406,4 +457,12 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
return fluid > 0; return fluid > 0;
} }
public void setActivePage(final int activePage) {
this.activePage = activePage;
}
public int getActivePage() {
return this.activePage;
}
} }
@@ -120,100 +120,54 @@ public class PartFluidPatternTerminal extends FCBasePart {
return GuiBridge.GUI_ME; return GuiBridge.GUI_ME;
} }
public void onChangeInventory0(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{
if( inv == this.pattern && slot == 1 )
{
final ItemStack is = this.pattern.getStackInSlot( 1 );
if( is != null && is.getItem() instanceof ICraftingPatternItem)
{
final ICraftingPatternItem pattern = (ICraftingPatternItem) is.getItem();
final ICraftingPatternDetails details = pattern.getPatternForItem( is, this.getHost().getTile().getWorldObj() );
if( details != null )
{
this.setCraftingRecipe( details.isCraftable() );
this.setSubstitution( details.canSubstitute() );
for( int x = 0; x < this.crafting.getSizeInventory(); x++ )
{
this.crafting.setInventorySlotContents( x, null );
}
for( int x = 0; x < this.output.getSizeInventory(); x++ )
{
this.output.setInventorySlotContents( x, null );
}
for( int x = 0; x < this.crafting.getSizeInventory() && x < details.getInputs().length; x++ )
{
final IAEItemStack item = details.getInputs()[x];
this.crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
for( int x = 0; x < this.output.getSizeInventory() && x < details.getOutputs().length; x++ )
{
final IAEItemStack item = details.getOutputs()[x];
this.output.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
}
}
}
else if( inv == this.crafting )
{
this.fixCraftingRecipes();
}
this.getHost().markForSave();
}
@Override @Override
public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack ) public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{ {
if (inv == this.pattern && slot == 1) { if (inv == this.pattern && slot == 1) {
final ItemStack is = inv.getStackInSlot(1); final ItemStack is = inv.getStackInSlot(1);
if (is != null && is.getItem() instanceof ItemFluidEncodedPattern) { if (is != null && is.getItem() instanceof ICraftingPatternItem) {
final ItemFluidEncodedPattern pattern = (ItemFluidEncodedPattern) is.getItem(); final ICraftingPatternItem pattern = (ICraftingPatternItem) is.getItem();
final ICraftingPatternDetails details = pattern.getPatternForItem( is, this.getHost().getTile().getWorldObj() ); final ICraftingPatternDetails details = pattern.getPatternForItem(is, this.getHost().getTile().getWorldObj());
if( details != null ) if (details != null) {
{ final IAEItemStack[] inItems = details.getInputs();
this.setCraftingRecipe( details.isCraftable() ); final IAEItemStack[] outItems = details.getOutputs();
this.setSubstitution( details.canSubstitute() );
for( int x = 0; x < this.crafting.getSizeInventory(); x++ ) this.setCraftingRecipe(details.isCraftable());
{ this.setSubstitution(details.canSubstitute());
this.crafting.setInventorySlotContents( x, null );
for (int i = 0; i < this.crafting.getSizeInventory(); i++) {
this.crafting.setInventorySlotContents(i, null);
} }
for( int x = 0; x < this.output.getSizeInventory(); x++ ) for (int i = 0; i < this.output.getSizeInventory(); i++) {
{ this.output.setInventorySlotContents(i, null);
this.output.setInventorySlotContents( x, null );
} }
for( int x = 0; x < this.crafting.getSizeInventory() && x < details.getInputs().length; x++ ) for (int i = 0; i < this.crafting.getSizeInventory() && i < inItems.length; i++) {
{ if (inItems[i] != null) {
final IAEItemStack item = details.getInputs()[x]; final IAEItemStack item = inItems[i];
if (item != null && item.getItem() instanceof ItemFluidDrop) { if (item != null && item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack())); ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.crafting.setInventorySlotContents(x, packet); this.crafting.setInventorySlotContents(i, packet);
} else
this.crafting.setInventorySlotContents(i, item == null ? null : item.getItemStack());
} }
else this.crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
} }
for( int x = 0; x < this.output.getSizeInventory() && x < details.getOutputs().length; x++ ) for (int i = 0; i < this.output.getSizeInventory() && i < outItems.length; i++) {
{ if (outItems[i] != null) {
final IAEItemStack item = details.getOutputs()[x]; final IAEItemStack item = outItems[i];
if (item != null && item.getItem() instanceof ItemFluidDrop) { if (item != null && item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack())); ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.output.setInventorySlotContents(x, packet); this.output.setInventorySlotContents(i, packet);
} else
this.output.setInventorySlotContents(i, item == null ? null : item.getItemStack());
} }
else this.output.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
} }
} }
this.getHost().markForSave();
return;
} }
} }
onChangeInventory0(inv, slot, mc, removedStack, newStack); this.getHost().markForSave();
} }
private void fixCraftingRecipes() private void fixCraftingRecipes()
@@ -11,7 +11,6 @@ import appeng.tile.inventory.InvOperation;
import appeng.util.Platform; import appeng.util.Platform;
import com.glodblock.github.client.textures.FCPartsTexture; import com.glodblock.github.client.textures.FCPartsTexture;
import com.glodblock.github.common.item.ItemFluidDrop; import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.common.item.ItemFluidEncodedPattern;
import com.glodblock.github.common.item.ItemFluidPacket; import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.inventory.InventoryHandler; import com.glodblock.github.inventory.InventoryHandler;
import com.glodblock.github.inventory.gui.GuiType; import com.glodblock.github.inventory.gui.GuiType;
@@ -34,12 +33,14 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
private static final FCPartsTexture FRONT_DARK_ICON = FCPartsTexture.PartFluidPatternTerminal_Colored; private static final FCPartsTexture FRONT_DARK_ICON = FCPartsTexture.PartFluidPatternTerminal_Colored;
private static final FCPartsTexture FRONT_COLORED_ICON = FCPartsTexture.PartFluidPatternTerminal_Dark; private static final FCPartsTexture FRONT_COLORED_ICON = FCPartsTexture.PartFluidPatternTerminal_Dark;
private final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 16 ); private final AppEngInternalInventory crafting = new AppEngInternalInventory( this, 32 );
private final AppEngInternalInventory output = new AppEngInternalInventory( this, 4 ); private final AppEngInternalInventory output = new AppEngInternalInventory( this, 32 );
private final AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 ); private final AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 );
private boolean substitute = false; private boolean substitute = false;
private boolean combine = false; private boolean combine = false;
private boolean inverted = false;
private int activePage = 0;
public PartFluidPatternTerminalEx(ItemStack is) { public PartFluidPatternTerminalEx(ItemStack is) {
super(is, true); super(is, true);
@@ -79,22 +80,32 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
public void readFromNBT( final NBTTagCompound data ) public void readFromNBT( final NBTTagCompound data )
{ {
super.readFromNBT( data ); super.readFromNBT( data );
this.setSubstitution( data.getBoolean( "substitute" ) ); this.setSubstitution( data.getBoolean( "substitute" ) );
this.setCombineMode( data.getBoolean("combine") ); this.setCombineMode( data.getBoolean("combine") );
this.pattern.readFromNBT( data, "pattern" ); this.pattern.readFromNBT( data, "pattern" );
this.output.readFromNBT( data, "outputList" ); this.output.readFromNBT( data, "outputList" );
this.crafting.readFromNBT( data, "craftingGrid" ); this.crafting.readFromNBT( data, "craftingGrid" );
this.setSubstitution( data.getBoolean( "substitute" ) );
this.setInverted( data.getBoolean( "inverted" ) );
this.setActivePage( data.getInteger( "activePage" ) );
} }
@Override @Override
public void writeToNBT( final NBTTagCompound data ) public void writeToNBT( final NBTTagCompound data )
{ {
super.writeToNBT( data ); super.writeToNBT( data );
data.setBoolean( "substitute", this.substitute ); data.setBoolean( "substitute", this.substitute );
data.setBoolean( "combine", this.combine ); data.setBoolean( "combine", this.combine );
this.pattern.writeToNBT( data, "pattern" ); this.pattern.writeToNBT( data, "pattern" );
this.output.writeToNBT( data, "outputList" ); this.output.writeToNBT( data, "outputList" );
this.crafting.writeToNBT( data, "craftingGrid" ); this.crafting.writeToNBT( data, "craftingGrid" );
data.setBoolean( "substitute", this.substitute );
data.setBoolean( "inverted", this.inverted );
data.setInteger( "activePage", this.activePage );
} }
@Override @Override
@@ -117,94 +128,82 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
return GuiBridge.GUI_ME; return GuiBridge.GUI_ME;
} }
public void onChangeInventory0(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{
if( inv == this.pattern && slot == 1 )
{
final ItemStack is = this.pattern.getStackInSlot( 1 );
if( is != null && is.getItem() instanceof ICraftingPatternItem)
{
final ICraftingPatternItem pattern = (ICraftingPatternItem) is.getItem();
final ICraftingPatternDetails details = pattern.getPatternForItem( is, this.getHost().getTile().getWorldObj() );
if( details != null )
{
this.setSubstitution( details.canSubstitute() );
for( int x = 0; x < this.crafting.getSizeInventory(); x++ )
{
this.crafting.setInventorySlotContents( x, null );
}
for( int x = 0; x < this.output.getSizeInventory(); x++ )
{
this.output.setInventorySlotContents( x, null );
}
for( int x = 0; x < this.crafting.getSizeInventory() && x < details.getInputs().length; x++ )
{
final IAEItemStack item = details.getInputs()[x];
this.crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
for( int x = 0; x < this.output.getSizeInventory() && x < details.getOutputs().length; x++ )
{
final IAEItemStack item = details.getOutputs()[x];
this.output.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
}
}
}
}
this.getHost().markForSave();
}
@Override @Override
public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack ) public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{ {
if (inv == this.pattern && slot == 1) { if (inv == this.pattern && slot == 1) {
final ItemStack is = inv.getStackInSlot(1); final ItemStack is = inv.getStackInSlot(1);
if (is != null && is.getItem() instanceof ItemFluidEncodedPattern) {
final ItemFluidEncodedPattern pattern = (ItemFluidEncodedPattern) is.getItem();
final ICraftingPatternDetails details = pattern.getPatternForItem( is, this.getHost().getTile().getWorldObj() );
if( details != null )
{
this.setSubstitution( details.canSubstitute() );
for( int x = 0; x < this.crafting.getSizeInventory(); x++ ) if (is != null && is.getItem() instanceof ICraftingPatternItem) {
{ final ICraftingPatternItem pattern = (ICraftingPatternItem) is.getItem();
this.crafting.setInventorySlotContents( x, null ); final ICraftingPatternDetails details = pattern.getPatternForItem(is, this.getHost().getTile().getWorldObj());
}
for( int x = 0; x < this.output.getSizeInventory(); x++ ) if (details != null) {
{ final IAEItemStack[] inItems = details.getInputs();
this.output.setInventorySlotContents( x, null ); final IAEItemStack[] outItems = details.getOutputs();
} int inputsCount = 0;
int outputCount = 0;
for( int x = 0; x < this.crafting.getSizeInventory() && x < details.getInputs().length; x++ ) for (int i = 0; i < inItems.length; i++) {
{ if (inItems[i] != null) {
final IAEItemStack item = details.getInputs()[x]; inputsCount++;
if (item != null && item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.crafting.setInventorySlotContents(x, packet);
} }
else this.crafting.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
} }
for( int x = 0; x < this.output.getSizeInventory() && x < details.getOutputs().length; x++ ) for (int i = 0; i < outItems.length; i++) {
{ if (outItems[i] != null) {
final IAEItemStack item = details.getOutputs()[x]; outputCount++;
if (item != null && item.getItem() instanceof ItemFluidDrop) { }
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack())); }
this.output.setInventorySlotContents(x, packet);
this.setSubstitution(details.canSubstitute());
this.setInverted(inputsCount <= 8 && outputCount >= 8);
this.setActivePage(0);
for (int i = 0; i < this.crafting.getSizeInventory(); i++) {
this.crafting.setInventorySlotContents(i, null);
}
for (int i = 0; i < this.output.getSizeInventory(); i++) {
this.output.setInventorySlotContents(i, null);
}
for (int i = 0; i < this.crafting.getSizeInventory() && i < inItems.length; i++) {
final IAEItemStack item = inItems[i];
if (item != null) {
if (item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.crafting.setInventorySlotContents(i, packet);
} else this.crafting.setInventorySlotContents(i, item.getItemStack());
}
}
if (inverted) {
for (int i = 0; i < this.output.getSizeInventory() && i < outItems.length; i++) {
final IAEItemStack item = outItems[i];
if (item != null) {
if (item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.output.setInventorySlotContents(i, packet);
} else this.output.setInventorySlotContents(i, item.getItemStack());
}
}
} else {
for (int i = 0; i < outItems.length && i < 8; i++) {
final IAEItemStack item = outItems[i];
if (item != null) {
if (item.getItem() instanceof ItemFluidDrop) {
ItemStack packet = ItemFluidPacket.newStack(ItemFluidDrop.getFluidStack(item.getItemStack()));
this.output.setInventorySlotContents(i >= 4 ? 12 + i : i, packet);
} else
this.output.setInventorySlotContents(i >= 4 ? 12 + i : i, item.getItemStack());
}
} }
else this.output.setInventorySlotContents( x, item == null ? null : item.getItemStack() );
} }
} }
this.getHost().markForSave();
return;
} }
} }
onChangeInventory0(inv, slot, mc, removedStack, newStack); this.getHost().markForSave();
} }
public boolean shouldCombine() public boolean shouldCombine()
@@ -283,4 +282,20 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
return false; return false;
} }
public boolean isInverted() {
return inverted;
}
public void setInverted(boolean inverted) {
this.inverted = inverted;
}
public int getActivePage() {
return this.activePage;
}
public void setActivePage(int activePage) {
this.activePage = activePage;
}
} }
@@ -0,0 +1,17 @@
package com.glodblock.github.nei;
import codechicken.nei.api.INEIGuiAdapter;
import com.glodblock.github.client.gui.GuiFCBaseMonitor;
import net.minecraft.client.gui.inventory.GuiContainer;
public class NEIGuiHandler extends INEIGuiAdapter {
@Override
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
if (gui instanceof GuiFCBaseMonitor) {
return ((GuiFCBaseMonitor) gui).hideItemPanelSlot(x, y, w, h);
}
return false;
}
}
@@ -11,6 +11,8 @@ public class NEI_FC_Config implements IConfigureNEI {
@Override @Override
public void loadConfig() { public void loadConfig() {
API.registerNEIGuiHandler(new NEIGuiHandler());
for (String identifier : FluidRecipe.getSupportRecipes()) { for (String identifier : FluidRecipe.getSupportRecipes()) {
API.registerGuiOverlayHandler(GuiFluidPatternTerminal.class, FluidPatternTerminalRecipeTransferHandler.INSTANCE, identifier); API.registerGuiOverlayHandler(GuiFluidPatternTerminal.class, FluidPatternTerminalRecipeTransferHandler.INSTANCE, identifier);
API.registerGuiOverlayHandler(GuiFluidPatternTerminalEx.class, FluidPatternTerminalRecipeTransferHandler.INSTANCE, identifier); API.registerGuiOverlayHandler(GuiFluidPatternTerminalEx.class, FluidPatternTerminalRecipeTransferHandler.INSTANCE, identifier);
@@ -4,6 +4,7 @@ import com.glodblock.github.nei.recipes.extractor.*;
import com.glodblock.github.util.ModAndClassUtil; import com.glodblock.github.util.ModAndClassUtil;
import forestry.factory.recipes.nei.*; import forestry.factory.recipes.nei.*;
import gregapi.recipes.Recipe; import gregapi.recipes.Recipe;
import gregtech.api.util.GTPP_Recipe;
import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe;
public class DefaultExtractorLoader implements Runnable { public class DefaultExtractorLoader implements Runnable {
@@ -27,6 +28,14 @@ public class DefaultExtractorLoader implements Runnable {
} }
} }
if (ModAndClassUtil.GTPP) {
for (GTPP_Recipe.GTPP_Recipe_Map_Internal gtppMap : GTPP_Recipe.GTPP_Recipe_Map_Internal.sMappingsEx) {
if (gtppMap.mNEIAllowed) {
FluidRecipe.addRecipeMap(gtppMap.mNEIName, new GTPPRecipeExtractor());
}
}
}
if (ModAndClassUtil.EIO) { if (ModAndClassUtil.EIO) {
FluidRecipe.addRecipeMap("EIOEnchanter", new EnderIORecipeExtractor()); FluidRecipe.addRecipeMap("EIOEnchanter", new EnderIORecipeExtractor());
FluidRecipe.addRecipeMap("EnderIOAlloySmelter", new EnderIORecipeExtractor()); FluidRecipe.addRecipeMap("EnderIOAlloySmelter", new EnderIORecipeExtractor());
@@ -37,6 +46,17 @@ public class DefaultExtractorLoader implements Runnable {
} }
if (ModAndClassUtil.FTR) { if (ModAndClassUtil.FTR) {
// GTNH
FluidRecipe.addRecipeMap("forestry.bottler", new ForestryRecipeExtractor(new NEIHandlerBottler()));
FluidRecipe.addRecipeMap("forestry.carpenter", new ForestryRecipeExtractor(new NEIHandlerCarpenter()));
FluidRecipe.addRecipeMap("forestry.centrifuge", new ForestryRecipeExtractor(new NEIHandlerCentrifuge()));
FluidRecipe.addRecipeMap("forestry.fabricator", new ForestryRecipeExtractor(new NEIHandlerFabricator()));
FluidRecipe.addRecipeMap("forestry.fermenter", new ForestryRecipeExtractor(new NEIHandlerFermenter()));
FluidRecipe.addRecipeMap("forestry.moistener", new ForestryRecipeExtractor(new NEIHandlerMoistener()));
FluidRecipe.addRecipeMap("forestry.squeezer", new ForestryRecipeExtractor(new NEIHandlerSqueezer()));
FluidRecipe.addRecipeMap("forestry.still", new ForestryRecipeExtractor(new NEIHandlerStill()));
// LEGACY
FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerBottler())); FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerBottler()));
FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerCarpenter())); FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerCarpenter()));
FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerCentrifuge())); FluidRecipe.addRecipeMap(null, new ForestryRecipeExtractor(new NEIHandlerCentrifuge()));
@@ -0,0 +1,13 @@
package com.glodblock.github.nei.recipes.extractor;
public class GTPPRecipeExtractor extends GregTech5RecipeExtractor {
public GTPPRecipeExtractor() {
super(false);
}
public GTPPRecipeExtractor(boolean removeSpecial) {
super(removeSpecial);
}
}
@@ -15,15 +15,15 @@ import java.util.List;
public class GregTech5RecipeExtractor implements IRecipeExtractor { public class GregTech5RecipeExtractor implements IRecipeExtractor {
boolean r; boolean removeSpecial;
public GregTech5RecipeExtractor(boolean removeSpecial) { public GregTech5RecipeExtractor(boolean removeSpecial) {
r = removeSpecial; this.removeSpecial = removeSpecial;
} }
@Override @Override
public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) { public List<OrderStack<?>> getInputIngredients(List<PositionedStack> rawInputs) {
if (r) removeSpecial(rawInputs); if (removeSpecial) removeSpecial(rawInputs);
List<OrderStack<?>> tmp = new LinkedList<>(); List<OrderStack<?>> tmp = new LinkedList<>();
for (int i = 0; i < rawInputs.size(); i ++) { for (int i = 0; i < rawInputs.size(); i ++) {
if (rawInputs.get(i) == null) continue; if (rawInputs.get(i) == null) continue;
@@ -84,28 +84,34 @@ public class CPacketFluidPatternTermBtns implements IMessage {
cpt.getPatternTerminal().setCombineMode(Value.equals("1")); cpt.getPatternTerminal().setCombineMode(Value.equals("1"));
break; break;
} }
} else if( Name.startsWith( "PatternTerminal." ) && (c instanceof ContainerFluidPatternTerminalEx)) } else if( Name.startsWith( "PatternTerminalEx." ) && (c instanceof ContainerFluidPatternTerminalEx))
{ {
final ContainerFluidPatternTerminalEx cpt = (ContainerFluidPatternTerminalEx) c; final ContainerFluidPatternTerminalEx cpt = (ContainerFluidPatternTerminalEx) c;
switch (Name) { switch (Name) {
case "PatternTerminal.Encode": case "PatternTerminalEx.Encode":
if (Value.equals("2")) if (Value.equals("2"))
cpt.encodeAndMoveToInventory(); cpt.encodeAndMoveToInventory();
else else
cpt.encode(); cpt.encode();
break; break;
case "PatternTerminal.Clear": case "PatternTerminalEx.Clear":
cpt.clear(); cpt.clear();
break; break;
case "PatternTerminal.Substitute": case "PatternTerminalEx.Substitute":
cpt.getPatternTerminal().setSubstitution(Value.equals("1")); cpt.getPatternTerminal().setSubstitution(Value.equals("1"));
break; break;
case "PatternTerminal.Double": case "PatternTerminalEx.Invert":
cpt.getPatternTerminal().setInverted(Value.equals("1"));
break;
case "PatternTerminalEx.Double":
cpt.doubleStacks(Value.equals("1")); cpt.doubleStacks(Value.equals("1"));
break; break;
case "PatternTerminal.Combine": case "PatternTerminalEx.Combine":
cpt.getPatternTerminal().setCombineMode(Value.equals("1")); cpt.getPatternTerminal().setCombineMode(Value.equals("1"));
break; break;
case "PatternTerminalEx.ActivePage":
cpt.getPatternTerminal().setActivePage(Integer.parseInt(Value));
break;
} }
} else if(Name.equals( "Terminal.Cpu" ) && c instanceof ContainerFluidCraftConfirm) { } else if(Name.equals( "Terminal.Cpu" ) && c instanceof ContainerFluidCraftConfirm) {
final ContainerFluidCraftConfirm qk = (ContainerFluidCraftConfirm) c; final ContainerFluidCraftConfirm qk = (ContainerFluidCraftConfirm) c;
@@ -27,7 +27,7 @@ public class CPacketTransferRecipe implements IMessage {
private List<OrderStack<?>> inputs; private List<OrderStack<?>> inputs;
private List<OrderStack<?>> outputs; private List<OrderStack<?>> outputs;
private boolean isCraft; private boolean isCraft;
private final static int MAX_INDEX = 16; private final static int MAX_INDEX = 32;
public CPacketTransferRecipe(){ public CPacketTransferRecipe(){
} }
@@ -11,6 +11,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.Constants;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@@ -87,7 +88,9 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
if (condensed.length == 0) { if (condensed.length == 0) {
return false; return false;
} }
this.outputs = outputs; this.outputs = Arrays.stream(outputs)
.filter(Objects::nonNull)
.toArray(IAEItemStack[]::new);
this.outputsCond = condensed; this.outputsCond = condensed;
return true; return true;
} }
@@ -159,12 +162,11 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
public static NBTTagList writeStackArray(IAEItemStack[] stacks) { public static NBTTagList writeStackArray(IAEItemStack[] stacks) {
NBTTagList listTag = new NBTTagList(); NBTTagList listTag = new NBTTagList();
for (IAEItemStack stack : stacks) { for (IAEItemStack stack : stacks) {
if (stack != null) { // see note at top of class
// see note at top of class NBTTagCompound stackTag = new NBTTagCompound();
NBTTagCompound stackTag = new NBTTagCompound(); if (stack != null) stack.writeToNBT(stackTag);
stack.writeToNBT(stackTag);
listTag.appendTag(stackTag); listTag.appendTag(stackTag);
}
} }
return listTag; return listTag;
} }
@@ -22,6 +22,7 @@ public final class ModAndClassUtil {
public static boolean WCT = false; public static boolean WCT = false;
public static boolean IC2 = false; public static boolean IC2 = false;
public static boolean NEI = false; public static boolean NEI = false;
public static boolean GTPP = false;
public static boolean isDoubleButton; public static boolean isDoubleButton;
public static boolean isSaveText; public static boolean isSaveText;
@@ -118,6 +119,7 @@ public final class ModAndClassUtil {
IC2 = true; IC2 = true;
if (Loader.isModLoaded("NotEnoughItems")) if (Loader.isModLoaded("NotEnoughItems"))
NEI = true; NEI = true;
if (Loader.isModLoaded("miscutils"))
GTPP = true;
} }
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B