Ok so i notice it was Techinc screwing up the rotation points (aka position on techne) so i manually, over try and error fix the legs and tail, im trying to learn the coding for the models and the animations (rotation of parts),
it makes the arms rotate ok but it 'reset' its position to 90o degrees (or 0), like a regular cow leg for example, i want it to move like that, like a monkey arm but i want it to start at 20o degrees, not vertical 90, like on the picture above, so how i add this variable? i convert to Cos or Sen? then i add it where?
Ok so i notice it was Techinc screwing up the rotation points (aka position on techne) so i manually, over try and error fix the legs and tail, im trying to learn the coding for the models and the animations (rotation of parts),
it makes the arms rotate ok but it 'reset' its position to 90o degrees (or 0), like a regular cow leg for example, i want it to move like that, like a monkey arm but i want it to start at 20o degrees, not vertical 90, like on the picture above, so how i add this variable? i convert to Cos or Sen? then i add it where?
yeah techne sucks bad, and the sad is that NOBODY makes a decent one to replace it... tabula sucks cause it uses in-game (witch could be with mods and be a pain) and also dont export Java, blender is way to complicated... i wish someone could point me a decent one...
Ok so im new to modding but for a long time i´ve been trying to find/extract/view .java files of the vanilla mobs so i can learn the rotation angles to make my own mobs, i just cant find it, i try to visualise the .class files but they are all diffrent... for example, i want to make my frog leap, i cant even star it, i dont have the bunny file from vanilla to teach myself :/ its so frustating
Hey guys! im learning/modding here, could use some help:
I need a simple code that, when i click on a specific entity, with a specific item, it delete/remove that entity and gives me back another specific item.
0
if i add this code on my mob file it will make it 50% of its size?
0
Hey!
where can i find modding tutorials? my mob here works fine but i dont know how to code breeding or taming... plz help?
thanks!
0
this.armleft.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
this.armright.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F;
0
Ok so i notice it was Techinc screwing up the rotation points (aka position on techne) so i manually, over try and error fix the legs and tail, im trying to learn the coding for the models and the animations (rotation of parts),
Ok so i have this code here:
this.armleft.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
this.armright.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1
it makes the arms rotate ok but it 'reset' its position to 90o degrees (or 0), like a regular cow leg for example, i want it to move like that, like a monkey arm but i want it to start at 20o degrees, not vertical 90, like on the picture above, so how i add this variable? i convert to Cos or Sen? then i add it where?
0
Ok so i notice it was Techinc screwing up the rotation points (aka position on techne) so i manually, over try and error fix the legs and tail, im trying to learn the coding for the models and the animations (rotation of parts),
Ok so i have this code here:
this.armleft.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
this.armright.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1
it makes the arms rotate ok but it 'reset' its position to 90o degrees (or 0), like a regular cow leg for example, i want it to move like that, like a monkey arm but i want it to start at 20o degrees, not vertical 90, like on the picture above, so how i add this variable? i convert to Cos or Sen? then i add it where?
thanks!
0
you dont need to use eclipse, just use any simple .class viewer, look the class file with the armor and copy what you need...
0
This part was another problem and solved so i deleted all the code for safe space
0
yeah techne sucks bad, and the sad is that NOBODY makes a decent one to replace it... tabula sucks cause it uses in-game (witch could be with mods and be a pain) and also dont export Java, blender is way to complicated... i wish someone could point me a decent one...
0
is there a 1.10 already on curse?
0
Ok so im new to modding but for a long time i´ve been trying to find/extract/view .java files of the vanilla mobs so i can learn the rotation angles to make my own mobs, i just cant find it, i try to visualise the .class files but they are all diffrent... for example, i want to make my frog leap, i cant even star it, i dont have the bunny file from vanilla to teach myself :/ its so frustating
can anybody PLZ help me here?
thanks!
0
So im trying to make my mob breed, here what i done so far:
public Entitygiraffe createChild(EntityAgeable ageable) {
return new Entitygiraffe(world);
}
public float getEyeHeight() {
return this.isChild() ? this.height : 1.3F;
}
public boolean isBreedingItem(ItemStack stack) {
return stack != null && com.google.common.collect.Sets.newHashSet(new Item[]{Items.REEDS,}).contains(stack.getItem());
}
it wont eat the Reed thou : what im missing? thanks!
0
This is my Mob file:
package mod.mcreator;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.minecraft.world.biome.Biome;import net.minecraft.world.World;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.Items;import net.minecraft.entity.player.EntityPlayer;import net.minecraft.entity.monster.EntityMob;import net.minecraft.entity.effect.EntityLightningBolt;import net.minecraft.entity.ai.EntityAIWatchClosest;import net.minecraft.entity.ai.EntityAIWander;import net.minecraft.entity.ai.EntityAITempt;import net.minecraft.entity.SharedMonsterAttributes;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_bottleDevil {
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_bottleDevil.ModelChucky(), 0) { protected ResourceLocation getEntityTexture(Entity par1Entity) { return new ResourceLocation("BottleDevil.png"); } }; RenderingRegistry.registerEntityRenderingHandler(mcreator_bottleDevil.EntitybottleDevil.class, customRender);
}
public void serverLoad(FMLServerStartingEvent event) { }
public void preInit(FMLPreInitializationEvent event) { int entityID = MathHelper.getRandomUUID().hashCode(); mobid = entityID; EntityRegistry.registerModEntity(mcreator_bottleDevil.EntitybottleDevil.class, "bottleDevil", entityID, instance, 64, 1, true, (102 << 16) + (0 << 8) + 0, (204 << 16) + (102 << 8) + 0); EntityRegistry.addSpawn(mcreator_bottleDevil.EntitybottleDevil.class, 0, 1, 1, EnumCreatureType.MONSTER, clean(Biome.REGISTRY));
}
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 EntitybottleDevil extends EntityMob { World world = null;
public EntitybottleDevil(World var1) { super(var1); world = var1; experienceValue = 5; this.isImmuneToFire = true; addRandomArmor(); setNoAI(!true);
this.tasks.addTask(10, new EntityAIWander(this, 0.8D)); this.tasks.addTask(3, new EntityAITempt(this, 0.8D, Items.CHICKEN, false)); this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
}
protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.4D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D); if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null) this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(3D); }
protected void addRandomArmor() {
}
@Override protected Item getDropItem() { return null; }
@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; }
}
// Date: 29/10/2017 05:22:00 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX
public static class ModelChucky extends ModelBase { // fields ModelRenderer body; ModelRenderer rightarm; ModelRenderer rightleg; ModelRenderer leftarm; ModelRenderer leftleg; ModelRenderer Piece1; ModelRenderer hornright; ModelRenderer hornleft; ModelRenderer head;
public ModelChucky() { textureWidth = 64; textureHeight = 32; setTextureOffset("Piece1.Folder1", 0, 0);
body = new ModelRenderer(this, 39, 2); body.addBox(-1.5F, 0F, -1F, 3, 4, 2); body.setRotationPoint(0F, 16F, 0F); body.setTextureSize(64, 32); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 49, 16); rightarm.addBox(-1F, -1F, -0.5F, 1, 4, 1); rightarm.setRotationPoint(-1.5F, 17F, 0F); rightarm.setTextureSize(64, 32); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 4, 16); rightleg.addBox(-0.5F, 0F, -0.5F, 1, 4, 1); rightleg.setRotationPoint(-1F, 20F, 0F); rightleg.setTextureSize(64, 32); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(0F, -1F, -0.5F, 1, 4, 1); leftarm.setRotationPoint(1.5F, 17F, 0F); leftarm.setTextureSize(64, 32); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); leftleg = new ModelRenderer(this, 14, 16); leftleg.addBox(-1F, 0F, -0.5F, 1, 4, 1); leftleg.setRotationPoint(1.5F, 20F, 0F); leftleg.setTextureSize(64, 32); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); Piece1 = new ModelRenderer(this, "Piece1"); Piece1.setRotationPoint(0F, 16F, 0F); setRotation(Piece1, 0F, 0F, 0F); Piece1.mirror = true; hornleft = new ModelRenderer(this, 23, 2); hornleft.addBox(0.5F, -5F, -0.5F, 1, 3, 1); hornleft.setRotationPoint(0F, 0F, 0F); hornleft.setTextureSize(64, 32); hornleft.mirror = true; setRotation(hornleft, 0F, 0F, 0F); hornright = new ModelRenderer(this, 23, 7); hornright.addBox(-1.5F, -5F, -0.5F, 1, 3, 1); hornright.setRotationPoint(0F, 0F, 0F); hornright.setTextureSize(64, 32); hornright.mirror = true; setRotation(hornright, 0F, 0F, 0F); head = new ModelRenderer(this, 4, 4); head.addBox(-1F, -3F, -1F, 2, 3, 2); head.setRotationPoint(0F, 0F, 0F); head.setTextureSize(64, 32); head.mirror = true; setRotation(head, 0F, 0F, 0F); Piece1.addChild(hornright); Piece1.addChild(hornleft); Piece1.addChild(head); }
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); body.render(f5); rightarm.render(f5); rightleg.render(f5); leftarm.render(f5); leftleg.render(f5); Piece1.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.Piece1.rotateAngleY = f3 / (180F / (float)Math.PI); this.Piece1.rotateAngleX = f4 / (180F / (float)Math.PI); this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1; this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1; this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F; this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F; }
}
}
0
hum im trying to do with the /kill command on the code, but i know how to do it for a vanilla mob, like:
/kill @e[type=Zombie]
but what about for my custom mob?
EDIT:
i also try this:
kill @e[type=mcreator_bottleDevil.EntitybottleDevil]
since its how its register my mob on my mod, im still learning
0
Hey guys! im learning/modding here, could use some help:
I need a simple code that, when i click on a specific entity, with a specific item, it delete/remove that entity and gives me back another specific item.
any lights?
Thanks!
0
yeah thanks i was manage to fix/learn with a korean tutorial! lol dont ask me how since i cant speak korean