I am updating my 1.7.10 mod to 1.8, my Blocks are rendering perfectly in the inventory, while on hands and placed. But my Items only shows as a purple/black block, my item textues are placed in src/main/resources/assets/sc/textures/items, and the models in src/main/resources/assets/sc/models/item.
1. You will need to use a lot of events (mainly registry). To register an event mark the event's class with @Mod.EventBusSubscriber, make the event's method static and mark it with @SubscribeEvent.
2. To register blocks and items subscribe to RegistryEvent.Register<Item/Block>, then call the event's register/registerAll method.
3. To register item models subscribe to ModelRegistryEvent on the client and use ModelLoader.setCustomModelResourceLocation inside of the method.
4. Generally you won't need a post initialization event in the mod class.
1. You will need to use a lot of events (mainly registry). To register an event mark the event's class with @Mod.EventBusSubscriber, make the event's method static and mark it with @SubscribeEvent.
2. To register blocks and items subscribe to RegistryEvent.Register<Item/Block>, then call the event's register/registerAll method.
3. To register item models subscribe to ModelRegistryEvent on the client and use ModelLoader.setCustomModelResourceLocation inside of the method.
4. Generally you won't need a post initialization event in the mod class.
Oh ok, as I am a begginer I'll need to find a tutorial for that(updating to 1.12), but thanks again!
1. You will need to use a lot of events (mainly registry). To register an event mark the event's class with @Mod.EventBusSubscriber, make the event's method static and mark it with @SubscribeEvent.
2. To register blocks and items subscribe to RegistryEvent.Register<Item/Block>, then call the event's register/registerAll method.
3. To register item models subscribe to ModelRegistryEvent on the client and use ModelLoader.setCustomModelResourceLocation inside of the method.
4. Generally you won't need a post initialization event in the mod class.
Oh my God what do I have to do to code in 1.12? I can't even find a tutorial to this! That's why I like coding in 1.7.10, bcause I'm newbie in coding, because I'm very used to 1.7.10 modding, because it doesn't need json files, because my mod worked PERFECTLY with 1.7.10... But I don't receive much support for 1.7.10, that's why I am trying to update, but the only thing I want is to EXTEND my custom Sword Reach, and I realy really really don't know how to do that. Thanks!
You gotta update at some point. Can't just use an outdated version forever. Also you gotta stop relying on tutorials at some point.
It's quite late where I am so I'll help you properly in around 10-12 hrs.
How did you extend sword reach in 1.7? I know jabelar has some good updated tutorials (including sword reach).
The best way would probably ray tracing all entities in the player's look vector and damaging the closest one. You need to run this from an event. Here's a list of all forge events.
Also you might want to create a separate topic for this.
Search next time as well, because I remember a very similar question being asked yesterday.
You gotta update at some point. Can't just use an outdated version forever. Also you gotta stop relying on tutorials at some point.
It's quite late where I am so I'll help you properly in around 10-12 hrs.
How did you extend sword reach in 1.7? I know jabelar has some good updated tutorials (including sword reach).
The best way would probably ray tracing all entities in the player's look vector and damaging the closest one. You need to run this from an event. Here's a list of all forge events.
Also you might want to create a separate topic for this.
Search next time as well, because I remember a very similar question being asked yesterday.
Oh no, I am trying to update my mod just to use jabelar's tutorial to extend my sword reach. For now, I couldn't do it.
You gotta update at some point. Can't just use an outdated version forever. Also you gotta stop relying on tutorials at some point.
It's quite late where I am so I'll help you properly in around 10-12 hrs.
How did you extend sword reach in 1.7? I know jabelar has some good updated tutorials (including sword reach).
The best way would probably ray tracing all entities in the player's look vector and damaging the closest one. You need to run this from an event. Here's a list of all forge events.
Also you might want to create a separate topic for this.
Search next time as well, because I remember a very similar question being asked yesterday.
But I'll keep using 1.7.10 forever. I DON'T KNOW HOW TO MOD FOR NEWER VERSIONS. I have followed mrcrayfish's modding tutorial for 1.10.2, I watched many times the first videos and I still can't set the item's in game visible name and it's texture. Everything is in it's place, exactly as he taught in his videos, but not working for me. 1.7.10 is easier. Doesn't need json files and registryName. Thanks again.
I am updating my 1.7.10 mod to 1.8, my Blocks are rendering perfectly in the inventory, while on hands and placed. But my Items only shows as a purple/black block, my item textues are placed in src/main/resources/assets/sc/textures/items, and the models in src/main/resources/assets/sc/models/item.
Main class:
https://pastebin.com/ZB0M5j99
SapphireCraft_Items Class:
https://pastebin.com/XKacDZaQ
ItemSapphire Class (as an item class example):
https://pastebin.com/YYuaDUKg
ItemRenderRegister Class:
https://pastebin.com/7AdwKJvS
sapphire.json:
https://pastebin.com/CrJR91f2
CommonProxy:
https://pastebin.com/9tybVF6b
ClientProxy:
https://pastebin.com/pumHS1Xn
1. Do not use unlocalized name when registering models.
2. I'm not sure if 1.8 has it, but try registering your models from the ModelRegistryEvent.
3. Again, not sure if 1.8 has it, but try registering your model with ModelLoader.
4. Show your console log/errors.
Thanks for answering. I've found error lines like this:
[15:36:07] [Client thread/ERROR] [FML]: Model definition for location sc:sapphire#inventory not found
And I have followed this tutorial:
https://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/first-item/
You really should update to newer minecraft versions, it much easier and cleaner.
I don't have the 1.8 source on me so could you check if the following classes exist: ModelRegistryEvent, ModelLoader, RegistryEvent.
Also can you show where you register your items.
I register them here man:
SapphireCraft_Items Class
Ok then, I'll try to update my mod to 1.12.
If updating to 1.10+ I have some useful tips:
1. You will need to use a lot of events (mainly registry). To register an event mark the event's class with @Mod.EventBusSubscriber, make the event's method static and mark it with @SubscribeEvent.
2. To register blocks and items subscribe to RegistryEvent.Register<Item/Block>, then call the event's register/registerAll method.
3. To register item models subscribe to ModelRegistryEvent on the client and use ModelLoader.setCustomModelResourceLocation inside of the method.
4. Generally you won't need a post initialization event in the mod class.
Oh ok, as I am a begginer I'll need to find a tutorial for that(updating to 1.12), but thanks again!
Oh my God what do I have to do to code in 1.12? I can't even find a tutorial to this! That's why I like coding in 1.7.10, bcause I'm newbie in coding, because I'm very used to 1.7.10 modding, because it doesn't need json files, because my mod worked PERFECTLY with 1.7.10... But I don't receive much support for 1.7.10, that's why I am trying to update, but the only thing I want is to EXTEND my custom Sword Reach, and I realy really really don't know how to do that. Thanks!
You gotta update at some point. Can't just use an outdated version forever. Also you gotta stop relying on tutorials at some point.
It's quite late where I am so I'll help you properly in around 10-12 hrs.
How did you extend sword reach in 1.7? I know jabelar has some good updated tutorials (including sword reach).
The best way would probably ray tracing all entities in the player's look vector and damaging the closest one. You need to run this from an event. Here's a list of all forge events.
Also you might want to create a separate topic for this.
Search next time as well, because I remember a very similar question being asked yesterday.
Oh no, I am trying to update my mod just to use jabelar's tutorial to extend my sword reach. For now, I couldn't do it.
But I'll keep using 1.7.10 forever. I DON'T KNOW HOW TO MOD FOR NEWER VERSIONS. I have followed mrcrayfish's modding tutorial for 1.10.2, I watched many times the first videos and I still can't set the item's in game visible name and it's texture. Everything is in it's place, exactly as he taught in his videos, but not working for me. 1.7.10 is easier. Doesn't need json files and registryName. Thanks again.