mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 20:19:06 +00:00
add nms method to hotload Datapacks
This commit is contained in:
@@ -213,6 +213,10 @@ public class ServerConfigurator {
|
||||
}
|
||||
|
||||
if (bad) {
|
||||
for (File folder : getDatapacksFolder()) {
|
||||
if (INMS.get().loadDatapack(folder)) return;
|
||||
}
|
||||
|
||||
if (allowRestarting) {
|
||||
restart();
|
||||
} else if (INMS.get().supportsDataPacks()) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.object.IrisEntity;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.json.JSONObject;
|
||||
import com.volmit.iris.util.mantle.Mantle;
|
||||
import com.volmit.iris.util.math.Vector3d;
|
||||
import com.volmit.iris.util.nbt.mca.palette.MCABiomeContainer;
|
||||
@@ -40,6 +41,8 @@ import org.bukkit.event.entity.EntitySpawnEvent;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface INMSBinding {
|
||||
boolean hasTile(Location l);
|
||||
|
||||
@@ -112,4 +115,6 @@ public interface INMSBinding {
|
||||
Vector3d getBoundingbox(org.bukkit.entity.EntityType entity);
|
||||
|
||||
Entity spawnEntity(Location location, EntityType type, CreatureSpawnEvent.SpawnReason reason);
|
||||
|
||||
boolean loadDatapack(File datapackFolder);
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class NMSBinding1X implements INMSBinding {
|
||||
private static final boolean supportsCustomHeight = testCustomHeight();
|
||||
|
||||
@@ -97,6 +99,11 @@ public class NMSBinding1X implements INMSBinding {
|
||||
return location.getWorld().spawnEntity(location, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean loadDatapack(File datapackFolder) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeTile(CompoundTag s, Location newPosition) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user