mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Fortern <blueten.ki@gmail.com>
|
|
Date: Sat, 20 Jan 2024 02:50:56 +0800
|
|
Subject: [PATCH] Placing locked hopper no longer send NC updates
|
|
|
|
|
|
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
|
index 48eca978dc58c3c2045c5746aac5d7f5b732ff89..07ab2907bb9e4de5810889bec6d2b08f9abfec0c 100644
|
|
--- a/net/minecraft/world/level/Level.java
|
|
+++ b/net/minecraft/world/level/Level.java
|
|
@@ -1164,7 +1164,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
}
|
|
|
|
if ((flags & 1) != 0) {
|
|
- this.updateNeighborsAt(pos, blockState.getBlock());
|
|
+ // Leaves start - Placing locked hopper doesn't send NC updates.
|
|
+ if (!(blockState.getBlock() instanceof net.minecraft.world.level.block.HopperBlock) || blockState.getValue(net.minecraft.world.level.block.HopperBlock.ENABLED)) {
|
|
+ this.updateNeighborsAt(pos, blockState.getBlock());
|
|
+ }
|
|
+ // Leaves end - Placing locked hopper doesn't send NC updates.
|
|
if (!this.isClientSide() && state.hasAnalogOutputSignal()) {
|
|
this.updateNeighbourForOutputSignal(pos, newState.getBlock());
|
|
}
|