[1.6.4][Tutorial]Создание и рендер моба.

2,955
12
Ну, типо первый туториал по мобам (и вообще первый на форуме).
Многим хотелось создать моба и рендерить его, но туториала не было на сайте. Ну что же, давайте начнем.
Для начала в главном классе мода пишите:
Код:
EntityList.addMapping(EntityYouMob.class, "YourMob", 156, 0x0033FF, 0x00CCFF);
111 - айди вашего моба последние 2 - цвет яйца.
Класс моба
Код:
public class EntityYouMob extends EntityMob //Еще тут может быть EntityAnimal для пассивного моба, еще есть IAnimal и EntityCreature, но о них позже.
{
    public EntityYouMob(World par1World)
    {
        super(par1World);
        this.setSize(0.9F, 1.3F); //Размерчики
        this.setEquipmentDropChance(1, 1.0F); //Шанс дропа экипировки
        this.setCanPickUpLoot(true); //Может подбирать лут
           //AI.... Тут тупо поможет перевод названий классов.
        this.tasks.addTask(1, new EntityAISwimming(this)); //Плавает
        this.tasks.addTask(5, new EntityAIWander(this, 0.8D));//Хрен от вас отстанет
        this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); //Смотрит на вас
        this.tasks.addTask(6, new EntityAILookIdle(this)); //Просто смотрит
        this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); //Подходит
    }

    @Override
    protected void applyEntityAttributes()
    {
        super.applyEntityAttributes();
        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(10.0D); //Макс хп у моба.
        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.20000000298023224D);//Скорость передвижения
    }

    @Override
    protected String getLivingSound()
    {
        return "yourmod:MobLiving";//Это обычные звуки, их в yourmod/sound/MobLiving.
    }

    @Override
    protected String getHurtSound()
    {
        return "yourmod:HurtLiving";//Это звуки урона, их туда же.
    }

    @Override
    protected String getDeathSound()
    {
        return "yourmod:DeathLiving";//Типо звуки смерти.
    }

    @Override
    protected float getSoundVolume() //Громкость звуков
    {
        return 0.4F;
    }
}
Я думаю в коде все понятно.
Клиент прокси (у меня оно такое)
Код:
public class ClientProxy extends CommonProxy{

    public void preLoad() {
        
    }
    public void load(){
    MinecraftForge.EVENT_BUS.register(new YourSoundEvent()); //Событие ваших звуков.
     RenderingRegistry.registerEntityRenderingHandler(EntityYouMob.class, new RenderYourMob(new YourModel(),2.0F));
    //YourModel - модель вашего моба, делается в програмке Teche. RenderYourMob - класс рендера вашего моба.      EntityYouMob - класс вашего моба.
    }
    public void postLoad(){
        
    }
}
Сделали модель? Хорошо.
Теперь создаем файл рендера
Код:
@SideOnly(Side.CLIENT)
public class RenderYourMob extends RenderLiving
{
    private static final ResourceLocation Your_Texture = new ResourceLocation("yourmod", "textures/entity/yourtexture.png");  //Текстуру в assets/yourmod/textures/entity/yourtexture.png 

    public RenderYourMob(ModelBase par1ModelBase, float par2)
    {
        super(par1ModelBase, par2);
    }

    @Override
    protected ResourceLocation getEntityTexture(Entity par1Entity)
    {
        return Your_Texture;
    }
}
Вот, у вас есть рендер.
И последнее, событие звуков
Код:
public class YourSoundEvent 
{
        @ForgeSubscribe
        public void onSoundLoad(SoundLoadEvent event) {
                event.manager.addSound("yourmod:MobLiving.ogg");
                event.manager.addSound("yourmod:HurtLiving.ogg");
                event.manager.addSound("yourmod:DeathLiving.ogg");
                //Я думаю вы поняли как изменять под себя.
        }
}
Все! У вас есть свой моб со своей моделью!
У вас моб с моделью игрока. Вы хотите чтоб в руке был виден предмет а на нем броня. Легко!
Файл рендера:
Код:
public class RenderYouMob extends RenderBiped //Вот он, рендерит все за вас, хвалю его. xD
{
    private static final ResourceLocation Your_Texture = new ResourceLocation("textures/entity/steve.png"); //Изменяйте на свою текстуру, рисовать по такому же принцапу, как скин.
    
    public RenderYourMob(ModelBiped par1ModelBiped, float par2) {
        super(par1ModelBiped, par2);
             }
     @Override
        protected ResourceLocation getEntityTexture(Entity par1Entity)
        {
            return Your_Texture;
        }
    }
