0.1.5
EnergonRelics/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-08-19 20:59:16 -04:00
parent 9e0edf763a
commit 5dbfb589ee
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
**Beta 0.1.5**
* Fix Energy Teleporter Y Issues Again
**Beta 0.1.4** **Beta 0.1.4**
* Fix Bug Where Off Switches Require Power * Fix Bug Where Off Switches Require Power

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.9.0+build.204 fabric_loader_version = 0.9.0+build.204
# Mod Properties # Mod Properties
mod_version = 0.1.4 mod_version = 0.1.5
maven_group = com.thebrokenrail maven_group = com.thebrokenrail
# Dependencies # Dependencies

View File

@ -55,9 +55,9 @@ class EnergyTeleporter {
private static int convertY(int y, int oldHeight, int newHeight) { private static int convertY(int y, int oldHeight, int newHeight) {
int newY = (int) (((float) y / (float) oldHeight) * (float) newHeight); int newY = (int) (((float) y / (float) oldHeight) * (float) newHeight);
int bottomPadding = HardcodedConfig.ENERGY_PORTAL_Y_PADDING; int bottomY = HardcodedConfig.ENERGY_PORTAL_Y_PADDING;
int topPadding = bottomPadding + HardcodedConfig.ENERGY_PORTAL_Y_PADDING_EXTRA_TOP; int topY = newHeight - (bottomY + HardcodedConfig.ENERGY_PORTAL_Y_PADDING_EXTRA_TOP);
newY = Math.max(bottomPadding, Math.min(topPadding, newY)); newY = Math.max(bottomY, Math.min(topY, newY));
return newY; return newY;
} }