http://pastebin.com/jprD4nDV - Client Proxy http://pastebin.com/XUTVXdWT - Main Mod Class http://pastebin.com/rLYreTqj- EntityMob Class HELP
In the addSpawn in the main class under entity registries, it says "The method addSpawn(Class<? extends EntityLiving>, int, int, int, EnumCreatureType, BiomeGenBase...) in the type EntityRegistry is not applicable for the arguments (Class<Snabical>, int, int, int,
EnumCreatureType)"
Also in the client Proxy it says "The method addSpawn(Class<? extends EntityLiving>, int, int, int, EnumCreatureType, BiomeGenBase...) in the type EntityRegistry is not applicable for the arguments (Class<Snabical>, int, int, int,
EnumCreatureType)" in the rendering registry.
Help please!
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
item.damageItem(1, entityplayer);
}
return item;
}
Credit to The_Slayer via MCForums
I wanted to make a topic where people code post codes for swords (lightning sword, fireball sword etc.) So onto rules.
>Post code in replies.
>Credit original author(if possible) and place found. Exp. Code by jacobmob via MCForums.
>Make sure it works for 1.6.4 (I might make another post for 1.7)
>DO NOT ask for codes! E.g. Can someone make a sword that spawns a wolf? Go make your own topic!
That's all, I'll post 2 codes later today. (As on 5/27/14)
Okay. Thank you for the feedback. I would like to say, the reason I want to use
Mcreator is because I am, wait for it, 13 YEARS OLD. I am too lazy to learn how
to code, as stated, I do not care how limited Mcreator is. I think its a lot better than
most mod creators.
I know people 2 years younger than you who actually are learning java and programming mods.
Hi all, I was wondering if anyone could help me make a backpack mod, or redirect me to where I could learn, I am currently working on a 1.6.4 Forge mod, that I would like to add backpacks to. If anyone could help I would be really grateful! Thanks!
0
0
0
package jacobmob.fantasticalfantasycreatures.mobs;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class Snabical extends ModelBase
{
//fields
ModelRenderer head;
ModelRenderer body;
ModelRenderer leg1;
ModelRenderer leg2;
ModelRenderer leg3;
ModelRenderer leg4;
ModelRenderer nose;
ModelRenderer wing1;
ModelRenderer wing2;
ModelRenderer wing3;
ModelRenderer wing_4;
ModelRenderer wing5;
ModelRenderer wing6;
ModelRenderer wing7;
ModelRenderer wing8;
ModelRenderer wing9;
ModelRenderer wing10;
ModelRenderer tail1;
ModelRenderer tail2;
ModelRenderer tail3;
ModelRenderer tail4;
ModelRenderer tail5;
ModelRenderer tail6;
ModelRenderer tail7;
ModelRenderer tail8;
public Snabical()
{
textureWidth = 64;
textureHeight = 32;
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -4F, -8F, 8, 8, 8);
head.setRotationPoint(0F, 12F, -6F);
head.setTextureSize(64, 32);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
body = new ModelRenderer(this, 28, 8);
body.addBox(-5F, -10F, -7F, 10, 16, 8);
body.setRotationPoint(0F, 11F, 3F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 1.570796F, 0F, 0F);
leg1 = new ModelRenderer(this, 0, 16);
leg1.addBox(-2F, 0F, -2F, 4, 6, 4);
leg1.setRotationPoint(-3F, 18F, 7F);
leg1.setTextureSize(64, 32);
leg1.mirror = true;
setRotation(leg1, 0F, 0F, 0F);
leg2 = new ModelRenderer(this, 0, 16);
leg2.addBox(-2F, 0F, -2F, 4, 6, 4);
leg2.setRotationPoint(3F, 18F, 7F);
leg2.setTextureSize(64, 32);
leg2.mirror = true;
setRotation(leg2, 0F, 0F, 0F);
leg3 = new ModelRenderer(this, 0, 16);
leg3.addBox(-2F, 18F, -2F, 4, 6, 4);
leg3.setRotationPoint(-3F, 0F, -5F);
leg3.setTextureSize(64, 32);
leg3.mirror = true;
setRotation(leg3, 0F, 0F, 0F);
leg4 = new ModelRenderer(this, 0, 16);
leg4.addBox(-2F, 0F, -2F, 4, 6, 4);
leg4.setRotationPoint(3F, 18F, -5F);
leg4.setTextureSize(64, 32);
leg4.mirror = true;
setRotation(leg4, 0F, 0F, 0F);
nose = new ModelRenderer(this, 0, 0);
nose.addBox(0F, 0F, 0F, 4, 3, 1);
nose.setRotationPoint(-2F, 12F, -15F);
nose.setTextureSize(64, 32);
nose.mirror = true;
setRotation(nose, 0F, 0F, 0F);
wing1 = new ModelRenderer(this, 0, 0);
wing1.addBox(0F, 0F, 0F, 3, 1, 6);
wing1.setRotationPoint(4F, 10F, -4F);
wing1.setTextureSize(64, 32);
wing1.mirror = true;
setRotation(wing1, 0F, 0F, -0.3316126F);
wing2 = new ModelRenderer(this, 0, 0);
wing2.addBox(0F, 0F, 0F, 3, 1, 6);
wing2.setRotationPoint(-7F, 10F, -4F);
wing2.setTextureSize(64, 32);
wing2.mirror = true;
setRotation(wing2, 0F, 0F, 0.2792527F);
wing3 = new ModelRenderer(this, 0, 0);
wing3.addBox(0F, 0F, 0F, 5, 1, 13);
wing3.setRotationPoint(7F, 9F, -2F);
wing3.setTextureSize(64, 32);
wing3.mirror = true;
setRotation(wing3, 0F, 0F, -0.3316126F);
wing_4 = new ModelRenderer(this, 0, 0);
wing_4.addBox(0F, 0F, 0F, 1, 1, 13);
wing_4.setRotationPoint(12F, 8F, -1F);
wing_4.setTextureSize(64, 32);
wing_4.mirror = true;
setRotation(wing_4, 0F, 0F, -0.3316126F);
wing5 = new ModelRenderer(this, 0, 0);
wing5.addBox(0F, 0F, 0F, 1, 1, 13);
wing5.setRotationPoint(13F, 8F, 0F);
wing5.setTextureSize(64, 32);
wing5.mirror = true;
setRotation(wing5, 0F, 0F, -0.3316126F);
wing6 = new ModelRenderer(this, 0, 0);
wing6.addBox(0F, 0F, 0F, 1, 1, 11);
wing6.setRotationPoint(6F, 9F, -1F);
wing6.setTextureSize(64, 32);
wing6.mirror = true;
setRotation(wing6, 0F, 0F, -0.3316126F);
wing7 = new ModelRenderer(this, 0, 0);
wing7.addBox(0F, 0F, 0F, 1, 1, 11);
wing7.setRotationPoint(-7F, 9F, -1F);
wing7.setTextureSize(64, 32);
wing7.mirror = true;
setRotation(wing7, 0F, 0F, 0.3316126F);
wing8 = new ModelRenderer(this, 0, 0);
wing8.addBox(0F, 0F, 0F, 6, 1, 13);
wing8.setRotationPoint(-12.8F, 7.4F, -2F);
wing8.setTextureSize(64, 32);
wing8.mirror = true;
setRotation(wing8, 0F, 0F, 0.3316126F);
wing9 = new ModelRenderer(this, 0, 0);
wing9.addBox(0F, 0F, 0F, 1, 1, 13);
wing9.setRotationPoint(-15F, 8F, 0F);
wing9.setTextureSize(64, 32);
wing9.mirror = true;
setRotation(wing9, 0F, 0F, 0.3316126F);
wing10 = new ModelRenderer(this, 0, 0);
wing10.addBox(0F, 0F, 0F, 1, 1, 13);
wing10.setRotationPoint(-14F, 8F, -1F);
wing10.setTextureSize(64, 32);
wing10.mirror = true;
setRotation(wing10, 0F, 0F, 0.3316126F);
tail1 = new ModelRenderer(this, 0, 0);
tail1.addBox(0F, 0F, 0F, 6, 1, 12);
tail1.setRotationPoint(-3F, 10F, 7F);
tail1.setTextureSize(64, 32);
tail1.mirror = true;
setRotation(tail1, 0.2230717F, 0F, 0F);
tail2 = new ModelRenderer(this, 0, 0);
tail2.addBox(0F, -1F, 0F, 8, 1, 1);
tail2.setRotationPoint(-4F, 8F, 19F);
tail2.setTextureSize(64, 32);
tail2.mirror = true;
setRotation(tail2, 0.6320364F, 0F, 0F);
tail3 = new ModelRenderer(this, 0, 0);
tail3.addBox(0F, 0F, 0F, 10, 1, 1);
tail3.setRotationPoint(-5F, 6F, 19F);
tail3.setTextureSize(64, 32);
tail3.mirror = true;
setRotation(tail3, -0.3717861F, 0F, 0F);
tail4 = new ModelRenderer(this, 0, 0);
tail4.addBox(0F, -1F, -1F, 12, 1, 2);
tail4.setRotationPoint(-6F, 6F, 20F);
tail4.setTextureSize(64, 32);
tail4.mirror = true;
setRotation(tail4, 0.8179294F, 0F, 0F);
tail5 = new ModelRenderer(this, 0, 0);
tail5.addBox(0F, 0F, 0F, 4, 1, 1);
tail5.setRotationPoint(2F, 4F, 20F);
tail5.setTextureSize(64, 32);
tail5.mirror = true;
setRotation(tail5, 0F, 0F, 0F);
tail6 = new ModelRenderer(this, 0, 0);
tail6.addBox(0F, 0F, 0F, 4, 1, 1);
tail6.setRotationPoint(-6F, 4F, 20F);
tail6.setTextureSize(64, 32);
tail6.mirror = true;
setRotation(tail6, 0F, 0F, 0F);
tail7 = new ModelRenderer(this, 0, 0);
tail7.addBox(0F, 0F, 0F, 2, 1, 1);
tail7.setRotationPoint(-6F, 3F, 20F);
tail7.setTextureSize(64, 32);
tail7.mirror = true;
setRotation(tail7, 0F, 0F, 0F);
tail8 = new ModelRenderer(this, 0, 0);
tail8.addBox(0F, 0F, 0F, 2, 1, 1);
tail8.setRotationPoint(4F, 3F, 20F);
tail8.setTextureSize(64, 32);
tail8.mirror = true;
setRotation(tail8, 0F, 0F, 0F);
}
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
head.render(par7);
body.render(par7);
leg1.render(par7);
leg2.render(par7);
leg3.render(par7);
leg4.render(par7);
nose.render(par7);
wing1.render(par7);
wing2.render(par7);
wing3.render(par7);
wing_4.render(par7);
wing5.render(par7);
wing6.render(par7);
wing7.render(par7);
wing8.render(par7);
wing9.render(par7);
wing10.render(par7);
tail1.render(par7);
tail2.render(par7);
tail3.render(par7);
tail4.render(par7);
tail5.render(par7);
tail6.render(par7);
tail7.render(par7);
tail8.render(par7);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) {
}
{
}
}
0
0
0
http://pastebin.com/XUTVXdWT - Main Mod Class
http://pastebin.com/rLYreTqj- EntityMob Class
HELP
In the addSpawn in the main class under entity registries, it says "The method addSpawn(Class<? extends EntityLiving>, int, int, int, EnumCreatureType, BiomeGenBase...) in the type EntityRegistry is not applicable for the arguments (Class<Snabical>, int, int, int,
EnumCreatureType)"
Also in the client Proxy it says "The method addSpawn(Class<? extends EntityLiving>, int, int, int, EnumCreatureType, BiomeGenBase...) in the type EntityRegistry is not applicable for the arguments (Class<Snabical>, int, int, int,
EnumCreatureType)" in the rendering registry.
Help please!
Thank you to those that help!
-Jacobmob
0
@Override
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer entityplayer) {
float f = 1.0F;
float f1 = entityplayer.prevRotationPitch + (entityplayer.rotationPitch - entityplayer.prevRotationPitch) * f;
float f2 = entityplayer.prevRotationYaw + (entityplayer.rotationYaw - entityplayer.prevRotationYaw) * f;
double d = entityplayer.prevPosX + (entityplayer.posX - entityplayer.prevPosX) * (double)f;
double d1 = (entityplayer.prevPosY + (entityplayer.posY - entityplayer.prevPosY) * (double)f + 1.6200000000000001D) - (double)entityplayer.yOffset;
double d2 = entityplayer.prevPosZ + (entityplayer.posZ - entityplayer.prevPosZ) * (double)f;
Vec3 vec3d = Vec3.createVectorHelper(d, d1, d2);
float f3 = MathHelper.cos(-f2 * 0.01745329F - 3.141593F);
float f4 = MathHelper.sin(-f2 * 0.01745329F - 3.141593F);
float f5 = -MathHelper.cos(-f1 * 0.01745329F);
float f6 = MathHelper.sin(-f1 * 0.01745329F);
float f7 = f4 * f5;
float f8 = f6;
float f9 = f3 * f5;
double d3 = 5000D;
Vec3 vec3d1 = vec3d.addVector((double)f7 * d3, (double)f8 * d3, (double)f9 * d3);
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(vec3d, vec3d1, false);
if (movingobjectposition == null)
return item;
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) {
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
int k = movingobjectposition.blockZ;
world.spawnEntityInWorld(new EntityLightningBolt(world, i, j, k));
item.damageItem(1, entityplayer);
}
return item;
}
Credit to The_Slayer via MCForums
Fireball Sword:
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
itemstack.damageItem(20, entityplayer);
if (!world.isRemote)
{
Vec3 look = entityplayer.getLookVec();
EntityLargeFireball fireball2 = new EntityLargeFireball(world, entityplayer, 1, 1, 1);
fireball2.setPosition(
entityplayer.posX + look.xCoord * 2,
entityplayer.posY + 1 + look.yCoord * 1,
entityplayer.posZ + look.zCoord * 2);
fireball2.accelerationX = look.xCoord * 0.1;
fireball2.accelerationY = look.yCoord * 0.1;
fireball2.accelerationZ = look.zCoord * 0.1;
world.spawnEntityInWorld(fireball2);
}
return itemstack;
}
Credit to MCM TripleThree via Youtube
0
>Post code in replies.
>Credit original author(if possible) and place found. Exp. Code by jacobmob via MCForums.
>Make sure it works for 1.6.4 (I might make another post for 1.7)
>DO NOT ask for codes! E.g. Can someone make a sword that spawns a wolf? Go make your own topic!
That's all, I'll post 2 codes later today. (As on 5/27/14)
0
I know people 2 years younger than you who actually are learning java and programming mods.
0
0
(I know there are many topics like this, but they are all outdated, and I don't really know how to do the EntityLightningBolt, and sword thing! )
Thanks,
jacobmob
0
Fellow Forum User,
Jacobmob
0
Where did you hear about the server: Minecraft Forums
Do you understand and accept the rules: Of course! (Yes)
What's our policy on raging: it's just a minor setback and just keep calm and continue on, and THEN you can get REVENGE!
0
0
derp...