mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-31 04:46:37 +00:00
fix(bukkit): 修复性能问题
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user