• 0

    posted a message on Enchantments and Potions on Weapons
    Someone has been playing too much Skyrim...
    Posted in: Suggestions
  • 0

    posted a message on [WIP]Starwars Mod
    Yes, you heard(read) it right, i'm planning on making a star wars mod! I haven't got much yet, but i do have a list of planned features, what i've got up to now is this Beyoutiful Jawa (don't mind de skin)

    Planned Features:

    Clones, Troopers, stuff like that;
    Droids, Battle Droid, Not really planning on doing droideka though;
    A LOT OF CLONE/DROID/JAWA/WOOKIE/ETCS WEAPS;
    Starships" !(to use on the earth only)!;
    And all those good stuff that if i put here it'd never end!
    I'm working on the Jawa, i'll make them non-agressive, uless u atack them, with the ray gun from SW battlefront 2, as soon as i'm done with that i'll post it so you guys can test, TY!

    Team:
    Me,
    Fridai(Idead and Images)
    Another guy that if he agrees to be part of the team i'll place his name here.

    As soon as i get them working i'll post here, even with an ulgy skin ^^
    Posted in: WIP Mods
  • 0

    posted a message on STAR WARS MOD
    Yes, you heard(read) it right, i'm planning on making a star wars mod! I haven't got much yet, but i do have a list of planned features, what i've got up to now is this Beyoutiful Jawa (don't mind de skin)

    Planned Features:

    Clones, Troopers, stuff like that;
    Droids, Battle Droid, Not really planning on doing droideka though;
    A LOT OF CLONE/DROID/JAWA/WOOKIE/ETCS WEAPS;
    Starships" !(to use on the earth only)!;
    And all those good stuff that if i put here it'd never end!
    I'm working on the Jawa, i'll make them non-agressive, uless u atack them, with the ray gun from SW battlefront 2, as soon as i'm done with that i'll post it so you guys can test, TY!

    Team:
    Me,
    Fridai(Idead and Images)
    Another guy that if he agrees to be part of the team i'll place his name here.

    As soon as i get them working i'll post here, even with an ulgy skin ^^
    Posted in: WIP Mods
  • 0

    posted a message on Entites questions
    Quote from mister_person

    Okay, I have the block placing done. I used none of your code, so you might have to change a few things. You can change the variables 'gravity' and 'speed' in ItemLantern.class to change the properties of the lantern. To test this, just use RenderSnowball for now. To do the Rendering, I need to see your textures. (I used a slimeball for now.) And the entity doesn't save itself when you log out yet I don't think.

    ItemLantern:

    package net.minecraft.src;
    
    public class ItemLantern extends Item {
    
    	protected ItemLantern(int i) {
    		super(i);
    	}
    	
    	public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
        {
    		gravity = 0.08;
    		speed = 1.0;
    		itemstack.stackSize--;
    		EntityThrowableLantern lantern = new EntityThrowableLantern(world, gravity);
    		lantern.setPosition(entityplayer.posX, entityplayer.posY, entityplayer.posZ);
    		lantern.motionX = -MathHelper.sin((entityplayer.rotationYaw / 180F) * 3.141593F) * MathHelper.cos((entityplayer.rotationPitch / 180F) * 3.141593F) * speed;
            lantern.motionZ = MathHelper.cos((entityplayer.rotationYaw / 180F) * 3.141593F) * MathHelper.cos((entityplayer.rotationPitch / 180F) * 3.141593F) * speed;
            lantern.motionY = -MathHelper.sin((entityplayer.rotationPitch / 180F) * 3.141593F) * speed;
    		world.entityJoinedWorld(lantern);
    		world.playSoundAtEntity(lantern, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
            return itemstack;
        }
    	
    	private double gravity;
    	private double speed;
    
    }

    EntityThrowableLantern:

    package net.minecraft.src;
    
    import java.util.List;
    
    public class EntityThrowableLantern extends Entity {
    
    	public EntityThrowableLantern(World world, double Gravity) {
    		super(world);
    		stepHeight = 1;
    		setSize(.25F, .25F);
    		gravity = Gravity;
    	}
    
    	protected void readEntityFromNBT(NBTTagCompound nbttagcompound)
    	{
    	}
    
    	protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
    	{
    	}
    	
    	public boolean canTriggerWalking()
    	{
    		return false;
    	}
    	
    	public void onUpdate()
    	{//82
    		super.onUpdate();
    		motionY -= gravity;
    		moveEntity(motionX, motionY, motionZ);
    		if(isCollided)
    		{
    			worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (rand.nextFloat() * 0.2F + 0.9F));
    			worldObj.setBlockWithNotify((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ), Block.glowStone.blockID);
    			setEntityDead();
    		}
    	}
    	private double gravity;
    }


    OOOMFG ur so pro dude xD do u have MSN or skype, if u want to help me with the coding, we coul make a team and work with something very cool, and ty the code worked, how did u do it?! u are just too pro (i can't blame u i'm just a 14 old who read 1 1/2 java books) anyway the image is in http://imgur.com/LO5iI, that's the image i made for that model, and to make it spin vertically, i have to go on techne and make it right?
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions

    i have to finish mine first sorry xD i'll think about it after i finish everything i want to do on mine
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions
    Quote from Chronosmith

    Sorry for the delay in answering. I thought the other guy would take care of it. Anyway, xyz values are all over the place if you know where to look. Check out Entity.java and you'll see several values of interest: posX, posY, posZ, prevPosX, prevPosY, and prevPosz. The first three are probably the most interesting for you, but the last three may also be useful depending on what you eventually decide to do. Every entity whether it be a lightning bolt, a mob, or a player gets a good chunk of its code from Entity.java, and so it inherits those six values, which are public and open for editing.

    Granted I haven't tried this, but maybe you can set the air block the torch is currently in to have a light value, thereby increasing or decreasing the light value on the floor depending on the height the torch was thrown at. Even if it doesn't work, you can use one or two of the functions in World.java to check the coordinates below your torch to see if there's a block there and then set it with a light value.

    gah, i just can't make that entity place a block when it touches the ground, I always get crashed, my code is:
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) braces deadcode 
    
    package net.minecraft.src;
    
    import java.util.List;
    import java.util.Random;
    
    // Referenced classes of package net.minecraft.src:
    //            Entity, AxisAlignedBB, EntityLiving, MathHelper, 
    //            World, Vec3D, MovingObjectPosition, DamageSource, 
    //            EntityChicken, NBTTagCompound, EntityPlayer, ItemStack, 
    //            Item, InventoryPlayer
    
    public class EntityLantern extends Entity
    {
    
        public EntityLantern(World world)
        {
            super(world);
            xTile = -1;
            yTile = -1;
            zTile = -1;
            inTile = 0;
            inGround = false;
            shake = 0;
            field_20049_i = 0;
            setSize(0.25F, 0.25F);
        }
    
        protected void entityInit()
        {
        }
    
        public boolean isInRangeToRenderDist(double d)
        {
            double d1 = boundingBox.getAverageEdgeLength() * 4D;
            d1 *= 64D;
            return d < d1 * d1;
        }
    
        public EntityLantern(World world, EntityLiving entityliving)
        {
            super(world);
            xTile = -1;
            yTile = -1;
            zTile = -1;
            inTile = 0;
            inGround = false;
            shake = 0;
            field_20049_i = 0;
            field_20051_g = entityliving;
            setSize(0.25F, 0.25F);
            setLocationAndAngles(entityliving.posX, entityliving.posY + (double)entityliving.getEyeHeight(), entityliving.posZ, entityliving.rotationYaw, entityliving.rotationPitch);
            posX -= MathHelper.cos((rotationYaw / 180F) * 3.141593F) * 0.16F;
            posY -= 0.10000000149011612D;
            posZ -= MathHelper.sin((rotationYaw / 180F) * 3.141593F) * 0.16F;
            setPosition(posX, posY, posZ);
            yOffset = 0.0F;
            float f = 0.4F;
            motionX = -MathHelper.sin((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F) * f;
            motionZ = MathHelper.cos((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F) * f;
            motionY = -MathHelper.sin((rotationPitch / 180F) * 3.141593F) * f;
            setEggHeading(motionX, motionY, motionZ, 1.5F, 1.0F);
        }
    
        public EntityLantern(World world, double d, double d1, double d2)
        {
            super(world);
            xTile = -1;
            yTile = -1;
            zTile = -1;
            inTile = 0;
            inGround = false;
            shake = 0;
            field_20049_i = 0;
            field_20050_h = 0;
            setSize(0.25F, 0.25F);
            setPosition(d, d1, d2);
            yOffset = 0.0F;
        }
    
        public void setEggHeading(double d, double d1, double d2, float f, 
                float f1)
        {
            float f2 = MathHelper.sqrt_double(d * d + d1 * d1 + d2 * d2);
            d /= f2;
            d1 /= f2;
            d2 /= f2;
            d += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
            d1 += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
            d2 += rand.nextGaussian() * 0.0074999998323619366D * (double)f1;
            d *= f;
            d1 *= f;
            d2 *= f;
            motionX = d;
            motionY = d1;
            motionZ = d2;
            float f3 = MathHelper.sqrt_double(d * d + d2 * d2);
            prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
            prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f3) * 180D) / 3.1415927410125732D);
            field_20050_h = 0;
        }
    
        public void setVelocity(double d, double d1, double d2)
        {
            motionX = d;
            motionY = d1;
            motionZ = d2;
            if(prevRotationPitch == 0.0F && prevRotationYaw == 0.0F)
            {
                float f = MathHelper.sqrt_double(d * d + d2 * d2);
                prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
                prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f) * 180D) / 3.1415927410125732D);
            }
        }
    
        public void onUpdate()
        {
            lastTickPosX = posX;
            lastTickPosY = posY;
            lastTickPosZ = posZ;
            super.onUpdate();
            if(shake > 0)
            {
                shake--;
            }
            if(inGround)
            {
            	int i = MathHelper.floor_double(posX);
                int j = MathHelper.floor_double(posY);
                int k = MathHelper.floor_double(posZ);
                world.setBlockWithNotify(i, j, k, mod_Lantern.lantern.blockID);
                if(i != inTile)
                {
                    inGround = false;
                    motionX *= rand.nextFloat() * 0.2F;
                    motionY *= rand.nextFloat() * 0.2F;
                    motionZ *= rand.nextFloat() * 0.2F;
                    field_20050_h = 0;
                    field_20049_i = 0;
                } else
                {
                    field_20050_h++;
                    if(field_20050_h == 1200)
                    {
                        setEntityDead();
                    }
                    return;
                }
            } else
            {
                field_20049_i++;
            }
            Vec3D vec3d = Vec3D.createVector(posX, posY, posZ);
            Vec3D vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
            MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(vec3d, vec3d1);
            vec3d = Vec3D.createVector(posX, posY, posZ);
            vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
            if(movingobjectposition != null)
            {
                
            }
            if(!worldObj.multiplayerWorld)
            {
                Entity entity = null;
                List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
                double d = 0.0D;
                for(int i1 = 0; i1 < list.size(); i1++)
                {
                    Entity entity1 = (Entity)list.get(i1);
                    if(!entity1.canBeCollidedWith() || entity1 == field_20051_g && field_20049_i < 5)
                    {
                        continue;
                    }
                    float f4 = 0.3F;
                    AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f4, f4, f4);
                    MovingObjectPosition movingobjectposition1 = axisalignedbb.func_1169_a(vec3d, vec3d1);
                    if(movingobjectposition1 == null)
                    {
                        continue;
                    }
                    double d1 = vec3d.distanceTo(movingobjectposition1.hitVec);
                    if(d1 < d || d == 0.0D)
                    {
                        entity = entity1;
                        d = d1;
                    }
                }
    
                if(entity != null)
                {
                    movingobjectposition = new MovingObjectPosition(entity);
                }
            }
            if(movingobjectposition != null)
            {
                
            	if(movingobjectposition.entityHit != null)
                {
                    if(!movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, field_20051_g), 0));
                }
                if(!worldObj.multiplayerWorld && rand.nextInt(8) == 0)
                {
                    byte byte0 = 1;
                    if(rand.nextInt(32) == 0)
                    {
                        byte0 = 4;
                    }
                    
    
                }
               
    
                setEntityDead();
            }
            posX += motionX;
            posY += motionY;
            posZ += motionZ;
            float f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
            rotationYaw = (float)((Math.atan2(motionX, motionZ) * 180D) / 3.1415927410125732D);
            for(rotationPitch = (float)((Math.atan2(motionY, f) * 180D) / 3.1415927410125732D); rotationPitch - prevRotationPitch < -180F; prevRotationPitch -= 360F) { }
            for(; rotationPitch - prevRotationPitch >= 180F; prevRotationPitch += 360F) { }
            for(; rotationYaw - prevRotationYaw < -180F; prevRotationYaw -= 360F) { }
            for(; rotationYaw - prevRotationYaw >= 180F; prevRotationYaw += 360F) { }
            rotationPitch = prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
            rotationYaw = prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
            float f1 = 0.99F;
            float f2 = 0.03F;
            if(isInWater())
            {
                for(int l = 0; l < 4; l++)
                {
                    float f3 = 0.25F;
                    worldObj.spawnParticle("bubble", posX - motionX * (double)f3, posY - motionY * (double)f3, posZ - motionZ * (double)f3, motionX, motionY, motionZ);
                }
    
                f1 = 0.8F;
            }
            motionX *= f1;
            motionY *= f1;
            motionZ *= f1;
            motionY -= f2;
            setPosition(posX, posY, posZ);
        }
    
        public void writeEntityToNBT(NBTTagCompound nbttagcompound)
        {
            nbttagcompound.setShort("xTile", (short)xTile);
            nbttagcompound.setShort("yTile", (short)yTile);
            nbttagcompound.setShort("zTile", (short)zTile);
            nbttagcompound.setByte("inTile", (byte)inTile);
            nbttagcompound.setByte("shake", (byte)shake);
            nbttagcompound.setByte("inGround", (byte)(inGround ? 1 : 0));
        }
    
        public void readEntityFromNBT(NBTTagCompound nbttagcompound)
        {
            xTile = nbttagcompound.getShort("xTile");
            yTile = nbttagcompound.getShort("yTile");
            zTile = nbttagcompound.getShort("zTile");
            inTile = nbttagcompound.getByte("inTile") & 0xff;
            shake = nbttagcompound.getByte("shake") & 0xff;
            inGround = nbttagcompound.getByte("inGround") == 1;
        }
    
        public void onCollideWithPlayer(EntityPlayer entityplayer)
        {
            if(inGround && field_20051_g == entityplayer && shake <= 0 && entityplayer.inventory.addItemStackToInventory(new ItemStack(Item.arrow, 1)))
            {
                worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                entityplayer.onItemPickup(this, 1);
                setEntityDead();
            }
        }
    
        public float getShadowSize()
        {
            return 0.0F;
        }
    
        private World world;
        private int xTile;
        private int yTile;
        private int zTile;
        private int inTile;
        private boolean inGround;
        public int shake;
        private EntityLiving field_20051_g;
        private int field_20050_h;
        private int field_20049_i;
    }
    , if u can, please try to make it work, and to make it have the model but not atack or anything, do i still have to use ModLoader.regierentity (i think it's that), and when i tried to render it it didn't work i just kept on getting eclipse tellimg me i had errors, the code i got from eclipse to make the model is :
    package net.minecraft.src;
    //Exported java file
    //Keep in mind that you still need to fill in some blanks
    // - ZeuX
    
    public class ModelLantern extends ModelBase
    {
    	public ModelLantern()
    	{
    		body = new ModelRenderer(0, 0);
    		body.addBox(0F, 0F, 0F, 3, 5, 3, 0F);
    		body.setRotationPoint(0F, 0F, 0F);
    		body.rotateAngleX = 0F;
    		body.rotateAngleY = 0F;
    		body.rotateAngleZ = 0F;
    		body.mirror = false;
    	}
    	
    	public void render(float f, float f1, float f2, float f3, float f4, float f5)
    	{
    		super.render(f, f1, f2, f3, f4, f5);
    		setRotationAngles(f, f1, f2, f3, f4, f5);
    		body.render(f5);
    	}
    	
    	public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
    	{
    		super.setRotationAngles(f, f1, f2, f3, f4, f5);
    	}
    	
    	//fields
    	public ModelRenderer body;
    }
    and i don't know how to complete the code so it works, and neither how to make the render, when u guys have some spare time please help me :biggrin.gif:, and when i release the mod, i'll surely put u guys on the credits (when i get it working) ty all
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions
    Quote from mister_person

    Use the setBlockWithNotify() function instead. And i, j, and k are the coordinates of the block. If I have time tomorrow, I might give you some code.

    The renderer determines how to render the entity. Like, which model to use and what color it is. Most of the actual code it uses is in the Render class, I think.

    thanks, i'll try it out, but how can i get the value?
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions
    i tried the setBlock() method but i need ints, i, j and k and i looked over the code and they don't seem to have a value, what do i put on those ints' values?
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions
    Quote from mister_person

    I don't have much time right now, I'll help more in a few days. Sorry it took so long!

    1: Entities don't come with a light value, so this is harder than it sounds. I think what you can do is set the block at the entity's position to a specific light value every frame. This is kind of ugly and slow, but it's the best way to do it without rewriting the lighting code.

    2: Did the guy above me explain in enough detail? let me know if you need more help with this one.

    3: If you want the block to be a cuboid, use the setBlockBounds() function. If you want a different shape like stairs, you will have to make a new render type in RenderBlocks.java. Just Use the functions used by the stair rendering code (renderStandardBlock and setBlockBounds) to make a shape with multiple cuboids. For the collision, copy the stair collision and make it your blocks shape. And what do you mean by throwable? You can't throw blocks, you'd need an entity for that.

    4: What do you mean by an entity render? You mean EntityRender.java or stuff like RenderArrow.java?

    well ty for the help, i haven't had much time lately to mod the things i want, the render would be RenderArrow.java, cause the thing is, i'm making a mod of a throwable lantern, wich (what i thought of) would be, u have a lantern block, and a t(throwable)lantern block,a tlantern item and a tlantern entity, u'd get the lanern block (lights autoamticaly when it's night), crafted into two tlantern item, wich when u rightclick, "summons" and tlantern entity that has a light value and illuminates it's path (good for exploring) and when the entity touched the ground, it'd be replaced by a tlantern block, so it's recolectable.I already have the model for the lantern and the skins, but i can't get the entity to have a light value, and only on tuesday i'll have time to try the block placing thingym so i'll tell if i have any succes, another guy told me that u can make an entity glow using DynamicLighting mod, and i haven't had time to do anything so on tuesday i'll do my stuff and reply here
    Posted in: Mods Discussion
  • 0

    posted a message on [1.8.1] Level Up! - RPG Skills & More - Update v1.5.2
    Quote from PowerUp217

    IMPORTANT:


    Anyway,


    Oh in that case you want to check out GuiMainMenu. All the Gui classes can be helpful really if you're trying to learn how to make your own.


    ok man, i'll look into it, do i need any especial methods from ModLoader to make it work?
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.8.1] Level Up! - RPG Skills & More - Update v1.5.2
    Quote from PowerUp217

    Exactly.


    I worked it out myself. Not that hard actually. Just take a look at GuiIngameMenu (in.class in the obfuscation) in MCP.


    Can't replicate it...Even after making a new world, getting to level 3, and dying, I still got skill points on level 2 with another new world.

    well, i'll check it out but the problem is that what i want to do is in the main menu b4 the game start D:
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.8.1] Level Up! - RPG Skills & More - Update v1.5.2
    Wow! cool mod, i might download it later, and i have a question, did u just checko on the minecraft classes to add a new GUI to the menu or did u see that in a tutorial? if it was on a tutorial could u link it to me please? if u just checked on the classes can u tell me wich, so i can see how to add a button too? (i need it for a mod i want to make) ty
    and :Diamond: :Diamond: for the mod ^^
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.1] Kitchen additions UPDATED Fridges, toasters, stoves And more!!
    Hi! i saw that the block are rendered, is there any chance of u making a how-to-render-a-block tutorial or linking wher eu learned it please? i really need it
    Posted in: Minecraft Mods
  • 0

    posted a message on Entites questions
    Quote from Chronosmith

    I can help out with the second one. The others are either really difficult or at least beyond me.

    EntityEgg relies on this code in the onUpdate function to see if the egg has hit something:
    if(movingobjectposition != null)

    You'll find similar code in EntityArrow, which is probably where you should place a world.setBlock function. The exact function you should use might vary depending on which block you're placing.

    hmm nice idea, i'll see if i can get risugami's dirt arrow (it's his isn't it?) if i can i'll check it and copy it D: ty for the helps
    Posted in: Mods Discussion
  • 0

    posted a message on Entites questions
    come on guys! i really need help on this!
    Posted in: Mods Discussion
  • To post a comment, please .