Improve Y Padding
EnergonRelics/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-08-01 23:26:30 -04:00
parent 1e78023ee4
commit fdad30c27f
1 changed files with 4 additions and 0 deletions

View File

@ -67,10 +67,14 @@ class EnergyTeleporter {
float multiplier = (float) newPaddedHeight / (float) oldPaddedHeight;
y = y - bottomPadding;
y = (int) (y * multiplier);
int newMax = newHeight - topPadding;
y = y + bottomPadding;
y = MathHelper.clamp(y, bottomPadding, newMax);
return y;