Skip to content

Commit

Permalink
1.1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyploszaj committed Oct 7, 2024
1 parent 1ce21d1 commit d2c1e2b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
### Tweaks
* The "Default Stack" bind will now clear a default when used on a defaulted stack (to clear a tag resolution, for example)
* Added "Hidden" option for status effect display location #517

### Fixes
* #739
* More update for JEI compatibility #732 #734
* Properly implement JEI fixes in 1.20.1 #743
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.21.1
enabled_platforms=fabric,neoforge

archives_base_name=emi
mod_version=1.1.15
mod_version=1.1.16
maven_group=dev.emi

architectury_version=4.9.83
Expand Down
2 changes: 1 addition & 1 deletion xplat/src/main/java/dev/emi/emi/VanillaPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void register(EmiRegistry registry) {
});

registry.addGenericExclusionArea((screen, consumer) -> {
if (screen instanceof AbstractInventoryScreen<?> inv) {
if (EmiConfig.effectLocation != EffectLocation.HIDDEN && screen instanceof AbstractInventoryScreen<?> inv) {
MinecraftClient client = MinecraftClient.getInstance();
Collection<StatusEffectInstance> collection = client.player.getStatusEffects();
if (!collection.isEmpty()) {
Expand Down
1 change: 1 addition & 0 deletions xplat/src/main/java/dev/emi/emi/config/EffectLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public enum EffectLocation implements ConfigEnum {
RIGHT_COMPRESSED("right-compressed", true),
LEFT("left", false),
RIGHT("right", false),
HIDDEN("hidden", false),
;

public final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void drawStatusEffects(DrawContext draw, int mouseX, int mouseY, Callbac
@ModifyVariable(at = @At(value = "INVOKE", target = "java/util/Collection.size()I", ordinal = 0),
method = "drawStatusEffects", ordinal = 0)
private Collection<StatusEffectInstance> drawStatusEffects(Collection<StatusEffectInstance> original) {
if (EmiConfig.effectLocation == EffectLocation.TOP) {
if (EmiConfig.effectLocation == EffectLocation.TOP || EmiConfig.effectLocation == EffectLocation.HIDDEN) {
return List.of();
}
return original;
Expand Down Expand Up @@ -132,7 +132,7 @@ private boolean squishEffects(boolean original) {
method = "drawStatusEffects", ordinal = 2)
private int changeEffectSpace(int original) {
return switch (EmiConfig.effectLocation) {
case RIGHT, RIGHT_COMPRESSED -> original;
case RIGHT, RIGHT_COMPRESSED, HIDDEN -> original;
case TOP -> this.x;
case LEFT_COMPRESSED -> this.x - 2- 32;
case LEFT -> this.x - 2 - 120;
Expand Down
1 change: 1 addition & 0 deletions xplat/src/main/resources/assets/emi/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"emi.effect_location.right_compressed": "Right (Compressed)",
"emi.effect_location.left": "Left",
"emi.effect_location.right": "Right",
"emi.effect_location.hidden": "Hidden",
"emi.recipe_book_action.default": "Default",
"emi.recipe_book_action.toggle_craftables": "Toggle Craftables",
"emi.recipe_book_action.toggle_visibility": "Toggle Visibility",
Expand Down

0 comments on commit d2c1e2b

Please sign in to comment.