Skip to content

Commit 9e1e286

Browse files
authored
Merge pull request #11 from iLexiconn/command-improvement
Let /clearchunk use the spawn list of the generator
2 parents 10bd49a + 47ca363 commit 9e1e286

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ if (secretFile.exists()) {
5555
}
5656

5757
minecraft {
58-
version = "1.10.2-12.18.1.2011"
58+
version = "1.10.2-12.18.2.2125"
5959
runDir = "run"
60-
mappings = "snapshot_20160820"
60+
mappings = "snapshot_20161111"
6161
makeObfSourceJar = false
6262
}
6363

src/main/java/mmd/orespawn/command/ClearChunkCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package mmd.orespawn.command;
22

3+
import mmd.orespawn.world.OreSpawnWorldGenerator;
34
import net.minecraft.block.Block;
45
import net.minecraft.command.CommandBase;
56
import net.minecraft.command.CommandException;
67
import net.minecraft.command.ICommandSender;
78
import net.minecraft.entity.player.EntityPlayer;
8-
import net.minecraft.init.Blocks;
99
import net.minecraft.server.MinecraftServer;
1010
import net.minecraft.util.math.BlockPos;
1111
import net.minecraft.util.math.ChunkPos;
@@ -38,7 +38,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
3838
BlockPos pos = new BlockPos(x, y, z);
3939
Block block = player.worldObj.getBlockState(pos).getBlock();
4040

41-
if (block == Blocks.STONE || block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND || block == Blocks.SANDSTONE || block == Blocks.BEDROCK) {
41+
if (OreSpawnWorldGenerator.SPAWN_BLOCKS.contains(block)) {
4242
player.worldObj.setBlockToAir(pos);
4343
}
4444
}

src/main/java/mmd/orespawn/world/OreSpawnWorldGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class OreSpawnWorldGenerator implements IWorldGenerator {
4747
private static final int MAX_CACHE_SIZE = 1024;
4848
private static final Map<Vec3i, Map<BlockPos, IBlockState>> OVERFLOW_CACHE = new HashMap<>(MAX_CACHE_SIZE);
4949
private static final Deque<Vec3i> CACHE_ORDER = new LinkedList<>();
50-
private static final HashSet<Block> SPAWN_BLOCKS = new HashSet<>();
50+
public static final HashSet<Block> SPAWN_BLOCKS = new HashSet<>();
5151
private static final Set<Integer> KNOWN_DIMENSIONS = new HashSet<>();
5252

5353
private static final Predicate<IBlockState> STONE_PREDICATE = input -> {

0 commit comments

Comments
 (0)