This commit is contained in:
RePixelatedMC 2024-11-13 16:58:36 +01:00
parent a0d91dbc74
commit 578070dffe
4 changed files with 15 additions and 2 deletions

View File

@ -33,6 +33,7 @@ import com.volmit.iris.util.nbt.mca.palette.MCAPaletteAccess;
import com.volmit.iris.util.nbt.tag.CompoundTag;
import org.bukkit.*;
import org.bukkit.block.Biome;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Dolphin;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;

View File

@ -48,7 +48,7 @@ public class IrisMerger {
private boolean useMemoryWorld = false;
@Desc("Allows to gen chunks on the mergers world")
private boolean allowGenChunks = false;
private boolean allowGenChunks = true;
@Desc("Uses a world instead of a generator")
private String world;

View File

@ -572,12 +572,18 @@ public class NMSBinding implements INMSBinding {
return null;
}
@Override
public Entity spawnEntity(Location location, org.bukkit.entity.EntityType type, CreatureSpawnEvent.SpawnReason reason) {
return ((CraftWorld) location.getWorld()).spawn(location, type.getEntityClass(), null, reason);
}
@Override
public boolean setBlock(World world, int x, int y, int z, BlockData data, int flag, int updateDepth) {
var level = ((CraftWorld) world).getHandle();
var blockData = ((CraftBlockData) data).getState();
return level.setBlock(new BlockPos(x, y, z), blockData, flag, updateDepth);
}
@Override
public Color getBiomeColor(Location location, BiomeColor type) {
LevelReader reader = ((CraftWorld) location.getWorld()).getHandle();

View File

@ -575,6 +575,12 @@ public class NMSBinding implements INMSBinding {
return null;
}
@Override
public boolean setBlock(World world, int x, int y, int z, BlockData data, int flag, int updateDepth) {
var level = ((CraftWorld) world).getHandle();
var blockData = ((CraftBlockData) data).getState();
return level.setBlock(new BlockPos(x, y, z), blockData, flag, updateDepth);
}
@Override
public Entity spawnEntity(Location location, org.bukkit.entity.EntityType type, CreatureSpawnEvent.SpawnReason reason) {