Skip to content

Commit

Permalink
Update MetaTileEntityLargeFluidPump.java
Browse files Browse the repository at this point in the history
  • Loading branch information
trainvoi committed Oct 21, 2024
1 parent 007d466 commit aa3de3a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.metatileentity.multiblock.IMultiblockPart;
import gregtech.api.metatileentity.multiblock.MultiblockAbility;
import gregtech.api.metatileentity.multiblock.MultiblockControllerBase;
import gregtech.api.metatileentity.multiblock.RecipeMapMultiblockController;
import gregtech.api.pattern.BlockPattern;
import gregtech.api.pattern.FactoryBlockPattern;
Expand All @@ -21,6 +22,7 @@
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
Expand Down Expand Up @@ -138,7 +140,13 @@ public boolean checkHeightRequirement() {
*/
public boolean checkBiomeRequirement(@NotNull Recipe recipe) {
if (!recipe.hasProperty(BiomeProperty.getInstance())) return true;
BlockPos tempPos = getMetaTileEntity().getPos().offset(getMetaTileEntity().getFrontFacing().rotateYCCW(), 2);
EnumFacing rightSide = RelativeDirection.RIGHT
.getRelativeFacing(
getMetaTileEntity().getFrontFacing(),
((MultiblockControllerBase) getMetaTileEntity()).getUpwardsFacing(),
((MultiblockControllerBase) getMetaTileEntity()).isFlipped()
);
BlockPos tempPos = getMetaTileEntity().getPos().offset(rightSide, 2);
return recipe.getProperty(BiomeProperty.getInstance(), BiomeProperty.BiomePropertyList.EMPTY_LIST)
.checkBiome(getMetaTileEntity().getWorld().getBiome(tempPos));
}
Expand Down

0 comments on commit aa3de3a

Please sign in to comment.