Help! Cannot create a custom mob!

Started by wardboys on

Topic category: Help with MCreator software

Last seen on 16:53, 14. Jul 2016
Joined May 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help! Cannot create a custom mob!

So I was trying to create a bipedal mob that attacks you just like any other monster... I first tried to base the AI off Zombie or something but it gives me the same error that I posted below. This error also happened when I tried to define custom AI tasks such as Act Agressively Against Player, Wander Around, etc.:

warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Pylo\MCreator169\forge\build\sources\main\java\mod\mcreator\mcreator_lynchmob.java:116: error: cannot find symbol
            this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntityEntityPlayer.class, true));
                                                                                  ^
  symbol:   class EntityEntityPlayer
  location: class Entitylynchmob
Note: C:\Pylo\MCreator169\forge\build\sources\main\java\mod\mcreator\mcreator_lynchmob.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 

Please help me... Thanks!

Last seen on 02:28, 26. Apr 2017
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:@ahig:
Tue, 07/19/2016 - 06:57

@#6.1.1 ikr

Last seen on 02:28, 26. Apr 2017
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:@ahig:
Tue, 07/19/2016 - 06:57

@#6.1.1 ikr

Last seen on 17:06, 4. Mar 2017
Joined Jul 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:@ahig:
Tue, 07/19/2016 - 15:07

@#6.1.1.1 i have the same problem but when ever i delete the mob the error keeps popping up every few seconds.

 

Last seen on 02:28, 26. Apr 2017
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:@ahig:
Tue, 07/19/2016 - 20:40

@#6.1.1.1.1 Geez

Last seen on 02:28, 26. Apr 2017
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:RE:@ahig:
Tue, 07/19/2016 - 20:41

@#6.1.1.1.1.1 I'm making the mob in the old version of mcreator, hoping it will still work

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
don't touch the import entity
Tue, 07/19/2016 - 23:13

don't touch the import entity Entity!

the ai tasks are farther down the code!

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or entity entity = this
Tue, 07/19/2016 - 23:16

or entity entity = this

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the double entity is at the
Tue, 07/19/2016 - 23:17

the double entity is at the front of the name of (said mob) inside the ai tasks. for example, EntityEntityZombie

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the ai tasks are all together
Wed, 07/20/2016 - 13:19

the ai tasks are all together farther down the code, you need to edit the name of the mobs in that area.

Last seen on 19:08, 12. Aug 2016
Joined Jul 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:the ai tasks are all together
Thu, 07/21/2016 - 21:41

@#10 Still not seing the ai tasks, going to wait for the update. even searched 'entity entity and nothing like you discribed showed up.

Last seen on 07:54, 18. Sep 2016
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@ahig
Thu, 07/21/2016 - 22:28

@ahig

I managed to find the code.. I think


            this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
            this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
            this.tasks.addTask(9, new EntityAIWander(this, 0.8D));
            this.tasks.addTask(9, new EntityAILookIdle(this));
            this.tasks.addTask(10, new EntityAISwimming(this));

I changed "entityentityplayer" to EntityPlayer.class

Is that right?

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes that is right, also if
Fri, 07/22/2016 - 00:30

yes that is right, also if you use other mobs do what i said farther up and change their name and import them

Last seen on 19:08, 12. Aug 2016
Joined Jul 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:yes that is right, also if
Fri, 07/22/2016 - 02:24

@#12 Again did  not find it. Here is the whole code:

package mod.mcreator;

 

import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.common.DungeonHooks;

 

import net.minecraft.world.biome.Biome;
import net.minecraft.world.World;
import net.minecraft.world.BossInfoServer;
import net.minecraft.world.BossInfo;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.EnumHand;
import net.minecraft.util.DamageSource;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.init.Blocks;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.Minecraft;

 

import java.util.Random;
import java.util.Iterator;
import java.util.ArrayList;

 

@SuppressWarnings("unchecked")
public class mcreator_lycanCloneFire {

 

 public int mobid = 0;
 public static Object instance;

 

 public void load(FMLInitializationEvent event) {
 }

 

 public void generateNether(World world, Random random, int chunkX, int chunkZ) {
 }

 

