MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[1.8.1] Throwable Explosive

+2
lcass
Strengthowns
6 posters

Go down

[1.8.1] Throwable Explosive Empty [1.8.1] Throwable Explosive

Post by Strengthowns Fri Jul 01, 2011 8:47 am

Throwable Explosive

Spoiler:
Strengthowns
Strengthowns
Admin

Posts : 79
Join date : 2011-06-14
Location : Right here!

http://www.mcmodding.4umer.com

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Wed Oct 26, 2011 1:23 pm

when i try this the causethrowndamage bit goes red and dosn't work !!!!

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Wed Oct 26, 2011 1:33 pm

how would you make it do napalm or even in portal 2 speed gel

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by bottz2 Thu Oct 27, 2011 1:35 am

how do i make i glow and not explode like a glowstick

bottz2
Member

Posts : 14
Join date : 2011-10-24

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 2:23 am

Shouldn`t be looking at throwable explosive you should look at the items tutorial and i suggest putting this is requests.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by bottz2 Thu Oct 27, 2011 2:30 am

well i want to be able to through the glowstick

bottz2
Member

Posts : 14
Join date : 2011-10-24

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 3:00 am

You should still put it in help or requests.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Thu Oct 27, 2011 11:11 am

remove the causethrowdamage part it dosn't work also the glowstick Idea seems nice

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 6:16 pm

You would also have to remove the code where it blows up Neutral.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Thu Oct 27, 2011 6:20 pm

acctually no here is the code you need if you want to fix it
Code:
package net.minecraft.src;
 
public class Entitynukethrow extends EntityItem
{
 
    public Entitynukethrow(World world)
    {
        super(world);
        setSize(0.5F, 0.5F);
        yOffset = height / 2.0F;
        item = new ItemStack(Item.itemsList[nukethrow.nukethrowID]);
        bounceFactor = 0.9;
        exploded = false;
        stopped = false;
        fuse = 120;
    }
    public Entitynukethrow(World world, double x, double y, double z, float yaw, float pitch, double force, int fuseLength)
    {
        this(world);

      setRotation(yaw, 0);
      double xHeading = -MathHelper.sin((yaw * 3.141593F) / 180F);
      double zHeading = MathHelper.cos((yaw * 3.141593F) / 180F);
        motionX = force*xHeading*MathHelper.cos((pitch / 180F) * 3.141593F);
        motionY = -force*MathHelper.sin((pitch / 180F) * 3.141593F);
        motionZ = force*zHeading*MathHelper.cos((pitch / 180F) * 3.141593F);

        setPosition(x+xHeading*0.8, y, z+zHeading*0.8);
        prevPosX = posX;
        prevPosY = posY;
        prevPosZ = posZ;
 
        fuse = fuseLength;
    }
    public Entitynukethrow(World world, Entity entity)
    {
        this(world, entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch, 0.5, 50);
    }
   
    protected boolean canTriggerWalking()
    {
        return false;
    }
 
    public void onUpdate()
    {
        if(fuse-- <= 0)
        {
            explode();
        }
        if(!(stopped) && !(exploded))
        {
          double prevVelX = motionX;
          double prevVelY = motionY;
          double prevVelZ = motionZ;
          prevPosX = posX;
          prevPosY = posY;
          prevPosZ = posZ;
          moveEntity(motionX, motionY, motionZ);
   
          boolean collided = false;
       
          if(motionX!=prevVelX)
          {
              motionX = -prevVelX;
              collided = true;
          }
          if(motionZ!=prevVelZ)
          {
              motionZ = -prevVelZ;
          }
   
          if(motionY!=prevVelY)
          {
              motionY = -prevVelY;
              collided = true;
          }
          else
          {
              motionY -= 0.04;
          }
   
          if(collided)
          {
              motionX *= bounceFactor;
              motionY *= bounceFactor;
              motionZ *= bounceFactor;
          }
   
          motionX *= 0.99;
          motionY *= 0.99;
          motionZ *= 0.99;
          if(onGround && (motionX*motionX+motionY*motionY+motionZ*motionZ)<0.02)
          {
              stopped = true;
              motionX = 0;
              motionY = 0;
              motionZ = 0;
          }
        }
    }
    public void onCollideWithPlayer(EntityPlayer entityplayer)
    {
 
    }
    protected void explode()
    {
      if(!exploded)
      {
          exploded = true;
          worldObj.createExplosion(null, posX, posY, posZ, 50F);
      }
    }
 
    public boolean attackEntity(Entity entity, int i)
    {
      return false;
    }
    public void writeEntityToNBT(NBTTagCompound nbttagcompound)
    {
      super.writeEntityToNBT(nbttagcompound);
        nbttagcompound.setByte("Fuse", (byte)fuse);
    }
 
    public void readEntityFromNBT(NBTTagCompound nbttagcompound)
    {
      super.readEntityFromNBT(nbttagcompound);
        fuse = nbttagcompound.getByte("Fuse");
    }
    double bounceFactor;
    int fuse;
    boolean exploded;
    boolean collided;
    boolean stopped;
}

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 6:21 pm

Still need it to glow.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Thu Oct 27, 2011 6:34 pm

you want the item to glow. add this code then I think it will work add it to the
mod_item.class
Code:
public static item namehere = new namehere(ID,0).setLightValue(1.0F)

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 7:58 pm

I ment he still wants it to glow but that should help him
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Thu Oct 27, 2011 10:01 pm

yer I think it will work like that but what exactly do you mean by "glow" you mean like a texture around it if your going to do that you will need to declare a new item entity and a new void that makes it follow on click or just add it o the texture

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by breakyorself Thu Oct 27, 2011 11:16 pm

I`m not the one who wanted it -.-.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Thu Oct 27, 2011 11:17 pm

-.-

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by MrCreeper07 Fri Oct 28, 2011 1:25 am

hey I'm having trouble getting the spoilers work!! They never open and I want to make a creeper bomb for my mod. I don't get why its not that popular when it has 10 new blocks, rainbow soup, a tool set, and 3 mobs?? I think people like explosives so this will help my mod a lot.
MrCreeper07
MrCreeper07
Member

Posts : 18
Join date : 2011-10-23

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by bottz2 Fri Oct 28, 2011 2:11 am

by glow i mean like give of light

bottz2
Member

Posts : 14
Join date : 2011-10-24

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Fri Oct 28, 2011 2:13 am

Use my code then

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by mastereric Fri Oct 28, 2011 2:16 am

@MrCreeper07 Wow, that's a lot of stuff! and rainbow soup! MMM Rainbow soup... [1.8.1] Throwable Explosive Drool_Emote_by_Icyfrodo
I think your mod isn't popular because nobody knows about it! Put a link in your signature! Put your modHere!
Back on topic!
I likely won't use this but its just cool to know its here!
mastereric
mastereric
Member

Posts : 30
Join date : 2011-10-26

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by bottz2 Fri Oct 28, 2011 2:26 am

icass ur light code only works for blocks

bottz2
Member

Posts : 14
Join date : 2011-10-24

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by lcass Fri Oct 28, 2011 2:41 am

It's lcass I will see if I can get it fixed nut from what I know no such block has worked

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

[1.8.1] Throwable Explosive Empty Re: [1.8.1] Throwable Explosive

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum