Using config option for saving to cache.

This commit is contained in:
2025-05-26 18:56:43 +01:00
parent 0f15554b6c
commit e4c444c6f8
2 changed files with 6 additions and 2 deletions

View File

@ -45,8 +45,10 @@ public class OnBlockBreakEventHandler {
); );
// Save operations to cache // Save operations to cache
if (Config.Server.optimizationUseCache.get()) {
OperationCache.addBlockBreakCacheEntry(block_id, operations); OperationCache.addBlockBreakCacheEntry(block_id, operations);
} }
}
// Add global operations before all others // Add global operations before all others
operations.addAll(0, Config.Server.blockBreakGlobalOperationItems); operations.addAll(0, Config.Server.blockBreakGlobalOperationItems);

View File

@ -45,8 +45,10 @@ public class OnLivingExperienceDropEventHandler {
); );
// Save operations to cache // Save operations to cache
if (Config.Server.optimizationUseCache.get()) {
OperationCache.addEntityKillCacheEntry(entity_id, operations); OperationCache.addEntityKillCacheEntry(entity_id, operations);
} }
}
// Add global operations before all others // Add global operations before all others
operations.addAll(0, Config.Server.entityKillGlobalOperationItems); operations.addAll(0, Config.Server.entityKillGlobalOperationItems);