56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
--- a/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
|
|
+++ b/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
|
|
@@ -10,8 +10,6 @@
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.world.World;
|
|
-import net.minecraftforge.api.distmarker.Dist;
|
|
-import net.minecraftforge.api.distmarker.OnlyIn;
|
|
|
|
public class ShulkerBoxColoringRecipe extends IRecipeHidden {
|
|
public ShulkerBoxColoringRecipe(ResourceLocation p_i48159_1_) {
|
|
@@ -31,7 +29,7 @@
|
|
if (Block.func_149634_a(itemstack.func_77973_b()) instanceof BlockShulkerBox) {
|
|
++i;
|
|
} else {
|
|
- if (!(itemstack.func_77973_b() instanceof ItemDye)) {
|
|
+ if (!itemstack.func_77973_b().func_206844_a(net.minecraftforge.common.Tags.Items.DYES)) {
|
|
return false;
|
|
}
|
|
|
|
@@ -50,7 +48,7 @@
|
|
|
|
public ItemStack func_77572_b(IInventory p_77572_1_) {
|
|
ItemStack itemstack = ItemStack.field_190927_a;
|
|
- ItemDye itemdye = (ItemDye)Items.field_196106_bc;
|
|
+ net.minecraft.item.EnumDyeColor color = net.minecraft.item.EnumDyeColor.WHITE;
|
|
|
|
for(int i = 0; i < p_77572_1_.func_70302_i_(); ++i) {
|
|
ItemStack itemstack1 = p_77572_1_.func_70301_a(i);
|
|
@@ -58,13 +56,14 @@
|
|
Item item = itemstack1.func_77973_b();
|
|
if (Block.func_149634_a(item) instanceof BlockShulkerBox) {
|
|
itemstack = itemstack1;
|
|
- } else if (item instanceof ItemDye) {
|
|
- itemdye = (ItemDye)item;
|
|
+ } else {
|
|
+ net.minecraft.item.EnumDyeColor tmp = net.minecraft.item.EnumDyeColor.getColor(itemstack1);
|
|
+ if (tmp != null) color = tmp;
|
|
}
|
|
}
|
|
}
|
|
|
|
- ItemStack itemstack2 = BlockShulkerBox.func_190953_b(itemdye.func_195962_g());
|
|
+ ItemStack itemstack2 = BlockShulkerBox.func_190953_b(color);
|
|
if (itemstack.func_77942_o()) {
|
|
itemstack2.func_77982_d(itemstack.func_77978_p().func_74737_b());
|
|
}
|
|
@@ -72,7 +71,6 @@
|
|
return itemstack2;
|
|
}
|
|
|
|
- @OnlyIn(Dist.CLIENT)
|
|
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
|
return p_194133_1_ * p_194133_2_ >= 2;
|
|
}
|