Add YUNG's Better Strongholds compat
This commit is contained in:
parent
1c2a2c65ad
commit
5df695cbbb
|
|
@ -2,6 +2,7 @@ package org.embeddedt.modernfix.structure.logic;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import net.minecraft.advancements.CriteriaTriggers;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.stats.Stats;
|
||||
|
|
@ -9,6 +10,8 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.entity.projectile.EyeOfEnder;
|
||||
import net.minecraft.world.item.EnderEyeItem;
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.embeddedt.modernfix.mixin.perf.async_locator.EyeOfEnderAccess;
|
||||
import org.embeddedt.modernfix.structure.AsyncLocator;
|
||||
|
||||
|
|
@ -16,9 +19,14 @@ public class EnderEyeItemLogic {
|
|||
private EnderEyeItemLogic() {}
|
||||
|
||||
public static void locateAsync(ServerLevel level, Player player, EyeOfEnder eyeOfEnder, EnderEyeItem enderEyeItem) {
|
||||
StructureFeature<?> targetFeature;
|
||||
if(ModList.get().isLoaded("betterstrongholds"))
|
||||
targetFeature = ForgeRegistries.STRUCTURE_FEATURES.getValue(new ResourceLocation("betterstrongholds", "stronghold"));
|
||||
else
|
||||
targetFeature = StructureFeature.STRONGHOLD;
|
||||
AsyncLocator.locateChunkGen(
|
||||
level,
|
||||
ImmutableSet.of(StructureFeature.STRONGHOLD),
|
||||
ImmutableSet.of(targetFeature),
|
||||
player.blockPosition(),
|
||||
100,
|
||||
false
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user