mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Only remove blocks when golem is successfully spawned. Fixes BUKKIT-1094
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
eaf42d8b35
commit
a90a7edd76
1 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.craftbukkit.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.BlockState;
|
||||
|
@ -8,6 +9,10 @@ public class BlockStateListPopulator {
|
|||
private final World world;
|
||||
private final List<BlockState> list;
|
||||
|
||||
public BlockStateListPopulator(World world) {
|
||||
this(world, new ArrayList<BlockState>());
|
||||
}
|
||||
|
||||
public BlockStateListPopulator(World world, List<BlockState> list) {
|
||||
this.world = world;
|
||||
this.list = list;
|
||||
|
@ -19,6 +24,12 @@ public class BlockStateListPopulator {
|
|||
list.add(state);
|
||||
}
|
||||
|
||||
public void updateList() {
|
||||
for (BlockState state : list) {
|
||||
state.update(true);
|
||||
}
|
||||
}
|
||||
|
||||
public List<BlockState> getList() {
|
||||
return list;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue