hi everyone, for my current mod im trying to add lightbulbs which will be similar to torches but can be turned on and off with redstone, but i cant figure out how to make a custom model for it. instead of just being a block of light like most mods, i want it to actualy resemble a light bulb somewhat and have its orientation change depending where you put it like a torch, but i cant find how the torch does it.
i tried looking up tutorials but i cant find any on this. all the model files in the src folder are only for mobs. does anyone have a clue what i should do next? thanks guys!
hi everyone, for my current mod im trying to add lightbulbs which will be similar to torches but can be turned on and off with redstone, but i cant figure out how to make a custom model for it. instead of just being a block of light like most mods, i want it to actualy resemble a light bulb somewhat and have its orientation change depending where you put it like a torch, but i cant find how the torch does it.
i tried looking up tutorials but i cant find any on this. all the model files in the src folder are only for mobs. does anyone have a clue what i should do next? thanks guys!
Torches, like every other block, don't have models. They don't work that way.
Instead, they are directly drawn via OpenGL. You can find renderBlockTorchAtAngle() or something in RenderBlocks. You probably won't understand it, because OpenGL is not just Java, it's a language for itself :smile.gif:
I suggest you just use the given "models" you have, by using "getRenderType". It saves a looooot of work. :smile.gif:
Torches, like every other block, don't have models. They don't work that way.
Instead, they are directly drawn via OpenGL. You can find renderBlockTorchAtAngle() or something in RenderBlocks. You probably won't understand it, because OpenGL is not just Java, it's a language for itself :smile.gif:
I suggest you just use the given "models" you have, by using "getRenderType". It saves a looooot of work. :smile.gif:
do you know which type of models there are i can use with getRenderType? are they made by notch or does he use default ones?
do you know which type of models there are i can use with getRenderType? are they made by notch or does he use default ones?
Of course they are made by Notch :happy.gif:
In your own Block class, put in something like (don't know what it's literally called right now)
public int getRenderType() {
return 1;
}
I think 0 is "do not render", 1 is standard, and the other ones are custom ones. For example, look what number is returned in BlockTorch, and copy that number to have your own block look like a torch. Like that, flowers, fire and portal blocks for example have their own render type numbers.
In your own Block class, put in something like (don't know what it's literally called right now)
public int getRenderType() {
return 1;
}
I think 0 is "do not render", 1 is standard, and the other ones are custom ones. For example, look what number is returned in BlockTorch, and copy that number to have your own block look like a torch. Like that, flowers, fire and portal blocks for example have their own render type numbers.
hmm, it returns 2 but im still not sure where i would actualy set what the lightbulb looks like, it would be more then just a stick.
i tried looking up tutorials but i cant find any on this. all the model files in the src folder are only for mobs. does anyone have a clue what i should do next? thanks guys!
Torches, like every other block, don't have models. They don't work that way.
Instead, they are directly drawn via OpenGL. You can find renderBlockTorchAtAngle() or something in RenderBlocks. You probably won't understand it, because OpenGL is not just Java, it's a language for itself :smile.gif:
I suggest you just use the given "models" you have, by using "getRenderType". It saves a looooot of work. :smile.gif:
do you know which type of models there are i can use with getRenderType? are they made by notch or does he use default ones?
Of course they are made by Notch :happy.gif:
In your own Block class, put in something like (don't know what it's literally called right now)
I think 0 is "do not render", 1 is standard, and the other ones are custom ones. For example, look what number is returned in BlockTorch, and copy that number to have your own block look like a torch. Like that, flowers, fire and portal blocks for example have their own render type numbers.
hmm, it returns 2 but im still not sure where i would actualy set what the lightbulb looks like, it would be more then just a stick.
model with techne.