Hello.
I created my custom enchantment. It appears in "Combat tab" as enchanted book and can enchant weapon.
Unfortunately I can't find any way to create crafting table recipe for that book.
I declarate enchant like this.
lifeSteal = new LifeSteal(config.enchLifeStealID, 1, EnumEnchantmentType.weapon);
MinecraftForge.EVENT_BUS.register(lifeSteal);
Hello.
How can I get all my server players? Corrently logged in and offline players. This line return an array of the usernames of all the connected players:
MinecraftServer.getServer().getAllUsernames();
I need to get all players from my server not only connected at that time.
But how can I call that ItemStack in my constructor or apply my created ItemStack to my item? I tried this in my constructor:
ItemStack itemstack = new ItemStack(par1, 1, 500);
and when I check this:
getItemDamageFromStack(itemstack)
I get that it is 500 damaged, but nothing changes on my items.
Hello,
I am trying to write my first mod. Everything goes fine, but I have one problem. How can I set item damage on item when it is found or created? Now I have this code:
public BrokenItem(int par1) {
super(par1);
setMaxStackSize(1);
setMaxDamage(1000);
}
I would like to create broken items. For example with 500 durability when they are found.