mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
cleanup access transformers
This commit is contained in:
@@ -6,39 +6,13 @@ private-f net.minecraft.world.level.levelgen.NoiseChunk$FlatCache noiseFiller
|
|||||||
private-f net.minecraft.world.level.levelgen.NoiseChunk$NoiseInterpolator noiseFiller
|
private-f net.minecraft.world.level.levelgen.NoiseChunk$NoiseInterpolator noiseFiller
|
||||||
private-f net.minecraft.world.level.levelgen.RandomState router
|
private-f net.minecraft.world.level.levelgen.RandomState router
|
||||||
private-f net.minecraft.world.level.levelgen.RandomState sampler
|
private-f net.minecraft.world.level.levelgen.RandomState sampler
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.executor.RadiusAwarePrioritisedExecutor$Task
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.executor.RadiusAwarePrioritisedExecutor$Task chunkX
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.executor.RadiusAwarePrioritisedExecutor$Task chunkZ
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkProgressionTask chunkX
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkProgressionTask chunkZ
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkProgressionTask world
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.GenericDataLoadTask chunkX
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.GenericDataLoadTask chunkZ
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.GenericDataLoadTask world
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.GenericDataLoadTask$ProcessOffMainTask
|
|
||||||
public ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.GenericDataLoadTask$ProcessOnMainTask
|
|
||||||
public net.minecraft.util.Mth SIN
|
public net.minecraft.util.Mth SIN
|
||||||
public net.minecraft.world.entity.ai.Brain sensors
|
public net.minecraft.world.entity.ai.Brain sensors
|
||||||
public net.minecraft.world.entity.ai.memory.NearestVisibleLivingEntities lineOfSightTest
|
public net.minecraft.world.entity.ai.memory.NearestVisibleLivingEntities lineOfSightTest
|
||||||
public net.minecraft.world.entity.ai.memory.NearestVisibleLivingEntities nearbyEntities
|
public net.minecraft.world.entity.ai.memory.NearestVisibleLivingEntities nearbyEntities
|
||||||
public net.minecraft.world.entity.ai.sensing.Sensor scanRate
|
public net.minecraft.world.entity.ai.sensing.Sensor scanRate
|
||||||
public net.minecraft.world.entity.ai.sensing.Sensor timeToTick
|
public net.minecraft.world.entity.ai.sensing.Sensor timeToTick
|
||||||
public net.minecraft.world.level.ServerExplosion damageSource
|
public net.minecraft.world.level.chunk.PaletteResize
|
||||||
public net.minecraft.world.level.ServerExplosion source
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper rebind(Lnet/minecraft/world/level/block/entity/TickingBlockEntity;)V
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper ticker
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunkSection nonEmptyBlockCount
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunkSection tickingBlockCount
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunkSection tickingFluidCount
|
|
||||||
public net.minecraft.world.level.chunk.PalettedContainer palette
|
|
||||||
public net.minecraft.world.level.chunk.PalettedContainer strategy
|
|
||||||
public net.minecraft.world.level.chunk.PalettedContainer$Data palette
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFile getOversizedData(II)Lnet/minecraft/nbt/CompoundTag;
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFile isOversized(II)Z
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFile recalculateHeader()Z
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFile setOversized(IIZ)V
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFile write(Lnet/minecraft/world/level/ChunkPos;Ljava/nio/ByteBuffer;)V
|
|
||||||
public net.minecraft.world.level.entity.EntityTickList entities
|
public net.minecraft.world.level.entity.EntityTickList entities
|
||||||
public net.minecraft.world.level.levelgen.DensityFunctions$BlendAlpha
|
public net.minecraft.world.level.levelgen.DensityFunctions$BlendAlpha
|
||||||
public net.minecraft.world.level.levelgen.DensityFunctions$BlendDensity
|
public net.minecraft.world.level.levelgen.DensityFunctions$BlendDensity
|
||||||
@@ -62,26 +36,6 @@ public net.minecraft.world.level.levelgen.NoiseChunk$BlendOffset
|
|||||||
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity
|
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity
|
||||||
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity getSpaghettiRarity3D(D)D
|
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity getSpaghettiRarity3D(D)D
|
||||||
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity getSphaghettiRarity2D(D)D
|
public net.minecraft.world.level.levelgen.NoiseRouterData$QuantizedSpaghettiRarity getSphaghettiRarity2D(D)D
|
||||||
public net.minecraft.world.level.levelgen.Xoroshiro128PlusPlus seedHi
|
|
||||||
public net.minecraft.world.level.levelgen.Xoroshiro128PlusPlus seedLo
|
|
||||||
public net.minecraft.world.level.levelgen.XoroshiroRandomSource randomNumberGenerator
|
|
||||||
public net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool rawTemplates
|
public net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool rawTemplates
|
||||||
public net.minecraft.world.level.levelgen.structure.structures.WoodlandMansionPieces$SimpleGrid
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise mainNoise
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise maxLimitNoise
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise minLimitNoise
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise smearScaleMultiplier
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise xzFactor
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise xzMultiplier
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise xzScale
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise yFactor
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise yMultiplier
|
|
||||||
public net.minecraft.world.level.levelgen.synth.BlendedNoise yScale
|
|
||||||
public net.minecraft.world.level.levelgen.synth.ImprovedNoise p
|
|
||||||
public net.minecraft.world.level.levelgen.synth.PerlinNoise amplitudes
|
|
||||||
public net.minecraft.world.level.levelgen.synth.PerlinNoise lowestFreqInputFactor
|
|
||||||
public net.minecraft.world.level.levelgen.synth.PerlinNoise lowestFreqValueFactor
|
|
||||||
public net.minecraft.world.level.levelgen.synth.PerlinNoise noiseLevels
|
|
||||||
public net.minecraft.world.level.levelgen.synth.SimplexNoise p
|
|
||||||
public net.minecraft.world.level.pathfinder.SwimNodeEvaluator allowBreaching
|
public net.minecraft.world.level.pathfinder.SwimNodeEvaluator allowBreaching
|
||||||
public-f ca.spottedleaf.moonrise.paper.PaperHooks
|
public-f ca.spottedleaf.moonrise.paper.PaperHooks
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..6e264b311894f510112beb996190f5ff
|
|||||||
+ @Override public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out) { } // DivineMC - lithium: faster chunk serialization
|
+ @Override public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out) { } // DivineMC - lithium: faster chunk serialization
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
index baa006132b1fa3d73fd4a14f6bc747a3957d1a0c..be11a87ab1badca64219d74bc7a4f5d51b818a8c 100644
|
index a251ba67644cd02a0b00d7c8b0e2c64aa5e26291..9d892c1c3890e0aaf13fd5cd7b7d138afeaad260 100644
|
||||||
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
@@ -32,6 +32,23 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
@@ -32,6 +32,23 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||||
public final PalettedContainer.Strategy strategy;
|
private final PalettedContainer.Strategy strategy;
|
||||||
//private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); // Paper - unused
|
//private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); // Paper - unused
|
||||||
|
|
||||||
+ // DivineMC start - lithium: faster chunk serialization
|
+ // DivineMC start - lithium: faster chunk serialization
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ As part of: C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
diff --git a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||||
index 46e98a99442523614284150964ba528d0c91493f..55ae29a5e846bb2a6d6991ce071aefe6a8113ebb 100644
|
index fb11a2eea540d55e50eab59f9857ca5d99f556f8..c40f65c30b6422a27154295a2b3a63483496dcca 100644
|
||||||
--- a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
--- a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||||
+++ b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
+++ b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||||
@@ -11,6 +11,27 @@ public final class ImprovedNoise {
|
@@ -11,6 +11,27 @@ public final class ImprovedNoise {
|
||||||
@@ -180,12 +180,12 @@ index 46e98a99442523614284150964ba528d0c91493f..55ae29a5e846bb2a6d6991ce071aefe6
|
|||||||
|
|
||||||
private double sampleWithDerivative(int gridX, int gridY, int gridZ, double deltaX, double deltaY, double deltaZ, double[] noiseValues) {
|
private double sampleWithDerivative(int gridX, int gridY, int gridZ, double deltaX, double deltaY, double deltaZ, double[] noiseValues) {
|
||||||
diff --git a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
diff --git a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||||
index ffac5b7b1eb1364ab8442d7145a7b4ebde68ee10..667d464e61aea2aa7f7b7f1ed082daadc17f723b 100644
|
index da3c26fbad32d75d71f7e59c8c3341316a754756..23e12c26e6035b429c89b98a796a048557e8c9b2 100644
|
||||||
--- a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
--- a/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||||
+++ b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
+++ b/net/minecraft/world/level/levelgen/synth/PerlinNoise.java
|
||||||
@@ -26,6 +26,10 @@ public class PerlinNoise {
|
@@ -26,6 +26,10 @@ public class PerlinNoise {
|
||||||
public final double lowestFreqValueFactor;
|
private final double lowestFreqValueFactor;
|
||||||
public final double lowestFreqInputFactor;
|
private final double lowestFreqInputFactor;
|
||||||
private final double maxValue;
|
private final double maxValue;
|
||||||
+ // DivineMC start - C2ME: optimize noise generation
|
+ // DivineMC start - C2ME: optimize noise generation
|
||||||
+ private final int octaveSamplersCount;
|
+ private final int octaveSamplersCount;
|
||||||
|
|||||||
@@ -26,16 +26,17 @@ index 04875840085541ebfc7014868beec49bb7ab9976..bbfb1de1a03c4208406feb803a2f378d
|
|||||||
|
|
||||||
super.onSyncedDataUpdated(key);
|
super.onSyncedDataUpdated(key);
|
||||||
diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java
|
diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java
|
||||||
index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e985deecd05 100644
|
index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..56b8a46a9e9e99829c28a11d5068096603b03980 100644
|
||||||
--- a/net/minecraft/world/entity/ai/Brain.java
|
--- a/net/minecraft/world/entity/ai/Brain.java
|
||||||
+++ b/net/minecraft/world/entity/ai/Brain.java
|
+++ b/net/minecraft/world/entity/ai/Brain.java
|
||||||
@@ -45,16 +45,73 @@ public class Brain<E extends LivingEntity> {
|
@@ -45,16 +45,74 @@ public class Brain<E extends LivingEntity> {
|
||||||
static final Logger LOGGER = LogUtils.getLogger();
|
static final Logger LOGGER = LogUtils.getLogger();
|
||||||
private final Supplier<Codec<Brain<E>>> codec;
|
private final Supplier<Codec<Brain<E>>> codec;
|
||||||
private static final int SCHEDULE_UPDATE_DELAY = 20;
|
private static final int SCHEDULE_UPDATE_DELAY = 20;
|
||||||
- private final Map<MemoryModuleType<?>, Optional<? extends ExpirableValue<?>>> memories = Maps.newHashMap();
|
- private final Map<MemoryModuleType<?>, Optional<? extends ExpirableValue<?>>> memories = Maps.newHashMap();
|
||||||
- public final Map<SensorType<? extends Sensor<? super E>>, Sensor<? super E>> sensors = Maps.newLinkedHashMap();
|
- public final Map<SensorType<? extends Sensor<? super E>>, Sensor<? super E>> sensors = Maps.newLinkedHashMap();
|
||||||
- private final Map<Integer, Map<Activity, Set<BehaviorControl<? super E>>>> availableBehaviorsByPriority = Maps.newTreeMap();
|
- private final Map<Integer, Map<Activity, Set<BehaviorControl<? super E>>>> availableBehaviorsByPriority = Maps.newTreeMap();
|
||||||
|
+
|
||||||
+ private Map<MemoryModuleType<?>, Optional<? extends ExpirableValue<?>>> memories = Maps.newConcurrentMap(); // DivineMC - concurrent map
|
+ private Map<MemoryModuleType<?>, Optional<? extends ExpirableValue<?>>> memories = Maps.newConcurrentMap(); // DivineMC - concurrent map
|
||||||
+ public Map<SensorType<? extends Sensor<? super E>>, Sensor<? super E>> sensors = Maps.newLinkedHashMap(); // DivineMC - linked hash map
|
+ public Map<SensorType<? extends Sensor<? super E>>, Sensor<? super E>> sensors = Maps.newLinkedHashMap(); // DivineMC - linked hash map
|
||||||
+ private final Map<Integer, Map<Activity, Set<BehaviorControl<? super E>>>> availableBehaviorsByPriority = Maps.newTreeMap(); // DivineMC - tree map
|
+ private final Map<Integer, Map<Activity, Set<BehaviorControl<? super E>>>> availableBehaviorsByPriority = Maps.newTreeMap(); // DivineMC - tree map
|
||||||
@@ -107,7 +108,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
|
|
||||||
public static <E extends LivingEntity> Brain.Provider<E> provider(
|
public static <E extends LivingEntity> Brain.Provider<E> provider(
|
||||||
Collection<? extends MemoryModuleType<?>> memoryTypes, Collection<? extends SensorType<? extends Sensor<? super E>>> sensorTypes
|
Collection<? extends MemoryModuleType<?>> memoryTypes, Collection<? extends SensorType<? extends Sensor<? super E>>> sensorTypes
|
||||||
@@ -146,6 +203,12 @@ public class Brain<E extends LivingEntity> {
|
@@ -146,6 +204,12 @@ public class Brain<E extends LivingEntity> {
|
||||||
for (Brain.MemoryValue<?> memoryValue : memoryValues) {
|
for (Brain.MemoryValue<?> memoryValue : memoryValues) {
|
||||||
memoryValue.setMemoryInternal(this);
|
memoryValue.setMemoryInternal(this);
|
||||||
}
|
}
|
||||||
@@ -120,7 +121,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
}
|
}
|
||||||
|
|
||||||
public <T> DataResult<T> serializeStart(DynamicOps<T> ops) {
|
public <T> DataResult<T> serializeStart(DynamicOps<T> ops) {
|
||||||
@@ -165,6 +228,7 @@ public class Brain<E extends LivingEntity> {
|
@@ -165,6 +229,7 @@ public class Brain<E extends LivingEntity> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <U> void eraseMemory(MemoryModuleType<U> type) {
|
public <U> void eraseMemory(MemoryModuleType<U> type) {
|
||||||
@@ -128,7 +129,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
this.setMemory(type, Optional.empty());
|
this.setMemory(type, Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,16 +244,33 @@ public class Brain<E extends LivingEntity> {
|
@@ -180,16 +245,33 @@ public class Brain<E extends LivingEntity> {
|
||||||
this.setMemoryInternal(memoryType, memory.map(ExpirableValue::of));
|
this.setMemoryInternal(memoryType, memory.map(ExpirableValue::of));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +168,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
public <U> Optional<U> getMemory(MemoryModuleType<U> type) {
|
public <U> Optional<U> getMemory(MemoryModuleType<U> type) {
|
||||||
Optional<? extends ExpirableValue<?>> optional = this.memories.get(type);
|
Optional<? extends ExpirableValue<?>> optional = this.memories.get(type);
|
||||||
if (optional == null) {
|
if (optional == null) {
|
||||||
@@ -251,19 +332,7 @@ public class Brain<E extends LivingEntity> {
|
@@ -251,19 +333,7 @@ public class Brain<E extends LivingEntity> {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@VisibleForDebug
|
@VisibleForDebug
|
||||||
public List<BehaviorControl<? super E>> getRunningBehaviors() {
|
public List<BehaviorControl<? super E>> getRunningBehaviors() {
|
||||||
@@ -188,7 +189,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void useDefaultActivity() {
|
public void useDefaultActivity() {
|
||||||
@@ -294,6 +363,7 @@ public class Brain<E extends LivingEntity> {
|
@@ -294,6 +364,7 @@ public class Brain<E extends LivingEntity> {
|
||||||
this.activeActivities.clear();
|
this.activeActivities.clear();
|
||||||
this.activeActivities.addAll(this.coreActivities);
|
this.activeActivities.addAll(this.coreActivities);
|
||||||
this.activeActivities.add(activity);
|
this.activeActivities.add(activity);
|
||||||
@@ -196,7 +197,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,11 +453,13 @@ public class Brain<E extends LivingEntity> {
|
@@ -383,11 +454,13 @@ public class Brain<E extends LivingEntity> {
|
||||||
.computeIfAbsent(activity, activity1 -> Sets.newLinkedHashSet())
|
.computeIfAbsent(activity, activity1 -> Sets.newLinkedHashSet())
|
||||||
.add((BehaviorControl<? super E>)pair.getSecond());
|
.add((BehaviorControl<? super E>)pair.getSecond());
|
||||||
}
|
}
|
||||||
@@ -210,7 +211,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isActive(Activity activity) {
|
public boolean isActive(Activity activity) {
|
||||||
@@ -404,6 +476,7 @@ public class Brain<E extends LivingEntity> {
|
@@ -404,6 +477,7 @@ public class Brain<E extends LivingEntity> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +219,7 @@ index 99ced3cb7d3d4c7a80d890689d7585fa9acd17f6..78bd18006fc2b9b59f044de9767e4e98
|
|||||||
return brain;
|
return brain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,31 +511,38 @@ public class Brain<E extends LivingEntity> {
|
@@ -438,31 +512,38 @@ public class Brain<E extends LivingEntity> {
|
||||||
|
|
||||||
for (BehaviorControl<? super E> behaviorControl : this.getRunningBehaviors()) {
|
for (BehaviorControl<? super E> behaviorControl : this.getRunningBehaviors()) {
|
||||||
behaviorControl.doStop(level, owner, gameTime);
|
behaviorControl.doStop(level, owner, gameTime);
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ Original project: https://github.com/Winds-Studio/Leaf
|
|||||||
This should help for massive hopper chains or hopper matrix.
|
This should help for massive hopper chains or hopper matrix.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 6d9274f0da9507d0152611d6b7785e0524dedb2d..a2b21970841a0f7f2b4b469c7b8737440041ebaa 100644
|
index dbb4142ea38cdf484e74c81103cebb024ae8813d..32f17328b7980a9dc382c90af76cca04b74c639a 100644
|
||||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -982,13 +982,26 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -982,13 +982,26 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
|
|
||||||
public static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity {
|
static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity {
|
||||||
public TickingBlockEntity ticker;
|
private TickingBlockEntity ticker;
|
||||||
+ private @Nullable BlockEntity blockEntityReference = null; // DivineMC - Improve BlockEntity ticking isRemoved check
|
+ private @Nullable BlockEntity blockEntityReference = null; // DivineMC - Improve BlockEntity ticking isRemoved check
|
||||||
|
|
||||||
RebindableTickingBlockEntityWrapper(TickingBlockEntity ticker) {
|
RebindableTickingBlockEntityWrapper(TickingBlockEntity ticker) {
|
||||||
@@ -26,7 +26,7 @@ index 6d9274f0da9507d0152611d6b7785e0524dedb2d..a2b21970841a0f7f2b4b469c7b873744
|
|||||||
+ // DivineMC end - Improve BlockEntity ticking isRemoved check
|
+ // DivineMC end - Improve BlockEntity ticking isRemoved check
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rebind(TickingBlockEntity ticker) {
|
void rebind(TickingBlockEntity ticker) {
|
||||||
this.ticker = ticker;
|
this.ticker = ticker;
|
||||||
+ // DivineMC start - Improve BlockEntity ticking isRemoved check
|
+ // DivineMC start - Improve BlockEntity ticking isRemoved check
|
||||||
+ if (ticker instanceof BoundTickingBlockEntity<?> boundTicker) {
|
+ if (ticker instanceof BoundTickingBlockEntity<?> boundTicker) {
|
||||||
|
|||||||
@@ -626,3 +626,29 @@ index e4e2e42d0ca25df7fe9f2dd4275610e45fcb2c84..93bf7beab3b00973a19e51d48a9dfb26
|
|||||||
final Thread thread = Thread.currentThread();
|
final Thread thread = Thread.currentThread();
|
||||||
// Paper start - name threads according to running plugin
|
// Paper start - name threads according to running plugin
|
||||||
final String nameBefore = thread.getName();
|
final String nameBefore = thread.getName();
|
||||||
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
|
index dffff76bf6df39dd26892edc2b4988fafab282e7..26659624c5fcad5f4e05fd9174dab89118ab7be7 100644
|
||||||
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
|
@@ -112,6 +112,21 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
||||||
|
WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(MinecraftServer.getServer().serverThread.threadId(), Integer.MAX_VALUE), logger);
|
||||||
|
logger.log(Level.SEVERE, "------------------------------");
|
||||||
|
|
||||||
|
+ // DivineMC start - Dump Parallel World Ticking thread
|
||||||
|
+ logger.log(Level.SEVERE, "Parallel world ticking thread dump");
|
||||||
|
+ for (Thread thread : org.apache.commons.lang3.ThreadUtils.getAllThreads()) {
|
||||||
|
+ if (MinecraftServer.getServer().serverThread == thread || thread instanceof WatchdogThread) {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (thread instanceof ca.spottedleaf.moonrise.common.util.TickThread tickThread) {
|
||||||
|
+ if (tickThread instanceof ServerLevelTickThread tickThread1) {
|
||||||
|
+ WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(tickThread1.threadId(), Integer.MAX_VALUE), logger);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ logger.log(Level.SEVERE, "------------------------------");
|
||||||
|
+ // DivineMC end - Dump Parallel World Ticking thread
|
||||||
|
+
|
||||||
|
// Paper start - Only print full dump on long timeouts
|
||||||
|
if (isLongTimeout) {
|
||||||
|
logger.log(Level.SEVERE, "Entire Thread Dump:");
|
||||||
|
|||||||
Reference in New Issue
Block a user