mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-06 15:52:03 +00:00
优化tags更新
This commit is contained in:
@@ -143,7 +143,7 @@ public abstract class AbstractBlockManager extends AbstractModelGenerator implem
|
||||
@Override
|
||||
public void delayedLoad() {
|
||||
this.initSuggestions();
|
||||
this.resendTags();
|
||||
this.updateTags();
|
||||
this.processSounds();
|
||||
this.clearCache();
|
||||
}
|
||||
@@ -232,7 +232,7 @@ public abstract class AbstractBlockManager extends AbstractModelGenerator implem
|
||||
|
||||
public abstract BlockBehavior createBlockBehavior(CustomBlock customBlock, List<Map<String, Object>> behaviorConfig);
|
||||
|
||||
protected abstract void resendTags();
|
||||
protected abstract void updateTags();
|
||||
|
||||
protected abstract boolean isVanillaBlock(Key id);
|
||||
|
||||
|
||||
@@ -184,6 +184,8 @@ public abstract class CraftEngine implements Plugin {
|
||||
delayedLoadTasks.add(CompletableFuture.runAsync(() -> this.recipeManager.delayedLoad(), this.scheduler.async()));
|
||||
}
|
||||
CompletableFutures.allOf(delayedLoadTasks).join();
|
||||
// 重新发送tags,需要等待tags更新完成
|
||||
this.networkManager.delayedLoad();
|
||||
long time2 = System.currentTimeMillis();
|
||||
asyncTime = time2 - time1;
|
||||
} finally {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package net.momirealms.craftengine.core.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MarkedHashMap<K, V> extends HashMap<K, V> {
|
||||
}
|
||||
Reference in New Issue
Block a user