mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-22 16:39:30 +00:00
--------- Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com> Co-authored-by: Bluemangoo <chenfy2006@qq.com>
29 lines
1.6 KiB
Diff
29 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
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 4d315bd1df9f4647814500135195375166c578b3..69f7c2e4a41c73c99f3c9bf7a2923339d77e7f37 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
|
|
@@ -80,7 +80,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, !org.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) {
|
|
@@ -130,7 +130,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
|
@Override
|
|
public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
|
|
if (state.getValue(TRIGGERED)) {
|
|
- world.scheduleTick(pos, this, 4);
|
|
+ world.scheduleTick(pos, this, !org.leavesmc.leaves.LeavesConfig.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay
|
|
}
|
|
}
|
|
|