diff --git a/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/ModMapMarkers.java b/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/ModMapMarkers.java index 0f95433f6..3f20c14ff 100644 --- a/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/ModMapMarkers.java +++ b/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/ModMapMarkers.java @@ -29,6 +29,8 @@ public class ModMapMarkers { Supplementaries.res("flag"), FlagMarker::new, FlagMarker::getFromWorld, ColoredDecoration::new); public static final CustomDecorationType NETHER_PORTAL_DECORATION_TYPE = CustomDecorationType.withWorldMarker( Supplementaries.res("nether_portal"), NetherPortalMarker::new, NetherPortalMarker::getFromWorld, CustomMapDecoration::new); + public static final CustomDecorationType AETHER_PORTAL_DECORATION_TYPE = CustomDecorationType.withWorldMarker( + Supplementaries.res("aether_portal"), AetherPortalMarker::new, AetherPortalMarker::getFromWorld, CustomMapDecoration::new); public static final CustomDecorationType BEACON_DECORATION_TYPE = CustomDecorationType.withWorldMarker( Supplementaries.res("beacon"), BeaconMarker::new, BeaconMarker::getFromWorld, CustomMapDecoration::new); public static final CustomDecorationType BANNER_DECORATION_TYPE = CustomDecorationType.withWorldMarker( diff --git a/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/markers/AetherPortalMarker.java b/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/markers/AetherPortalMarker.java new file mode 100644 index 000000000..a763b3c41 --- /dev/null +++ b/common/src/main/java/net/mehvahdjukaar/supplementaries/common/misc/map_markers/markers/AetherPortalMarker.java @@ -0,0 +1,26 @@ +package net.mehvahdjukaar.supplementaries.common.misc.map_markers.markers; + +import net.mehvahdjukaar.moonlight.api.map.markers.SimpleMapBlockMarker; +import net.mehvahdjukaar.moonlight.api.util.Utils; +import net.mehvahdjukaar.supplementaries.common.misc.map_markers.ModMapMarkers; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import org.jetbrains.annotations.Nullable; + +public class AetherPortalMarker extends SimpleMapBlockMarker { + + public AetherPortalMarker() { + super(ModMapMarkers.AETHER_PORTAL_DECORATION_TYPE); + } + + @Nullable + public static AetherPortalMarker getFromWorld(BlockGetter world, BlockPos pos) { + if (Utils.getID(getType().toString().equals("aether:aether_portal")) { + var m = new AetherPortalMarker(); + m.setPos(pos); + return m; + } else { + return null; + } + } +} diff --git a/common/src/main/resources/assets/supplementaries/textures/map_marker/aether_portal.png b/common/src/main/resources/assets/supplementaries/textures/map_marker/aether_portal.png new file mode 100644 index 000000000..81c4cde36 Binary files /dev/null and b/common/src/main/resources/assets/supplementaries/textures/map_marker/aether_portal.png differ diff --git a/common/src/main/resources/data/supplementaries/moonlight/map_markers/aether_portal.json b/common/src/main/resources/data/supplementaries/moonlight/map_markers/aether_portal.json new file mode 100644 index 000000000..657a76192 --- /dev/null +++ b/common/src/main/resources/data/supplementaries/moonlight/map_markers/aether_portal.json @@ -0,0 +1,3 @@ +{ + "custom_type": "supplementaries:aether_portal" +}