Skip to content

Commit

Permalink
Merge pull request #1276 from Artienia80/master
Browse files Browse the repository at this point in the history
Aether portal for supplementaries map
  • Loading branch information
MehVahdJukaar authored Dec 27, 2024
2 parents f1a3a95 + d51b0ab commit 65908f1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class ModMapMarkers {
Supplementaries.res("flag"), FlagMarker::new, FlagMarker::getFromWorld, ColoredDecoration::new);
public static final CustomDecorationType<CustomMapDecoration, NetherPortalMarker> NETHER_PORTAL_DECORATION_TYPE = CustomDecorationType.withWorldMarker(
Supplementaries.res("nether_portal"), NetherPortalMarker::new, NetherPortalMarker::getFromWorld, CustomMapDecoration::new);
public static final CustomDecorationType<CustomMapDecoration, AetherPortalMarker> AETHER_PORTAL_DECORATION_TYPE = CustomDecorationType.withWorldMarker(
Supplementaries.res("aether_portal"), AetherPortalMarker::new, AetherPortalMarker::getFromWorld, CustomMapDecoration::new);
public static final CustomDecorationType<CustomMapDecoration, BeaconMarker> BEACON_DECORATION_TYPE = CustomDecorationType.withWorldMarker(
Supplementaries.res("beacon"), BeaconMarker::new, BeaconMarker::getFromWorld, CustomMapDecoration::new);
public static final CustomDecorationType<ColoredDecoration, CeilingBannerMarker> BANNER_DECORATION_TYPE = CustomDecorationType.withWorldMarker(
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"custom_type": "supplementaries:aether_portal"
}

0 comments on commit 65908f1

Please sign in to comment.