File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
src/main/java/com/wanderersoftherift/wotr Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ protected void addTranslations() {
130130 addTheme ("processor" , "Processor" );
131131 addTheme ("swamp" , "Swamp" );
132132
133+ add (WanderersOfTheRift .translationId ("rift_generator_preset" , "default" ), "Default" );
134+ add (WanderersOfTheRift .translationId ("rift_generator_preset" , "dungeon" ), "Dungeon" );
135+
133136 WotrBlocks .BLOCK_FAMILY_HELPERS .forEach (helper -> {
134137 // addBlock(helper.getBlock(), getTranslationString(helper.getBlock().get()));
135138 helper .getVariants ().forEach ((variant , block ) -> addBlock (block , getTranslationString (block .get ())));
Original file line number Diff line number Diff line change 2121import net .minecraft .world .item .Item ;
2222import net .minecraft .world .item .ItemStack ;
2323import net .minecraft .world .item .Items ;
24+ import net .minecraft .world .item .crafting .Ingredient ;
2425import net .minecraft .world .level .block .Blocks ;
2526import net .neoforged .neoforge .registries .DeferredHolder ;
2627import org .jetbrains .annotations .NotNull ;
@@ -293,6 +294,21 @@ protected void buildRecipes() {
293294 .save (output , WanderersOfTheRift .id ("rift_objective_stealth" ));
294295 // </editor-fold>
295296
297+ // <editor-fold desc="WotR Key Forge Generator">
298+ // Add recipes for the mod's generators
299+ KeyForgeRecipe
300+ .create (WotrDataComponentType .RiftKeyData .GENERATOR_PRESET .get (),
301+ DeferredHolder .create (WotrRegistries .Keys .GENERATOR_PRESETS , WanderersOfTheRift .id ("default" )))
302+ .setPriority (-1 )
303+ .save (output , WanderersOfTheRift .id ("rift_generator_default" ));
304+ KeyForgeRecipe
305+ .create (WotrDataComponentType .RiftKeyData .GENERATOR_PRESET .get (),
306+ DeferredHolder .create (WotrRegistries .Keys .GENERATOR_PRESETS , WanderersOfTheRift .id ("dungeon" )))
307+ .setPriority (1 )
308+ .withItemReq (Ingredient .of (Items .COMPASS ))
309+ .save (output , WanderersOfTheRift .id ("rift_generator_dungeon" ));
310+
311+ // </editor-fold>
296312 }
297313
298314 // The runner to add to the data generator
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ public void appendHoverText(
9595 if (stack .has (WotrDataComponentType .RiftKeyData .GENERATOR_PRESET )) {
9696 var preset = stack .get (WotrDataComponentType .RiftKeyData .GENERATOR_PRESET );
9797 var presetString = preset .unwrapKey ()
98- .map (it -> Component .literal (it .location ().toString ( )).withStyle ())
98+ .map (it -> Component .translatable (it .location ().toLanguageKey ( "rift_generator_preset" )).withStyle ())
9999 .orElse (Component .literal ("Custom" )
100100 .withStyle (Style .EMPTY .withColor (ChatFormatting .GRAY ).withItalic (true )));
101101 components .add (Component
You can’t perform that action at this time.
0 commit comments