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