Skip to content

Commit

Permalink
final crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ANightDazingZoroark committed Mar 10, 2024
1 parent e5810b6 commit 86b6ddd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ public boolean getCanSpawnHere() {
List<String> blockSpawn = Arrays.asList(GeneralConfig.universalSpawnBlocks);
IBlockState belowState = this.world.getBlockState(this.getPosition().down());
for (String blockVal : blockSpawn) {
int colData = blockVal.indexOf(":", blockVal.indexOf(":"));
int colData = blockVal.indexOf(":", blockVal.indexOf(":") + 1);
int blockData = Integer.parseInt(blockVal.substring(colData + 1));
String blockName = blockVal.substring(0, colData);
return Block.getBlockFromName(blockName) == belowState.getBlock() && (blockData == - 1 || belowState.getBlock().getMetaFromState(belowState) == blockData) && this.world.getLight(this.getPosition()) > 8 && !this.world.getBlockState(this.getPosition()).getMaterial().isLiquid() && this.testOtherCreatures();
Expand Down

0 comments on commit 86b6ddd

Please sign in to comment.