mirror of
https://github.com/BX-Team/DivineMC.git
synced 2026-01-04 15:31:43 +00:00
25 lines
1.5 KiB
Diff
25 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sat, 12 Apr 2025 17:40:53 +0300
|
|
Subject: [PATCH] SparklyPaper: Allow throttling hopper checks if the target
|
|
container is full
|
|
|
|
Original project: https://github.com/SparklyPower/SparklyPaper
|
|
|
|
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
index 5cd1326ad5d046c88b2b3449d610a78fa880b4cd..6ad3388ac45a4d2ef85fc0fafece7de6e387f738 100644
|
|
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
@@ -419,6 +419,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
|
} else {
|
|
Direction opposite = blockEntity.facing.getOpposite();
|
|
if (isFullContainer(attachedContainer, opposite)) {
|
|
+ // DivineMC start - SparklyPaper: Allow throttling hopper checks if the target container is full
|
|
+ if (org.bxteam.divinemc.DivineConfig.hopperThrottleWhenFull && org.bxteam.divinemc.DivineConfig.hopperThrottleSkipTicks > 0) {
|
|
+ blockEntity.setCooldown(org.bxteam.divinemc.DivineConfig.hopperThrottleSkipTicks);
|
|
+ }
|
|
+ // DivineMC end - SparklyPaper: Allow throttling hopper checks if the target container is full
|
|
return false;
|
|
} else {
|
|
// Paper start - Perf: Optimize Hoppers
|