Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.glado.legomod.container_items;
- import com.glado.legomod.core.itemgroup.LegoModItemGroup;
- import com.glado.legomod.core.init.ItemInit;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- public class lego_mold extends Item
- {
- public lego_mold() {
- super(new Properties().group(LegoModItemGroup.LEGO_MOD).defaultMaxDamage(10));
- }
- @Override
- public boolean hasContainerItem(ItemStack stack) {
- return true;
- }
- @Override
- public ItemStack getContainerItem(ItemStack itemstack) {
- final ItemStack copy = itemstack.copy();
- if(copy.attemptDamageItem(1, Item.random, null)) {
- copy.shrink(1);
- copy.setDamage(0);
- }
- return copy;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement