use of net.minecraft.predicate.StatePredicate in project frame-fabric by moddingplayground.
the class AbstractBlockLootTableGenerator method checkDoublePlantHalf.
public static LocationCheckLootCondition.Builder checkDoublePlantHalf(Block plant, DoubleBlockHalf half) {
int d = half == DoubleBlockHalf.UPPER ? 1 : -1;
StatePredicate expectState = stateProp(TallPlantBlock.HALF, half).build();
return LocationCheckLootCondition.builder(LocationPredicate.Builder.create().block(BlockPredicate.Builder.create().blocks(plant).state(expectState).build()), new BlockPos(0, d, 0));
}
Aggregations