Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.33'
}


Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.server.S2FPacketSetSlot;

Expand Down Expand Up @@ -292,7 +293,6 @@ private void tryCraft(EntityPlayer player, FoodRecipe recipe, boolean isShiftDow
if (recipe.isSmeltingRecipe()) {
return;
}
craftBook.prepareRecipe(player, recipe);
if (!isShiftDown) {
if (craftBook.canMouseItemHold(player, recipe)) {
ItemStack craftingResult = craftBook.craft(player, recipe);
Expand All @@ -308,26 +308,22 @@ private void tryCraft(EntityPlayer player, FoodRecipe recipe, boolean isShiftDow
.sendPacket(new S2FPacketSetSlot(-1, 0, craftingResult));
}
}
player.inventory.markDirty();
player.inventoryContainer.detectAndSendChanges();
}
} else {
ItemStack craftingResult;
ItemStack craftingResult = craftBook.craft(player, recipe);
int crafted = 0;
while (crafted < 64 && (craftingResult = craftBook.craft(player, recipe)) != null) {
while (craftingResult != null && crafted < craftingResult.getMaxStackSize()) {
crafted += craftingResult.stackSize;
if (!player.inventory.addItemStackToInventory(craftingResult)) {
if (player.inventory.getItemStack() == null) {
player.inventory.setItemStack(craftingResult);
} else {
player.dropPlayerItemWithRandomChoice(craftingResult, false);
}
break;
player.dropPlayerItemWithRandomChoice(craftingResult, false);
}

craftingResult = craftBook.craft(player, recipe);
}
player.inventory.markDirty();
player.inventoryContainer.detectAndSendChanges();
}

player.inventory.markDirty();
player.inventoryContainer.detectAndSendChanges();
}

public void markSelectionDirty() {
Expand Down
Loading