Skip to content

Commit

Permalink
Merge branch 'pre-rewrite/fabric/1.20.x' into fabric_1.20.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
#	src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java
  • Loading branch information
wendavid552 committed Jan 18, 2024
2 parents 1da50c0 + d7705dd commit d8a739b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.3-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_17
Expand Down
13 changes: 6 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Thu Jan 14 08:33:00 EET 2016
group = fi.dy.masa
mod_id = itemscroller
mod_name = Item Scroller
Expand All @@ -12,12 +11,12 @@ mod_file_name = itemscroller-fabric
mod_version = craftaddon-1.0.0

# Required malilib version
malilib_version = 0.16.0
malilib_version = 0.17.0

# Minecraft, Fabric and mappings versions
minecraft_version_out = 1.20.1
minecraft_version = 1.20.1
mappings_version = 1.20.1+build.2
minecraft_version_out = 1.20.2
minecraft_version = 1.20.2
mappings_version = 1.20.2+build.2

fabric_loader_version = 0.14.21
mod_menu_version = 7.0.1
fabric_loader_version = 0.14.22
mod_menu_version = 8.0.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void initTradeListWidget(CallbackInfo ci)
}

@Inject(method = "mouseScrolled", at = @At("RETURN"))
private void onMouseScrollPost(double mouseX, double mouseY, double amount, CallbackInfoReturnable<Boolean> cir)
private void onMouseScrollPost(double mouseX, double mouseY, double horizontalAmount, double verticalAmount, CallbackInfoReturnable<Boolean> cir)
{
if (Configs.Toggles.VILLAGER_TRADE_FEATURES.getBooleanValue() &&
Configs.Generic.VILLAGER_TRADE_LIST_REMEMBER_SCROLL.getBooleanValue() &&
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/fi/dy/masa/itemscroller/util/InventoryUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.recipe.RecipeManager;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.recipe.RecipeType;
import net.minecraft.recipe.StonecuttingRecipe;
import net.minecraft.screen.Generic3x3ContainerScreenHandler;
Expand Down Expand Up @@ -874,7 +875,7 @@ private static boolean tryMoveSingleItemToThisInventory(Slot slot,
/*
* for (Slot slotTmp : container.slots) { ItemStack stackTmp =
* slotTmp.getStack();
*
*
* if (slotTmp.id != slot.id && isStackEmpty(stackTmp) == false &&
* slotTmp.canTakeItems(gui.mc.player) && (getStackSize(stackTmp) == 1 ||
* slotTmp.canInsert(stackTmp))) { if (areStacksEqual(stackTmp, stackOrig)) {
Expand Down Expand Up @@ -1744,7 +1745,7 @@ && areStacksEqual(stackReference, slot.getStack())) {
* If preferPartial is true, then stacks with a stackSize less that
* getMaxStackSize() are at the beginning of the list (not ordered though) and
* full stacks are at the end, otherwise the reverse is true.
*
*
* @param container
* @param slotReference
* @param sameInventory if true, then the returned slots are from the
Expand Down Expand Up @@ -1941,7 +1942,7 @@ && isStackEmpty(stackNew) == false && getStackSize(stackNew) == (getStackSize(st
* areStacksEqual(slot.getStack(), slotTmp.getStack()))) {
* this.clickSlotsToMoveItemsFromSlot(slotTmp, gui, toOtherInventory); return; }
* }
*
*
* // Move the hovered-over slot's stack last if (toOtherInventory) {
* this.clickSlotsToMoveItemsFromSlot(slot, gui, toOtherInventory); } }
*/
Expand Down Expand Up @@ -2046,7 +2047,7 @@ private static boolean clickSlotsToMoveSingleItemByShiftClick(HandledScreen<? ex

/**
* Try move items from slotFrom to slotTo
*
*
* @return true if at least some items were moved
*/
private static boolean clickSlotsToMoveItems(HandledScreen<? extends ScreenHandler> gui,
Expand Down Expand Up @@ -2311,13 +2312,13 @@ public static MoveAction getActiveMoveAction() {
/*
* private static class SlotVerticalSorterSlots implements Comparator<Slot> {
* private final boolean topToBottom;
*
*
* public SlotVerticalSorterSlots(boolean topToBottom) { this.topToBottom =
* topToBottom; }
*
*
* @Override public int compare(Slot slot1, Slot slot2) { if (slot1.yPos ==
* slot2.yPos) { return (slot1.id < slot2.id) == this.topToBottom ? -1 : 1; }
*
*
* return (slot1.yPos < slot2.yPos) == this.topToBottom ? -1 : 1; } }
*/

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],

"depends": {
"minecraft": "1.20.x",
"malilib": "0.16.x"
"minecraft": ">=1.20.2",
"malilib": ">=0.17.0"
}
}

0 comments on commit d8a739b

Please sign in to comment.