Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Yes. I love working within the Forge framework and have adopted several of its patterns in my own projects (eg. event systems and registry objects, though my registry system is often little more than a dictionary<string,SomeType> that doesn't deal with a lot of the validation Forge does, but I'm also not an idiot trying to register things at the wrong time, or with duplicate names).
  2. And not all things that plant crops are items that are BlockItems.
  3. You do know that this is client-side-only right? https://github.com/kregerl/Potion-Cakes/blob/1.15.2/src/main/java/com/loucaskreger/potioncakes/EventSubscriber.java#L10
  4. I don't know where you heard this, but it is objectively wrong.
  5. 1.7 isn't supported any more, thus against forum policy. Those threads are locked in order to prevent people from helping give support to an unsupported version. There's a green banner at the top of every page about it.
  6. This is a forum, not Stack Overflow. There's no need to lock threads unless they violate actual rules.
  7. Do people not know how to use search? https://forums.minecraftforge.net/search/?q=x-ray block&type=forums_topic&updated_after=any&sortby=relevancy&search_and_or=and 2nd, 5th, 6th, 10th, 11th, 12th, 13th, 14th, 16th, and 18th results are all this problem.
  8. private void Hat() { //what does it do? } glad to help
  9. Cool. What's the plugin do? This is the Forge forums, most of us (probably all of us) have never used Bukkit.
  10. You're overriding Block#hasTileEntity not IForgeBlock#hasTileEntity public boolean hasTileEntity(BlockState state)
  11. You write a method (eg. a lambda) that satisfies the constraints of Supplier<T>. That is, it is a zero parameter function that returns an instance of <T> You already know what the <T> is, too, its right there:
  12. In other words: Right-click -> Open Type Hierarchy
  13. A "supplier" is just a function (such as a lambda) that takes no parameters and returns a value of a specified Type; it supplies a thing. A consumer is the opposite: it consumes a given Type as its only parameter and returns nothing.
  14. When I say the same way I mean literally the same way you would a block or an item, just not a block, but a recipe serializer. YOU don't, that's what @ObjectHolder is for (not that you actually need a field for it anyway). That's for ITEMS, you want RECIPIE_SERIALIZERS.
  15. The same way you register other IForgeRegistryEntry objects.
  16. Post your code.
  17. This is what tags are for. Mods that make tags visible have the onus on them to not make it overwhelming.
  18. Modifying loot tables directly is not inter-mod compatible.
  19. Using the available hooks Forge already provides. Namely events and registry substitutions, but also tags, and json data files (and their extensions).
  20. TLDR Forge blockstates were removed because vanilla states are smarter now.
  21. You have an inner class with the same name as the outer class.
  22. 1) ItemStacks are never null 2) This method is only ever called on a book that has been written to, which implies that it has NBT data already
  23. Generally that's the correct way yes. Of course, you haven't shown your code.
  24. This is just some random ItemStack you created that contains nothing (I am not even sure that's a valid constructor...) You need to actually get the itemstack in the player's hand, which you would have to do when you create your thrown entity (and appears you are already doing): He's not creating item entities, he's creating snowball like thrown entities.
×
×
  • Create New...

Important Information

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