Files
2019-02-24 22:29:41 +08:00

81 lines
3.7 KiB
Diff

--- ../src-base/minecraft/net/minecraft/item/ItemFishFood.java
+++ ../src-work/minecraft/net/minecraft/item/ItemFishFood.java
@@ -21,21 +21,21 @@
public int getHealAmount(ItemStack stack)
{
- ItemFishFood.FishType itemfishfood$fishtype = ItemFishFood.FishType.byItemStack(stack);
+ FishType itemfishfood$fishtype = FishType.byItemStack(stack);
return this.cooked && itemfishfood$fishtype.canCook() ? itemfishfood$fishtype.getCookedHealAmount() : itemfishfood$fishtype.getUncookedHealAmount();
}
public float getSaturationModifier(ItemStack stack)
{
- ItemFishFood.FishType itemfishfood$fishtype = ItemFishFood.FishType.byItemStack(stack);
+ FishType itemfishfood$fishtype = FishType.byItemStack(stack);
return this.cooked && itemfishfood$fishtype.canCook() ? itemfishfood$fishtype.getCookedSaturationModifier() : itemfishfood$fishtype.getUncookedSaturationModifier();
}
protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player)
{
- ItemFishFood.FishType itemfishfood$fishtype = ItemFishFood.FishType.byItemStack(stack);
+ FishType itemfishfood$fishtype = FishType.byItemStack(stack);
- if (itemfishfood$fishtype == ItemFishFood.FishType.PUFFERFISH)
+ if (itemfishfood$fishtype == FishType.PUFFERFISH)
{
player.addPotionEffect(new PotionEffect(MobEffects.POISON, 1200, 3));
player.addPotionEffect(new PotionEffect(MobEffects.HUNGER, 300, 2));
@@ -49,7 +49,7 @@
{
if (this.isInCreativeTab(tab))
{
- for (ItemFishFood.FishType itemfishfood$fishtype : ItemFishFood.FishType.values())
+ for (FishType itemfishfood$fishtype : FishType.values())
{
if (!this.cooked || itemfishfood$fishtype.canCook())
{
@@ -61,7 +61,7 @@
public String getUnlocalizedName(ItemStack stack)
{
- ItemFishFood.FishType itemfishfood$fishtype = ItemFishFood.FishType.byItemStack(stack);
+ FishType itemfishfood$fishtype = FishType.byItemStack(stack);
return this.getUnlocalizedName() + "." + itemfishfood$fishtype.getUnlocalizedName() + "." + (this.cooked && itemfishfood$fishtype.canCook() ? "cooked" : "raw");
}
@@ -72,7 +72,7 @@
CLOWNFISH(2, "clownfish", 1, 0.1F),
PUFFERFISH(3, "pufferfish", 1, 0.1F);
- private static final Map<Integer, ItemFishFood.FishType> META_LOOKUP = Maps.<Integer, ItemFishFood.FishType>newHashMap();
+ private static final Map<Integer, FishType> META_LOOKUP = Maps.<Integer, FishType>newHashMap();
private final int meta;
private final String unlocalizedName;
private final int uncookedHealAmount;
@@ -138,20 +138,20 @@
return this.cookable;
}
- public static ItemFishFood.FishType byMetadata(int meta)
+ public static FishType byMetadata(int meta)
{
- ItemFishFood.FishType itemfishfood$fishtype = META_LOOKUP.get(Integer.valueOf(meta));
+ FishType itemfishfood$fishtype = META_LOOKUP.get(Integer.valueOf(meta));
return itemfishfood$fishtype == null ? COD : itemfishfood$fishtype;
}
- public static ItemFishFood.FishType byItemStack(ItemStack stack)
+ public static FishType byItemStack(ItemStack stack)
{
return stack.getItem() instanceof ItemFishFood ? byMetadata(stack.getMetadata()) : COD;
}
static
{
- for (ItemFishFood.FishType itemfishfood$fishtype : values())
+ for (FishType itemfishfood$fishtype : values())
{
META_LOOKUP.put(Integer.valueOf(itemfishfood$fishtype.getMetadata()), itemfishfood$fishtype);
}