В клиент прокси, вместо Вашей модели (YourModel) пишите ModelBiped.
Вот и все. Можете смело надеть на него броню и дать меч.
Хотите сделать босса? Давайте начнем.
В файле вашего моба дописываем implements IBossDisplayData.
А в файл вашего рендера добавляем метод:
Код:
public void doRenderLiving(EntityLiving entity, double par2, double par4, double par6, float par8, float par9)
    {
        super.doRenderLiving(entity, par2, par4, par6, par8, par9);
        BossStatus.setBossStatus((EntityYouMob)entity, true);
    }
Вот и все. У вас есть босс.
Тема будут дополняться, но не сейчас.
 
Или грузить через AML .tcn вместо .obj.
 
У меня не работает.  Модели моба нет вообще!
Помогите,пожалуйста!
Код моба:
Код:
package assets.powerblocks.src;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class EntityRobotWarrior extends EntityMob
{
    public EntityRobotWarrior(World par1World)
    {
        super(par1World);
        this.setSize(0.9F, 1.3F); //Размерчики
        this.setEquipmentDropChance(1, 1.0F); 
        this.setCanPickUpLoot(true); //Может подбирать лут
           //AI.... Тут тупо поможет перевод названий классов.
        this.tasks.addTask(1, new EntityAISwimming(this)); 
        this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
        this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); 
        this.tasks.addTask(6, new EntityAILookIdle(this)); 
        this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
        this.tasks.addTask(7, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0, true));
        this.tasks.addTask(8, new EntityAIAttackOnCollide(this, EntityVillager.class, 0, false));
        this.tasks.addTask(9, new EntityAIAttackOnCollide(this, EntityIronGolem.class, 0, false));
    }

    @Override
    protected void applyEntityAttributes()
    {
        super.applyEntityAttributes();
        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(60.0D); 
        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.4D);
    }

    @Override
    protected String getLivingSound()
    {
        return "powerblocks:robot1living";
    }

    @Override
    protected String getHurtSound()
    {
        return "powerblocks:robot1hurt";
    }

    @Override
    protected String getDeathSound()
    {
        return "powerblocks:robot1death";
    }

    @Override
    protected float getSoundVolume()
    {
        return 0.5F;
    }
}
Код  client proxy:
Код:
package assets.powerblocks.src;

import net.minecraftforge.common.MinecraftForge;
import assets.powerblocks.src.EntityRobotWarrior;
import cpw.mods.fml.client.registry.RenderingRegistry;

public class ClientProxy extends CommonProxy{

    public void preLoad() {
        
    }
    public void load(){
        MinecraftForge.EVENT_BUS.register(new RobotWarriorSoundEvent());
        RenderingRegistry.registerEntityRenderingHandler(EntityRobotWarrior.class, new RenderRobotWarrior(new ModelRobotWarrior(),2.0F));
    }
    public void postLoad(){
        
    }
}
Код Рендера моба:
Код:
package assets.powerblocks.src;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderRobotWarrior extends RenderLiving
{
    private static final ResourceLocation Robot1 = new ResourceLocation("powerblocks:textures/entity/robot1"); 

    public RenderRobotWarrior(ModelBase par1ModelBase, float par2)
    {
        super(par1ModelBase, par2);
    }

    @Override
    protected ResourceLocation getEntityTexture(Entity par1Entity)
    {
        return Robot1;
    }
}
Код модели моба:
Код:
package assets.powerblocks.src;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


@SideOnly(Side.CLIENT)
public class ModelRobotWarrior extends ModelBiped
{


    public boolean isAttacking;

