2015-11-09 06:50:45 +00:00
|
|
|
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java
|
|
|
|
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java
|
2016-11-13 22:09:54 +00:00
|
|
|
@@ -153,6 +153,7 @@
|
2015-11-09 06:50:45 +00:00
|
|
|
|
2015-11-22 05:46:26 +00:00
|
|
|
private boolean func_145934_k()
|
2015-11-09 06:50:45 +00:00
|
|
|
{
|
2016-11-13 22:09:54 +00:00
|
|
|
+ if (1 == 1) return net.minecraftforge.common.brewing.BrewingRecipeRegistry.canBrew(field_145945_j, field_145945_j.get(3), field_145947_i); // divert to VanillaBrewingRegistry
|
|
|
|
ItemStack itemstack = (ItemStack)this.field_145945_j.get(3);
|
2015-11-09 06:50:45 +00:00
|
|
|
|
2016-11-13 22:09:54 +00:00
|
|
|
if (itemstack.func_190926_b())
|
|
|
|
@@ -181,19 +182,17 @@
|
2015-11-09 06:50:45 +00:00
|
|
|
|
2015-11-22 05:46:26 +00:00
|
|
|
private void func_145940_l()
|
2015-11-09 06:50:45 +00:00
|
|
|
{
|
2016-03-23 14:34:48 +00:00
|
|
|
+ if (net.minecraftforge.event.ForgeEventFactory.onPotionAttemptBrew(field_145945_j)) return;
|
2016-11-13 22:09:54 +00:00
|
|
|
ItemStack itemstack = (ItemStack)this.field_145945_j.get(3);
|
2016-03-12 00:59:24 +00:00
|
|
|
|
|
|
|
- for (int i = 0; i < 3; ++i)
|
|
|
|
- {
|
2016-11-13 22:09:54 +00:00
|
|
|
- this.field_145945_j.set(i, PotionHelper.func_185212_d(itemstack, (ItemStack)this.field_145945_j.get(i)));
|
2016-03-12 00:59:24 +00:00
|
|
|
- }
|
2016-11-13 22:09:54 +00:00
|
|
|
+ net.minecraftforge.common.brewing.BrewingRecipeRegistry.brewPotions(field_145945_j, field_145945_j.get(3), field_145947_i);
|
2016-03-12 00:59:24 +00:00
|
|
|
|
2016-11-13 22:09:54 +00:00
|
|
|
itemstack.func_190918_g(1);
|
2016-03-12 00:59:24 +00:00
|
|
|
BlockPos blockpos = this.func_174877_v();
|
|
|
|
|
|
|
|
- if (itemstack.func_77973_b().func_77634_r())
|
|
|
|
+ if (itemstack.func_77973_b().hasContainerItem(itemstack))
|
2015-11-09 06:50:45 +00:00
|
|
|
{
|
2016-03-12 00:59:24 +00:00
|
|
|
- ItemStack itemstack1 = new ItemStack(itemstack.func_77973_b().func_77668_q());
|
|
|
|
+ ItemStack itemstack1 = itemstack.func_77973_b().getContainerItem(itemstack);
|
2015-11-09 06:50:45 +00:00
|
|
|
|
2016-11-13 22:09:54 +00:00
|
|
|
if (itemstack.func_190926_b())
|
2015-11-09 06:50:45 +00:00
|
|
|
{
|
2016-11-13 22:09:54 +00:00
|
|
|
@@ -207,6 +206,7 @@
|
2015-11-09 06:50:45 +00:00
|
|
|
|
2016-11-13 22:09:54 +00:00
|
|
|
this.field_145945_j.set(3, itemstack);
|
2016-03-12 00:59:24 +00:00
|
|
|
this.field_145850_b.func_175718_b(1035, blockpos, 0);
|
|
|
|
+ net.minecraftforge.event.ForgeEventFactory.onPotionBrewed(field_145945_j);
|
2015-11-09 06:50:45 +00:00
|
|
|
}
|
|
|
|
|
2016-06-23 06:39:36 +00:00
|
|
|
public static void func_189675_a(DataFixer p_189675_0_)
|
2016-11-13 22:09:54 +00:00
|
|
|
@@ -289,12 +289,12 @@
|
2015-11-09 06:50:45 +00:00
|
|
|
{
|
2016-03-12 00:59:24 +00:00
|
|
|
if (p_94041_1_ == 3)
|
|
|
|
{
|
|
|
|
- return PotionHelper.func_185205_a(p_94041_2_);
|
|
|
|
+ return net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidIngredient(p_94041_2_);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Item item = p_94041_2_.func_77973_b();
|
|
|
|
- return p_94041_1_ == 4 ? item == Items.field_151065_br : item == Items.field_151068_bn || item == Items.field_185155_bH || item == Items.field_185156_bI || item == Items.field_151069_bo;
|
|
|
|
+ return p_94041_1_ == 4 ? item == Items.field_151065_br : net.minecraftforge.common.brewing.BrewingRecipeRegistry.isValidInput(p_94041_2_);
|
|
|
|
}
|
2015-11-09 06:50:45 +00:00
|
|
|
}
|
|
|
|
|
2016-11-13 22:09:54 +00:00
|
|
|
@@ -348,6 +348,26 @@
|
2016-01-17 16:41:34 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-12 00:59:24 +00:00
|
|
|
|
2016-01-17 16:41:34 +00:00
|
|
|
+ net.minecraftforge.items.IItemHandler handlerInput = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.UP);
|
|
|
|
+ net.minecraftforge.items.IItemHandler handlerOutput = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.DOWN);
|
2016-06-18 22:49:21 +00:00
|
|
|
+ net.minecraftforge.items.IItemHandler handlerSides = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.NORTH);
|
2016-01-17 16:41:34 +00:00
|
|
|
+
|
2016-03-22 06:01:00 +00:00
|
|
|
+ @SuppressWarnings("unchecked")
|
2016-01-17 16:41:34 +00:00
|
|
|
+ @Override
|
|
|
|
+ public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.util.EnumFacing facing)
|
|
|
|
+ {
|
|
|
|
+ if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
2016-06-18 22:49:21 +00:00
|
|
|
+ {
|
2016-01-17 16:41:34 +00:00
|
|
|
+ if (facing == EnumFacing.UP)
|
|
|
|
+ return (T) handlerInput;
|
2016-06-18 22:49:21 +00:00
|
|
|
+ else if (facing == EnumFacing.DOWN)
|
2016-01-17 16:41:34 +00:00
|
|
|
+ return (T) handlerOutput;
|
2016-06-18 22:49:21 +00:00
|
|
|
+ else
|
|
|
|
+ return (T) handlerSides;
|
|
|
|
+ }
|
2016-01-17 16:41:34 +00:00
|
|
|
+ return super.getCapability(capability, facing);
|
|
|
|
+ }
|
2016-03-12 00:59:24 +00:00
|
|
|
+
|
|
|
|
public int func_174890_g()
|
|
|
|
{
|
|
|
|
return 2;
|