mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
24 lines
1.4 KiB
Diff
24 lines
1.4 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/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index 1848ed1dff8327db5c9a01e8e2019997e927692c..79f5a45cb0f4e2ffdbe82614afa6ad017fd1b09e 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -1128,7 +1128,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
}
|
|
|
|
if ((i & 1) != 0) {
|
|
- this.blockUpdated(blockposition, iblockdata1.getBlock());
|
|
+ // Leaves start - Placing locked hopper doesn't send NC updates.
|
|
+ if (!(iblockdata.getBlock() instanceof net.minecraft.world.level.block.HopperBlock) || iblockdata.getValue(net.minecraft.world.level.block.HopperBlock.ENABLED)) {
|
|
+ this.blockUpdated(blockposition, iblockdata1.getBlock());
|
|
+ }
|
|
+ // Leaves end - Placing locked hopper doesn't send NC updates.
|
|
if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
|
|
this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock());
|
|
}
|