Regenerate patches with relative headers. This should lower conflicts in future PRs.

Convert Forge to use Official mappings.
Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive.
It is clear that their intent is to allow us to use their names for developing mods like this.
See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
This commit is contained in:
LexManos committed 2021-03-09 14:21:48 -08:00
1 parent 802298d99d
commit a95b968c13
832 files changed
+4464 -4373

No files matched your search

@@ -51,7 +51,7 @@ public class DispenseFluidContainer extends DefaultDispenseItemBehavior
@Override
@Nonnull
public ItemStack dispenseStack(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
public ItemStack execute(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
{
if (FluidUtil.getFluidContained(stack).isPresent())
{
@@ -69,23 +69,23 @@ public class DispenseFluidContainer extends DefaultDispenseItemBehavior
@Nonnull
private ItemStack fillContainer(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
{
World world = source.getWorld();
Direction dispenserFacing = source.getBlockState().get(DispenserBlock.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
World world = source.getLevel();
Direction dispenserFacing = source.getBlockState().getValue(DispenserBlock.FACING);
BlockPos blockpos = source.getPos().relative(dispenserFacing);
FluidActionResult actionResult = FluidUtil.tryPickUpFluid(stack, null, world, blockpos, dispenserFacing.getOpposite());
ItemStack resultStack = actionResult.getResult();
if (!actionResult.isSuccess() || resultStack.isEmpty())
{
return super.dispenseStack(source, stack);
return super.execute(source, stack);
}
if (stack.getCount() == 1)
{
return resultStack;
}
else if (((DispenserTileEntity)source.getBlockTileEntity()).addItemStack(resultStack) < 0)
else if (((DispenserTileEntity)source.getEntity()).addItem(resultStack) < 0)
{
this.dispenseBehavior.dispense(source, resultStack);
}
@@ -106,13 +106,13 @@ public class DispenseFluidContainer extends DefaultDispenseItemBehavior
IFluidHandlerItem fluidHandler = FluidUtil.getFluidHandler(singleStack).orElse(null);
if (fluidHandler == null)
{
return super.dispenseStack(source, stack);
return super.execute(source, stack);
}
FluidStack fluidStack = fluidHandler.drain(FluidAttributes.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE);
Direction dispenserFacing = source.getBlockState().get(DispenserBlock.FACING);
BlockPos blockpos = source.getBlockPos().offset(dispenserFacing);
FluidActionResult result = FluidUtil.tryPlaceFluid(null, source.getWorld(), Hand.MAIN_HAND, blockpos, stack, fluidStack);
Direction dispenserFacing = source.getBlockState().getValue(DispenserBlock.FACING);
BlockPos blockpos = source.getPos().relative(dispenserFacing);
FluidActionResult result = FluidUtil.tryPlaceFluid(null, source.getLevel(), Hand.MAIN_HAND, blockpos, stack, fluidStack);
if (result.isSuccess())
{
@@ -122,7 +122,7 @@ public class DispenseFluidContainer extends DefaultDispenseItemBehavior
{
return drainedStack;
}
else if (!drainedStack.isEmpty() && ((DispenserTileEntity)source.getBlockTileEntity()).addItemStack(drainedStack) < 0)
else if (!drainedStack.isEmpty() && ((DispenserTileEntity)source.getEntity()).addItem(drainedStack) < 0)
{
this.dispenseBehavior.dispense(source, drainedStack);
}