1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 01:57:55 +00:00

Several cleanup to turtle crafting upgrade

- Don't construct a fake player when crafting: vanilla now has its own
   automated crafting, so no longer requires the presence of a player.

 - Fix remainder stack not being set in some situations. Closes #2007.
This commit is contained in:
Jonathan Coates
2024-11-15 07:31:49 +00:00
parent f39e86bb10
commit 0c8e757314
6 changed files with 5 additions and 71 deletions

View File

@@ -55,9 +55,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.*;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.item.crafting.CraftingInput;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
@@ -197,15 +195,6 @@ public class PlatformHelperImpl implements PlatformHelper {
return stack.getRecipeRemainder();
}
@Override
public List<ItemStack> getRecipeRemainingItems(ServerPlayer player, Recipe<CraftingInput> recipe, CraftingInput container) {
return recipe.getRemainingItems(container);
}
@Override
public void onItemCrafted(ServerPlayer player, CraftingInput container, ItemStack stack) {
}
@Override
public boolean onNotifyNeighbour(Level level, BlockPos pos, BlockState block, Direction direction) {
return true;