mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 17:09:29 +00:00
Fix terminal color on Windows (#176)
* Fix terminal color on Windows Windows doesn't have environment variables TERM and COLORTERM by default, but we assuming that it supports the `truecolor` for terminal. * Add back revert to original java console on Java 22
This commit is contained in:
32
patches/server/0099-Remove-stream-in-GateBehavior.patch
Normal file
32
patches/server/0099-Remove-stream-in-GateBehavior.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Taiyou06 <kaandindar21@gmail.com>
|
||||
Date: Tue, 9 Nov 2077 00:00:00 +0800
|
||||
Subject: [PATCH] Remove stream in GateBehavior
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
|
||||
index d4581127366736c54f74e4ef7479236b18fb487d..67aa59deebdf47e53d9f6949b26c9b313de45035 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
|
||||
@@ -73,9 +73,20 @@ public class GateBehavior<E extends LivingEntity> implements BehaviorControl<E>
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Remove streams from hot code
|
||||
- if (this.behaviors.stream().noneMatch(task -> task.getStatus() == Behavior.Status.RUNNING)) {
|
||||
+
|
||||
+ // Leaf start - Remove more streams in GateBehavior
|
||||
+ boolean hasRunningTask = false;
|
||||
+ for (final BehaviorControl<? super E> task : this.behaviors) {
|
||||
+ if (task.getStatus() == Behavior.Status.RUNNING) {
|
||||
+ hasRunningTask = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!hasRunningTask) {
|
||||
this.doStop(world, entity, time);
|
||||
}
|
||||
+ // Leaf end - Remove more streams in GateBehavior
|
||||
}
|
||||
|
||||
@Override
|
||||
Reference in New Issue
Block a user