Posted August 28, 20196 yr I want to add Entities to the game but I don't know how. I know how you add a block, First, you make a block class: Then you call that in a ModBlocks class: Then you Register the Block and the Block Item: And then you would have the Blockstate and Block Models and Textures. Those are all the steps to making a Block, But what are all the steps to making an Entity? I know Block Bench has an Entity Model creator thing but I do not know how to use it. could someone please explain
August 28, 20196 yr I'm assuming you're using MC 1.14.4. Registering Entities is very similar to registering other game Objects, and extremely similar to registering TileEntities in that you actually register Types rather than the Entity itself. Here's an example: //Entities @ObjectHolder("wabbit") public static final EntityType<WabbitEntity> wabbit = null; @SubscribeEvent public static void registerEntities(final RegistryEvent.Register<EntityType<?>> event) { LOGGER.debug("Wabbits: Registering Entities..."); event.getRegistry().registerAll( EntityType.Builder.create(WabbitEntity::new, EntityClassification.CREATURE) .build("wabbit").setRegistryName(Constants.MOD_ID, "wabbit"); ); } //registerEntities() You'll probably want a model for your Entity. Try reading https://mcforge.readthedocs.io/en/1.13.x/models/introduction/ (outdated) to get started. You ought to search through the vanilla files (I'd recommend the Slime or the Rabbit) to see how they make theirs, and you could use a program like Blender to create .obj models if you decide to go that route. You'll likely need to create a special Renderer for you model. Try looking at the vanilla files to see how this works. As for registering your Renderer, try looking at this: https://stackoverflow.com/questions/37126170/irenderfactory-help-in-minecraft-forge (outdated, but the factory still works). Finally, I have some code you can look at if you need more help. Note that it's mostly throw-away code and not very good, so you ought to use it as an example only.EntityType ExampleEntity and Goal ExampleRenderer and Model Example
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.