package techreborn.items.tools;

import me.modmuss50.jsonDestroyer.api.ITexturedItem;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBucket;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import reborncore.RebornCore;
import techreborn.blocks.fluid.BlockFluidBase;
import techreborn.client.TechRebornCreativeTabMisc;

public class ItemFluidbucket extends ItemBucket implements ITexturedItem
{
	Fluid containedFluid;
	private String iconName;

	public ItemFluidbucket(BlockFluidBase block)
	{
		super(block);
		setContainerItem(Items.BUCKET);
		setCreativeTab(TechRebornCreativeTabMisc.instance);
		setUnlocalizedName("techreborn.fluidbucket");
		RebornCore.jsonDestroyer.registerObject(this);
		containedFluid = block.getFluid();
	}

	@Override
	public Item setUnlocalizedName(String par1Str)
	{
		iconName = par1Str;
		return super.setUnlocalizedName(par1Str);
	}

	// @Override
	// public boolean isGas(int damage) {
	// return false;
	// }
	//
	// @Override
	// public Fluid getFluid(int damage) {
	// return containedFluid;
	// }

	@Override
	public String getTextureName(int damage)
	{
		return "techreborn:items/bucket/" + iconName;
	}

	@Override
	public int getMaxMeta()
	{
		return 1;
	}

	@Override
	public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining)
	{
		return null;
	}
}

@@ -26,16 +26,71 @@
 tools;%0A%0A
+import me.modmuss50.jsonDestroyer.api.ITexturedBucket;%0A
 import m
@@ -633,20 +633,22 @@
 Textured
-Item
+Bucket
 %0A%7B%0A%09Flui
@@ -1116,18 +1116,16 @@
 );%0A%09%7D%0A%0A%09
-//
  @Overri
@@ -1120,34 +1120,32 @@
 %7D%0A%0A%09 @Override%0A%09
-//
  public boolean 
@@ -1157,34 +1157,32 @@
 (int damage) %7B%0A%09
-//
  return false;%0A%09
@@ -1185,20 +1185,13 @@
 e;%0A%09
-//
  %7D%0A
+%0A
 %09
-//%0A%09//
  @Ov
@@ -1198,18 +1198,16 @@
 erride%0A%09
-//
  public 
@@ -1236,18 +1236,16 @@
 age) %7B%0A%09
-//
  return 
@@ -1265,14 +1265,14 @@
 d;%0A%09
-//
  %7D%0A%0A
+//
 %09@Ov
@@ -1270,32 +1270,34 @@
 %7D%0A%0A//%09@Override%0A
+//
 %09public String g
@@ -1322,19 +1322,23 @@
 damage)%0A
+//
 %09%7B%0A
+//
 %09%09return
@@ -1377,16 +1377,18 @@
 onName;%0A
+//
 %09%7D%0A%0A%09@Ov

Fix forge fluid bucket rendering