mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: hayanesuru <hayanesuru@outlook.jp>
|
|
Date: Fri, 4 Jul 2025 03:06:55 +0900
|
|
Subject: [PATCH] optimize no action time
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java
|
|
index 04d5910d736dee2a88a2602f4a98495459277157..22fd0fe972a732aae409f0a0ab2aa5756a9b06ce 100644
|
|
--- a/net/minecraft/world/entity/monster/Monster.java
|
|
+++ b/net/minecraft/world/entity/monster/Monster.java
|
|
@@ -46,6 +46,12 @@ public abstract class Monster extends PathfinderMob implements Enemy {
|
|
}
|
|
|
|
protected void updateNoActionTime() {
|
|
+ // Leaf start - optimize no action time
|
|
+ if (org.dreeam.leaf.config.modules.opt.OptimizeNoActionTime.disableLightCheck) {
|
|
+ this.noActionTime++;
|
|
+ return;
|
|
+ }
|
|
+ // Leaf end - optimize no action time
|
|
float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue();
|
|
if (lightLevelDependentMagicValue > 0.5F) {
|
|
this.noActionTime += 2;
|