Skip to content

Commit

Permalink
Add an additional tool action to firestarter for non-campfire things (#…
Browse files Browse the repository at this point in the history
…4893)

Happy to support a more specific set, but people need to request it. This one is generic enough that mods can detect it as needed
  • Loading branch information
KnightMiner committed Dec 26, 2022
1 parent 4034740 commit f9d141f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
*/
@RequiredArgsConstructor
public class FirestarterModifier extends InteractionModifier.NoLevels implements EntityInteractionModifierHook, BlockInteractionModifierHook {
/** Generic action for the sake of people who want compat but do not want to request a specific action */
private static final ToolAction LIGHT_FIRE = ToolAction.get("light_fire");
/** Compat with mods adding custom campfires */
private static final ToolAction LIGHT_CAMPFIRE = ToolAction.get("light_campfire");

Expand All @@ -66,7 +68,7 @@ public boolean shouldDisplay(boolean advanced) {

@Override
public boolean canPerformAction(IToolStackView tool, int level, ToolAction toolAction) {
return toolAction == LIGHT_CAMPFIRE;
return toolAction == LIGHT_CAMPFIRE || toolAction == LIGHT_FIRE;
}

@Override
Expand Down

0 comments on commit f9d141f

Please sign in to comment.