Jump to content

ChampionAsh5357

Members
  • Posts

    3284
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by ChampionAsh5357

  1. My guess is that you called a registry object instance before it was loaded, probably COPPER_ORE.get() within some sort of method handling without deferring the instance such that it only gets called when the TE type is registered and not when the static final variable is defined. Please show the repository where this code is linked to.
  2. That would probably be the result of a carver of some kind. I believe the class you should look at is CanyonWorldCarver. Other than that, it should be the same as creating any other biome.
  3. https://mcforge.readthedocs.io/en/latest/forgedev/prguidelines/
  4. Probably somewhere out in the world, but you would need to find them yourself.
  5. Unfortunately, I don't believe there is any such event or hook that calls when an enchantment is applied. You would probably need to add a new event that checks when an enchantment is applied to an item which would require a PR. There are other methods of achieving it that don't require a PR, but they all involve things that are not allowed on this forum.
  6. My recommendation is opening up the PlainsBiome class and reusing the builder within. The parent method determines whether the biome is a mutation of a different one (e.g. Modified Badlands Plateau is a mutation of Badlands Plateau). It would be better just to supply the builder with similar or the same parameters as those within the biome you would like to replicate.
  7. That's because on line 22 you wrote an else if statement. Data generators have four booleans to check whether to output a certain criteria. The event is only sent once with these four checks, not four times with one check each. So, each check should be its own separate if statement and not chained within an if-then-else.
  8. 1.12.2 is not supported here. You should update to 1.15.2 at the very least if you would like to receive support.
  9. MCreator is not supported on this forum. It is completely recommend that you take the time to learn java properly before coding as it is a semi-variation on C languages. To answer your question though, Potion recipes should be registered through BrewingRecipeRegistry.
  10. Well it depends on where you are trying to draw it from. You'll need an instance of a MatrixStack to get the current Matrix4f for placement in the world along with the x, y, z coordinates of where you want it to render. The IRenderTypeBuffer used to get the vertex builder can either be gotten from a local variable or the static instance within the Minecraft class. As for which vertex buffer, you would probably need a RenderType that supports quad draw mode (7 for OpenGL) that supports position, texture, and color vertices. From there, it's a matter of placing the vertices where you want on the screen and binding the correct texture/atlas.
  11. Apologies for my incorrectness. I believed that registry objects were populated after all registries were frozen and not after each one.
  12. Instead of applying every tick, I would rather subscribe to LivingEquipmentChangeEvent or whatever its called and check there and apply infinitely. Less data calculated per tick. However, you will need to check if the effect gets removed due to milk or something and reapply when that happens. However, that's my opinion.
  13. Create a new vector with a 0 y. Actually, it should be the y motion of the player if you're going to use set.
  14. Add velocity in the direction of that look vector, there's some method to do that within Entity. The y can be ignored due to the additive identity.
  15. Use the ConditionalRecipe system. You can add a condition to make it determine whether to allow based on the config, recommended you use data generators for this as the recipes are easier to create using that, especially conditional ones. However, you will need to reload the recipe datapack if you plan to change the config value on the fly during runtime.
  16. No, those refer to the physical side. You should only have one instance of an event (except in very specific cases). Since this code is not specific to a physical side, there should be no sided annotations. That falls under Code Style 6. The linked doc page I sent you earlier was supposed to be for you to understand about World#isRemote which is held in every entity instance and then implement.
  17. 'This event is fired on both sides before the player triggers'. Since it holds logic, it should be properly delegated to only execute on the server.
  18. The docs although not fully updated yet, provides a good place to start. Other than that, I would just recommend asking questions or looking at the source. Sometimes viewing open source projects or videos is good, but take those with a grain of salt as they usually contain some bad practices or just inefficient code in general. Note that you are expected to know Java as that will usually go unexplained from most answers.
  19. Yes, that's why I mentioned the vertex buffer as that can draw textured rects provided it uses the same render type. The method mentioned has useful tidbits of code that provides how to face the orientation towards the player at all times.
  20. Offset the center such that the rotation is within the template itself maybe?
  21. Probably a vertex buffer in the translucent render type that draws the background with the text that's centered and rendered using FontRenderer. Basic, some version of EntityRenderer#renderName with more flare.
  22. I believe it's assets/<modid>/textures/painting/<path>. It creates an atlas from the painting folder so any image not in their will not be added to the uploader. Just as a warning, try to avoid making large pictures. This is also an 22x11 image and should be bound to a power of two (e.g. 32x16). My suggestion is usually to have a lower quality version of the image and then supporting a higher resolution version in a resource pack which will be scaled and mapped to the vertices correctly.
  23. Nope, never do. I just have no filter when it comes to saying anything. I apologize if I gave you any offense, but that's exactly what I see. And yes, I did look both githubs in their entirety before I made my first post. Now back to the other point. Your issue is within the tile entity registry class itself. You defer execution of the builder block but then proceed to grab an instance of the blocks raw before any registry has been loaded. This is problematic as the registry isn't populated causing an NPE to be thrown. This can be rectified by deferring execution for each block registered. For reference, that's the usage of a supplier as it executes the data when it's method is called.
  24. This looks like a cluster of nonsense. But the obvious answer is that you never deferred the block usage in the registry object, even though your copy-paste code did everywhere else for you.
×
×
  • Create New...

Important Information

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