Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
You really register a block that doesn't exist, unless there is some part I am missing.
Oh I have that, I just forgot to show it...
In my main mod file I have:
//----Blocks----\\
public static Block amberBlock;
public static Block amberDisruptor;
public static Block amberCrop;
public static Block okazakiCrop;
public static Block amberDirt;
public static Block operonOre;
public static Block amberCobble;
public static Block amberStoneBrick;
public static int brickTextVar;
public static int cobbleTextVar;
public static String amberStoneBrickTexture;
public static String amberCobbleTexture;
public static Block amberFurnaceIdle;
public static Block amberFurnaceActive;
public static Block operonBlock;
and then just register them in the block class file
The registry system was overhauled in 1.9, GameRegistry.register no longer creates an ItemBlock for your Block; you must do that yourself if you want your block to have an item form. Create the ItemBlock, set its registry name to the Block's registry name and then register it with GameRegistry.register.
Don't use unlocalised names for anything except display/translation purposes, they're not unique and can change at any time. The default model loaded for every Item is the one with its registry name, so use this as the default model location for your items (like you're doing in the code you've commented out).
Don't use ItemModelMesher#register, use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit.
In 1.9+, standard display transformations (the "display" block in the model file) are already defined by the item/generated and block/block models. These are inherited by most item and block models, respectively. Only define display transformations yourself if your model should display differently.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Do you actually have item models or blockstates files named with your items' registry names? I have an explanation of the model loading process and how model locations are mapped to models here.
If you post the full FML log (logs/fml-client-latest.log), I may be able to tell you more about why your models aren't loading.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Do you actually have item models or blockstates files named with your items' registry names? I have an explanation of the model loading process and how model locations are mapped to models here.
If you post the full FML log (logs/fml-client-latest.log), I may be able to tell you more about why your models aren't loading.
Thank you very much, it was very helpful!
I got it to work!
I've got everything working, except for blocks!
My blocks do not show up in creative mode, and when I try to open a blocks creative (mod creative tab), the game crashes.
If I try to register them to the MC creative tabs, they do not exist...
Is there an extra step in 1.9.4 that was not needed in 1.8?
[SOLVED]
Where is the part where you say
public static Block ExampleBlock;
?
You really register a block that doesn't exist, unless there is some part I am missing.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
Oh I have that, I just forgot to show it...
In my main mod file I have:
and then just register them in the block class file
The registry system was overhauled in 1.9, GameRegistry.register no longer creates an ItemBlock for your Block; you must do that yourself if you want your block to have an item form. Create the ItemBlock, set its registry name to the Block's registry name and then register it with GameRegistry.register.
Don't use unlocalised names for anything except display/translation purposes, they're not unique and can change at any time. The default model loaded for every Item is the one with its registry name, so use this as the default model location for your items (like you're doing in the code you've commented out).
Don't use ItemModelMesher#register, use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit.
In 1.9+, standard display transformations (the "display" block in the model file) are already defined by the item/generated and block/block models. These are inherited by most item and block models, respectively. Only define display transformations yourself if your model should display differently.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thank you for the help! It's no longer crashing, however my textures are not loading...
So I tried using .setCustomModelResourceLocation:
But I keep getting an error for all my items/blocks:
http://pastebin.com/WyWXMEg9
Do you actually have item models or blockstates files named with your items' registry names? I have an explanation of the model loading process and how model locations are mapped to models here.
If you post the full FML log (logs/fml-client-latest.log), I may be able to tell you more about why your models aren't loading.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thank you very much, it was very helpful!
I got it to work!