Skip to content

Commit

Permalink
Merge branch '1.21' into 1.21.3
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
Sollace committed Dec 19, 2024
2 parents 71cb513 + 9f6d77d commit 10806d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ org.gradle.daemon=false
hd_skins_version=6.14.1+1.21.3
minelp_version=4.13.0+1.21.3
fabwork_version=1.3.2+1.21

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public boolean hasCameraConsent() {
}

public boolean hasScalingConsent() {
return (client.player == null || Permissions.freeform(InteractionManager.getInstance().getPermissions()));
}

public boolean isScalingButtonsEnabled() {
return (client.player == null || Permissions.freeform(InteractionManager.getInstance().getPermissions())) && !BigPony.getInstance().getConfig().useDetectedPonyScaling.get();
}

Expand Down Expand Up @@ -109,7 +113,7 @@ private void rebuildContent() {

boolean allowCamera = hasCameraConsent();
boolean allowHitbox = hasHitboxConsent();
boolean allowScaling = hasScalingConsent();
boolean allowScaling = isScalingButtonsEnabled();

content.addButton(new Label(left, top)).getStyle().setText("minebp.options.body");
content.addButton(new Label(left, top + 100)).getStyle().setText("minebp.options.camera");
Expand Down Expand Up @@ -191,15 +195,15 @@ private void rebuildContent() {
});
} else {
PresetDetector.getInstance().revertFillyCam();
dimensions = new EntityScale(dimensions.body(), dimensions.camera(), true);
dimensions = hasScalingConsent() ? new EntityScale(dimensions.body(), dimensions.camera(), true) : EntityScale.DEFAULT;
updateDimensions();
}
tick();
return v;
})
.getStyle().setText("minebp.camera.auto");

if (!allowCamera || !allowHitbox) {
if (!allowCamera || !allowHitbox || !hasScalingConsent()) {
content.addButton(new Label(left, top += 20)).getStyle().setText(OPTION_DISABLED);
}

Expand All @@ -221,7 +225,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float partialTic
@Override
public void tick() {
boolean allowCamera = hasCameraConsent();
boolean allowScaling = hasScalingConsent();
boolean allowScaling = isScalingButtonsEnabled();

for (int i = 0; i < presets.length; i++) {
presets[i].updateEnabled(height.getValue(), distance.getValue(), xSize.getValue(), ySize.getValue(), zSize.getValue());
Expand Down

0 comments on commit 10806d4

Please sign in to comment.