9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-21 07:49:35 +00:00
Files
LeavesMC/patches/server/0040-InstantBlockUpdater-Reintroduced.patch
2024-05-27 14:31:44 +08:00

35 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Tue, 29 Nov 2022 14:54:56 +0800
Subject: [PATCH] InstantBlockUpdater Reintroduced
This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition)
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index db64aef6cd6bc961c2b69853cb2f5a86a044d49d..099617d8aefc9b9f1bbcf2810af64b8152822291 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -73,6 +73,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.redstone.CollectingNeighborUpdater;
+import net.minecraft.world.level.redstone.InstantNeighborUpdater;
import net.minecraft.world.level.redstone.NeighborUpdater;
import net.minecraft.world.level.saveddata.maps.MapId;
import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
@@ -246,7 +247,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.thread = Thread.currentThread();
this.biomeManager = new BiomeManager(this, i);
this.isDebug = flag1;
- this.neighborUpdater = new CollectingNeighborUpdater(this, j);
+ // Leaves start - instantBlockUpdaterReintroduced
+ if (org.leavesmc.leaves.LeavesConfig.instantBlockUpdaterReintroduced) {
+ this.neighborUpdater = new InstantNeighborUpdater(this);
+ } else {
+ this.neighborUpdater = new CollectingNeighborUpdater(this, j);
+ }
+ // Leaves end - instantBlockUpdaterReintroduced
this.registryAccess = iregistrycustom;
this.damageSources = new DamageSources(iregistrycustom);
// CraftBukkit start