• 0

    posted a message on Projectile Render with Diferent Models + Shooting cooldown
    anyone?
    Posted in: Mods Discussion
  • 0

    posted a message on Projectile Render with Diferent Models + Shooting cooldown
    Hello guys, i need some help with this mod i'm making, cause i'm stuck at this rocket part. I made a rocket laucher (obviously, rocket needs a launcher), and i need some help on the rendering. i'm still working on the model, but i want it to be something around this
    // Date: 29/08/2012 15:42:07
    // Template version 1.1
    // Java generated by Techne
    // Keep in mind that you still need to fill in some blanks
    // - ZeuX
    
    
    
    
    
    
    package net.minecraft.src;
    
    public class ModelModel extends ModelBase
    {
    //fields
    ModelRenderer Shape1;
    ModelRenderer Shape2;
    ModelRenderer Shape3;
    
    public ModelModel()
    {
    textureWidth = 32;
    textureHeight = 32;
    
    	 Shape1 = new ModelRenderer(this, 0, 0);
    	 Shape1.addBox(0F, 0F, 0F, 9, 4, 4);
    	 Shape1.setRotationPoint(-1F, 0F, 0F);
    	 Shape1.setTextureSize(64, 32);
    	 Shape1.mirror = true;
    	 setRotation(Shape1, 0F, 0F, 0F);
    	 Shape2 = new ModelRenderer(this, 0, 8);
    	 Shape2.addBox(0F, 0F, 0F, 2, 9, 0);
    	 Shape2.setRotationPoint(-3F, -1F, -1F);
    	 Shape2.setTextureSize(64, 32);
    	 Shape2.mirror = true;
    	 setRotation(Shape2, 0.7853982F, 0F, 0F);
    	 Shape3 = new ModelRenderer(this, 0, 8);
    	 Shape3.addBox(0F, 0F, 0F, 2, 9, 0);
    	 Shape3.setRotationPoint(-3F, -1F, 5F);
    	 Shape3.setTextureSize(64, 32);
    	 Shape3.mirror = true;
    	 setRotation(Shape3, -0.7853982F, 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);
    Shape1.render(f5);
    Shape2.render(f5);
    Shape3.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);
    }
    
    }
    and the other thing i need help with is that in this mod there are a bunch of weapons (i mean to make a pvp like mod), so i need to make a way to reload weapons, and make them have a shooting cooldown. i had the idea of making the item get the durability (and the durability being the amount of ammo u got), and when u press R, it gets the max durability, takes the amount u have left and subtracts it one from the other, than takes from your backpack the amount u got, up to the max cap (being still able to reload without enough bullets for a full rechard), but i need some help with it, cause i got no idea on how to do that, i can make it waste ammo when you shoot, but it shoots way too fast, and a rocket launcher that u had, for example, 10 bullets you could just kill everyone. Any help is apreciated, ty very much :D
    Posted in: Mods Discussion
  • 0

    posted a message on Is there a method that returns Block when you give it blockID?
    Thanks! i'll try it out. But i don't think it'll work with modloaderly added blocks...
    Posted in: Modification Development
  • 0

    posted a message on Is there a method that returns Block when you give it blockID?
    I'm making a mod, where the block takes the texture from the block underneath it, and copies it. i have a way to get the block blockIndexInTexture from any block, but i needed it from the block ID, becuase i'll be able to use World.getBlockId(), than use that method, than use a method that i made, and get the texture, but i needed a way to convert the blockID to Block. is there a way to make that?
    Posted in: Modification Development
  • 0

    posted a message on Redstoneish question
    No help? Please guys i really need it, it's the only thing i haven't found out, so i can complete my mod
    Posted in: Modification Development
  • 0

    posted a message on Does anyone know a good "take your SSP mod and make it SMP" tutorial?
    hmm, i'll have to make changes to the client and server, but i'll try it out. I wanted one with only ModloaderMP, cause i dunno what that forge thing is :P
    Posted in: Mods Discussion
  • 0

    posted a message on Redstoneish question
    I am making a mod with lots of stuff, and one of them consists in a block that once it's activated, you can pass through it.(at that i have succeded). I copied the code from the repeater, deleted some render stuff and aded the thing i wanted and the code looks like this
    package net.minecraft.src;
    
    import java.util.ArrayList;
    import java.util.Random;
    
    public class BlockFalse extends BlockDirectional
    {
        public static final double repeaterTorchOffset[] =
        {
    	    -0.0625D, 0.0625D, 0.1875D, 0.3125D
        };
        private static final int repeaterState[] =
        {
    	    1, 2, 3, 4
        };
    
        /** Tells whether the repeater is powered or not */
        private final boolean isRepeaterPowered;
    
        protected BlockFalse(int par1, boolean par2)
        {
    	    super(par1, 6, Material.circuits);
    	    isRepeaterPowered = par2;
        }
        public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
        {
    	    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        }
        public void getCollidingBoundingBoxes(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, ArrayList par6ArrayList)
        {
            if(isRepeaterPowered){
                setBlockBounds(0f,0f,0f,0f,0f,0f);
                super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
            }else {
                setBlockBounds(0f,0f,0f,1f,1f,1f);
                super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
            }
        }
    
        /**
    	 * Can this block stay at this position.  Similar to canPlaceBlockAt except gets checked often with plants.
    	 */
        public boolean canBlockStay(World par1World, int par2, int par3, int par4)
        {
    	    if (!par1World.isBlockNormalCube(par2, par3 - 1, par4))
    	    {
    		    return false;
    	    }
    	    else
    	    {
    		    return super.canBlockStay(par1World, par2, par3, par4);
    	    }
        }
    
        /**
    	 * Ticks the block if it's been scheduled
    	 */
        public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
        {
    	    int i = par1World.getBlockMetadata(par2, par3, par4);
    	    boolean flag = ignoreTick(par1World, par2, par3, par4, i);
    
    	    if (isRepeaterPowered && !flag)
    	    {
    		    par1World.setBlockAndMetadataWithNotify(par2, par3, par4, mod_Soulore.falseoff.blockID, i);
    	    }
    	    else if (!isRepeaterPowered)
    	    {
    		    par1World.setBlockAndMetadataWithNotify(par2, par3, par4, mod_Soulore.falseon.blockID, i);
    
    		    if (!flag)
    		    {
    			    int j = (i & 0xc) >> 2;
    			    par1World.scheduleBlockUpdate(par2, par3, par4, mod_Soulore.falseon.blockID, repeaterState[j] * 2);
    		    }
    	    }
        }
    
    
        /**
    	 * Is this block indirectly powering the block on the specified side
    	 */
        public boolean isIndirectlyPoweringTo(World par1World, int par2, int par3, int par4, int par5)
        {
    	    return isPoweringTo(par1World, par2, par3, par4, par5);
        }
    
        /**
    	 * Is this block powering the block on the specified side
    	 */
        public boolean isPoweringTo(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
        {
    	    if (!isRepeaterPowered)
    	    {
    		    return false;
    	    }
    
    	    int i = getDirection(par1IBlockAccess.getBlockMetadata(par2, par3, par4));
    
    	    if (i == 0 && par5 == 3)
    	    {
    		    return true;
    	    }
    
    	    if (i == 1 && par5 == 4)
    	    {
    		    return true;
    	    }
    
    	    if (i == 2 && par5 == 2)
    	    {
    		    return true;
    	    }
    
    	    return i == 3 && par5 == 5;
        }
    
        /**
    	 * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
    	 * their own) Args: x, y, z, neighbor blockID
    	 */
        public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
        {
    	    if (!canBlockStay(par1World, par2, par3, par4))
    	    {
    		    dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
    		    par1World.setBlockWithNotify(par2, par3, par4, 0);
    		    par1World.notifyBlocksOfNeighborChange(par2 + 1, par3, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2 - 1, par3, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 + 1, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 - 1, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3 + 1, par4, blockID);
    		    return;
    	    }
    
    	    int i = par1World.getBlockMetadata(par2, par3, par4);
    	    boolean flag = ignoreTick(par1World, par2, par3, par4, i);
    	    int j = (i & 0xc) >> 2;
    
    	    if (isRepeaterPowered && !flag)
    	    {
    		    par1World.scheduleBlockUpdate(par2, par3, par4, blockID, repeaterState[j] * 2);
    	    }
    	    else if (!isRepeaterPowered && flag)
    	    {
    		    par1World.scheduleBlockUpdate(par2, par3, par4, blockID, repeaterState[j] * 2);
    	    }
        }
    
        private boolean ignoreTick(World par1World, int par2, int par3, int par4, int par5)
        {
    	    int i = getDirection(par5);
    
    	    switch (i)
    	    {
    		    case 0:
    			    return par1World.isBlockIndirectlyProvidingPowerTo(par2, par3, par4 + 1, 3) || par1World.getBlockId(par2, par3, par4 + 1) == Block.redstoneWire.blockID && par1World.getBlockMetadata(par2, par3, par4 + 1) > 0;
    
    		    case 2:
    			    return par1World.isBlockIndirectlyProvidingPowerTo(par2, par3, par4 - 1, 2) || par1World.getBlockId(par2, par3, par4 - 1) == Block.redstoneWire.blockID && par1World.getBlockMetadata(par2, par3, par4 - 1) > 0;
    
    		    case 3:
    			    return par1World.isBlockIndirectlyProvidingPowerTo(par2 + 1, par3, par4, 5) || par1World.getBlockId(par2 + 1, par3, par4) == Block.redstoneWire.blockID && par1World.getBlockMetadata(par2 + 1, par3, par4) > 0;
    
    		    case 1:
    			    return par1World.isBlockIndirectlyProvidingPowerTo(par2 - 1, par3, par4, 4) || par1World.getBlockId(par2 - 1, par3, par4) == Block.redstoneWire.blockID && par1World.getBlockMetadata(par2 - 1, par3, par4) > 0;
    	    }
    
    	    return false;
        }
    
        /**
    	 * Called upon block activation (left or right click on the block.). The three integers represent x,y,z of the
    	 * block.
    	 */
        /**
    	 * Can this block provide power. Only wire currently seems to have this change based on its state.
    	 */
        public boolean canProvidePower()
        {
    	    return true;
        }
    
        /**
    	 * Called when the block is placed in the world.
    	 */
        public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving)
        {
    	    int i = ((MathHelper.floor_double((double)((par5EntityLiving.rotationYaw * 4F) / 360F) + 0.5D) & 3) + 2) % 4;
    	    par1World.setBlockMetadataWithNotify(par2, par3, par4, i);
    	    boolean flag = ignoreTick(par1World, par2, par3, par4, i);
    
    	    if (flag)
    	    {
    		    par1World.scheduleBlockUpdate(par2, par3, par4, blockID, 1);
    	    }
        }
    
        /**
    	 * Called whenever the block is added into the world. Args: world, x, y, z
    	 */
        public void onBlockAdded(World par1World, int par2, int par3, int par4)
        {
    	    par1World.notifyBlocksOfNeighborChange(par2 + 1, par3, par4, blockID);
    	    par1World.notifyBlocksOfNeighborChange(par2 - 1, par3, par4, blockID);
    	    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 + 1, blockID);
    	    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 - 1, blockID);
    	    par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, blockID);
    	    par1World.notifyBlocksOfNeighborChange(par2, par3 + 1, par4, blockID);
        }
    
        /**
    	 * Called right before the block is destroyed by a player.  Args: world, x, y, z, metaData
    	 */
        public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5)
        {
    	    if (isRepeaterPowered)
    	    {
    		    par1World.notifyBlocksOfNeighborChange(par2 + 1, par3, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2 - 1, par3, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 + 1, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3, par4 - 1, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, blockID);
    		    par1World.notifyBlocksOfNeighborChange(par2, par3 + 1, par4, blockID);
    	    }
    
    	    super.onBlockDestroyedByPlayer(par1World, par2, par3, par4, par5);
        }
    
        /**
    	 * Is this block (a) opaque and (B) a full 1m cube?  This determines whether or not to render the shared face of two
    	 * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
    	 */
        public boolean isOpaqueCube()
        {
    	    return false;
        }
    
        /**
    	 * Returns the ID of the items to drop on destruction.
    	 */
        public int idDropped(int par1, Random par2Random, int par3)
        {
    	    return mod_Soulore.falseoff.blockID;
        }
    
        /**
    	 * A randomly called display update to be able to add particles or other items for display
    	 */
        public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
        {
    	    if (!isRepeaterPowered)
    	    {
    		    return;
    	    }
    
    	    int i = par1World.getBlockMetadata(par2, par3, par4);
    	    int j = getDirection(i);
    	    double d = (double)((float)par2 + 0.5F) + (double)(par5Random.nextFloat() - 0.5F) * 0.20000000000000001D;
    	    double d1 = (double)((float)par3 + 0.4F) + (double)(par5Random.nextFloat() - 0.5F) * 0.20000000000000001D;
    	    double d2 = (double)((float)par4 + 0.5F) + (double)(par5Random.nextFloat() - 0.5F) * 0.20000000000000001D;
    	    double d3 = 0.0D;
    	    double d4 = 0.0D;
    
    	    if (par5Random.nextInt(2) == 0)
    	    {
    		    switch (j)
    		    {
    			    case 0:
    				    d4 = -0.3125D;
    				    break;
    
    			    case 2:
    				    d4 = 0.3125D;
    				    break;
    
    			    case 3:
    				    d3 = -0.3125D;
    				    break;
    
    			    case 1:
    				    d3 = 0.3125D;
    				    break;
    		    }
    	    }
    	    else
    	    {
    		    int k = (i & 0xc) >> 2;
    
    		    switch (j)
    		    {
    			    case 0:
    				    d4 = repeaterTorchOffset[k];
    				    break;
    
    			    case 2:
    				    d4 = -repeaterTorchOffset[k];
    				    break;
    
    			    case 3:
    				    d3 = repeaterTorchOffset[k];
    				    break;
    
    			    case 1:
    				    d3 = -repeaterTorchOffset[k];
    				    break;
    		    }
    	    }
    
    	    par1World.spawnParticle("portal", d + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
        }
    }
    it provides power to the block in front of it, but i wanted to make it provide power to the block on top of it, so you could make some cool secret doors, but i don't know how to change the isPoweringTo method. does anyone there know how to do it? i really need some help on this. Ty
    Posted in: Modification Development
  • 0

    posted a message on Does anyone know a good "take your SSP mod and make it SMP" tutorial?
    Hi guys. i have a mod i made, and have yet to release, but i wanted to make it server-sided as well, so i could play it online with my friends, so if any of you know some tutorials that help with that, please share them with me. ty :D
    Posted in: Mods Discussion
  • 0

    posted a message on MCP 6.1
    i've done that already, but on eclipse it show a bunch of errors =/it is like it hasn't decompiled it with modloader... odd
    Posted in: Discussion
  • 0

    posted a message on MCP 6.1
    Is there a fix to decompiling MC 1.2.4 with modloader on MCP? i get a whole bunch of errors, is there something i'm doing wrong? i put in the file that is on risugami's thread ad decompile fix but it didn't work, sorry for the noob question :D
    Posted in: Discussion
  • 0

    posted a message on [1.5.2]STAR WARS mod - NEW 1.1.3 VERSION - Please, follow the new thread
    Quote from AXELTOPOLINO

    Hey, I've personally already done the jawa model :smile.gif:

    If you want to be a tester, just the wait the first release :wink.gif:

    okay than, i just have one question, how did you make the double saber SO AWESOME? it looks amazing, coming out from two ways ^^ so cool!
    Posted in: WIP Mods
  • 0

    posted a message on [1.5.2]STAR WARS mod - NEW 1.1.3 VERSION - Please, follow the new thread
    Awwww, i started to do it but i gave up! xD. anyway, i made a jawa model wich i think looks pretty nice, and i'd like to be a tester too, i know some basic java if you want i can try to help you with models or stuff like that, if you wanna see the jawa just send me a PM ^^
    Posted in: WIP Mods
  • 0

    posted a message on Pocket Edition On Sale; New Account System Coming
    MC PORTABLE, Y U NO WORK ON MOTOROLA DEXT?!
    Posted in: Minecraft News
  • 0

    posted a message on Minecraft is Officially Out!
    Awesomw ending, that on top of the "pilar" was suposed to be a dragon egg? i couldn't mine it because i was on creative D:
    Posted in: Minecraft News
  • 0

    posted a message on More Minecon, More Pics!
    WTB> Creeper Bag, 1kk
    Posted in: Minecraft News
  • To post a comment, please or register a new account.