-
Posts
3284 -
Joined
-
Last visited
-
Days Won
62
Everything posted by ChampionAsh5357
-
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.
-
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.
-
How can I detect a change of enchantment properties?
ChampionAsh5357 replied to Tavi007's topic in Modder Support
https://mcforge.readthedocs.io/en/latest/forgedev/prguidelines/ -
Probably somewhere out in the world, but you would need to find them yourself.
-
How can I detect a change of enchantment properties?
ChampionAsh5357 replied to Tavi007's topic in Modder Support
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. -
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.
-
[1.16.3] [SOLVED] GatherDataEvent triggering only server-side?
ChampionAsh5357 replied to IamN5's topic in Modder Support
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. -
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.
-
[1.15.2] How to make items usable inside the brewing stand
ChampionAsh5357 replied to Cyndi4U's topic in Modder Support
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. -
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.
-
[1.16.3] [SOLVED] Block not being registered.
ChampionAsh5357 replied to IamN5's topic in Modder Support
Apologies for my incorrectness. I believed that registry objects were populated after all registries were frozen and not after each one. -
[1.16.1] onArmorTick method not working
ChampionAsh5357 replied to mirakapz97's topic in Modder Support
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. -
That's why I prepended this statement.
-
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.
-
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.
-
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.
-
PlayerInteractEvent.RightClickEmpty Won't Work
ChampionAsh5357 replied to mbkgr's topic in Modder Support
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. -
PlayerInteractEvent.RightClickEmpty Won't Work
ChampionAsh5357 replied to mbkgr's topic in Modder Support
'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. -
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.
-
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.
-
Offset the center such that the rotation is within the template itself maybe?
-
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.
-
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.
-
[1.16.3] [SOLVED] Block not being registered.
ChampionAsh5357 replied to IamN5's topic in Modder Support
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. -
[1.16.3] [SOLVED] Block not being registered.
ChampionAsh5357 replied to IamN5's topic in Modder Support
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.