Jump to content

Recommended Posts

Posted

i have this currently:

    @SubscribeEvent(priority= EventPriority.NORMAL, receiveCanceled=true)

    public void onEvent(LivingDropsEvent event) {

        random = new Random();

        dropped = random.nextInt(2) + 1;

        if (event.entity instanceof EntityZombie) {

            zombieItem = random.nextInt(1);

            event.drops.clear();

            switch (zombieItem) {

                case 0:

                    ItemStack itemStoneSword = new ItemStack(Items.stone_sword, dropped);

                    itemStoneSword.getAttributeModifiers();

                    event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX,event.entity.posY, event.entity.posZ, itemStoneSword));

                    break;

                case 1:

                    ItemStack itemIronSword = new ItemStack(Items.iron_sword, dropped);

                    itemIronSword.getAttributeModifiers();

                    event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX,event.entity.posY, event.entity.posZ, itemIronSword));

                    break;

            }

        }

    }

 

But what i want to do is for the items that drop liek the stone_sword, i want it to have a random damage, and some things added in description that is different from other items.

Posted

First of all: Code tags please.

Second. I dont think you can change The DMG of vanilla items with nbt. Whats you could do is add enchantments to The items

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.