    public ModelRobotWarrior()
    {
        super(0.0F, -14.0F, 64, 64);
        float f = -14.0F;
        float f1 = 0.0F;
        this.bipedHeadwear = new ModelRenderer(this, 0, 0);
        this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 6, 8, 6, f1 - 0.5F);
        this.bipedHeadwear.setRotationPoint(1.0F, -17.0F + f, 1.0F);
        this.bipedBody = new ModelRenderer(this, 16, 16);
        this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, f1);
        this.bipedBody.setRotationPoint(0.0F, -17.0F + f, 0.0F);
        this.bipedRightArm = new ModelRenderer(this, 40, 16);
        this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 27, 4, f1);
        this.bipedRightArm.setRotationPoint(-5.0F, -14.0F + f, 0.0F);
        this.bipedLeftArm = new ModelRenderer(this, 40, 16);
        this.bipedLeftArm.mirror = true;
        this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 27, 4, f1);
        this.bipedLeftArm.setRotationPoint(5.0F, -14.0F + f, 0.0F);
        this.bipedRightLeg = new ModelRenderer(this, 0, 16);
        this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, f1);
        this.bipedRightLeg.setRotationPoint(-1.7F, 5.0F + f, 0.0F);
        this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
        this.bipedLeftLeg.mirror = true;
        this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 3, 29, 4, f1);
        this.bipedLeftLeg.setRotationPoint(2.6F, -5.0F + f, 0.0F);
    }


    public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
    {
        super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
        this.bipedHead.showModel = true;
        float f6 = -14.0F;
        this.bipedBody.rotateAngleX = 0.0F;
        this.bipedBody.rotationPointY = f6;
        this.bipedBody.rotationPointZ = -0.0F;
        this.bipedRightLeg.rotateAngleX -= 0.0F;
        this.bipedLeftLeg.rotateAngleX -= 0.0F;
        this.bipedRightArm.rotateAngleX = (float)((double)this.bipedRightArm.rotateAngleX * 0.5D);
        this.bipedLeftArm.rotateAngleX = (float)((double)this.bipedLeftArm.rotateAngleX * 0.5D);
        this.bipedRightLeg.rotateAngleX = (float)((double)this.bipedRightLeg.rotateAngleX * 0.5D);
        this.bipedLeftLeg.rotateAngleX = (float)((double)this.bipedLeftLeg.rotateAngleX * 0.5D);
        float f7 = 0.4F;

        if (this.bipedRightArm.rotateAngleX > f7)
        {
            this.bipedRightArm.rotateAngleX = f7;
        }

        if (this.bipedLeftArm.rotateAngleX > f7)
        {
            this.bipedLeftArm.rotateAngleX = f7;
        }

        if (this.bipedRightArm.rotateAngleX < -f7)
        {
            this.bipedRightArm.rotateAngleX = -f7;
        }

        if (this.bipedLeftArm.rotateAngleX < -f7)
        {
            this.bipedLeftArm.rotateAngleX = -f7;
        }

        if (this.bipedRightLeg.rotateAngleX > f7)
        {
            this.bipedRightLeg.rotateAngleX = f7;
        }

        if (this.bipedLeftLeg.rotateAngleX > f7)
        {
            this.bipedLeftLeg.rotateAngleX = f7;
        }

        if (this.bipedRightLeg.rotateAngleX < -f7)
        {
            this.bipedRightLeg.rotateAngleX = -f7;
        }

        if (this.bipedLeftLeg.rotateAngleX < -f7)
        {
            this.bipedLeftLeg.rotateAngleX = -f7;
        }


        this.bipedRightArm.rotationPointZ = 0.0F;
        this.bipedLeftArm.rotationPointZ = 0.0F;
        this.bipedRightLeg.rotationPointZ = 0.0F;
        this.bipedLeftLeg.rotationPointZ = 0.0F;
        this.bipedRightLeg.rotationPointY = 9.0F + f6;
        this.bipedLeftLeg.rotationPointY = 9.0F + f6;
        this.bipedHead.rotationPointZ = -0.0F;
        this.bipedHead.rotationPointY = f6 + 1.0F;
        this.bipedHeadwear.rotationPointX = this.bipedHead.rotationPointX;
        this.bipedHeadwear.rotationPointY = this.bipedHead.rotationPointY;
        this.bipedHeadwear.rotationPointZ = this.bipedHead.rotationPointZ;
        this.bipedHeadwear.rotateAngleX = this.bipedHead.rotateAngleX;
        this.bipedHeadwear.rotateAngleY = this.bipedHead.rotateAngleY;
        this.bipedHeadwear.rotateAngleZ = this.bipedHead.rotateAngleZ;

        if (this.isAttacking)
        {
            this.bipedRightArm.rotateAngleX = -64.0F;
        }
    }
}
Ну и код SoundEvent
Код:
package assets.powerblocks.src;

import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.event.ForgeSubscribe;

public class RobotWarriorSoundEvent 
    {
        @ForgeSubscribe
        public void onSoundLoad(SoundLoadEvent event) {
                event.manager.addSound("powerblocks:robot1living");
                event.manager.addSound("powerblocks:robot1hurt");
                event.manager.addSound("powerblocks:robot1death");
        }
}
Помогите,пожалуйста!
Заранее спасибо.
 
