Jump to content

Choonster

Moderators
  • Posts

    5117
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Choonster

  1. For simple blocks, it can be a single method call that generates both the blockstates file and the block model. If you have a lot of similar blocks, you can use loops or helper methods to save having to write out the JSON by hand (or having to write your own JSON generation code). The fluent-style builder classes make it very simple to use. The IDE can auto-complete all the methods and fields for you, so you don't have to manually type out block, property and value names.
  2. Mojang added data generators (or stopped stripping them from the built JAR) in 1.14. Model generation was added in October last year by this PR. The code is still in the mod JAR after it's built, but it doesn't run at all during normal gameplay; there's a separate main class (net.minecraft.data.Main) that runs data generators.
  3. BlockStateProvider is the correct way to generate blockstate and model files. There's an example in Forge's GitHub repository here, and in my mod here.
  4. This looks like an issue with Forge's dev-time login implementation, I've reported it on GitHub.
  5. The mappings are provided by MCP and many are contributed by the community. You can contribute using MCPBot and its issue tracker. Mojang did start providing mappings, but there are potential legal issues preventing Forge from using them. I believe CPW tweeted about this a while back and the Forge twitter account retweeted it.
  6. I haven't tested it, but I assume you can just remove REGISTRYDUMP from the forge.logging.markers property of the run configuration in build.gradle and regenerate your IDE run configurations.
  7. src/generated/resources and any generated models, loot tables, recipes, etc. (see GatherDataEvent, DataGenerator and the implementations of IDataProvider) inside of that directory should be included in your repository, but the .cache directory should be ignored. If you look at Forge's repository, you'll see that it ignores the .cache directory while including everything else in src/generated/resources.
  8. I can't see anything obviously wrong with your data generators, have you tried stepping through the code in the debugger? I have some working data generators here.
  9. That code creates the recipe in the minecraft namespace, you should use your mod ID as the namespace of the ResourceLocation (i.e. call the two-argument overload of the ResourceLocation constructor).
  10. Use the build overload that takes a ResourceLocation argument to change the name of the generated recipe.
  11. tterrag did create a PR for that here, but it went stale.
  12. The JAR in the build/libs directory is the correct one, you just need to run build instead of jar. You don't need to use anything from any of the other directories in build, they only contain temporary/intermediate files.
  13. You need to run the build task, this reobfuscates the built JAR so it can be loaded outside of the development environment.
  14. It's still isRemote (and probably always will be), see this issue on the MCPBot issue tracker.
  15. Minecraft assumes that every block is an opaque cube by default, so it doesn't render the adjacent block faces. Override Block#isOpaqueCube to return false to fix this.
  16. Yes. The client loses the attribute (which may be a Vanilla bug, I'm not sure), but the server retains the correct value and re-syncs it to the client.
  17. It sends the packet to all players whose clients are tracking the entity (i.e. all players within X blocks of it) as well as the entity itself (if it's a player).
  18. I'm pretty sure this method worked in 1.12.2, the linked code is for 1.14.4 but I haven't tested it yet.
  19. It should be possible to overwrite the existing behaviour simply by calling DispenserBlock.registerDispenseBehavior with your IDispenseItemBehavior. If you want to delegate to the existing behaviour, you'll need to use reflection to access DispenserBlock.DISPENSE_BEHAVIOR_REGISTRY and fetch the existing behaviour before overwriting it.
  20. This should have been fixed by this PR (merged in Forge 1.14.4-28.1.92). The dispense behaviour now checks for any flammable block and calls Block#catchFire instead of calling the static method.
  21. If you're using DeferredRegister, you don't need to use @ObjectHolder at all; the returned RegistryObject is internally registered as an ObjectHolder and as such is automatically updated with overrides.
  22. One way is to use a method that always returns null but suppresses IDEA's warnings, like this: method, usage The newer way is to use the DeferredRegister system that was introduced relatively recently. I've started updating to this, but it doesn't look like I've pushed any of my changes to GitHub.
  23. You can see how I remove recipes according to various conditions here. The recipe maps are immutable, but the fields storing them aren't final.
  24. It looks like Vanilla extends JsonReloadListener for recipes (RecipeManager), advancements (AdvancementManager) and loot tables (LootTableManager).
×
×
  • Create New...

Important Information

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