Skip to content

Commit

Permalink
Use AbstractFireBlock for wet lava sponge
Browse files Browse the repository at this point in the history
  • Loading branch information
Electro593 committed Nov 22, 2023
1 parent 0fb060b commit ec5b12a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Ran
int zOffset = 2 - random.nextInt(5);

BlockPos targetPos = pos.add(xOffset, yOffset, zOffset);
if (world.getBlockState(targetPos).isAir() && world.getBlockState(targetPos.down()).isSolid()) {
world.setBlockState(targetPos, Blocks.FIRE.getDefaultState());
if (AbstractFireBlock.canPlaceAt(world, targetPos, Direction.UP)) {
world.setBlockState(targetPos, AbstractFireBlock.getState(world, targetPos));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public void inventoryTick(ItemStack stack, World world, Entity entity, int slot,
int zOffset = 3 - random.nextInt(7);

BlockPos targetPos = BlockPos.ofFloored(entity.getPos()).add(xOffset, yOffset, zOffset);
if (world.getBlockState(targetPos).isAir() && world.getBlockState(targetPos.down()).isSolid()) {
world.setBlockState(targetPos, Blocks.FIRE.getDefaultState());
if (AbstractFireBlock.canPlaceAt(world, targetPos, Direction.UP)) {
world.setBlockState(targetPos, AbstractFireBlock.getState(world, targetPos));
}
}
}
Expand Down

0 comments on commit ec5b12a

Please sign in to comment.