diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 12:00:38 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-15 12:01:11 +0000 |
commit | 65f30fd99d2a31d5980eafda3ac70028208f08af (patch) | |
tree | 4ff14fef200511049f0f96d2e0c8cb22a25b707a /src/main/java/org | |
parent | 233de0de2cc02150c57936b151981bd99ac2e8c6 (diff) | |
download | craftbukkit-65f30fd99d2a31d5980eafda3ac70028208f08af.tar craftbukkit-65f30fd99d2a31d5980eafda3ac70028208f08af.tar.gz craftbukkit-65f30fd99d2a31d5980eafda3ac70028208f08af.tar.lz craftbukkit-65f30fd99d2a31d5980eafda3ac70028208f08af.tar.xz craftbukkit-65f30fd99d2a31d5980eafda3ac70028208f08af.zip |
Dragons now throw events when creating portals
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java new file mode 100644 index 00000000..eb83172e --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -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; + } +} |