31 mars 2019, 09:01
package com.google.daichi93100.modaichmod.common;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class DynamiteTuto extends Item {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if(!world.isRemote) {
world.spawnEntityInWorld(new EntityDynamiteTuto(world, player));
stack.stacksize--;
}
return stack;
}
private int getItemStackLimit(float f) {
return 0;
}
}