
Everything posted by Cadiboo
-
[1.12.2] Exception loading model
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.
-
new to mods, game keeps crashing.
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.
-
Translucent color overlay for blocks and items
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.
-
[1.15.1] Transparent Blocks, Arn't
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.
-
[1.15.1] Transparent Blocks, Arn't
What do you mean?
-
[1.14.4] Custom Campfire Block
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?
You can use a single line of code with ObfuscationReflectionHelper. You can also use an AT (Access Transformer)
-
Help with creating items?
Your logs should contain some information
-
How can i add alot of almost identical json files fast?
There are the Forge data generators that were made for exactly this purpose.
-
Entity Collisions not working
Show your code. As a general rule projectiles should extend ArrowEntity because Minecraft has special handling for them that uses instanceof checks.
-
[1.14.4 - IntelliJ] Develop during runtime
Add/Remove a Field/Method
-
Can i use a layer-class to show and hide inflated state of Bubbles (orange bird)?
Look at how the arrow entity syncs its isCritical flag.
-
Can i use a layer-class to show and hide inflated state of Bubbles (orange bird)?
This is the right way to do it. Make sure you sync it properly with the EntityDataManger or similar.
-
What´s wrong with this custom player renderer
MCP is separate to Forge. Literally anyone can add names to the list of mappings.
-
[Solved] How to cancel PlayerEvent.ItemCraftedEvent?
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
-
A way to save player data?
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
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?
What is the condition that you’re trying to implement meant to do?
-
[1.14.4] Custom Campfire Block
Show your code please. Vanilla handles many trying based on instanceof or equality checks that don’t play well with mods.
-
A way to save player data?
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
Many things can change in a few weeks, such as MinecraftForge#6444 being merged.
-
How to scale Obj Model
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?
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
-
[1.14.4] Create two-block tall block
^ You need two blocks
-
What´s wrong with this custom player renderer
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.
IPS spam blocked by CleanTalk.