You can find the initialization of all the blocks in the Block class. Look for the spot where it registers a block under the name "wool" -- in 1.9, at least, this is done as a new BlockColored()
Not there, the initial registration. That's where Blocks.wool is assigned, but it's not where the wool block is registered, find that and look at the Block class it registers. Then use that class to help you create your block.
Rollback Post to RevisionRollBack
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
You can find the initialization of all the blocks in the Block class. Look for the spot where it registers a block under the name "wool" -- in 1.9, at least, this is done as a new BlockColored()
Like I said here, Block.java, not Blocks.java
You will have to search for the method call that passes "wool" as an argument to find the block.
Rollback Post to RevisionRollBack
Click this banner for a list of illegal mod distributors -- only download from legal sites!
Your registerRender method only registers for metadata of 0. Your block has metadata of 0, 1, and 2.
The only multi-texture block I've done needed to be registered with the ModelBakery to have the item-form working correctly.
I called this from preInit:
public void registerVariantRenders()
{
ResourceLocation[] RLTepeeWall = new ResourceLocation[BlockTepeeWall.NUM_TEXTURES];
for(int j = 0; j < BlockTepeeWall.NUM_TEXTURES; j++)
{
String modelName = Content.IB_TEPEE_WALL.getRegistryName() + "_" + j;
RLTepeeWall[j] = new ResourceLocation(modelName);
register(Content.IB_TEPEE_WALL, modelName, j);
}
ModelBakery.registerItemVariants(Content.IB_TEPEE_WALL, RLTepeeWall);
}
public void register(Item i, String name, int... meta)
{
if(meta.length < 1) meta = new int[] {0};
for(int m : meta)
{
ModelLoader.setCustomModelResourceLocation(i, m, new ModelResourceLocation(name, "inventory"));
}
}
You can see the full thing here. One important note: I call setRegistryName(MODID, "name") instead of your setRegistryName("name") so I do not have to append the MODID + ":" in my ModelResourceLocation.
It took a lot of work to get the ResourceLocation[] correct. The ResourceLocations I use for that array point to the model > item > name.JSON file where name was everything from "tepee_wall_0" to "tepee_wall_15"
I hope this helps. Any questions?
Rollback Post to RevisionRollBack
Click this banner for a list of illegal mod distributors -- only download from legal sites!
You can see the full thing here. One important note: I call setRegistryName(MODID, "name") instead of your setRegistryName("name") so I do not have to append the MODID + ":" in my ModelResourceLocation.
setRegistryName(String) will automatically prefix the specified name with your mod ID (this applies to 1.8.9 and 1.9+). getRegistryName will always return a String (1.8.9) or ResourceLocation (1.9+) with your mod ID as the domain.
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.
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.
As the title says, how do I create blocks that are similar to wool in which there is one block with multiple textures?
i havent gone past 1.7.10 for modding but its as easy as
item1= new youritem(youritemID).setTextureName(texturename);
item2= new youritem(youritemID).setTextureName(texturename);
you just make multiple instances of the item/block in your registry
That creates multiple blocks, wool is a single block with metadata.
@Spyeedy
Since the wool block is similar to what you want, look at the wool block.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Check this tutorial http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/blockstates-and-metadata/
ah yes , i gotta stop looking at these forums at 3am, misread alot of stuff often
Extend BlockColored, which both wool and stained_hardened_clay do. It has a property called COLOR that takes care of all that.
You then need to make a way to color the block, probably.
I can't find the wool nor the stained hardened clay blocks under the blocks folder. Any idea where the 2 block classes file is located?
You can find the initialization of all the blocks in the Block class. Look for the spot where it registers a block under the name "wool" -- in 1.9, at least, this is done as a new BlockColored()
The registration is like this:
And the method that is being called:
Not there, the initial registration. That's where Blocks.wool is assigned, but it's not where the wool block is registered, find that and look at the Block class it registers. Then use that class to help you create your block.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Like I said here, Block.java, not Blocks.java
You will have to search for the method call that passes "wool" as an argument to find the block.
Oh, the block class, sorry, didn't read it correctly
Yes, that's it. Now look at BlockColoured and use it to help you make your block.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
I tried and when I placed the block only one of the variant showed. Gist for it. Image of file structure attached.
Show us the blockstates JSON and where you register the render (ClientProxy)
Blockstates, client proxy is here.
Your registerRender method only registers for metadata of 0. Your block has metadata of 0, 1, and 2.
The only multi-texture block I've done needed to be registered with the ModelBakery to have the item-form working correctly.
I called this from preInit:
You can see the full thing here. One important note: I call setRegistryName(MODID, "name") instead of your setRegistryName("name") so I do not have to append the MODID + ":" in my ModelResourceLocation.
It took a lot of work to get the ResourceLocation[] correct. The ResourceLocations I use for that array point to the model > item > name.JSON file where name was everything from "tepee_wall_0" to "tepee_wall_15"
I hope this helps. Any questions?
setRegistryName(String) will automatically prefix the specified name with your mod ID (this applies to 1.8.9 and 1.9+). getRegistryName will always return a String (1.8.9) or ResourceLocation (1.9+) with your mod ID as the domain.
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.
It uses Item, what changes do I have to make to do the code such that it will allow Block as my multi-texture block class extends Block.
You can use Item.getItemFromBlock to get the Item form of a Block.
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.