Source:
<code>public boolean load(@Nonnull IResourceManager manager, @Nonnull ResourceLocation location, @Nonnull Function<ResourceLocation, TextureAtlasSprite> textureGetter) { final TextureAtlasSprite sprite = textureGetter.apply(bucket); final TextureAtlasSprite alphaMask = textureGetter.apply(bucketCoverMask); width = sprite.getIconWidth(); height = sprite.getIconHeight(); final int[][] pixels = new int[Minecraft.getMinecraft().gameSettings.mipmapLevels + 1][]; pixels[0] = new int[width * height]; IResource empty = null; IResource mask = null; try { <START> empty = getResource(new ResourceLocation("textures/items/bucket_empty.png")); <END> mask = getResource(new ResourceLocation(ForgeVersion.MOD_ID, "textures/items/vanilla_bucket_cover_mask.png")); if (empty != null && mask != null && Objects.equals(empty.getResourcePackName(), mask.getResourcePackName()) && alphaMask.getIconWidth() == width && alphaMask.getIconHeight() == height) { final int[][] oldPixels = sprite.getFrameTextureData(0); final int[][] alphaPixels = alphaMask.getFrameTextureData(0); for (int p = 0; p < width * height; p++) { final int alphaMultiplier = alphaPixels[0][p] >>> 24; final int oldPixel = oldPixels[0][p]; final int oldPixelAlpha = oldPixel >>> 24; final int newAlpha = oldPixelAlpha * alphaMultiplier / 0xFF; pixels[0][p] = (oldPixel & 0xFFFFFF) + (newAlpha << 24); } } } finally { IOUtils.closeQuietly(empty); IOUtils.closeQuietly(mask); } this.clearFramesTextureData(); this.framesTextureData.add(pixels); return false; }</code><technical_language>Please try-with-resources for instead, this: java try ( IResource empty = getResource(new ResourceLocation("textures/items/bucket_empty.png")); IResource mask = getResource(new ResourceLocation(ForgeVersion.MOD_ID, "textures/items/vanilla_bucket_cover_mask.png")) ) { // do stuff } catch (IOException e) { FMLLog.log.error("Failed close resource. {}", e); }</technical_language>

Target:
public boolean load(@Nonnull IResourceManager manager, @Nonnull ResourceLocation location, @Nonnull Function<ResourceLocation, TextureAtlasSprite> textureGetter) { final TextureAtlasSprite sprite = textureGetter.apply(bucket); final TextureAtlasSprite alphaMask = textureGetter.apply(bucketCoverMask); width = sprite.getIconWidth(); height = sprite.getIconHeight(); final int[][] pixels = new int[Minecraft.getMinecraft().gameSettings.mipmapLevels + 1][]; pixels[0] = new int[width * height]; try ( IResource empty = getResource(new ResourceLocation("textures/items/bucket_empty.png")); IResource mask = getResource(new ResourceLocation(ForgeVersion.MOD_ID, "textures/items/vanilla_bucket_cover_mask.png")) ) { if (empty != null && mask != null && Objects.equals(empty.getResourcePackName(), mask.getResourcePackName()) && alphaMask.getIconWidth() == width && alphaMask.getIconHeight() == height) { final int[][] oldPixels = sprite.getFrameTextureData(0); final int[][] alphaPixels = alphaMask.getFrameTextureData(0); for (int p = 0; p < width * height; p++) { final int alphaMultiplier = alphaPixels[0][p] >>> 24; final int oldPixel = oldPixels[0][p]; final int oldPixelAlpha = oldPixel >>> 24; final int newAlpha = oldPixelAlpha * alphaMultiplier / 0xFF; pixels[0][p] = (oldPixel & 0xFFFFFF) + (newAlpha << 24); } } } catch (IOException e) { FMLLog.log.error("Failed to close resource", e); } this.clearFramesTextureData(); this.framesTextureData.add(pixels); return false; }