mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 09:59:20 +00:00
修复常加载区块弹射物
This commit is contained in:
@@ -17,6 +17,7 @@ import net.momirealms.craftengine.core.item.Item;
|
||||
import net.momirealms.craftengine.core.plugin.scheduler.SchedulerTask;
|
||||
import net.momirealms.craftengine.core.util.VersionHelper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -29,6 +30,7 @@ import org.bukkit.event.world.EntitiesLoadEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -47,6 +49,14 @@ public class BukkitProjectileManager implements Listener, ProjectileManager {
|
||||
@Override
|
||||
public void delayedInit() {
|
||||
Bukkit.getPluginManager().registerEvents(this, this.plugin.bootstrap());
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
List<Entity> entities = world.getEntities();
|
||||
for (Entity entity : entities) {
|
||||
if (entity instanceof Projectile projectile) {
|
||||
handleProjectileLoad(projectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.nio.file.Path;
|
||||
public class ModConfig {
|
||||
private static final Path CONFIG_PATH = FabricLoader.getInstance().getConfigDir().resolve("craft-engine-fabric-mod/config.yml");
|
||||
public static boolean enableNetwork = false;
|
||||
public static boolean enableCancelBlockUpdate = false;
|
||||
public static boolean enableCancelBlockUpdate = true;
|
||||
|
||||
public static Screen getConfigScreen(Screen parent) {
|
||||
ConfigBuilder builder = ConfigBuilder.create()
|
||||
|
||||
Reference in New Issue
Block a user