Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
public abstract static class BlockStateBase extends StateHolder<Block, BlockState> {
private final int lightEmission;
private final boolean useShapeForLightOcclusion;
@@ -523,12 +_,14 @@
@@ -523,14 +_,18 @@
return this.useShapeForLightOcclusion;
}

Expand All @@ -95,7 +95,11 @@
+ return this.getBlock().isAir((BlockState)this);
}

+ /** @deprecated Neo: Use {@link net.neoforged.neoforge.common.extensions.IBlockStateExtension#ignitedByLava(BlockGetter, BlockPos, Direction)} instead */
+ @Deprecated
public boolean ignitedByLava() {
return this.ignitedByLava;
}
@@ -541,9 +_,11 @@
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
+ return false;
+ }
+ BlockState state = level.getBlockState(pos);
+ return state.ignitedByLava() && state.isFlammable(level, pos, face);
+ return state.ignitedByLava(level, pos, face);
+ }
+
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,19 @@ default int getLightEmission(BlockState state, BlockGetter level, BlockPos pos)
return state.getLightEmission();
}

/**
* Called when lava is updating, checks if a block face can catch fire from lava.
*
* @param state The current state
* @param level The current level
* @param pos Block position in level
* @param direction The direction that the fire is coming from
* @return True if the face can catch fire from lava, false otherwise.
*/
default boolean ignitedByLava(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return state.ignitedByLava();
}

/**
* Checks if a player or entity can use this block to 'climb' like a ladder.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ default int getLightEmission(BlockGetter level, BlockPos pos) {
return self().getBlock().getLightEmission(self(), level, pos);
}

/**
* Called when lava is updating, checks if a block face can catch fire from lava.
*
* @param level The current level
* @param pos Block position in level
* @param face The face that the fire is coming from
* @return True if the face can catch fire from lava, false otherwise.
*/
default boolean ignitedByLava(BlockGetter level, BlockPos pos, Direction face) {
return self().getBlock().ignitedByLava(self(), level, pos, face);
}

/**
* Checks if a player or entity can use this block to 'climb' like a ladder.
*
Expand Down
Loading