diff options
4 files changed, 19 insertions, 17 deletions
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/exclusionzones/DefaultPotionEffectExclusionZones.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/exclusionzones/DefaultPotionEffectExclusionZones.java index bdc495ec2..e07e521b3 100644 --- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/exclusionzones/DefaultPotionEffectExclusionZones.java +++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/exclusionzones/DefaultPotionEffectExclusionZones.java @@ -41,19 +41,21 @@ import java.util.List; public class DefaultPotionEffectExclusionZones implements ExclusionZonesProvider<EffectRenderingInventoryScreen<?>> { @Override public Collection<Rectangle> provide(EffectRenderingInventoryScreen<?> screen) { - if (!screen.doRenderEffects) + if (!screen.canSeeEffects()) return Collections.emptyList(); Collection<MobEffectInstance> activePotionEffects = Minecraft.getInstance().player.getActiveEffects(); - if (activePotionEffects.isEmpty()) + int x = screen.leftPos + screen.imageWidth + 2; + int availableWidth = screen.width - x; + if (activePotionEffects.isEmpty() || availableWidth < 32) return Collections.emptyList(); + boolean fullWidth = availableWidth >= 120; List<Rectangle> zones = new ArrayList<>(); - int x = screen.leftPos - 124; int y = screen.topPos; int height = 33; if (activePotionEffects.size() > 5) height = 132 / (activePotionEffects.size() - 1); for (MobEffectInstance instance : Ordering.natural().sortedCopy(activePotionEffects)) { - zones.add(new Rectangle(x, y, 166, height)); + zones.add(new Rectangle(x, y, fullWidth ? 120 : 32, 32)); y += height; } return zones; diff --git a/gradle.properties b/gradle.properties index 910fad3b3..660274dfc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,14 @@ org.gradle.jvmargs=-Xmx3G base_version=6.0 unstable=true -supported_version=1.17.1 -minecraft_version=1.17.1 -forgeEnabled=true +supported_version=21w41a +minecraft_version=21w41a +forgeEnabled=false forge_version=37.0.18 fabricloader_version=0.11.6 -cloth_config_version=5.0.37 -modmenu_version=2.0.2 -fabric_api=0.40.8+1.17 -architectury_version=2.5.32 +cloth_config_version=6.0.39 +modmenu_version=3.0.0 +fabric_api=0.40.9+1.18 +architectury_version=3.0.33 api_exculde= #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/basewidgets/ButtonWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/basewidgets/ButtonWidget.java index f2e60bb88..63f731a4b 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/basewidgets/ButtonWidget.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/basewidgets/ButtonWidget.java @@ -291,10 +291,10 @@ public class ButtonWidget extends Button { // 9 Patch Texture // Four Corners - blit(matrices, x, y, getBlitOffset(), 0, textureOffset * 80, 8, 8, 512, 256); - blit(matrices, x + width - 8, y, getBlitOffset(), 248, textureOffset * 80, 8, 8, 512, 256); - blit(matrices, x, y + height - 8, getBlitOffset(), 0, textureOffset * 80 + 72, 8, 8, 512, 256); - blit(matrices, x + width - 8, y + height - 8, getBlitOffset(), 248, textureOffset * 80 + 72, 8, 8, 512, 256); + blit(matrices, x, y, getBlitOffset(), 0, textureOffset * 80, 8, 8, 256, 512); + blit(matrices, x + width - 8, y, getBlitOffset(), 248, textureOffset * 80, 8, 8, 256, 512); + blit(matrices, x, y + height - 8, getBlitOffset(), 0, textureOffset * 80 + 72, 8, 8, 256, 512); + blit(matrices, x + width - 8, y + height - 8, getBlitOffset(), 248, textureOffset * 80 + 72, 8, 8, 256, 512); Matrix4f matrix = matrices.last().pose(); // Sides diff --git a/settings.gradle b/settings.gradle index 61561aa8d..d74265742 100755 --- a/settings.gradle +++ b/settings.gradle @@ -13,7 +13,7 @@ include "api" include "default-plugin" include "runtime" include "fabric" -include "forge" +//include "forge" -include "jei-compatibility-layer" +//include "jei-compatibility-layer" //include "jei-internals-workaround" |