 public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
 }

 

 public int addFuel(ItemStack fuel) {
  return 0;
 }

 

 @SideOnly(Side.CLIENT)
 public void registerRenderers() {
  RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_lycanCloneFire.ModelLycanCloneFire(),
    0) {
   protected ResourceLocation getEntityTexture(Entity par1Entity) {
    return new ResourceLocation("LycanCloneFire.png");
   }
  };
  RenderingRegistry.registerEntityRenderingHandler(mcreator_lycanCloneFire.EntitylycanCloneFire.class, customRender);
 }

 

 public void serverLoad(FMLServerStartingEvent event) {
 }

 

 public void preInit(FMLPreInitializationEvent event) {
  int entityID = MathHelper.getRandomUUID().hashCode();
  mobid = entityID;
  EntityRegistry.registerModEntity(mcreator_lycanCloneFire.EntitylycanCloneFire.class, "lycanCloneFire", entityID, instance, 64, 1, true,
    (255 << 16) + (0 << 8) + 0, (153 << 16) + (0 << 8) + 0);
  EntityRegistry.addSpawn(mcreator_lycanCloneFire.EntitylycanCloneFire.class, 20, 3, 30, EnumCreatureType.MONSTER, clean(Biome.REGISTRY));

 

  DungeonHooks.addDungeonMob("lycanCloneFire", 180);
 }

 

 public static Biome[] clean(net.minecraft.util.registry.RegistryNamespaced<ResourceLocation, Biome> in) {
  Iterator<Biome> itr = in.iterator();
  ArrayList<Biome> ls = new ArrayList<Biome>();
  while (itr.hasNext()) {
   ls.add(itr.next());
  }
  return ls.toArray(new Biome[ls.size()]);
 }

 

 /*
  * public Entity spawnEntity(int var1, World var2, double var3, double var5,
  * double var7) { if(var1==mobid) return new
  * mcreator_lycanCloneFire.EntitylycanCloneFire(var2); else return null; }
  */

 

 public static class EntitylycanCloneFire extends EntityWolf {
  World world = null;

 

  public EntitylycanCloneFire(World var1) {
   super(var1);
   world = var1;
   experienceValue = 200;
   this.isImmuneToFire = true;
   addRandomArmor();
   setNoAI(!false);

 

  }

 

  protected void addRandomArmor() {

 

  }

 

  @Override
  public boolean isNonBoss() {
   return false;
  }

 

  private final BossInfoServer bossInfo = (BossInfoServer) (new BossInfoServer(this.getDisplayName(), BossInfo.Color.RED,
    BossInfo.Overlay.PROGRESS));

 

  @Override
  public void addTrackingPlayer(EntityPlayerMP player) {
   super.addTrackingPlayer(player);
   this.bossInfo.addPlayer(player);
  }

 

  @Override
  public void removeTrackingPlayer(EntityPlayerMP player) {
   super.removeTrackingPlayer(player);
   this.bossInfo.removePlayer(player);
  }

 

  @Override
  public void onUpdate() {
   super.onUpdate();
   this.bossInfo.setPercent(this.getHealth() / this.getMaxHealth());
  }

 

  protected void dropRareDrop(int par1) {
   this.dropItem(new ItemStack(Blocks.FIRE).getItem(), 1);
  }

 

  @Override
  protected Item getDropItem() {
   return new ItemStack(Blocks.FIRE).getItem();
  }

 

  @Override
  protected net.minecraft.util.SoundEvent getAmbientSound() {
   return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wolf.ambient"));
  }

 

  @Override
  protected net.minecraft.util.SoundEvent getHurtSound() {
   return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wolf.hurt"));
  }

 

  @Override
  protected net.minecraft.util.SoundEvent getDeathSound() {
   return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wolf.death"));
  }

 

  @Override
  public void onStruckByLightning(EntityLightningBolt entityLightningBolt) {
   super.onStruckByLightning(entityLightningBolt);
   int i = (int) this.posX;
   int j = (int) this.posY;
   int k = (int) this.posZ;
   Entity entity = this;

 

  }

 

  @Override
  public void fall(float l, float d) {
   super.fall(l, d);
   int i = (int) this.posX;
   int j = (int) this.posY;
   int k = (int) this.posZ;
   super.fall(l, d);
   Entity entity = this;

 

  }

 

  @Override
  public void onDeath(DamageSource source) {
   super.onDeath(source);
   int i = (int) this.posX;
   int j = (int) this.posY;
   int k = (int) this.posZ;
   Entity entity = this;

 

  }

 

  @Override
  protected boolean processInteract(EntityPlayer entity, EnumHand hand, ItemStack stack) {
   super.processInteract(entity, hand, stack);
   int i = (int) this.posX;
   int j = (int) this.posY;
   int k = (int) this.posZ;

 

   return true;
  }

 

  @Override
  protected float getSoundVolume() {
   return 1.0F;
  }

 

 }

 

 // Date: 7/16/2016 10:00:52 PM
 // Template version 1.1
 // Java generated by Techne
 // Keep in mind that you still need to fill in some blanks
 // - ZeuX

 

 public static class ModelLycanCloneFire extends ModelBase {
  // fields
  ModelRenderer WolfHead;
  ModelRenderer Body;
  ModelRenderer Mane;
  ModelRenderer Leg1;
  ModelRenderer Leg2;
  ModelRenderer Leg3;
  ModelRenderer Leg4;
  ModelRenderer Tail;
  ModelRenderer Ear1;
  ModelRenderer Ear2;
  ModelRenderer Nose;

 

  public ModelLycanCloneFire() {
   textureWidth = 64;
   textureHeight = 32;

 

   WolfHead = new ModelRenderer(this, 0, 0);
   WolfHead.addBox(-3F, -3F, -2F, 6, 6, 4);
   WolfHead.setRotationPoint(-1F, 13.5F, -7F);
   WolfHead.setTextureSize(64, 32);
   WolfHead.mirror = true;
   setRotation(WolfHead, 0F, 0F, 0F);
   Body = new ModelRenderer(this, 18, 14);
   Body.addBox(-4F, -2F, -3F, 6, 9, 6);
   Body.setRotationPoint(0F, 14F, 2F);
   Body.setTextureSize(64, 32);
   Body.mirror = true;
   setRotation(Body, 1.570796F, 0F, 0F);
   Mane = new ModelRenderer(this, 21, 0);
   Mane.addBox(-4F, -3F, -3F, 8, 6, 7);
   Mane.setRotationPoint(-1F, 14F, -3F);
   Mane.setTextureSize(64, 32);
   Mane.mirror = true;
   setRotation(Mane, 1.570796F, 0F, 0F);
   Leg1 = new ModelRenderer(this, 0, 18);
   Leg1.addBox(-1F, 0F, -1F, 2, 8, 2);
   Leg1.setRotationPoint(-2.5F, 16F, 7F);
   Leg1.setTextureSize(64, 32);
   Leg1.mirror = true;
   setRotation(Leg1, 0F, 0F, 0F);
   Leg2 = new ModelRenderer(this, 0, 18);
   Leg2.addBox(-1F, 0F, -1F, 2, 8, 2);
   Leg2.setRotationPoint(0.5F, 16F, 7F);
   Leg2.setTextureSize(64, 32);
   Leg2.mirror = true;
   setRotation(Leg2, 0F, 0F, 0F);
   Leg3 = new ModelRenderer(this, 0, 18);
   Leg3.addBox(-1F, 0F, -1F, 2, 8, 2);
   Leg3.setRotationPoint(-2.5F, 16F, -4F);
   Leg3.setTextureSize(64, 32);
   Leg3.mirror = true;
   setRotation(Leg3, 0F, 0F, 0F);
   Leg4 = new ModelRenderer(this, 0, 18);
   Leg4.addBox(-1F, 0F, -1F, 2, 8, 2);
   Leg4.setRotationPoint(0.5F, 16F, -4F);
   Leg4.setTextureSize(64, 32);
   Leg4.mirror = true;
   setRotation(Leg4, 0F, 0F, 0F);
   Tail = new ModelRenderer(this, 9, 18);
   Tail.addBox(-1F, 0F, -1F, 2, 8, 2);
   Tail.setRotationPoint(-1F, 12F, 8F);
   Tail.setTextureSize(64, 32);
   Tail.mirror = true;
   setRotation(Tail, 1.130069F, 0F, 0F);
   Ear1 = new ModelRenderer(this, 16, 14);
   Ear1.addBox(-3F, -5F, 0F, 2, 2, 1);
   Ear1.setRotationPoint(-1F, 13.5F, -7F);
   Ear1.setTextureSize(64, 32);
   Ear1.mirror = true;
   setRotation(Ear1, 0F, 0F, 0F);
   Ear2 = new ModelRenderer(this, 16, 14);
   Ear2.addBox(1F, -5F, 0F, 2, 2, 1);
   Ear2.setRotationPoint(-1F, 13.5F, -7F);
   Ear2.setTextureSize(64, 32);
   Ear2.mirror = true;
   setRotation(Ear2, 0F, 0F, 0F);
   Nose = new ModelRenderer(this, 0, 10);
   Nose.addBox(-2F, 0F, -5F, 3, 3, 4);
   Nose.setRotationPoint(-0.5F, 13.5F, -7F);
   Nose.setTextureSize(64, 32);
   Nose.mirror = true;
   setRotation(Nose, 0F, 0F, 0F);
  }

 

  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
   super.render(entity, f, f1, f2, f3, f4, f5);
   setRotationAngles(f, f1, f2, f3, f4, f5, entity);

 

   WolfHead.render(f5);
   Body.render(f5);
   Mane.render(f5);
   Leg1.render(f5);
   Leg2.render(f5);
   Leg3.render(f5);
   Leg4.render(f5);
   Tail.render(f5);
   Ear1.render(f5);
   Ear2.render(f5);
   Nose.render(f5);
  }

 

  private void setRotation(ModelRenderer model, float x, float y, float z) {
   model.rotateAngleX = x;
   model.rotateAngleY = y;
   model.rotateAngleZ = z;
  }

 

  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e)

 

  {
   super.setRotationAngles(f, f1, f2, f3, f4, f5, e);

 

  }

 

 }

 

}

Last seen on 03:45, 3. Apr 2024
Joined Dec 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
do you have custom ai tasks,
Fri, 07/22/2016 - 18:52

do you have custom ai tasks, it doesn't look like you do.

the code for custom ai should be in green looking something like this...

this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
            this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
            this.tasks.addTask(9, new EntityAIWander(this, 0.8D));
            this.tasks.addTask(9, new EntityAILookIdle(this));
            this.tasks.addTask(10, new EntityAISwimming(this))

 

it will change depending on what tasks your mob has