-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0dba9b
commit 7279e57
Showing
14 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <[email protected]> | ||
Date: Tue, 12 Dec 2023 14:15:54 +0800 | ||
Subject: [PATCH] Crafter 1 gt delay | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java | ||
index 5afac5007bbd2010bb955eea6331875b52441b80..39072e41f640b6284813bac71fc9154982f31ee9 100644 | ||
--- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java | ||
+++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java | ||
@@ -75,7 +75,7 @@ public class CrafterBlock extends BaseEntityBlock { | ||
boolean bl2 = state.getValue(TRIGGERED); | ||
BlockEntity blockEntity = world.getBlockEntity(pos); | ||
if (bl && !bl2) { | ||
- world.scheduleTick(pos, this, 4); | ||
+ world.scheduleTick(pos, this, !top.leavesmc.leaves.LeavesConfig.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay | ||
world.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(true)), 2); | ||
this.setBlockEntityTriggered(blockEntity, true); | ||
} else if (!bl && bl2) { | ||
@@ -146,7 +146,7 @@ public class CrafterBlock extends BaseEntityBlock { | ||
} | ||
|
||
if (state.getValue(TRIGGERED)) { | ||
- world.scheduleTick(pos, this, 4); | ||
+ world.scheduleTick(pos, this, !top.leavesmc.leaves.LeavesConfig.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay | ||
} | ||
|
||
} | ||
@@ -174,13 +174,13 @@ public class CrafterBlock extends BaseEntityBlock { | ||
protected void dispenseFrom(BlockState state, ServerLevel world, BlockPos pos) { | ||
BlockEntity optional = world.getBlockEntity(pos); | ||
if (optional instanceof CrafterBlockEntity crafterBlockEntity) { | ||
- Optional<CraftingRecipe> optional = getPotentialResults(world, crafterBlockEntity); | ||
- if (optional.isEmpty()) { | ||
+ Optional<CraftingRecipe> optional1 = getPotentialResults(world, crafterBlockEntity); | ||
+ if (optional1.isEmpty()) { | ||
world.levelEvent(1050, pos, 0); | ||
} else { | ||
crafterBlockEntity.setCraftingTicksRemaining(6); | ||
world.setBlock(pos, state.setValue(CRAFTING, Boolean.valueOf(true)), 2); | ||
- CraftingRecipe craftingRecipe = optional.get(); | ||
+ CraftingRecipe craftingRecipe = optional1.get(); | ||
ItemStack itemStack = craftingRecipe.assemble(crafterBlockEntity, world.registryAccess()); | ||
itemStack.onCraftedBySystem(world); | ||
this.dispenseItem(world, pos, crafterBlockEntity, itemStack, state); |