HassanS6000 Posted June 14, 2015 Posted June 14, 2015 Hi! I've searched everywhere for this, but to no avail. Can anybody tell me how to use the B3D Model Loader? Thanks in Advance! Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 How would I do this for an item and an entity? Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 Not working for my item.. just getting purple and black squares.. Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 It's a format for 3D Models that Forge started supporting after 1.8 was released. Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 Okay I got my entity with the B3D Model. I have an IModel - which doesn't have a render method... what do I do now? Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 There was a IModelCustom class which had a render method... was there any replacement of that in 1.8? Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 Are you sure? The BlockModelRenderer may work but I'm not sure what to put for all the parameters. Such as VertexFormat, bakedTextureGetter, blockPosIn, worldRendererIn, blockAccessIn, and blockStateIn. Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 Alright I've gotten pretty far from what you've given me so far. Still don't know what to put in for the actual model.bake() parameters. The VertexFormat, and the bakedTextureGetter. Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 What am I supposed to do then? I have a model and want to render it.. Quote
HassanS6000 Posted June 14, 2015 Author Posted June 14, 2015 I'm not sure I understand what you mean exactly. I want to use a .obj or .b3d model for my entity and some items. How would registering my model and making a ModelResourceLocation make it render? I've already loaded my model into an IModel, but I want that IModel to render now. How do I do that??? ModelBakeEvent requires the following parameters ModelManager, IRegistry and ModelLoader, and B3DLoader.instance doesn't work for a ModelLoader.. Quote
HassanS6000 Posted June 15, 2015 Author Posted June 15, 2015 OK. How would I go about actually rendering it, if I can't bake my model? Quote
HassanS6000 Posted June 16, 2015 Author Posted June 16, 2015 I can't do what is done in RenderFallingBlock... it causes my game to crash because I can't pass in a block state... as I'm not rendering a block, rather an entity. Here is my class: http://pastebin.com/b8TNAVZf What are ModelLoaderRegistry, and ICustomModelLoader. In this forum posting: http://www.minecraftforge.net/forum/index.php?topic=27505.0 it says the new ModelLoaderRegistry is a "replacement for IAdvancedModelLoader" Quote
HassanS6000 Posted June 16, 2015 Author Posted June 16, 2015 Thanks! How would I actually use that in my class? I had a link to a paste-bin copy of it above. I don't have an IBakedModel - I have an IModel. Quote
HassanS6000 Posted June 17, 2015 Author Posted June 17, 2015 How? I can't use ModelBakeEvent because I don't know any of the parameters.. ModelManager, ModelLoader, and IRegistry Quote
larsgerrits Posted June 17, 2015 Posted June 17, 2015 You do not know how events work. Google it, there are plenty of tutorials. Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
HassanS6000 Posted June 17, 2015 Author Posted June 17, 2015 Yes I do. I can't use the event because I can't pass in any of the parameters. Quote
larsgerrits Posted June 17, 2015 Posted June 17, 2015 Judging by your last reply, you do not know how events work. You don't have to create new instances of an Event, but rather listen to the events posted by Forge/FML. Seriously, google it. Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
HassanS6000 Posted June 17, 2015 Author Posted June 17, 2015 LOL... I was being so stupid!! Thanks for your help! Quote
HassanS6000 Posted June 17, 2015 Author Posted June 17, 2015 Alright I've used ModelBakeEvent to get my IBakedModel. Now, how would I do worldrenderer.addVertexData(); from there? I can get a list of all the quads from my IBakedModel, but that does not return a list of int's - I think.. Quote
Ernio Posted June 17, 2015 Posted June 17, 2015 Look inside BakedQuad maybe? int[28] vertexData. Quote 1.7.10 is no longer supported by forge, you are on your own.
HassanS6000 Posted June 18, 2015 Author Posted June 18, 2015 Thanks Ernio! I'm not so sure what to do from here... It crashes now but I'm 80% sure I'm not using Tessellator correctly.. Crash-Report: http://pastebin.com/nt1gHi87 RenderMongooseEntity Class: http://pastebin.com/XXk6LVSh Quote
HassanS6000 Posted June 19, 2015 Author Posted June 19, 2015 UPDATE! I fixed the crashing issue.. I forgot about worldRenderer.startDrawingQuads() However, I still cannot see my model, as I don't know what to do for addVertex().. am I supposed to use the vertexData? Quote
HassanS6000 Posted June 19, 2015 Author Posted June 19, 2015 UPDATE No.2 I can get it to render - it's just screwed up. Here's what it's supposed to look like: http://snag.gy/hefWK.jpg Here's what it looks like: http://snag.gy/gqMQ0.jpg Here's my GitHub Repository: https://github.com/hsyyid/HaloMod Any help would be appreciated! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.