Skip to content

Commit

Permalink
2.7.2 Update
Browse files Browse the repository at this point in the history
- Fixed a bug with torch placing, closes #49

- Uncapped mining level limits, closes #52

- Uncapped per block energy usage limit for all powered Exchangers

- Added a config for blocks blacklist

- Fixed optional dependency for Redstone Flux, the mod should run properly again without it

- Completely switched over to use stack.isEmpty() for valid itemstack comparisons

- Corrected config comments for Thermal Expansion-based Exchangers
  • Loading branch information
JackyyTV committed May 3, 2018
1 parent f02ed6c commit dc5019b
Show file tree
Hide file tree
Showing 15 changed files with 282 additions and 253 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Submit any bug reports / suggestions via [issue tracker](https://github.com/Jack

## Contact Me

- Twitter DM - [@JackyyTV](https://twitter.com/JackyyTV)
- Discord DM - Jacky#3044
- Twitch PM - [Jackyy](https://www.twitch.tv/jackyy)
- Reddit DM - [Jacky1356400](https://www.reddit.com/message/compose/?to=Jacky1356400)
- Twitter - [@JackyyTV](https://twitter.com/JackyyTV)
- Discord - Jacky#3044
- Twitch - [Jackyy](https://www.twitch.tv/jackyy)
- Reddit - [Jacky1356400](https://www.reddit.com/message/compose/?to=Jacky1356400)

---

Expand All @@ -39,7 +39,7 @@ If you would like to set up the workspace yourself to submit PRs of features add
- Decompiled source: `gradlew setupDecompWorkspace`
- Obfuscated source: `gradlew setupDevWorkspace`
- CI server: `gradlew setupCIWorkspace`

3. Either use `gradlew build` to build the jar file (Output is in `build/libs`), or setup the IDE if you are going to modify any codes. Both IntelliJ IDEA and Eclipse are included below since they're more popular IDEs.
- IntelliJ IDEA: Do `gradlew idea`, open the `.ipr` file and import the gradle file, then execute the `genIntellijRuns` task in the "Gradle" tab.
- Eclipse: Do `gradlew eclipse` and open the directory as project.
106 changes: 53 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

Expand All @@ -15,77 +15,77 @@ archivesBaseName = "Exchangers"

sourceCompatibility = targetCompatibility = "1.8"
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
sourceCompatibility = targetCompatibility = "1.8"
}

minecraft {
version = "${forge_version}"
runDir = "run"
mappings = "${mappings_version}"
version = "${forge_version}"
runDir = "run"
mappings = "${mappings_version}"

replace '@FINGERPRINT@', project.findProperty('signSHA1')
replaceIn "Exchangers.java"
replace '@FINGERPRINT@', project.findProperty('signSHA1')
replaceIn "Exchangers.java"
}

repositories {
maven {
name = "JEI Maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "Hwyla Maven"
url = "https://tehnut.info/maven"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name = "JEI Maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "Hwyla Maven"
url = "https://tehnut.info/maven"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
}

dependencies {
deobfCompile "mezz.jei:jei_1.12.2:+"
deobfCompile "mcp.mobius.waila:Hwyla:+"
deobfCompile "cofh:CoFHCore:1.12.2-4.+:universal"
deobfCompile "mezz.jei:jei_1.12.2:+"
deobfCompile "mcp.mobius.waila:Hwyla:+"
deobfCompile "cofh:CoFHCore:1.12.2-4.+:universal"
}

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
rename '(.+_at.cfg)', 'META-INF/$1'
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
rename '(.+_at.cfg)', 'META-INF/$1'
}

jar {
manifest {
attributes 'FMLAT': 'exchangers_at.cfg'
}
manifest {
attributes 'FMLAT': 'exchangers_at.cfg'
}
}

task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}

build.dependsOn signJar

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
from sourceSets.main.output
classifier = 'deobf'
}

artifacts {
archives deobfJar
archives deobfJar
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx4G
mc_version=1.12.2
forge_version=1.12.2-14.23.2.2624
mod_version=2.7.1
mappings_version=snapshot_20180304
forge_version=1.12.2-14.23.3.2678
mod_version=2.7.2
mappings_version=snapshot_20180503
180 changes: 90 additions & 90 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
2 changes: 1 addition & 1 deletion src/main/java/jackyy/exchangers/Exchangers.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Mod(modid = Exchangers.MODID, version = Exchangers.VERSION, name = Exchangers.MODNAME, dependencies = Exchangers.DEPENDS, certificateFingerprint = "@FINGERPRINT@", acceptedMinecraftVersions = Exchangers.MCVERSION, useMetadata = true)
public class Exchangers {

public static final String VERSION = "1.12.2-2.7.1";
public static final String VERSION = "1.12.2-2.7.2";
public static final String MCVERSION = "[1.12,1.13)";
public static final String MODID = "exchangers";
public static final String MODNAME = "Exchangers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void onGameOverlayRender(RenderGameOverlayEvent event) {
if (player == null
|| !mc.inGameHasFocus
|| !Minecraft.isGuiEnabled()
|| player.getHeldItemMainhand() == ItemStack.EMPTY
|| player.getHeldItemMainhand().isEmpty()
|| !(player.getHeldItemMainhand().getItem() instanceof ItemExchangerBase))
return;

Expand Down Expand Up @@ -135,7 +135,7 @@ public void renderWorldLastEvent(RenderWorldLastEvent event) {
int meta = block.getMetaFromState(state);
ItemStack stack = player.getHeldItemMainhand();
float partialTicks = event.getPartialTicks();
if (stack != ItemStack.EMPTY && stack.getItem() instanceof ItemExchangerBase && stack.getTagCompound() != null && mouseOver.sideHit != null) {
if (!stack.isEmpty() && stack.getItem() instanceof ItemExchangerBase && stack.getTagCompound() != null && mouseOver.sideHit != null) {
Set<BlockPos> coordinates = ExchangerHandler.findSuitableBlocks(stack, player.getEntityWorld(), mouseOver.sideHit, mouseOver.getBlockPos(), block, meta);
double offsetX = player.prevPosX + (player.posX - player.prevPosX) * (double) partialTicks;
double offsetY = player.prevPosY + (player.posY - player.prevPosY) * (double) partialTicks;
Expand Down
Loading

0 comments on commit dc5019b

Please sign in to comment.