А модель-то у тебя и не рендерится нигде.
 
Ругается на CommonProxy и в классах его он не находит, либо его вообще нет ( класс ClientProxy )
 
Тут типа считается, что мод уже запилен и работает.
 
laz2727 написал(а):
Тут типа считается, что мод уже запилен и работает.
В смысле? Я понимаю что это вопрос, но создавать определённую тему как то не охота, засирать форум лёгкими вопросами
 
laz2727 написал(а):
А модель-то у тебя и не рендерится нигде.
Как это? Рендерится в классе client proxy.
[merge_posts_bbcode]Добавлено: 26.06.2014 20:37:44[/merge_posts_bbcode]

evan написал(а):
Ругается на CommonProxy и в классах его он не находит, либо его вообще нет ( класс ClientProxy )

CommonProxy есть в классах:
Код:
package assets.powerblocks.src;

public class CommonProxy {
    
     public CommonProxy()
        {
        }

        public void registerRenderThings()
        {
        }

        public void registerSoundThings()
        {
        }

        public int setArmorPrefix(String string)
        {
            return 0;
        }


}
 
модельку тоже надо, укажи путь к ней.(а у тебя текстура)
ImperialZig написал(а):
laz2727 написал(а):
А модель-то у тебя и не рендерится нигде.
Как это? Рендерится в классе client proxy.
[merge_posts_bbcode]Добавлено: 26.06.2014 20:37:44[/merge_posts_bbcode]

evan написал(а):
Ругается на CommonProxy и в классах его он не находит, либо его вообще нет ( класс ClientProxy )

CommonProxy есть в классах:
Код:
package assets.powerblocks.src;

public class CommonProxy {
    
     public CommonProxy()
        {
        }

        public void registerRenderThings()
        {
        }

        public void registerSoundThings()
        {
        }

        public int setArmorPrefix(String string)
        {
            return 0;
        }


}
 
Нету модели моба

Класс моба:
Код:
package assets.testmod.src.entity;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class EntityFireZombie extends EntityMob 
{
    public EntityFireZombie(World par1World)
    {
        super(par1World);
        this.setSize(0.9F, 1.3F);
        this.setEquipmentDropChance(1, 1.0F);
        this.setCanPickUpLoot(true);
        this.tasks.addTask(1, new EntityAISwimming(this));
        this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
        this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
        this.tasks.addTask(6, new EntityAILookIdle(this));
        this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
    }
    
    @Override
    protected void applyEntityAttributes()
    {
        super.applyEntityAttributes();
        
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(10.0D);

this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.20000000298023224D);
    }
    
     @Override
        protected String getLivingSound()
        {
             return "TestMod:MobLiving";
        }

     @Override
        protected String getHurtSound()
        {
            return "TestMod:MobHurt";//Это звуки урона, их туда же.
        }

        @Override
        protected String getDeathSound()
        {
            return "TestMod:MobDeath";//Типо звуки смерти.
        }

        @Override
        protected float getSoundVolume() //Громкость звуков
        {
            return 0.4F;
        }
    }

Рендер
Код:
package assets.testmod.src;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderFireZombie extends RenderLiving
{
    private static final ResourceLocation Your_Texture = new ResourceLocation("TestMod:textures/entity/yourtexture.png");  //Текстуру в assets/yourmod/textures/entity/yourtexture.png 

    public RenderFireZombie(ModelBase par1ModelBase, float par2)
    {
        super(par1ModelBase, par2);
    }

    @Override
    protected ResourceLocation getEntityTexture(Entity par1Entity)
    {
        return Your_Texture;
    }
}

Клиент прокси:


Код:
package assets.testmod.src;

import net.minecraftforge.client.event.sound.SoundEvent;
import net.minecraftforge.common.MinecraftForge;
import assets.testmod.src.entity.EntityFireZombie;
import cpw.mods.fml.client.registry.RenderingRegistry;

public class ClientProxy extends CommonProxy {
    
     public void preLoad() {
            
        }
        public void load(){
        MinecraftForge.EVENT_BUS.register(new SoundEvent());
         RenderingRegistry.registerEntityRenderingHandler(EntityFireZombie.class, new RenderFireZombie(new FireZombie(),2.0F));
        }
        public void postLoad(){
            
        }
    }


Модель в формате .java кидаю в assets.testmod.src
 
