
Everything posted by ChampionAsh5357
-
[1.16.3] Issues with texture
No, it wasn't. It was propagated by someone which caused the following response on the Common Issues and Recommendations thread "Using an interface (usually called IHasModel) on your Item and/or Block classes to denote that they are capable of registering a model is an anti-pattern and not necessary. All items require a model to be registered for them and usually no type-specific information from the item is needed, only the registry name, which is accessible for all items by default." As for the issue above, that's just how minecraft constructs their quads for generated item models if I'm not mistaken. If you would like to 'fix' the issue, then use a model creator (e.g. Blockbench) to create the model yourself and use that as the parent.
-
[1.16.3] [SOLVED] setBoundingBox() method not working?
Probably because the bounding box is changed every tick iirc. You should use EntityEvent$Size if you would like to handle that.
-
[1.16.1]how to use player.playsound()?
As diesieben07 explained, we've already answered your previous posts and you've asked the same question multiple times. If you started to learn Java a few weeks ago and you are having trouble understanding the forge docs, then I recommend you take some more time to get a better grasp in the language itself and specifically understanding what you are reading. The docs tells you exactly what each method for playSound does in good detail. We are not a Java based forum, if you cannot understand what you are reading then you either need to ask a question that more specifies what you are trying to find out or spend more time learning the language and the library itself. Most of us are not experts here, we try to work very hard to give you explanations to problems we either know how to solve or try and figure out how to solve. It is in your best interest to reconsider what you are asking and verify with yourself that you understand what it is you are doing before continuing on this path.
-
[1.16.1]how to use player.playsound()?
Which method are you referring to? Specifically the class. Playsound is based on the knowledge of being called on both sides to limit the amount of packets sent to the players.
-
Container ItemAdd and ItemRemove Events
1. You would need to store the owner of the block in the tile entity instance and make slots accessible based on that comparison flag. 2. A lot of custom container screen handling to make this happen. There is no difference between placing an item and removing it as it just simply is swapping an empty item stack on the cursor for the item stack in the container. So, you will need to define this specific action yourself.
-
[1.16.1]How do I use the sound event event?
https://mcforge.readthedocs.io/en/latest/effects/sounds/#playing-sounds
-
Create Custom Player Use Animation
No, you can do an animation without the need for UseAction. You will just need to edit how the player renders in first and third person. A combination of RenderHandEvent and RenderPlayerEvent should do fine. You could also do RenderLivingEvent to handle all BipedModels as it's fields are publicly accessible anyways.
-
Minecraft key codes to ascii(string)
Then you should probably output the character and not the character's modifiers.
-
[1.15] Replace the text from a gui string
If you want to change the string text to the key, use a variable. If it needs to be global, use a field.
-
[1.15] Multi Line Text field
You should probably start with something else then. This requires a bit of knowledge of the font system and TextInputUtil. However, if you choose to ignore me, you should probably look at how EditSignScreen handles this.
-
Making custom armor model
Don't use my video. It's terrible, outdated, and has bad practices. I plan on taking down all of those videos this year because of their problems. I would rather be promoting good standards of code and critical thinking rather than bad, copy-paste practices. Also, the video is for 1.12.2, and that is not supported on this forum. Please update to one of the versions in the banner to receive support.
-
Help for modding needed!
Do not try learning a library of Java without learning Java itself. It's like trying to run before you can walk. This is why almost everyone suggests that you take some time (probably a years-worth if you want to have the concepts with some level of mastery) before you learn how to use the Forge Modding Library The only videos we recommend are those from McJty. This is because most tutorial videos usually promote bad practices or outdated code. Mine also fall under this category. Spend some time reading the documentation and analyzing the source before attempting this. This is of course once you have an intermediate level of Java.
-
3rd Person Enchant Glint
This is a confusing statement. What is your end goal? The enchantment glint is applied whenever your item is enchanted by default. It will render in 3d person. What are you trying to change about the glint?
-
How to make custom furnace recipe that yields multiple drops of one item
Well if you test it, does it work? If not, look at the logs and see where the error is.
-
How do you make armor models that are not bulky and stick out?
Model them in the way you want? Only thing you really need to pay attention to is inflation of parts and that usually never is noticeable enough to matter.
-
[1.16.4] Storing a BlockState as NBT in a TileEntity
You'll probably need to use the associated codec with encodeStart and pass in the NBTDynamicOps instance. From there, grab the result and verify there is no error present and then write the tag.
-
I have a friend who wants to make a mod that places blocks beneath your feet
There is no event parameter. Also, please tell your friend to open a thread post of his own so we do not need to go through a middleman. Setting a block beneath the player's feet would probably need to be handled in a PlayerTickEvent. However, doing this probably isn't a good idea as it will cause a bunch of lag and make it impossible to go down.
-
How to make custom furnace recipe that yields multiple drops of one item
I didn't tell you anything related to modding, I told you something related to json objects. Reliance on a guide to do the work for you will not solve your problem. I'll give a more clear answer though. The 'result' key is attached to a json object. You can specify the name of the item using the 'item' key and the count with the 'count' key inside this json object.
-
How to make custom furnace recipe that yields multiple drops of one item
It's not a function, just a key-value pair. Also, result would need to be an object where you specify the item name and count for it to work.
-
Making custom armor model
Item#getArmorModel is all you really need to attach one. Everything else is just excess.
-
[1.15.2] Recipe input doubles - custom crafting table + recipe [Solved]
Then that's probably a desynchronisation across what you are changing. You are probably handling something that is not isolated and directly affects a field directly. As for what, I can't tell as most of this code seems to be from the shaped crafting recipe. You should rehandle your code such that it extends directly from the shaped crafting recipe if you are going to do it this way. Quite literally, I see no different between crafting tables other than a different recipe type. Therefore, you could reuse everything except the container and screen which could just be simply transferred as needed. This is not to mention a little bit of problematic logic during synchronization and how containers are handled. Just so I understand, are you saying the output is duplicating or the input?
-
[1.16.3] Custom Ore Generation
First, you need to register a ConfiguredFeature into a vanilla registry. A feature can have multiple placements now and their order does have an effect on how they spawn. After you registered one, you attach the feature within BiomeLoadingEvent with the provided generations builder.
-
[1.16] Rendering arrows on bows
That method is where you would call all of your model providers when they are being built. As for examples, you can look at the Forge test.
-
[1.16] Rendering arrows on bows
You're technically not making the models in code, you are creating loaders that handle your json models. Based on what I gather, you simply want to overlay one model or layer onto another given a specific arrow nocked. You can either use a data generator which will handle all of this overlay data for you and all you need is a texture of the bow and it's states along with a property for the arrow. Otherwise, you would need some implementation of IDynamicBakedModel where it stores the ModelProperty of the arrow using an enum or a registry. There is no specific documentation on this. However, I am sure someone has created examples, though I cannot point you to where.
-
BlockClusterFetureConfig Question
Look at the placement itself and how the variables are used. This looks like something for 1.15.2. It actually does do exactly what you said; however, you are thinking about the placement incorrectly. While it is true that it should generate 100 times, you are also neglecting the starting block position. By default, it will spawn at the height specified by the block position. However, if you try and variate the movement, there is a chance it might spawn within a block or in the air, making it nonviable to generate. Variating the x and y positions will have this affect although it is necessary to make it spawn more than one particular flower. Rarity of placement is more of a luck of the draw type thing like any other probabilistic type outcome. The more chances you give, the more you see a more probabilistic outcome. To make a flower rarer, you can just as easily make a block placer which has a probability to spawn the flower. As for having it generate from a configuration file, you would need to attach the features to reference a supplier holding the actual value of the config file. Otherwise, the changes will not be synchronized across sides.
IPS spam blocked by CleanTalk.