Felix_
Members-
Posts
9 -
Joined
-
Last visited
Everything posted by Felix_
-
Oh thanks. Got a solution by now, i just made my own file format and parsed the object to textured quads
-
Hi there, I want to use my custom 3D Models I created, but I don't understand how to render and bake custom 3D OBJ Models, or if it is even possible. Here is what I got so far: public class BakeHandler { public BakeHandler() { OBJLoader.INSTANCE.addDomain(HelicopterMod.MOD_ID); } @SubscribeEvent public void onModelBake(ModelBakeEvent event) { try { IUnbakedModel model = OBJLoader.INSTANCE.loadModel(new ResourceLocation(HelicopterMod.MOD_ID, "models/entity/helicopter_tris.obj")); //model.bake(bakery, spriteGetter, sprite, format); } catch (Exception e) { e.printStackTrace(); } } } I simply don't know where to continue now, as I don't find any currently working example or explanation. Does anyone of you guys know an example I can look at, or a good explanation on how to use OBJ models for entities? Would appreciate any help
-
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
Thank you very much! it's somewhat working now Now gonna try to use my .obj file. Thanks for the help! -
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
many thanks That's what I wrote there now: event.getRegistry().registerAll( EntityList.helicopter_entity = (EntityType<HelicopterEntity>) EntityType .Builder .<HelicopterEntity>create(HelicopterEntity::new ,EntityClassification.MISC) .size(1f, 1f) .build(MOD_ID + ":helicopter_entity") .setRegistryName(location("helicopter_entity")) ); When I now try to place the entity i get a RunTime exception. Edit by changing the code to: event.getRegistry().registerAll( EntityList.helicopter_entity = (EntityType<HelicopterEntity>) EntityType .Builder .<HelicopterEntity>create(HelicopterEntity::new ,EntityClassification.MISC) .setCustomClientFactory(HelicopterEntity::new) .size(1f, 1f) .build(MOD_ID + ":helicopter_entity") .setRegistryName(location("helicopter_entity")) ); I don't get a exception anymore, but if I spawn the entity nothing is happening. It must be somewhere, since I can destroy it, but there is nothing visible. Do you know where the problem is in this code? -
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
Hi, I stripped down the code to the most essential things: https://github.com/Felixleh/helicopter And I found a possible solution by using some build in function: @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } Apperently this should solve the problem. I can place the entity in the world by rightclicking the item, but I can't create it with the summon command. When created it's invisible and has no collision. Is there anything I am doing obviously wrong? I tried to create my own Packet but I still don't understand how to work with the handler part. -
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
hm thanks anyways is there anything that you would recommend me to do or where I could learn the things I need to make this project possible? -
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
Thanks! I found the documentation, but honestly I have no Idea where to start. Do you know any stripped down example code of a custom non-living entity, I could use to try to understand the concept? -
[Solved][1.14.4] Problem with custom entity rendering (...I guess?)
Felix_ replied to Felix_'s topic in Modder Support
Hi first of all thanks for the answer. I'm, of course, going to change the domain, when i came somewhat further. Do I have to use something instead of @OnlyIn or can I just remove it? For the custom Packet: Can I use a class with a signature similar to this one: public class SpawnHelicopterPacket implements IPacket<IClientPlayNetHandler> And if yes, how could i use the handler.handleSpawnObject(this); part? Sorry if that's to basic, but I really can't find anything helpfull on google. -
Hi there, I'm new to minecraft modelling, not to Java though. I try to make a custom mod, that adds a helicopter. For the start I tried to basically copy a boat. The problem: When I spawn the custom entity, it is invisible. It is definitly there, since I can kill it with the ingame comments and TNT can destroy the entity, with the explosion dropping the item. Basically i copied the minecraft boat classes, so i guess it has something to do with rendering or registration? Here is the Github link if anyone is willing to help: https://github.com/Felixleh/helicopter Would appreciate any help, as I have no idea where this comes from