-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
Update to a modern version of minecraft to receive support. 1.12.2 is old and you shouldn’t be making new mods for an outdated version.
-
We don’t support 1.12.2 on these forums anymore because it’s too old. You’ll need to update to a modern version of minecraft to receive support.
-
You can have a json model with an overlay texture that is 40% transparent + an iblockcolors implementation + setting the render layer of your block. This should work.
-
This means “an method called setRenderLayer in the class RenderTypeLookup”. (Usually “#” is the same as “.” but specifically means instance, however many people use “#”, “.” and “::” interchangeably which defeats their purpose). Your code will use RenderTypeLookup#setRenderLayer from inside the FMLClientSetupEvent. RenderTypeLookup#setRenderLayer needs to be called after block registration on the client distribution so the FMLClientSetupEvent callback is the perfect place to call it. You need to be careful though as RenderTypeLookup and RenderType are client side only classes. This usually isn’t an issue as you’re using them inside a method that will only get called on the client, however, if you specify multiple RenderTypes for your via a lambda, you need to take extra precautions that your code isn’t loaded serverside because of how lambdas work. Therefore it’s best to subscribe to the FMLClientSetupEvent in a client only event subscriber (subscribed to the mod event bus obviously) rather than in your main class. Since ChampionAsh wrote their response, mappings for 1.15.1 have been released. You should have updated your mappings to the latest (or latest stable) version and therefore should be referencing the mapped names not the SRG names in your source code.
-
What do you mean?
-
The vanilla code is a bit of a mess of legacy code and Forge compatibility hacks. Vanilla’s code was never meant to be extended by Modders. I would either extend the vanilla class and write all the necessary hacks to get stuff to work the way you want or write my own implementation that will be much cleaner and uses forges systems. You can see an example of the latter here
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
Cadiboo replied to DJ1TJOO's topic in Modder Support
You can use a single line of code with ObfuscationReflectionHelper. You can also use an AT (Access Transformer) -
Your logs should contain some information
-
How can i add alot of almost identical json files fast?
Cadiboo replied to Drachenbauer's topic in Modder Support
There are the Forge data generators that were made for exactly this purpose. -
Show your code. As a general rule projectiles should extend ArrowEntity because Minecraft has special handling for them that uses instanceof checks.
-
Add/Remove a Field/Method
-
What´s wrong with this custom player renderer
Cadiboo replied to Drachenbauer's topic in Modder Support
MCP is separate to Forge. Literally anyone can add names to the list of mappings. -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
Cadiboo replied to DJ1TJOO's topic in Modder Support
Ok so you would want a condition called something like “has_learned_item”. I’m not sure if you get a player object in the conditions, let me check -
It makes your code simpler. You can still do iterative registration with DeferredRegister and unless you’re doing something very complicated (which you probably shouldn’t be) you can do complex registration too.
-
What´s wrong with this custom player renderer
Cadiboo replied to Drachenbauer's topic in Modder Support
Forge doesn’t do this, your mappings (MCP) does this. Forge provides an API on top of Minecraft’s code. This API is constantly changing and being made better. -
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
Cadiboo replied to DJ1TJOO's topic in Modder Support
What is the condition that you’re trying to implement meant to do? -
Show your code please. Vanilla handles many trying based on instanceof or equality checks that don’t play well with mods.
-
You don’t do any complex or iterative registration so using DeferredRegister would simplify and clean up your code a ton
-
What´s wrong with this custom player renderer
Cadiboo replied to Drachenbauer's topic in Modder Support
Many things can change in a few weeks, such as MinecraftForge#6444 being merged. -
I know that JSON models provide a way to do it via the transforms section but the best way to do it is definitely to change your model to the correct scale
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
Cadiboo replied to DJ1TJOO's topic in Modder Support
This is what you’re meant to do. What is the exact issue that you’re having? Forge provides custom conditions too so even if you’re having trouble with the docs, you can look at Forge’s code to see how it works -
^ You need two blocks
-
What´s wrong with this custom player renderer
Cadiboo replied to Drachenbauer's topic in Modder Support
So you copied and pasted a class in an old version. Then you made some (probably small) changes to that class. Then you updated and are having trouble because the code that the old class depended on has changed. The class obviously also changed since the old version so you should copy + paste it again and re-apply the changes you made to the new code.