• 0

    posted a message on Help me to Make my Mob Tameable Please!

    Edited: Error Removed

    Posted in: Modification Development
  • 0

    posted a message on Help me to Make my Mob Tameable Please!

    i did look the wolf code, and i tried to add the lines myself, but i got 17 errros, i dont know java to much for that yet lol, when i use EntityTameable on the beginning it gives me errors.. could you guys show me what i need to add? thanks!

    its for 1.12 btw

    Posted in: Modification Development
  • 0

    posted a message on Help me to Make my Mob Tameable Please!

    Im trying to finish my mod so i can release it, i already have more than 40 mobs!


    But i need to learn to how to make them tameable :( can someone please help?)

    Im new to java so i would apreciate if someone can help me here! thanks!

    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.minecraft.world.gen.structure.template.Template;
    import net.minecraft.world.biome.Biome;
    import net.minecraft.world.World;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.util.DamageSource;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.Item;
    import net.minecraft.init.Items;
    import net.minecraft.entity.passive.EntityAnimal;
    import net.minecraft.entity.ai.EntityAIMate;
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.EnumCreatureType;
    import net.minecraft.entity.EntityAgeable;
    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 net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.entity.ai.EntityAIFollowParent;
    import net.minecraft.entity.ai.EntityAIWatchClosest;
    import net.minecraft.entity.ai.EntityMoveHelper;
    import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
    import net.minecraft.entity.ai.EntityAIHurtByTarget;
    
    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.EntityAIMate;
    import net.minecraft.entity.ai.EntityAILookIdle;
    
    import net.minecraftforge.fml.relauncher.SideOnly;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraft.util.math.MathHelper;
    import net.minecraft.entity.ai.EntityAIEatGrass;
    import net.minecraft.entity.ai.EntityAIWatchClosest;
    import net.minecraft.entity.ai.EntityAIFollowParent;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.ai.EntityAIPanic;
    
    import java.util.Random;
    
    public class mcreator_capuchinBrown {
    
    	public static Object instance;
    	public static int mobid = 57;
    	public static int mobid2 = 58;
    
    	public void preInit(FMLPreInitializationEvent event) {
    		EntityRegistry.registerModEntity(new ResourceLocation("testenvironmentmod:capuchinbrown"), EntitycapuchinBrown.class, "capuchinbrown", mobid,
    				instance, 64, 1, true, -9813724, -14145496);
    		Biome[] spawnBiomes = {Biome.REGISTRY.getObject(new ResourceLocation("jungle")),};
    		EntityRegistry.addSpawn(EntitycapuchinBrown.class, 18, 2, 8, EnumCreatureType.CREATURE, spawnBiomes);
    	}
    
    	public void load(FMLInitializationEvent event) {
    	}
    
    	public void serverLoad(FMLServerStartingEvent event) {
    	}
    
    	@SideOnly(Side.CLIENT)
    	public void registerRenderers() {
    		RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new ModelCapuchin(), 0) {
    
    			protected ResourceLocation getEntityTexture(EntityAgeable par1Entity) {
    				return new ResourceLocation("Capuchin_Brown.png");
    			}
    
    			protected void preRenderCallback(EntityAgeable entitylivingbaseIn, float partialTickTime) {
              float f = 0.8F;
              if (entitylivingbaseIn.getGrowingAge() < 0) {
                   f = (float)((double)f * 0.5D);
                   this.shadowSize = 0.4F;
              } else {
                   this.shadowSize = 0.8F;
              }
              GlStateManager.scale(f, f, f);
         } 
    			
    		};
    		RenderingRegistry.registerEntityRenderingHandler(EntitycapuchinBrown.class, customRender);
    	}
    
    	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;
    	}
    
    	public static class EntitycapuchinBrown extends EntityAnimal {
    
    		public EntitycapuchinBrown(World world) {
    			super(world);
    			addRandomArmor();
    			experienceValue = 4;
    			this.isImmuneToFire = false;
    			setNoAI(!true);
    			this.tasks.addTask(1, new EntityAIWander(this, 1.0D));
                   this.tasks.addTask(5, new EntityAILookIdle(this));
                   this.tasks.addTask(2, new EntityAITempt(this, 1.1D, Items.REEDS, false));
                   this.tasks.addTask(6, new EntityAIPanic(this, 1.2D));
                   this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
                   this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
                   this.tasks.addTask(4, new EntityAIFollowParent(this, 0.9D));
                   this.setSize(0.9F, 1.4F);
    		}
    
    		@Override
    		protected Item getDropItem() {
    			return new ItemStack(mcreator_monkeymeat.block, (int) (1)).getItem();
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getAmbientSound() {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.capuchin.ambient"));
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getHurtSound(DamageSource ds) {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.capuchin.hurt"));
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getDeathSound() {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.capuchin.death"));
    		}
    
    		@Override
    		protected float getSoundVolume() {
    			return 1.0F;
    		}
    
    		@Override
    		protected void applyEntityAttributes() {
    			super.applyEntityAttributes();
    			this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.35D);
    			this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(8D);
    			if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null)
    				this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(0D);
    		}
    
    		protected void addRandomArmor() {
    		}
    
    		@Override
    		public EntitycapuchinBrown createChild(EntityAgeable ageable) {
    			return new EntitycapuchinBrown(world);
    		}
    
    		@Override
    		public float getEyeHeight() {
    			return this.isChild() ? this.height : 1.3F;
    		}
    
    		@Override
    		public boolean isBreedingItem(ItemStack stack) {
    			if (stack == null)
    				return false;
    			if (new ItemStack(Items.REEDS, (int) (1)).getItem() == stack.getItem())
    				return true;
    			return false;
    		}
    
    		protected void dropRareDrop(int par1) {
    			this.dropItem(new ItemStack(Items.LEATHER, (int) (1)).getItem(), 1);
    		}
    	}
    Posted in: Modification Development
  • 0

    posted a message on /kill command for mod´s mobs? 1.12

    thanks ! i will test this asp!

    But i already fix my mod too ;)

    Posted in: Mods Discussion
  • 0

    posted a message on Wizard Animal Plus Mod

    here is the current list:


    http://www.mediafire.com/file/00cpi362ad8330d/zzz_My Mod Mobs.pptx


    i got a beta version ready to go, but im having a spawn problem (spread) with a single mob, cant find the problem...

    im working on this atm

    Posted in: WIP Mods
  • 0

    posted a message on WizardFarm Mod

    i might do a version 1.12 of this eventually....

    Posted in: Minecraft Mods
  • 0

    posted a message on Minecraft - Wizard´s Vending Machine Mod

    Guys im not doing this for 1.7-

    But i can do it for 1.12.... We need to move foward not backwards :D


    plus most of the good mods are on 1.12 now ;)

    Posted in: Minecraft Mods
  • 0

    posted a message on /kill command for mod´s mobs? 1.12

    Hey guys, so my problem here is this; my mod have a bug i cant figger/find - a single mob (the Nile crocodile) from more than 50 of my mod´s mobs are spawning like crazy, and i dont know why; its spawn code clear say 14% chance of spawn (2-4 mobs), yet its like a nile crocodile infection all over the river and river equivalent biomes, i will post his code on the modding section, but for now i wonder if someone know how to:


    Use the /kill command to kill a mob from a MOD.


    1.12:

    /kill @e [type=Creeper] -> this kill all the creepers around.


    i tried to use all the mob names i found and the one on .lang file, like


    /kill @e [type=entity.testenvironmentmod.crocodilenile]


    my lang file say:

    entity.testenvironmentmod.crocodilenile.name=Nile Crocodile


    anybody can help? thank you!

    Posted in: Mods Discussion
  • 0

    posted a message on Making a Passive Mob attack if provoked

    Eureka! i figger it out;


    public boolean attackEntityAsMob(Entity entityIn)
    {
    boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), (float)((int)this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue()));

    if (flag)
    {
    this.applyEnchantments(this, entityIn);
    }

    return flag;
    }



    i need to put this after the armor part :D

    Thanks for the advice, i found the code i need in the Polar Bear file ;0

    Posted in: Modification Development
  • 0

    posted a message on Making a Passive Mob attack if provoked

    i also tried to change those 2 parameters to 'false'


    this.targetTasks.addTask(9, new EntityAIHurtByTarget(this, true));
    this.tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));


    it does the same: it attack when provoked, but cause no damage... cant find what im missins :blink:

    Posted in: Modification Development
  • 0

    posted a message on Making a Passive Mob attack if provoked

    Just tried that change, still not causing damage to me (player) nor other mobs

    Posted in: Modification Development
  • 0

    posted a message on Making a Passive Mob attack if provoked

    Im trying to make my Gorilla to attack when attacked by the player, i can make he attack right, but he dont cause any damage.... :(


    here is my code:


    package mod.mcreator;
    
    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.minecraft.world.gen.structure.template.Template;
    import net.minecraft.world.biome.Biome;
    import net.minecraft.world.World;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.util.DamageSource;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.Item;
    import net.minecraft.init.Items;
    import net.minecraft.entity.passive.EntityAnimal;
    import net.minecraft.entity.ai.EntityAIMate;
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.EnumCreatureType;
    import net.minecraft.entity.EntityAgeable;
    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 net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.entity.ai.EntityAIFollowParent;
    import net.minecraft.entity.ai.EntityAIWatchClosest;
    import net.minecraft.entity.ai.EntityMoveHelper;
    import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
    import net.minecraft.entity.ai.EntityAIHurtByTarget;
    
    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.EntityAIMate;
    import net.minecraft.entity.ai.EntityAILookIdle;
    
    import net.minecraftforge.fml.relauncher.SideOnly;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraft.util.math.MathHelper;
    import net.minecraft.entity.ai.EntityAIEatGrass;
    import net.minecraft.entity.ai.EntityAIWatchClosest;
    import net.minecraft.entity.ai.EntityAIFollowParent;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.ai.EntityAIPanic;
    import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
    import net.minecraft.entity.ai.EntityAIHurtByTarget;
    import net.minecraft.entity.ai.EntityAIAttackMelee;
    
    import net.minecraft.util.DamageSource;
    
    import java.util.Random;
    
    public class mcreator_gorillaWestern {
    
    	public static Object instance;
    	public static int mobid = 89;
    	public static int mobid2 = 90;
    
    	public void preInit(FMLPreInitializationEvent event) {
    		EntityRegistry.registerModEntity(new ResourceLocation("testenvironmentmod:gorillawestern"), EntitygorillaWestern.class, "gorillawestern",
    				mobid, instance, 64, 1, true, -13158601, -12240594);
    		Biome[] spawnBiomes = {Biome.REGISTRY.getObject(new ResourceLocation("forest")),};
    		EntityRegistry.addSpawn(EntitygorillaWestern.class, 12, 1, 6, EnumCreatureType.CREATURE, spawnBiomes);
    	}
    
    	public void load(FMLInitializationEvent event) {
    	}
    
    	public void serverLoad(FMLServerStartingEvent event) {
    	}
    
    	@SideOnly(Side.CLIENT)
    	public void registerRenderers() {
    		RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new ModelGorilla(), 0) {
    
    			protected ResourceLocation getEntityTexture(EntityAgeable par1Entity) {
    				return new ResourceLocation("Gorilla_Western.png");
    			}
    
    			protected void preRenderCallback(EntityAgeable entitylivingbaseIn, float partialTickTime) {
              float f = 1.2F;
              if (entitylivingbaseIn.getGrowingAge() < 0) {
                   f = (float)((double)f * 0.5D);
                   this.shadowSize = 0.3F;
              } else {
                   this.shadowSize = 0.6F;
              }
              GlStateManager.scale(f, f, f);
         } 
    			
    		};
    		RenderingRegistry.registerEntityRenderingHandler(EntitygorillaWestern.class, customRender);
    	}
    
    	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;
    	}
    
    	public static class EntitygorillaWestern extends EntityAnimal {
    
    		public EntitygorillaWestern(World world) {
    			super(world);
    			addRandomArmor();
    			experienceValue = 40;
    			this.isImmuneToFire = false;
    			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(10, new EntityAITempt(this, 1.1D, mcreator_wildBanana.block, false));
    			this.targetTasks.addTask(9, new EntityAIHurtByTarget(this, true));
    			this.tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));
    			this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    			this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
                this.tasks.addTask(4, new EntityAIFollowParent(this, 0.9D));
                this.setSize(0.9F, 1.4F);
    		}
    
    		@Override
    		protected Item getDropItem() {
    			return new ItemStack(mcreator_monkeymeat.block, (int) (1)).getItem();
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getAmbientSound() {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.gorilla.ambient"));
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getHurtSound(DamageSource ds) {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.gorilla.hurt"));
    		}
    
    		@Override
    		public net.minecraft.util.SoundEvent getDeathSound() {
    			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(
    					"testenvironmentmod:wizard.gorilla.death"));
    		}
    
    		@Override
    		protected float getSoundVolume() {
    			return 1.0F;
    		}
    
    		@Override
    		protected void applyEntityAttributes() {
    			super.applyEntityAttributes();
    			this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
    			this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40D);
    			if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null)
    				this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6D);
    		}
    
    		protected void addRandomArmor() {
    		}
    
    		@Override
    		public EntitygorillaWestern createChild(EntityAgeable ageable) {
    			return new EntitygorillaWestern(world);
    		}
    
    		@Override
    		public float getEyeHeight() {
    			return this.isChild() ? this.height : 1.3F;
    		}
    
    		@Override
    		public boolean isBreedingItem(ItemStack stack) {
    			if (stack == null)
    				return false;
    			if (new ItemStack(mcreator_wildBanana.block, (int) (1)).getItem() == stack.getItem())
    				return true;
    			return false;
    		}
    
    		protected void dropRareDrop(int par1) {
    			this.dropItem(new ItemStack(Items.LEATHER, (int) (1)).getItem(), 1);
    		}
    	}
    
    	// Date: 14/12/2017 07:10:29
    	// Template version 1.1
    	// Java generated by Techne
    	// Keep in mind that you still need to fill in some blanks
    	// - ZeuX
    	public static class ModelGorilla extends ModelBase {
    
    		// fields
    		ModelRenderer Neck;
    		ModelRenderer Neck2;
    		ModelRenderer Head;
    		ModelRenderer Head2;
    		ModelRenderer Head3;
    		ModelRenderer Mouth;
    		ModelRenderer Eyebrown;
    		ModelRenderer Nose;
    		ModelRenderer Ear1;
    		ModelRenderer Ear2;
    		ModelRenderer BodyFront;
    		ModelRenderer BodyMiddle;
    		ModelRenderer BodyBack;
    		ModelRenderer UpperArm1;
    		ModelRenderer LowerArm1;
    		ModelRenderer Hand1;
    		ModelRenderer UpperLeg1;
    		ModelRenderer DownLeg1;
    		ModelRenderer Foot1;
    		ModelRenderer UpperArm2;
    		ModelRenderer LowerArm2;
    		ModelRenderer Hand2;
    		ModelRenderer UpperLeg2;
    		ModelRenderer DownLeg2;
    		ModelRenderer Foot2;
    
    		public ModelGorilla() {
    			textureWidth = 128;
    			textureHeight = 64;
    			Neck = new ModelRenderer(this, 2, 50);
    			Neck.addBox(-3F, -4F, -5F, 6, 7, 5);
    			Neck.setRotationPoint(0F, 12F, -3F);
    			Neck.setTextureSize(128, 64);
    			Neck.mirror = true;
    			setRotation(Neck, -0.5235988F, 0F, 0F);
    			Neck2 = new ModelRenderer(this, 60, 58);
    			Neck2.addBox(-2F, -6F, -4.5F, 4, 3, 2);
    			Neck2.setRotationPoint(0F, 12F, -3F);
    			Neck2.setTextureSize(128, 64);
    			Neck2.mirror = true;
    			setRotation(Neck2, 0.5235988F, 0F, 0F);
    			Head = new ModelRenderer(this, 37, 52);
    			Head.addBox(-2.5F, -7.5F, -7F, 5, 6, 5);
    			Head.setRotationPoint(0F, 12F, -3F);
    			Head.setTextureSize(128, 64);
    			Head.mirror = true;
    			setRotation(Head, 0F, 0F, 0F);
    			Head2 = new ModelRenderer(this, 60, 52);
    			Head2.addBox(-2F, -8F, -7.8F, 4, 3, 1);
    			Head2.setRotationPoint(0F, 12F, -3F);
    			Head2.setTextureSize(128, 64);
    			Head2.mirror = true;
    			setRotation(Head2, -0.1745329F, 0F, 0F);
    			Head3 = new ModelRenderer(this, 37, 39);
    			Head3.addBox(-2F, -10.5F, -3.5F, 4, 7, 4);
    			Head3.setRotationPoint(0F, 12F, -3F);
    			Head3.setTextureSize(128, 64);
    			Head3.mirror = true;
    			setRotation(Head3, 0.2617994F, 0F, 0F);
    			Mouth = new ModelRenderer(this, 33, 28);
    			Mouth.addBox(-2F, -4F, -7.5F, 4, 2, 2);
    			Mouth.setRotationPoint(0F, 12F, -3F);
    			Mouth.setTextureSize(128, 64);
    			Mouth.mirror = true;
    			setRotation(Mouth, 0.0872665F, 0F, 0F);
    			Eyebrown = new ModelRenderer(this, 35, 24);
    			Eyebrown.addBox(-2F, -7.4F, -7.2F, 4, 1, 1);
    			Eyebrown.setRotationPoint(0F, 12F, -3F);
    			Eyebrown.setTextureSize(128, 64);
    			Eyebrown.mirror = true;
    			setRotation(Eyebrown, 0F, 0F, 0F);
    			Nose = new ModelRenderer(this, 37, 34);
    			Nose.addBox(-1.5F, -5F, -8F, 3, 2, 1);
    			Nose.setRotationPoint(0F, 12F, -3F);
    			Nose.setTextureSize(128, 64);
    			Nose.mirror = true;
    			setRotation(Nose, 0F, 0F, 0F);
    			Ear1 = new ModelRenderer(this, 32, 18);
    			Ear1.addBox(-3F, -7F, -5F, 1, 2, 2);
    			Ear1.setRotationPoint(0F, 12F, -3F);
    			Ear1.setTextureSize(128, 64);
    			Ear1.mirror = true;
    			setRotation(Ear1, 0F, 0F, 0F);
    			Ear2 = new ModelRenderer(this, 40, 18);
    			Ear2.addBox(2F, -7F, -5F, 1, 2, 2);
    			Ear2.setRotationPoint(0F, 12F, -3F);
    			Ear2.setTextureSize(128, 64);
    			Ear2.mirror = true;
    			setRotation(Ear2, 0F, 0F, 0F);
    			BodyFront = new ModelRenderer(this, 2, 34);
    			BodyFront.addBox(-4F, 0F, -2F, 8, 9, 5);
    			BodyFront.setRotationPoint(0F, 8F, -3F);
    			BodyFront.setTextureSize(128, 64);
    			BodyFront.mirror = true;
    			setRotation(BodyFront, -0.1745329F, 0F, 0F);
    			BodyMiddle = new ModelRenderer(this, 2, 18);
    			BodyMiddle.addBox(-5F, 0F, 0F, 7, 8, 7);
    			BodyMiddle.setRotationPoint(1.5F, 9F, -1F);
    			BodyMiddle.setTextureSize(128, 64);
    			BodyMiddle.mirror = true;
    			setRotation(BodyMiddle, -0.0872665F, 0F, 0F);
    			BodyBack = new ModelRenderer(this, 2, 2);
    			BodyBack.addBox(-4F, 0F, 0F, 8, 9, 5);
    			BodyBack.setRotationPoint(0F, 9F, 5F);
    			BodyBack.setTextureSize(128, 64);
    			BodyBack.mirror = true;
    			setRotation(BodyBack, 0.0872665F, 0F, 0F);
    			UpperArm1 = new ModelRenderer(this, 32, 2);
    			UpperArm1.addBox(-1.5F, -1F, -1.5F, 4, 9, 4);
    			UpperArm1.setRotationPoint(-4F, 9F, -4.5F);
    			UpperArm1.setTextureSize(128, 64);
    			UpperArm1.mirror = true;
    			setRotation(UpperArm1, -0.1745329F, 0F, 0F);
    			LowerArm1 = new ModelRenderer(this, 68, 2);
    			LowerArm1.addBox(-2F, 7F, -3F, 5, 7, 5);
    			LowerArm1.setRotationPoint(-4F, 9F, -4.5F);
    			LowerArm1.setTextureSize(128, 64);
    			LowerArm1.mirror = true;
    			setRotation(LowerArm1, 0F, 0F, 0F);
    			Hand1 = new ModelRenderer(this, 68, 16);
    			Hand1.addBox(-1.5F, 14F, -2.5F, 4, 1, 4);
    			Hand1.setRotationPoint(-4F, 9F, -4.5F);
    			Hand1.setTextureSize(128, 64);
    			Hand1.mirror = true;
    			setRotation(Hand1, 0F, 0F, 0F);
    			UpperLeg1 = new ModelRenderer(this, 90, 16);
    			UpperLeg1.addBox(-2F, 0F, -2F, 5, 7, 5);
    			UpperLeg1.setRotationPoint(-3.5F, 14F, 7F);
    			UpperLeg1.setTextureSize(128, 64);
    			UpperLeg1.mirror = true;
    			setRotation(UpperLeg1, -0.0872665F, 0F, 0F);
    			DownLeg1 = new ModelRenderer(this, 68, 32);
    			DownLeg1.addBox(-1.5F, 7F, -1.5F, 4, 3, 4);
    			DownLeg1.setRotationPoint(-3.5F, 14F, 7F);
    			DownLeg1.setTextureSize(128, 64);
    			DownLeg1.mirror = true;
    			setRotation(DownLeg1, -0.0872665F, 0F, 0F);
    			Foot1 = new ModelRenderer(this, 50, 16);
    			Foot1.addBox(-1.5F, 9F, -4F, 4, 1, 4);
    			Foot1.setRotationPoint(-3.5F, 14F, 7F);
    			Foot1.setTextureSize(128, 64);
    			Foot1.mirror = true;
    			setRotation(Foot1, 0F, 0F, 0F);
    			UpperArm2 = new ModelRenderer(this, 50, 2);
    			UpperArm2.addBox(-1.5F, -1F, -1.5F, 4, 9, 4);
    			UpperArm2.setRotationPoint(3F, 9F, -4.5F);
    			UpperArm2.setTextureSize(128, 64);
    			UpperArm2.mirror = true;
    			setRotation(UpperArm2, -0.1745329F, 0F, 0F);
    			LowerArm2 = new ModelRenderer(this, 90, 2);
    			LowerArm2.addBox(-2F, 7F, -3F, 5, 7, 5);
    			LowerArm2.setRotationPoint(3F, 9F, -4.5F);
    			LowerArm2.setTextureSize(128, 64);
    			LowerArm2.mirror = true;
    			setRotation(LowerArm2, 0F, 0F, 0F);
    			Hand2 = new ModelRenderer(this, 68, 24);
    			Hand2.addBox(-1.5F, 14F, -2.5F, 4, 1, 4);
    			Hand2.setRotationPoint(3F, 9F, -4.5F);
    			Hand2.setTextureSize(128, 64);
    			Hand2.mirror = true;
    			setRotation(Hand2, 0F, 0F, 0F);
    			UpperLeg2 = new ModelRenderer(this, 90, 30);
    			UpperLeg2.addBox(-2F, 0F, -2F, 5, 7, 5);
    			UpperLeg2.setRotationPoint(2.5F, 14F, 7F);
    			UpperLeg2.setTextureSize(128, 64);
    			UpperLeg2.mirror = true;
    			setRotation(UpperLeg2, -0.0872665F, 0F, 0F);
    			DownLeg2 = new ModelRenderer(this, 68, 42);
    			DownLeg2.addBox(-1.5F, 7F, -1.5F, 4, 3, 4);
    			DownLeg2.setRotationPoint(2.5F, 14F, 7F);
    			DownLeg2.setTextureSize(128, 64);
    			DownLeg2.mirror = true;
    			setRotation(DownLeg2, -0.0872665F, 0F, 0F);
    			Foot2 = new ModelRenderer(this, 50, 24);
    			Foot2.addBox(-1.5F, 9F, -4F, 4, 1, 4);
    			Foot2.setRotationPoint(2.5F, 14F, 7F);
    			Foot2.setTextureSize(128, 64);
    			Foot2.mirror = true;
    			setRotation(Foot2, 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);
    			Neck.render(f5);
    			Neck2.render(f5);
    			Head.render(f5);
    			Head2.render(f5);
    			Head3.render(f5);
    			Mouth.render(f5);
    			Eyebrown.render(f5);
    			Nose.render(f5);
    			Ear1.render(f5);
    			Ear2.render(f5);
    			BodyFront.render(f5);
    			BodyMiddle.render(f5);
    			BodyBack.render(f5);
    			UpperArm1.render(f5);
    			LowerArm1.render(f5);
    			Hand1.render(f5);
    			UpperLeg1.render(f5);
    			DownLeg1.render(f5);
    			Foot1.render(f5);
    			UpperArm2.render(f5);
    			LowerArm2.render(f5);
    			Hand2.render(f5);
    			UpperLeg2.render(f5);
    			DownLeg2.render(f5);
    			Foot2.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 entity) {
    			super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    			this.Neck.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Neck.rotateAngleX = f4 / (180F / (float) Math.PI) - 0.5235988F;
    
                   this.Neck2.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Neck2.rotateAngleX = f4 / (180F / (float) Math.PI) + 0.5235988F;
    
                   this.Head.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Head.rotateAngleX = f4 / (180F / (float) Math.PI);
    
                   this.Head2.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Head2.rotateAngleX = f4 / (180F / (float) Math.PI) - 0.1745329F;
    
                   this.Head3.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Head3.rotateAngleX = f4 / (180F / (float) Math.PI) + 0.2617994F;
    
                   this.Eyebrown.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Eyebrown.rotateAngleX = f4 / (180F / (float) Math.PI);
    
                   this.Mouth.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Mouth.rotateAngleX = f4 / (180F / (float) Math.PI) + 0.0872665F;
    
                   this.Nose.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Nose.rotateAngleX = f4 / (180F / (float) Math.PI);
    
                   this.Ear1.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Ear1.rotateAngleX = f4 / (180F / (float) Math.PI);
    
                   this.Ear2.rotateAngleY = f3 / (180F / (float) Math.PI);
                   this.Ear2.rotateAngleX = f4 / (180F / (float) Math.PI);
                   
                   this.UpperLeg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1 - 0.0872665F;
                   this.DownLeg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1 - 0.0872665F;
                   this.Foot1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
                   
                   this.UpperLeg2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1 - 0.0872665F;
                   this.DownLeg2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1 - 0.0872665F;
                   this.Foot2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
    
                   this.UpperArm1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F - 0.1745329F;
                   this.LowerArm1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
                   this.Hand1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
    
                   this.UpperArm2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F - 0.1745329F;
                   this.LowerArm2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F;
                   this.Hand2.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F;
    		}
    	}
    }
    

    trying to use my instincts, i try to remove this part, pointed down, but that made the mod dont render (invisible) :D


    protected void applyEntityAttributes() {
    super.applyEntityAttributes();
    this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
    this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40D);
    if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null) <---------------- i Tried to remove this
    this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6D);

    what im missing here can someone light me? :D thanks!

    Posted in: Modification Development
  • 0

    posted a message on Changing Code part from 1.10 to 1.12

    Hey guys, im trying to upgrade my mod to 1.12, but im having some trouble with this part:


    RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new mcreator_capuchinWhiteHeaded.ModelCapuchin(), 0) {


    protected ResourceLocation getEntityTexture(Entity par1Entity) {



    the error log:


    D:\MCreator180\forge\build\sources\main\java\mod\mcreator\mcreator_capuchinWhiteHead.java:181: error: package mcreator_capuchinWhiteHeaded does not exist
    		RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new mcreator_capuchinWhiteHeaded.ModelCapuchin(), 0) {
    		                                                                                                                                         ^
    D:\MCreator180\forge\build\sources\main\java\mod\mcreator\mcreator_capuchinWhiteHead.java:181: error: <anonymous mod.mcreator.mcreator_capuchinWhiteHead$1> is not abstract and does not override abstract method getEntityTexture(EntityAgeable) in Render
    		RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new mcreator_capuchinWhiteHeaded.ModelCapuchin(), 0) {
    		                                                                                                                                                              ^
    D:\MCreator180\forge\build\sources\main\java\mod\mcreator\mcreator_capuchinWhiteHead.java:183: error: name clash: getEntityTexture(Entity) in <anonymous mod.mcreator.mcreator_capuchinWhiteHead$1> and getEntityTexture(T) in Render have the same erasure, yet neither overrides the other
    			protected ResourceLocation getEntityTexture(Entity par1Entity) {
    			                           ^
      where T is a type-variable:
        T extends Entity declared in class Render
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: D:\MCreator180\forge\build\sources\main\java\mod\mcreator\mcreator_capuchinWhiteHead.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    3 errors
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.
    Posted in: Modification Development
  • To post a comment, please or register a new account.