Должно быть так: new ResourceLocation("testMod", "textures/entity/mob.png);И название папки мода обязательно должно быть с маленькой буквы.
 
Dragon2488 написал(а):
Должно быть так: new ResourceLocation("testMod", "textures/entity/mob.png);И название папки мода обязательно должно быть с маленькой буквы.
Модель моба все равно не появляется, тупо белый кубик
P.S а клиент прокси или коммон прокси надо прописывать в главном классе, если да то как?
Если что вот код самой модели:
Код:
package assets.testmod.src;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;


public class FireZombie extends ModelBase
{
  //fields
    ModelRenderer head;
    ModelRenderer body;
    ModelRenderer rightarm;
    ModelRenderer leftarm;
    ModelRenderer rightleg;
    ModelRenderer leftleg;
  
  public FireZombie()
  {
    textureWidth = 64;
    textureHeight = 32;
    
      head = new ModelRenderer(this, 0, 0);
      head.addBox(-4F, -8F, -4F, 8, 8, 8);
      head.setRotationPoint(0F, 0F, 0F);
      head.setTextureSize(64, 32);
      head.mirror = true;
      setRotation(head, 0F, 0F, 0F);
      body = new ModelRenderer(this, 16, 16);
      body.addBox(-4F, 0F, -2F, 8, 12, 4);
      body.setRotationPoint(0F, 0F, 0F);
      body.setTextureSize(64, 32);
      body.mirror = true;
      setRotation(body, 0F, 0F, 0F);
      rightarm = new ModelRenderer(this, 40, 16);
      rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
      rightarm.setRotationPoint(-5F, 2F, 0F);
      rightarm.setTextureSize(64, 32);
      rightarm.mirror = true;
      setRotation(rightarm, 0F, 0F, 0F);
      leftarm = new ModelRenderer(this, 40, 16);
      leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
      leftarm.setRotationPoint(5F, 2F, 0F);
      leftarm.setTextureSize(64, 32);
      leftarm.mirror = true;
      setRotation(leftarm, 0F, 0F, 0F);
      rightleg = new ModelRenderer(this, 0, 16);
      rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
      rightleg.setRotationPoint(-2F, 12F, 0F);
      rightleg.setTextureSize(64, 32);
      rightleg.mirror = true;
      setRotation(rightleg, 0F, 0F, 0F);
      leftleg = new ModelRenderer(this, 0, 16);
      leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
      leftleg.setRotationPoint(2F, 12F, 0F);
      leftleg.setTextureSize(64, 32);
      leftleg.mirror = true;
      setRotation(leftleg, 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);
    head.render(f5);
    body.render(f5);
    rightarm.render(f5);
    leftarm.render(f5);
    rightleg.render(f5);
    leftleg.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)
  {
    super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
  }

}
 
Ты что, не зарегал прокси...
Пишешь в главном классе:

@SidedProxy(serverSide= "твойПакет.CommonProxy" , clientSide= "твойПакет.ClientProxy")
Public static CommonProxy proxy;

В ините пишешь:

proxy.load();
 
Теперь все без ошибок но краш выдает
Код:
---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 03.07.14 7:35
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: testMod.ClientProxy
    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
    at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
    at com.google.common.eventbus.EventBus.post(EventBus.java:267)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
    at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
    at com.google.common.eventbus.EventBus.post(EventBus.java:267)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
    at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:473)
    at net.minecraft.client.Minecraft.run(Minecraft.java:808)
    at net.minecraft.client.main.Main.main(Main.java:93)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.ClassNotFoundException: testMod.ClientProxy
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:61)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:58)
    ... 33 more
Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:178)
    ... 39 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.6.4
    Operating System: Windows 7 (x86) version 6.1
    Java Version: 1.7.0_60, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 925777168 bytes (882 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Suspicious classes: FML and Forge are installed
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 4 mods loaded, 4 mods active
    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
    FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed
    Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed
    TestMod{Closed Alpha 0.1.2} [LayserMod] (bin) Unloaded->Errored
 
Layser написал(а):
Код:
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: testMod.ClientProxy
Не найден класс прокси.
У тебя типа написано:
Код:
@SidedProxy(clientSide="testMod.ClientProxy", serverSide="testMod.CommonProxy")
А должно типа:
Код:
@SidedProxy(clientSide="assets.testmod.src.ClientProxy", serverSide="assets.testmod.src.CommonProxy")
 
Пробил кгм, кгм чем.
Пихать сурсы в ассеты.
 
Назад
Сверху