-
Posts
3284 -
Joined
-
Last visited
-
Days Won
62
Everything posted by ChampionAsh5357
-
[1.16.2] Way to render only one side of block
ChampionAsh5357 replied to Corgam's topic in Modder Support
Then you could just reuse the processes needed to get the BakedQuad in the upwards direction from the IBakedModel of each Block from the class you are referencing. I would recommend caching this data when applicable. -
Post the stacktrace here so we can diagnose it. This is not descriptive enough to warrant any help at the current moment without guessing.
-
[1.16.2] Way to render only one side of block
ChampionAsh5357 replied to Corgam's topic in Modder Support
Are you trying to do this for your block or a generic one? -
(1.16.1) How to add another texture layer to chestplate
ChampionAsh5357 replied to iSyriux's topic in Modder Support
For reference, you should cache the model instead of recreating it every tick probably in some client class that's isolated from the item class. You could then reference it using DistExecutor if I remember correctly. -
[1.16.2] Way to render only one side of block
ChampionAsh5357 replied to Corgam's topic in Modder Support
I mean you can just as easily do this with a regular block model by not drawing the other 5 sides. Same with using the method above. Hasn't changed. -
(1.16.1) How to add another texture layer to chestplate
ChampionAsh5357 replied to iSyriux's topic in Modder Support
That's probably because biped model doesn't extend living entity. You are also interpreting generics backwards. You need a class that is an instance of BipedModel, not the opposite way around. Please take the time to learn java if you haven't already. It will definitely help when doing all this in the future. -
Once again, you are not required to use this. You can make your own that allows this or rewrite it from scratch. That's the beauty of having an abstract class with the required methods being public/protected.
-
You are given an abstract class for the tree so you can make it do anything. If I wanted to, I could spawn a woodland mansion on tree growth. You just need to define the tree such that it allows it to happen. That is something completely different Luminaire, you should look into either replacing the tree with your own generation or doing something with mixins to replace only the first instance.
-
There are two questions I would like you to ask yourself. First, is there a point to using this event? If you are creating the class RubberTreeSapling, you can just as easily override the method SaplingBlock#placeTree and return your own tree growth. Second, if you're passing in an instance of the Tree to place when the sapling grows, is there any need for checking in manually instead of making your own tree instance that returns exactly what you're looking for? If your answer to either of these questions are yes, I would reevaluate how you are doing this. The event shouldn't really be used for your purpose as it's called directly before the sapling attempts to create the tree and is more of a cancelable type setting. Hopefully I have answered your question.
-
If only it was "code" persay. Dimensions have been moved to a data-driven system which means all json files. How to do them? Take gander to read the code and learn how everything is stored. Maybe google it on the wiki. You can do something even if you don't know exactly how to do it.
-
The newer versions of the mcp mappings seem to be broken. Anything before september should work fine. However, mcp is pretty much dead at this point and the new system, MMMS, is currently being worked on.
-
I assume that the value does not update when you reopen the gui. This is a shortcoming of IntReferenceHolder as it doesn't sync values on initial load if the holder isn't created when the container is opened. To counteract this, you would need to update the value, mark the holder as dirty, and update the value back to its intended value so it can be synced to the client on container open. Also, I would recommend redoing your code again at some point as a good bit of what you've shown is outdated, shouldn't be used, or redundant.
-
[1.15.2] Trouble With Saving NBT Data on Tile Entity
ChampionAsh5357 replied to Jack Richard's topic in Modder Support
So you'll need to be creative on how you send over the information from the client to the server. Tile entities only store their position on the server. So, before you open up your screen, you should probably send over the block position of the TE to the client and then send that value back with the player. Lucky for you, forge can actually send a packet buffer with the current block pos of the TE when inputted with some extra data assuming your container factory extends IContainerFactory on registry. From there, it's all a matter of piecing it together and implementing. Happy hunting! -
[1.16.3] Need help with custom trident models
ChampionAsh5357 replied to Kuwujii's topic in Modder Support
A lot of this seems like copy-paste code. I'm not going to search through your code since I'm guessing based on how it looks that pretty much the only difference is the textures. So let's go over the few things. First, you need an ISTER (ItemStackTileEntityRenderer) for your item to render as a 3d model in that sense. You can also just make the 3d model using a json file since it's literally the same exact thing. Second, keep your client and server code separated. Third, if you do end up making a custom entity for whatever reason, you will probably have to sync the data from the server to the client using IEntityAdditionalSpawnData and override the packet handling to forge's within NetworkHooks. Finally, don't copy-paste code. You don't learn anything and end up wondering what went wrong when it doesn't it work the same as vanilla. -
[1.16.2] Adding another mod to the dev env
ChampionAsh5357 replied to Corgam's topic in Modder Support
Refresh gradle dependencies and regen your runs. -
20200514-1.16.2 is not the correct default mapping. That would be 20200514-1.16. If you want an up to date report on the current mapping snapshot version, I suggest joining the forge discord. Currently, the one hosted by the forge server is 20200723-1.16.1 I believe.
-
Just because something works in the test environment doesn't mean it's good practice. I can declare all my objects as static final variables without deferring anything and it will still work. However, it would be a terrible fate to attest to since issues wouldn't be present except in broader scenarios. Everything feels disconnected when just starting out. This why we try things out until we understand how it works or ask questions for more specific topics. The objective of any programmer is to understand what they're doing, why they're doing it, and how they can complete it in a proper and/or efficient way. Following a tutorial just says here how's you do it without the what and why. We have to be able to problem solve in any situation presented to us. Whether that's through hard trial and error or asking others about the specific topic, it still allows the programmer to learn. I do admit when I started out in modding I didn't understand anything. I used bad practices from code I figured out at the time and never updated to new standards. Nowadays, I try to be on top of what I'm doing else I would fall behind. I'm not going to wait to figure out how to do something from a post. I'm going to keep testing and learning why certain things are how they are and how to use them properly. That's the reason why I am arguing this point. I'm not arguing for or against using a tutorial. I'm arguing against relying on the tutorial in any scenario since you as the programmer should be able to infer and predict how to make it yourself. That's not to say it'll work, but it at least shows you tried to solve the problem before relying on someone else's solution.
-
Not really. A tutorial is an interpretation of a "textbook" and is usually not reviewed or checked for errors/bad practices. Don't rely on a tutorial is just saying that to take them with the knowledge that most of the information has never been validated and is probably pirated off of someone else. You should use documentation and source to start when you begin and once you have a good grasp on the current practices maybe review a tutorial. I'm not saying there's anything bad about tutorial. I'm just saying as a creator of non-reviewed tutorials that they can promote bad practices and can lead someone who just started in modding down the wrong path. Especially those who try to learn java and modding at the same since it will give them bad information on both the language and the current forum. That's more why forge recommends learning java beforehand so you can have an understanding in the language and be able to interpret information accurately instead of someone else's point of view.
-
Don't rely on a tutorial to teach you information you need to know. Try and work backwards with the information you have. Maybe look inside some example in the game or from projects with open source code. Observe and interpret what you currently have, then come back with a specific question that you might have an issue with. As a good starting point, potions and effects are hooked in by forge registries. They also have a method inside that allows the user to tick the entity affected with whatever they want.
-
Your properties should probably append Properties#notSolid and Properties#setBlocksVision to false and see if that works.
-
[1.12.2] runClient doesn't add resources to the mod
ChampionAsh5357 replied to Marvin724's topic in Modder Support
1.12.2 is no longer supported on this forum. Please update to LTS 1.15.2 to receive support. -
[1.15.1] Transparent baked models/quads
ChampionAsh5357 replied to PianoManu's topic in Modder Support
Glass is rendered in a different layer than ice by default. It probably works for glass since the pixel is either completely completely opaque or transparent. Ice works differently since it has variable opacity. However, your pixels seem to be only grabbing the pixel colors and not the alpha. Another scenario is that you are grabbing the alpha; however, setRenderLayer was not set. The fix I showed uses the tint index alpha channel to set pixels. It could be that this value must be 1.0f to be multiplied with the current texture alpha channel if the render layer is set. However, this is mainly speculation.