Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Razor

Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Razor's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. But i want to delete these recipes based on settings in the config file
  2. 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?
  3. Add forge or minecraft this feature in the next versions? I mean, in the json files
  4. Hey, has anyone an idea how to give the crafting result enchantments?
  5. Hey How can i test for a player with a specific user name?
  6. Okay, i found a easier way to deactivate recipes! Here is my code:
  7. 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:
  8. 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; }
  9. 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
  10. Yes, thats what i mean And how can i get a single item for the drop out of this list ? Sorry i´m new ^^
  11. but how i make this without write all the items in
  12. 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; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.