When ever I make a mob it has an error.

Started by aGrill on Mon, 07/16/2018 - 01:02

Topic category: Bugs and solutions

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
When ever I make a mob it has an error.
Mon, 07/16/2018 - 01:02

Okay so, I was just making 2 of my mobs. Both were created in Techne. It went very smooth until when I try to test the mod it gives me a Problematic error. I searched up everything but I couldn't find a solution. The first time I did this with a custom model it worked. Why didn't it work when I did it again? Someone help please.

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Please I need help! It’s…
Mon, 07/16/2018 - 05:48

Please I need help! It’s been 4 hours and no respond yet...

 

Last seen on 13:11, 22. Feb 2019
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you give all the info…
Mon, 07/16/2018 - 10:48

Can you give all the info about the error?

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you give information…
Mon, 07/16/2018 - 15:59

Can you give information such as if it has a custom model, if so what did you make it with and if you want, the .java code. Also the AI procedure too.

Recreate the error by building it (go to the mob and spam next). Go to the console and wait for it to give the error. Copy all of it and post it here. 

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It was a custom model from…
Mon, 07/16/2018 - 17:36

It was a custom model from Techne. Let me just copy and paste the error

 

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You're taking quite long to…
Mon, 07/16/2018 - 17:51

You're taking quite long to copy and paste the error :P

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry I'm trying to copy and…
Mon, 07/16/2018 - 18:10

Sorry I'm trying to copy and paste

 

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
    Executing gradle command…
Mon, 07/16/2018 - 18:13

   
Executing gradle command: clean build
Microsoft Windows [Version 10.0.17134.112]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Pylo\MCreator174>cd forge
C:\Pylo\MCreator174\forge>SET "JAVA_HOME=C:\Pylo\MCreator174\jdk64\"
C:\Pylo\MCreator174\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator174\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator174\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" clean build
#################################################
         ForgeGradle 2.2-SNAPSHOT-9bc34b4        
  https://github.com/MinecraftForge/ForgeGradle  
#################################################
               Powered by MCP unknown               
             http://modcoderpack.com             
         by: Searge, ProfMobius, Fesh0r,         
         R4wk, ZeuX, IngisKahn, bspkrs           
#################################################
:clean
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator174\forge\build\sources\main\java\mod\mcreator\mcreator_bob.java:184: error: illegal character: '\u00bf'
   PK

 

 

 

Is how much it is letting me copy >:(

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Paste it in here (pastebin)
Mon, 07/16/2018 - 18:30

Paste it in here (pastebin)

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
From that, I know that you…
Mon, 07/16/2018 - 18:32

From that, I know that you created a mob called 'bob' and there is an unknown character in line 184 in that class. Did you edit the code in mcreator_bob.java before? Also, did you use a custom model and if you did, using Techne, Tabula, MCAnimator..

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for the 3 posts in a…
Mon, 07/16/2018 - 18:34

Sorry for the 3 posts in a row, I accidently pressed post. Can you also send the code of the mob:

  1. Go to the 'CODE' tab next to TOOLS and CONSOLE
  2. On the left there are a list of mods. Double click on 'bob' and copy the code. Paste it in the pastebin too or seperately

 

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I used Techne and  I didn’t…
Mon, 07/16/2018 - 18:34

I used Techne and  I didn’t edit any code cause I’m stupid and I can’t do that l

Last seen on 04:33, 12. May 2019
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
import net.minecraftforge…
Mon, 07/16/2018 - 18:39

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.minecraft.world.biome.Biome;
import net.minecraft.world.World;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.ResourceLocation;import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.EntityRegistry;

import net.minecraft.util.EnumHand;
import net.minecraft.util.DamageSource;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAITempt;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.Minecraft;

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

@SuppressWarnings("unchecked")
public class mcreator_bob {

    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_bob.Model(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("Bob.png");}};
        RenderingRegistry.registerEntityRenderingHandler(mcreator_bob.Entitybob.class, customRender);
        
    }
    
    public void serverLoad(FMLServerStartingEvent event){}
    public void preInit(FMLPreInitializationEvent event){
        int entityID = MathHelper.getRandomUUID().hashCode();
        mobid = entityID;
        EntityRegistry.registerModEntity(mcreator_bob.Entitybob.class, "bob", entityID, instance, 64, 1, true, (0 << 16) + (153 << 8) + 255, (102 << 16) + (51 << 8) + 255);
        EntityRegistry.addSpawn(mcreator_bob.Entitybob.class, 20, 3, 30, EnumCreatureType.CREATURE ,mcreator_sakuraBiome.biome);

        
        
        
    }
    
    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 static class Entitybob extends EntityOcelot 
    {
        World world = null;
        public Entitybob(World var1)
        {
            super(var1);
            world = var1;
            experienceValue = 15;
            this.isImmuneToFire = false;
            addRandomArmor();
            setNoAI(!true);
            this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
this.tasks.addTask(8, new EntityAILookIdle(this));
this.tasks.addTask(1, new EntityAITempt(this, 0.8D, mcreator_moonStone.block, true));

            
        }

        

        
protected void addRandomArmor(){

}

        
        
        
        @Override
        protected Item getDropItem()
        {
            return new ItemStack(mcreator_moonStone.block).getItem();
        }

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

        @Override
        protected net.minecraft.util.SoundEvent getHurtSound()
        {
            return (net.minecraft.util.SoundEvent)net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("game.neutral.hurt"));
        }
        
        @Override
        protected net.minecraft.util.SoundEvent getDeathSound()
        {
            return (net.minecraft.util.SoundEvent)net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("game.neutral.die"));
        }

        @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
        public 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;
        }
        
    }

    PK

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think it's something…
Mon, 07/16/2018 - 18:44

I think it's something inside the mob. Also remove the 'PK' at the end if it's apart of the file. I'm gonna try check the code.

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
In the code, remove 'PK' at…
Mon, 07/16/2018 - 18:46

In the code, remove 'PK' at the end. It shows on the console output that the illegal character is 'PK'. Remove PK and if there are other useless stuff, delete them and click Save and Build.