Skip to content

Commit

Permalink
UDOC-0 - Fix item meta data transmutation bug with click drag distrib…
Browse files Browse the repository at this point in the history
…ute events
  • Loading branch information
telvarost committed Apr 6, 2024
1 parent 91de4fc commit 015bf58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=b1.7.3-build.2
loader_version=0.14.24-babric.1

# Mod Properties
mod_version=2.1.2
mod_version=2.1.3
maven_group=com.github.telvarost
archives_base_name=InventoryTweaks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ public abstract class ContainerBaseMixin extends ScreenBase {
@Shadow
protected abstract boolean isMouseOverSlot(Slot slot, int x, int Y);

@Shadow protected int containerWidth;

@Shadow protected int containerHeight;

@Unique
private Slot slot;
@Unique private Slot slot;

@Unique Slot lastRMBSlot = null;

Expand Down Expand Up @@ -373,7 +368,7 @@ private void inventoryTweaks_mouseReleasedOrSlotChanged(int mouseX, int mouseY,
if (null != clickedSlot.getItem()) {

/** - Let vanilla minecraft handle right click with an item onto a different item */
if (cursorStack.itemId != clickedSlot.getItem().itemId) {
if ( !cursorStack.isDamageAndIDIdentical(clickedSlot.getItem()) ) {
return false;
}

Expand Down Expand Up @@ -500,7 +495,7 @@ private void inventoryTweaks_mouseReleasedOrSlotChanged(int mouseX, int mouseY,
}

/** - Let vanilla minecraft handle left click with an item onto a different item */
if (cursorStack.itemId != clickedSlot.getItem().itemId) {
if ( !cursorStack.isDamageAndIDIdentical(clickedSlot.getItem()) ) {
return false;
}
}
Expand Down

0 comments on commit 015bf58

Please sign in to comment.