use of com.mraof.minestuck.world.lands.ILandAspect in project Minestuck by mraof.
the class LandAspectLootCondition method testCondition.
@Override
public boolean testCondition(Random rand, LootContext context) {
WorldServer world = context.getWorld();
if (world != null && MinestuckDimensionHandler.isLandDimension(world.provider.getDimension())) {
AspectCombination aspects = MinestuckDimensionHandler.getAspects(world.provider.getDimension());
TerrainLandAspect terrain = includeSubtypes ? aspects.aspectTerrain.getPrimaryVariant() : aspects.aspectTerrain;
TitleLandAspect title = includeSubtypes ? aspects.aspectTitle.getPrimaryVariant() : aspects.aspectTitle;
for (ILandAspect aspect : landAspectNames) if (terrain == aspect || title == aspect)
return !inverted;
}
return inverted;
}
Aggregations