mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Dragons now throw events when creating portals
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
fd9c7e7c07
commit
876c2db682
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user