Jump to content

How do I make an entity for 1.16?


Skullblade

Recommended Posts

If you have a tutorial you can give me, I'd appreciate it. I've been searching for 3 hours and I can't find one. All I have is a Blockbench 3d model, a texture, and some snippets of Zombie code in a .json file. I don't know how to connect the two together, or what Java Classes I would need to make.

Link to comment
Share on other sites

Show us what you currently have along with what type of entity you would like it to be.

Based on your current description, I will assume it's some hostile mob which requires the following parts:

1. Something that extends MonsterEntity

2. An EntityType to register the factory to create your MonsterEntity

3. Entity Attributes which can be registered via EntityAttributeCreationEvent

4. Entity Spawn Placement which can be registered using EntitySpawnPlacementRegistry#register in the synchronous work queue of the FMLCommonSetupEvent

5. An Entity Model which probably extends SegmentedModel most likely

6. An Entity Texture that maps to the model

7. An Entity Renderer that probably extends MobRenderer that is registered via RenderingRegistry#registerEntityRenderingHandler in the FMLClientSetupEvent

8. Adding Entity Spawns which can be done via BiomeLoadingEvent to existing biomes or via json in your own biomes.

Link to comment
Share on other sites

24 minutes ago, ChampionAsh5357 said:

Show us what you currently have along with what type of entity you would like it to be.

Based on your current description, I will assume it's some hostile mob which requires the following parts:

1. Something that extends MonsterEntity

2. An EntityType to register the factory to create your MonsterEntity

3. Entity Attributes which can be registered via EntityAttributeCreationEvent

4. Entity Spawn Placement which can be registered using EntitySpawnPlacementRegistry#register in the synchronous work queue of the FMLCommonSetupEvent

5. An Entity Model which probably extends SegmentedModel most likely

6. An Entity Texture that maps to the model

7. An Entity Renderer that probably extends MobRenderer that is registered via RenderingRegistry#registerEntityRenderingHandler in the FMLClientSetupEvent

8. Adding Entity Spawns which can be done via BiomeLoadingEvent to existing biomes or via json in your own biomes.

The mob I want to create, known as "Bloodghast" (unrelated to a Nether Ghast), is a Vampire Spirit, or in other words, undead. (Burns in daylight, etc) It is hostile to the player, hovers above ground but doesn't actually fly like a Ghast or a Phantom. I would also like it to be able to pass through walls 1 block thick if possible and track players through those walls, but that might be a topic for another thread.

Here is what I have so far:

image.thumb.png.8e771168486b0b85f1192e9b7618c07a.png

image.thumb.png.5f44fa691fb0f6002b08d8ccb4d38b8e.png

image.thumb.png.6efd270b08276a61c79e11a9d9e20aff.png

image.thumb.png.a4f0a980b699486a6406c6da082b6467.png

image.thumb.png.d50dc91033293c833769741f7010f652.png

I included the Blockbench texture and model here to prove that, A: I have both (.png and .java), and B: So you can have an idea what I'm going for. The Bloodghast should be around player's height. In fact, it should be very similar to a Blaze, minus the fireballs and flying part. Any and all help is appreciated.

Link to comment
Share on other sites

2 hours ago, Skullblade said:

Uhh, I could still use help.

I will respond when I have time or when I'm looking through these.

 

Also, based on the formatting thing, I guess you're a bedrock addon maker? The json you have provided means absolutely nothing currently as there is nothing to handle that. You need to translate this into java.

Link to comment
Share on other sites

42 minutes ago, ChampionAsh5357 said:

I will respond when I have time or when I'm looking through these.

 

Also, based on the formatting thing, I guess you're a bedrock addon maker? The json you have provided means absolutely nothing currently as there is nothing to handle that. You need to translate this into java.

I'm coding for Java edition.

Link to comment
Share on other sites

2 minutes ago, ChampionAsh5357 said:

Then why did you make your entity as a bedrock behavior pack? Behavior packs do not existing in the Java edition currently.

I'm new to modding, okay? There's no tutorials online that I can find, so I'm guessing here.

Link to comment
Share on other sites

2 minutes ago, Skullblade said:

I'm new to modding, okay? There's no tutorials online that I can find, so I'm guessing here.

You can be new to modding sure, and I'm not putting you down for guessing incorrectly. However, it does say that on every tutorial I just googled for creating custom entity add-ons that the feature is exclusive to Bedrock.

 

So once again, you will need to translate your json to Java within the entity itself. You can use the other entity classes as references on where certain snippets should go.

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

You can be new to modding sure, and I'm not putting you down for guessing incorrectly. However, it does say that on every tutorial I just googled for creating custom entity add-ons that the feature is exclusive to Bedrock.

 

So once again, you will need to translate your json to Java within the entity itself. You can use the other entity classes as references on where certain snippets should go.

That sounds like replacing an old vanilla entity with a new one. I want to make a brand new one, but I don't know how to do that. Could you direct me to a tutorial or something?

Link to comment
Share on other sites

8 minutes ago, Skullblade said:

That sounds like replacing an old vanilla entity with a new one. I want to make a brand new one, but I don't know how to do that. Could you direct me to a tutorial or something?

You're not? There are NO deserializers for behavior packs for entities in Java edition. You need to create the entity data within the class directly. The json file from just a glance looks completely translatable into the format that Java edition uses (which means in code since entities, I repeat, are NOT data driven).

And probably not. Entity tutorials for 1.16 are not really existent as it requires learning in more detail about pathfinding and the new brain system. This is not to mention logic is usually unique to the user.

Link to comment
Share on other sites

37 minutes ago, ChampionAsh5357 said:

You're not? There are NO deserializers for behavior packs for entities in Java edition. You need to create the entity data within the class directly. The json file from just a glance looks completely translatable into the format that Java edition uses (which means in code since entities, I repeat, are NOT data driven).

And probably not. Entity tutorials for 1.16 are not really existent as it requires learning in more detail about pathfinding and the new brain system. This is not to mention logic is usually unique to the user.

So I can copy and paste the Zombie code into my class, or do I have to translate it? If so... well, I don't know how to do something like that.

Link to comment
Share on other sites

29 minutes ago, Skullblade said:

So I can copy and paste the Zombie code into my class, or do I have to translate it? If so... well, I don't know how to do something like that.

You need to translate that. And I was suggesting using already existing classes like CreeperEntity, ZombieEntity, and so forth for a base on how the translation might occur.

Link to comment
Share on other sites

7 minutes ago, ChampionAsh5357 said:

You need to translate that. And I was suggesting using already existing classes like CreeperEntity, ZombieEntity, and so forth for a base on how the translation might occur.

Would these classes be found somewhere in the .minecraft folder?

Link to comment
Share on other sites

21 minutes ago, ChampionAsh5357 said:

No, they would be found in your IDE within the dependencies of your project explorer. I think IntelliJ calls them referenced libraries or something similar.

I think I found the dependencies, known as "External Libraries." There's a ton of folders though, and I don't know where to look. I can find block and item data just fine, but the entity data seems separate.

Link to comment
Share on other sites

On 5/16/2021 at 5:49 PM, ChampionAsh5357 said:

Should be able to search for class names or find a type hierarchy for MonsterEntity. I don't use IntelliJ so I'm not familiar with the keybinds.

I found it in "Gradle: net.minecraftforge:forge1.16.5-36.1.0_mapped_official_1.16.5/forge-1.16.5_36.1.0_mapped_official_1.16.5-recomp.jar/net/minecraft/entity/monster"

Thank you.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.