9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 12:56:28 +00:00

fix(bukkit): 修复性能问题

This commit is contained in:
jhqwqmc
2025-05-19 13:05:13 +08:00
parent 32e720d6b2
commit d827140547
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ public class SetMaxVisibleFurnitureCommand extends BukkitCommandFeature<CommandS
.senderType(Player.class)
.required("max", IntegerParser.integerParser(1))
.handler(context -> {
// 需要找一个更好的存储方案
// 需要找一个更好的存储方案去兼容跨服和在初始化的时候加载
BukkitServerPlayer cePlayer = plugin().adapt(context.sender());
Integer max = context.get("max");
cePlayer.setMaxVisibleFurniture(max, true);

View File

@@ -351,11 +351,11 @@ public class BukkitServerPlayer extends Player {
}
if (this.gameTicks % 30 == 0) {
this.updateGUI();
this.updateVisualFurnitureView();
}
if (this.isDestroyingBlock) {
this.tickBlockDestroy();
}
this.updateVisualFurnitureView();
if (Config.predictBreaking() && !this.isDestroyingCustomBlock) {
// if it's not destroying blocks, we do predict
if ((gameTicks() + entityID()) % Config.predictBreakingInterval() == 0) {