fluid renders properly now...

This commit is contained in:
Flanks255 2022-01-06 18:59:06 -06:00
parent 66132ecdba
commit 21ca731de1
2 changed files with 10 additions and 2 deletions

View file

@ -9,8 +9,10 @@ import net.minecraft.data.DataGenerator;
import net.minecraft.data.DirectoryCache;
import net.minecraft.data.IFinishedRecipe;
import net.minecraft.data.RecipeProvider;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.Tags;
import net.minecraftforge.fluids.FluidStack;
import java.nio.file.Path;
@ -27,6 +29,11 @@ public class MiscMachineRecipeGenerator extends RecipeProvider {
@Override
protected void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
consumer.accept(new PressingRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "pressing/canola"), Ingredient.of(ActuallyItems.CANOLA.get()), new FluidStack(InitFluids.CANOLA_OIL.get(), 80)));
consumer.accept(new PressingRecipe.FinishedRecipe(folderRecipe("pressing", "canola"),
Ingredient.of(ActuallyItems.CANOLA.get()), new FluidStack(InitFluids.CANOLA_OIL.get(), 80)));
}
private ResourceLocation folderRecipe(String folder, String recipe) {
return new ResourceLocation(ActuallyAdditions.MODID, folder + "/" + recipe);
}
}

View file

@ -93,7 +93,8 @@ public class FluidDisplay extends AbstractGui {
GlStateManager._disableAlphaTest();
GlStateManager._blendFuncSeparate(770, 771, 1, 0);
int i = this.fluidReference.getFluid().getAmount() * 83 / this.fluidReference.getCapacity();
this.blit(matrices, barX + 1, barY + 84 - i, 36, 172, 16, i); //drawModalRectWithCustomSizedTexture(barX + 1, barY + 84 - i, 36, 172, 16, i, 16, 512);
this.blit(matrices, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512);
//drawModalRectWithCustomSizedTexture(barX + 1, barY + 84 - i, 36, 172, 16, i, 16, 512);
GlStateManager._disableBlend();
GlStateManager._enableAlphaTest();
GlStateManager._popMatrix();