Skip to content

Commit

Permalink
Merge branch '1.19.4' into 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyploszaj committed Oct 19, 2023
2 parents 4719cb3 + d9b2d34 commit 052acfa
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
### Tweaks
* Tweaked how dev mode settings overlap visually in the index

### Fixes
* Fixed fabric disconnect issue in 1.20.2 #322
* Fixed JEMI tooltips #330
* Fixed slot highlight misalignment #328
* Fixed slot highlight for mod search
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.19.3
enabled_platforms=fabric,forge

archives_base_name=emi
mod_version=1.0.22
mod_version=1.0.23
maven_group=dev.emi

architectury_version=4.9.83
Expand Down
2 changes: 1 addition & 1 deletion xplat/src/main/java/dev/emi/emi/jemi/JemiRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {

@Override
public List<TooltipComponent> getTooltip(int mouseX, int mouseY) {
return category.getTooltipStrings(recipe, recipeLayoutDrawable.getRecipeSlotsView(), x, y)
return category.getTooltipStrings(recipe, recipeLayoutDrawable.getRecipeSlotsView(), mouseX, mouseY)
.stream()
.map(t -> TooltipComponent.of(t.asOrderedText()))
.toList();
Expand Down
5 changes: 3 additions & 2 deletions xplat/src/main/java/dev/emi/emi/screen/EmiScreenManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import dev.emi.emi.config.SidebarType;
import dev.emi.emi.input.EmiBind;
import dev.emi.emi.input.EmiInput;
import dev.emi.emi.mixin.accessor.HandledScreenAccessor;
import dev.emi.emi.network.CreateItemC2SPacket;
import dev.emi.emi.network.EmiNetwork;
import dev.emi.emi.platform.EmiClient;
Expand Down Expand Up @@ -804,9 +805,9 @@ private static void renderSlotOverlays(EmiDrawContext context, int mouseX, int m
}
}
}
if (screen instanceof HandledScreen<?> hs && screen instanceof EmiScreen emi) {
if (screen instanceof HandledScreen<?> hs && hs instanceof HandledScreenAccessor hsa) {
context.push();
context.matrices().translate(emi.emi$getLeft(), emi.emi$getTop(), 0);
context.matrices().translate(hsa.getX(), hsa.getY(), 0);
for (Slot slot : hs.getScreenHandler().slots) {
EmiStack stack = EmiStack.of(slot.getStack());
context.push();
Expand Down
10 changes: 9 additions & 1 deletion xplat/src/main/java/dev/emi/emi/search/ModQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@

import com.google.common.collect.Sets;

import dev.emi.emi.EmiUtil;
import dev.emi.emi.api.stack.EmiStack;

public class ModQuery extends Query {
private final Set<EmiStack> valid = Sets.newIdentityHashSet();
private final String name;

public ModQuery(String name) {
EmiSearch.mods.findAll(name.toLowerCase()).forEach(s -> valid.add(s.stack));
this.name = name.toLowerCase();
EmiSearch.mods.findAll(this.name).forEach(s -> valid.add(s.stack));
}

@Override
public boolean matches(EmiStack stack) {
return valid.contains(stack);
}

@Override
public boolean matchesUnbaked(EmiStack stack) {
return EmiUtil.getModName(stack.getId().getNamespace()).toLowerCase().contains(name);
}
}

0 comments on commit 052acfa

Please sign in to comment.