package info.u_team.u_team_core.item;

import java.util.function.Supplier;

import info.u_team.u_team_core.api.registry.IURegistryType;
import net.minecraft.fluid.Fluid;
import net.minecraft.item.*;
import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fluids.capability.wrappers.FluidBucketWrapper;

public class UBucketItem extends BucketItem implements IURegistryType {
	
	protected final String name;
	
	public UBucketItem(String name, Properties properties, Supplier<? extends Fluid> fluid) {
		this(name, null, properties, fluid);
	}
	
	public UBucketItem(String name, ItemGroup group, Properties properties, Supplier<? extends Fluid> fluid) {
		super(fluid, group == null ? properties : properties.group(group));
		this.name = name;
	}
	
	@Override
	public String getEntryName() {
		return name;
	}
	
	@Override
	public ICapabilityProvider initCapabilities(ItemStack stack, CompoundNBT compound) {
		return new FluidBucketWrapper(stack);
	}
}

@@ -73,68 +73,8 @@
 r;%0A%0A
-import info.u_team.u_team_core.api.registry.IURegistryType;%0A
 impo
@@ -359,67 +359,9 @@
 tem 
-implements IURegistryType %7B%0A%09%0A%09protected final String name;
+%7B
 %0A%09%0A%09
@@ -379,29 +379,16 @@
 ketItem(
-String name, 
 Properti
@@ -444,22 +444,16 @@
 %0A%09%09this(
-name, 
 null, pr
@@ -499,21 +499,8 @@
 tem(
-String name, 
 Item
@@ -644,91 +644,8 @@
 ));%0A
-%09%09this.name = name;%0A%09%7D%0A%09%0A%09@Override%0A%09public String getEntryName() %7B%0A%09%09return name;%0A
 %09%7D%0A%09

Update UBucketItem