Wuppy’s Minecraft Forge Modding Tutorials for 1.6: Entity Part 2: EntityTutorial

In the last tutorial we registered the entity we are going to make. When we did this we didn’t make the EntityTutorial file which we did use several times in the Tutorial file. This gave several errors which we are going to fix right now.

The first thing you have to do is hover your mouse over EntityTutorial in one of the places it’s used. Then click Create class. This will make a file that looks like this.

The next thing you will have to do is make sure that this entity is actually going to be an Entity according to Java code. The way to do this is by making it extend EntityMob. When you add that code you will get an error under EntityMob to fix this simply import this file using Ctrl, Shift, O. Right now there should be an error under your EntityTutorial. The way to fix this one is by hovering over it and clicking addConstructor(World). You should now have a file that looks like this.

There also shouldn’t be any errors in your mod. If there are you did something wrong and should take a look at what the differences are.

In the next few tutorials I’m going to show you how to configure your mob. There are far too many things you can edit about your mob to cover in one tutorial. However, right now there is one more thing you should add to your mob which is this.

With this code you will set the creature attribute. If you would go to the EnumCreatureAttribute file you will not see that much in there. The only thing you will see are 3 words and that’s it. However, choosing this one is pretty important. It effects the way certain mobs will act when your mob is around and most importantly the way potions work. If you have an undead mob it will heal with poison potions and hurt with healing potions. However, if you go for an arthropod it will not change potion behavior, but it will make sure that bane of arthropods does more damage. So make sure you choose this one carefully.

The whole file should now look like this.

In the next tutorial there will be more customization of the mob.

You can download the source code and the assets folder overĀ here

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">