Skip to content

Commit

Permalink
Fixed bugs and tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Dec 24, 2023
1 parent 513851d commit c8ab06d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SlimefunHook extends Hook {
private Slimefun sfPlugin;

public SlimefunHook() {
super("SlimeFun", Material.SLIME_BLOCK);
super("Slimefun", Material.SLIME_BLOCK);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ private void copyChunkDataToChunk(Chunk chunk, ChunkGenerator.ChunkData chunkDat
if (x % 4 == 0 && y % 4 == 0 && z % 4 == 0) {
chunk.getBlock(x, y, z).setBiome(biomeGrid.getBiome(x, y, z));
}
// Delete any slimefun blocks
Location loc = new Location(chunk.getWorld(), baseX + x, y, baseZ + z);
plugin.getHooks().getHook("Slimefun")
.ifPresent(sf -> ((SlimefunHook) sf).clearBlockInfo(loc, true));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ private void copyChunkDataToChunk(Chunk chunk, ChunkGenerator.ChunkData chunkDat
}
// Delete any slimefun blocks
Location loc = new Location(chunk.getWorld(), baseX + x, y, baseZ + z);
BentoBox.getInstance().logDebug(loc + " " + plugin.getHooks().getHook("Slimefun").isPresent());
plugin.getHooks().getHook("Slimefun")
.ifPresent(sf -> ((SlimefunHook) sf).clearBlockInfo(loc, true));
}
Expand Down

0 comments on commit c8ab06d

Please sign in to comment.