Skip to content

Commit c093d30

Browse files
committed
remove space after item name when there is only 1 line
1 parent 1a9e766 commit c093d30

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/com/cleanroommc/modularui/screen/ModularContainer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ protected ItemStack transferItem(ModularSlot fromSlot, ItemStack fromStack) {
459459
// now insert into the first phantom slot we can find (will be non-empty)
460460
// unfortunately, when all phantom slots are used it will always overwrite the first one
461461
for (ModularSlot toSlot : getShiftClickSlots()) {
462-
ItemStack itemstack = toSlot.getStack();
463462
SlotGroup slotGroup = Objects.requireNonNull(toSlot.getSlotGroup());
464463
if (slotGroup != fromSlotGroup && toSlot.isPhantom() && toSlot.isEnabled() && toSlot.isItemValid(fromStack)) {
465464
// don't check for stackable, just overwrite

src/main/java/com/cleanroommc/modularui/screen/RichTooltip.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,12 @@ public RichTooltip setAutoUpdate(boolean update) {
327327

328328
public RichTooltip addFromItem(ItemStack item) {
329329
List<String> lines = MCHelper.getItemToolTip(item);
330-
add(lines.get(0)).spaceLine(2);
331-
for (int i = 1, n = lines.size(); i < n; i++) {
332-
add(lines.get(i)).newLine();
330+
add(lines.get(0));
331+
if (lines.size() > 1) {
332+
spaceLine();
333+
for (int i = 1, n = lines.size(); i < n; i++) {
334+
add(lines.get(i)).newLine();
335+
}
333336
}
334337
return this;
335338
}

0 commit comments

Comments
 (0)