Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Your one about saving information for each player? You already have an answer.
  2. What? Why? Yes, but that still doesn't let you have different blocks in different tabs. No.
  3. Should just be creating a dummy one that's essentially impossible to obtain. I swear I have it around somewhere... Ah ha there it is. Couldn't find it last night. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/resources/data/minecraft/advancements/recipes/misc/bone_meal.json
  4. No. I mean "don't use a list." public static void createBlockItems(final RegistryEvent.Register<Item> event) { final IForgeRegistry<Item> registry = event.getRegistry(); registry.register(new BlockItem(ModBlock.BlockA, new Item.Properties().group(ItemGroup.GROUP)).setRegistryName(ModBlock.BlockA.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockB, new Item.Properties().group(ItemGroup.BLOCKS)).setRegistryName(ModBlock.BlockB.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockC, new Item.Properties().group(ItemGroup.REDSTONE)).setRegistryName(ModBlock.BlockC.getRegistryName())); registry.register(new BlockItem(ModBlock.BlockD, new Item.Properties().group(ItemGroup.DECORATION)).setRegistryName(ModBlock.BlockD.getRegistryName())); } Also this line: IForgeRegistry blockRegistry = GameRegistry.findRegistry(Block.class).getRegistrySuperType(); Is useless, you never actually do anything with the blockRegistry. Objects.requireNonNull(block.getRegistryName()) RequireNonNull here is also useless. If it was null, the game would have already crashed. 12 blockItem.setRegistryName(Objects.requireNonNull(block.getRegistryName())); 13 registry.register(blockItem); setRegistryName returns the object, removing the need for a local variable.
  5. Don't use a giant massive list?
  6. No. Use packets. Why does your client need to know this information?
  7. A tag with nothing in it generates an empty list. An empty list is special in that it contains zero items and is not null.
  8. You could include a JSON tag file with no items in it. The whole point is that "an empty list" is still a valid list.
  9. That's exactly what you need to do. Just remember to give a blank dummy for the original advancement.
  10. IIRC this event is only fired on the server. And regardless, "will it work on the server?" is always true for things dealing with "game state" (and things dying is definitely game state information). Pretty much the answer is: "Does it involve visuals (textures, models), keyboard input, or sound files? No? Then it works on the server." Another way to tell is "is the 'client' in the package name?"
  11. One of them should name-match (I recommend the one that has the desired output, name the other one something like "{original}_override" or "{original}_dummy"). If for nothing else than so people know what it's for.
  12. There's a way to check on the Java side if a tag exists.
  13. Textures is all about the json model file. Also, rather than extending Block you could extend one of the directional block classes (HorizontalBlock, etc) that already supplies most of that code already.
  14. What do you mean, "format"? Its a list. It's ordered by its very nature and accepts objects of a single type.
  15. Do not use only-in. Get the player from the context.
  16. Then your modifier is broken, as even an empty loot drop list will still invoke all modifiers.
  17. You aren't supposed to modify the original loot table json when using Loot Modifiers.
  18. ItemStack#count()?
  19. The fuck is wrong with: public void fill(NonNullList<ItemStack> items) { items.add( InitItems.PISTOL_COLT_1911.get(), InitItems.BULLET_CAL_45.get(), InitItems.PISTOL_CAL_45_PROTOTYPE_BASIC.get(), InitItems.BARREL_CAL_45_LIGHT.get(), InitItems.BARREL_CAL_45_MEDIUM.get(), InitItems.BARREL_CAL_45_HEAVY.get(), InitItems.MAG_CAL_45_SMALL.get(), InitItems.MAG_CAL_45_BIG.get(), InitItems.MAG_CAL_45_DRUM.get(), InitItems.MAG_CAL_45_BOX.get(), InitItems.GUN_BODY_LIGHT.get(), InitItems.GUN_BODY_MEDIUM.get(), InitItems.GUN_BODY_HEAVY.get(), InitItems.PIPE_CAL_45.get(), InitItems.GUN_GRIP.get(), InitItems.GUN_BUTT.get(), InitItems.ARMORED_GLASS_ITEM_BLOCK.get() ); }
  20. GlobalLootModifiers. https://mcforge.readthedocs.io/en/1.15.x/items/globallootmodifiers/
  21. Use a server event. Do not trust the client. The client is a lying cheating bastard.
  22. The packet class must exist on both sides. On the sender, its used to construct the binary data, on the receiver its used to read the binary data. This is why a Context object is passed to the packet handler.
  23. Show your code, but this is probably a case of Reaching Across Sides. Yep, here: https://github.com/kyazuki/DietMod/blob/1.16.1-forge/src/main/java/com/github/kyazuki/dietmod/network/CapabilityPacket.java#L29 Your packet exists on both sides. The context contains a reference to the relevant player.
  24. Capabilities.
×
×
  • Create New...

Important Information

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