9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-30 20:39:21 +00:00
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

@@ -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) {