mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Brought WE up to date with the newest hMod revision.
This commit is contained in:
parent
67a43fe2a5
commit
4b8b77a6d5
@ -221,9 +221,16 @@ public static boolean isValidMobType(String type) {
|
||||
* @param mobType
|
||||
*/
|
||||
public static void setMobSpawnerType(Vector pt, String mobType) {
|
||||
Block block = etc.getServer().getBlockAt(
|
||||
ComplexBlock cblock = etc.getServer().getComplexBlock(
|
||||
pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
||||
block.setSpawnData(mobType);
|
||||
|
||||
if (!(cblock instanceof MobSpawner)) {
|
||||
return;
|
||||
}
|
||||
|
||||
MobSpawner mobSpawner = (MobSpawner)cblock;
|
||||
mobSpawner.setSpawn(mobType);
|
||||
mobSpawner.update();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user