Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Razor

Members
  • Joined

  • Last visited

Everything posted by Razor

  1. i don't know whats the problem here.. just comment it out and test is with the other dependency
  2. https://github.com/XxRexRaptorxX/AllTheCompatibility/blob/main/src/main/resources/META-INF/mods.toml can this problem arise if the other mod's version does not match?
  3. Hey guys, I try to make a mod thats overrides recipes from other mods. My problem is how to change the loading order that my recipes are loaded last. I tried to change 'ordering' to "AFTER" or "BEFORE" in the dependencies of the mods.toml file but it doesn't seem to work.. Can anyone help me? [[dependencies.allthecompatibility]] modId="assemblylinemachines" mandatory=false versionRange="[1.18-1.3.5,)" ordering="BEFORE" side="BOTH"
  4. Thanks for your hint, but i don't quite understand this Serializer inner class
  5. Hey guys, i try to make recipes based of config options, but i can`t find the problem here, all recipes linked to an config options are always disabled and theres no error in the console, maybe a problem in the factories? ConditionsFactory public class ConditionFactory implements IConditionBuilder { //@Override public BooleanSupplier parse(JsonSerializationContext context, JsonObject json) { boolean value = JSONUtils.getBoolean(json , "value", true); String key = JSONUtils.getString(json, "type"); if (key.equals(Uncrafted.MODID + ":spawneggs_enabled")) { return () -> Config.ACTIVATE_SPAWNEGG_RECIPES.get().booleanValue() == value; } else if (key.equals(Uncrafted.MODID + ":spawner_enabled")) { return () -> Config.ACTIVATE_SPAWNER_RECIPES.get().booleanValue() == value; } else if (key.equals(Uncrafted.MODID + ":skulls_enabled")) { return () -> Config.ACTIVATE_SKULL_RECIPES.get().booleanValue() == value; } return null; } } _factories.json { "conditions": { "spawneggs_enabled": "xxrexraptorxx.util.ConditionFactory", "spawner_enabled": "xxrexraptorxx.util.ConditionFactory", "skulls_enabled": "xxrexraptorxx.util.ConditionFactory" } } example recipe: spawner.json { "conditions" : [ { "type" : "uncrafted:spawner_enabled", "value" : true } ], "type": "minecraft:crafting_shaped", "pattern": [ "XXX", "X#X", "XXX" ], "key": { "X": { "item": "minecraft:iron_bars" }, "#": { "item": "minecraft:nether_star" } }, "result": { "item": "minecraft:spawner" } } i hope anyone can help me
  6. But i want to delete these recipes based on settings in the config file
  7. How can i delete specific crafting recipes on game/server start? i tried different things with ForgeRegistry<IRecipe> and IForgeRegistryModifiable but i don`t get it to work.. Has anyone done that yet?
  8. Add forge or minecraft this feature in the next versions? I mean, in the json files
  9. Hey, has anyone an idea how to give the crafting result enchantments?
  10. Hey How can i test for a player with a specific user name?
  11. Okay, i found a easier way to deactivate recipes! Here is my code:
  12. Okay i tried is, but now is the recipe deactivated regardless of whether the config option is true or false, whats wrong? heres my condition class: the _factories.json: and a recipe json file:
  13. omg it works! thanks guys
  14. public class BlockBox extends Block { List<Item> myItems = ForgeRegistries.ITEMS.getValues().stream().filter(it -> it.getRegistryName().getResourceDomain().equals("ageofweapons")).collect(Collectors.toList()); public BlockWeaponBox() { super(Material.WOOD); this.setCreativeTab(ModTabs.generalTab); this.setHardness(0.5F); this.setResistance(1.0F); this.setSoundType(SoundType.WOOD); } @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { int index = rand.nextInt(myItems.size()); Item item = myItems.get(index); return item; }
  15. Yes, i tried this: int index = rand.nextInt(myItems.size()); Item item = myItems.get(index); return item; but the console says: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: bound must be positive
  16. Yes, thats what i mean And how can i get a single item for the drop out of this list ? Sorry i´m new ^^
  17. but how i make this without write all the items in
  18. Heyyy, i try to make a block that drops the most of all the items in my mod (~100), but whats the easiest way to do this? Thats my current way, but to much work for all my items.. Anyone an idea?: @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { switch(rand.nextInt(6)){ case 1: return Item1; case 2: return Item2; case 3: return Item3; case 4: return Item4; case 5: return Item5; default: return Item6; } }
  19. Hey, i update my mods to 1.12 and i use for some recipes a config option to disable these recipes. But how i do this with the new recipe json file system?
  20. fixed
  21. what do you mean with "capitolized"

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.