Dragons now throw events when creating portals

This commit is contained in:
Nathan Adams
2012-01-15 12:00:38 +00:00
parent 233de0de2c
commit 65f30fd99d
2 changed files with 61 additions and 13 deletions

View File

@@ -0,0 +1,29 @@
package org.bukkit.craftbukkit.util;
import java.util.List;
import org.bukkit.World;
import org.bukkit.block.BlockState;
public class BlockStateListPopulator {
private final World world;
private final List<BlockState> list;
public BlockStateListPopulator(World world, List<BlockState> list) {
this.world = world;
this.list = list;
}
public void setTypeId(int x, int y, int z, int type) {
BlockState state = world.getBlockAt(x, y, z).getState();
state.setTypeId(type);
list.add(state);
}
public List<BlockState> getList() {
return list;
}
public World getWorld() {
return world;
}
}