How to make a throwable Item (TUTORIAL)

Started by Lakas on

Topic category: User side tutorials

Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a throwable Item (TUTORIAL)
Tue, 08/22/2017 - 13:20 (edited)

So you want a throwable Item like a Snowball? I know exactly what to do!

First you are going to create a gun (and select textures and stuff..)

but that is now very important  what comes

next! :

- put the durability of the "gun" to 0 

- choose a random item for bullet

Then you make the crafting recipe.

After that you edit the "gun" again

and make the item the bullet itself by

choosing the same item as the bullet

then after that you are finished! (Not really)

----Now this part is not important----

After finishing almost your throwable item you can make it

stackable by editing the code of the throwable item

you'll need to find this:

    static class ItemgGUN extends Item {

        public ItemgGUN() {
            super();
            setMaxDamage(0);
            maxStackSize = 1;
            setFull3D();
            setUnlocalizedName("explosiveSpear");
            setTextureName("TNTSpear");
            setCreativeTab(CreativeTabs.tabCombat);
        }

(setUnlocalizedName is the name of the Item and setTextureName is the Name of the png File

for this Item so "explosiveSpear" and "TNTSpear " doesn't need to be there.

There could be like "iceball" and "IceBallTexture" So ignore that!)

Well what you need to do is just edit the 1 in maxStackSize to 64 that allows the player to

stack the throwable item 64 times per slot!

Then you are finished! Voilà!

 

Edited by Lakas on Tue, 08/22/2017 - 13:20
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i make it explode  
Sat, 08/08/2020 - 08:49

how do i make it explode

 

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is helpful but do yyou…
Tue, 07/02/2024 - 23:48

This is helpful but do yyou know how to make the item explode lik throwable tnt?

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
whats happening her-
Wed, 07/03/2024 - 00:06

whats happening her-