Started by
aGrill
on
Topic category: Troubleshooting, bugs, and solutions
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.
Please I need help! It’s been 4 hours and no respond yet...
Can you give all the info about the error?
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.
It was a custom model from Techne. Let me just copy and paste the error
You're taking quite long to copy and paste the error :P
Sorry I'm trying to copy and paste
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 >:(
Paste it in here (pastebin)
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..
Sorry for the 3 posts in a row, I accidently pressed post. Can you also send the code of the mob:
I used Techne and I didn’t edit any code cause I’m stupid and I can’t do that l
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
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.
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.