feat: wowmine: immersive portals
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:armor_stand" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 6, "id": "minecraft:stick" } },
|
||||
{ "item": { "count": 1, "id": "minecraft:smooth_stone_slab" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "axe_dig" }
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:bowl" },
|
||||
{ "item": "minecraft:bowl" },
|
||||
{ "item": "minecraft:bowl" },
|
||||
{ "item": "minecraft:bowl" }
|
||||
],
|
||||
"result": { "count": 3, "id": "minecraft:oak_planks" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:copper_grate" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 2, "id": "minecraft:copper_ingot" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:exposed_copper_grate" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 2, "id": "minecraft:copper_ingot" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:firework_rocket" },
|
||||
{ "item": "minecraft:firework_rocket" },
|
||||
{ "item": "minecraft:firework_rocket" }
|
||||
],
|
||||
"result": { "count": 1, "id": "minecraft:gunpowder" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:iron_bars" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 3, "id": "minecraft:iron_nugget" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:iron_door" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 2, "id": "minecraft:iron_ingot" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:oxidized_copper_grate" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 2, "id": "minecraft:copper_ingot" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "farmersdelight:cutting",
|
||||
"ingredients": [
|
||||
{ "item": "minecraft:weathered_copper_grate" }
|
||||
],
|
||||
"result": [
|
||||
{ "item": { "count": 2, "id": "minecraft:copper_ingot" } }
|
||||
],
|
||||
"tool": { "type": "farmersdelight:item_ability", "action": "pickaxe_dig" }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:overworld",
|
||||
"generator": {
|
||||
"type": "minecraft:flat",
|
||||
"settings": {
|
||||
"biome": "minecraft:the_void",
|
||||
"features": false,
|
||||
"lakes": false,
|
||||
"layers": [],
|
||||
"structure_overrides": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,9 @@
|
||||
gamerule mobGriefing true
|
||||
gamerule reducedDebugInfo true
|
||||
gamerule playersSleepingPercentage 100
|
||||
team add wowmine_hidden
|
||||
team modify wowmine_hidden nametagVisibility never
|
||||
team modify wowmine_hidden friendlyFire true
|
||||
team modify wowmine_hidden seeFriendlyInvisibles false
|
||||
function wowmine_rules:player_visibility
|
||||
function wowmine_rules:minimap_policy
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Keep new players' overhead names hidden without moving existing team members.
|
||||
team join wowmine_hidden @a[team=]
|
||||
schedule function wowmine_rules:player_visibility 1t replace
|
||||
@@ -1,6 +1,38 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 48,
|
||||
"description": "wowmine: minimap access and mob griefing rules"
|
||||
"description": "wowmine: map access, mob griefing and recipe rules"
|
||||
},
|
||||
"filter": {
|
||||
"block": [
|
||||
{
|
||||
"namespace": "cuttingdelight-dev",
|
||||
"path": "recipe/cutting/duplicate1\\.json"
|
||||
},
|
||||
{
|
||||
"namespace": "^farmerscuttingeverything$",
|
||||
"path": "^recipe/cutting/honeycomb\\.json$"
|
||||
},
|
||||
{
|
||||
"namespace": "^vintagedelight$",
|
||||
"path": "^recipe/fermenting/leather_from_fermenting\\.json$"
|
||||
},
|
||||
{
|
||||
"namespace": "^farmerscuttingeverything$",
|
||||
"path": "^recipe/cutting/(packed_ice|blue_ice)\\.json$"
|
||||
},
|
||||
{
|
||||
"namespace": "^extradelight$",
|
||||
"path": "^recipe/cutting/(packed_ice|blue_ice)_axe\\.json$"
|
||||
},
|
||||
{
|
||||
"namespace": "^rusticdelight$",
|
||||
"path": "^recipe/wool\\.json$"
|
||||
},
|
||||
{
|
||||
"namespace": "^craftable_loot_chests$",
|
||||
"path": "^recipe/recipe_sealed_.*\\.json$"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"netherPortalMode": "normal",
|
||||
"lightVanillaNetherPortalWhenCrouching": false,
|
||||
"endPortalMode": "vanilla"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
enabled = true
|
||||
maxSimulatedTicks = 24000
|
||||
notifyPlayers = true
|
||||
|
||||
[performance]
|
||||
immediateChunkRadius = 2
|
||||
budgetMsPerTick = 10
|
||||
|
||||
[blocks]
|
||||
simulateRandomTicks = true
|
||||
simulateFluidRandomTicks = false
|
||||
simulateFreezing = true
|
||||
|
||||
[blockEntities]
|
||||
simulateBlockEntities = true
|
||||
tickAllBlockEntities = false
|
||||
types = [
|
||||
"minecraft:furnace",
|
||||
"minecraft:blast_furnace",
|
||||
"minecraft:smoker",
|
||||
"minecraft:brewing_stand",
|
||||
"minecraft:campfire",
|
||||
"minecraft:hopper",
|
||||
"create:millstone",
|
||||
"create:motor",
|
||||
"create:saw",
|
||||
"create:mechanical_press",
|
||||
"create:depot",
|
||||
"create:mechanical_mixer",
|
||||
"create:basin",
|
||||
"create:simple_kinetic",
|
||||
]
|
||||
|
||||
[minecarts]
|
||||
simulateMinecarts = true
|
||||
maxMinecarts = 32
|
||||
|
||||
[mobs]
|
||||
simulateAging = true
|
||||
simulateChickenEggs = true
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
profile_name = Default
|
||||
ignore_enforcement_if_edit_permission = false
|
||||
hide_waypoint_coordinates = true
|
||||
info_display_config = This option's value is saved to sub-folder "info_display_config".
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
infoDisplayOrder:coords:overworld_coords:chunk_coords
|
||||
infoDisplay:coords:false:-:-
|
||||
infoDisplay:overworld_coords:false:-:-
|
||||
infoDisplay:chunk_coords:false:-:-
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
profile_name = Default
|
||||
ignore_enforcement_if_edit_permission = false
|
||||
display_coordinates = false
|
||||
@@ -0,0 +1,29 @@
|
||||
{ pkgs, server, immersivePortals }:
|
||||
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "wowmine-world-policy";
|
||||
version = "1.1.0";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ pkgs.jdk21_headless pkgs.unzip ];
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
mkdir -p classes sdk
|
||||
neo="${server}/libraries/net/neoforged/neoforge/21.1.250"
|
||||
unzip -q "$neo/neoforge-21.1.250-universal.jar" \
|
||||
'META-INF/jarjar/mixinextras-neoforge-*.jar' -d sdk
|
||||
classpath="$neo/neoforge-21.1.250-server.jar:${immersivePortals}"
|
||||
for dependency in $(find sdk ${server}/libraries -name '*.jar' | sort); do
|
||||
classpath="$classpath:$dependency"
|
||||
done
|
||||
javac -proc:none --release 21 -classpath "$classpath" \
|
||||
-d classes $(find src -name '*.java' | sort)
|
||||
jar --create --file wowmine-world-policy.jar \
|
||||
--date=2026-11-22T00:00:00Z -C classes . -C resources .
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm444 wowmine-world-policy.jar "$out/share/java/wowmine-world-policy.jar"
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
modLoader="javafml"
|
||||
loaderVersion="[4,)"
|
||||
license="All Rights Reserved"
|
||||
|
||||
[[mods]]
|
||||
modId="wowmine_world_policy"
|
||||
version="1.1.0"
|
||||
displayName="wowmine World Policy"
|
||||
displayTest="IGNORE_ALL_VERSION"
|
||||
|
||||
[[mixins]]
|
||||
config="wowmine_world_policy.mixins.json"
|
||||
|
||||
[[dependencies.wowmine_world_policy]]
|
||||
modId="neoforge"
|
||||
type="required"
|
||||
versionRange="[21.1.250]"
|
||||
ordering="NONE"
|
||||
side="SERVER"
|
||||
|
||||
[[dependencies.wowmine_world_policy]]
|
||||
modId="imm_ptl"
|
||||
type="required"
|
||||
versionRange="[6.1.3.1]"
|
||||
ordering="NONE"
|
||||
side="SERVER"
|
||||
|
||||
[[dependencies.wowmine_world_policy]]
|
||||
modId="minecraft"
|
||||
type="required"
|
||||
versionRange="[1.21.1]"
|
||||
ordering="NONE"
|
||||
side="SERVER"
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "wowmine.world.mixin",
|
||||
"compatibilityLevel": "JAVA_21",
|
||||
"mixins": [
|
||||
"LoginMixin",
|
||||
"TravelMixin",
|
||||
"NetherPortalMixin",
|
||||
"ImmersivePortalMixin",
|
||||
"PortalIgnitionMixin",
|
||||
"SleepClockMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package wowmine.world;
|
||||
|
||||
import java.util.Objects;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.portal.DimensionTransition;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.neoforged.bus.api.EventPriority;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
import net.neoforged.neoforge.event.entity.player.PlayerRespawnPositionEvent;
|
||||
|
||||
/** Keep the engine Overworld registered while using Azeroth for player fallback. */
|
||||
@Mod("wowmine_world_policy")
|
||||
public final class WorldPolicy {
|
||||
public static final ResourceKey<Level> AZEROTH = ResourceKey.create(
|
||||
Registries.DIMENSION, ResourceLocation.parse("crafting_azeroth:azeroth")
|
||||
);
|
||||
public static final ResourceKey<Level> VOID = ResourceKey.create(
|
||||
Registries.DIMENSION, ResourceLocation.parse("wowmine:void")
|
||||
);
|
||||
public static final Vec3 SPAWN = new Vec3(3742.5, 89, 8891.5);
|
||||
|
||||
public WorldPolicy() {
|
||||
NeoForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public static ServerLevel home(MinecraftServer server) {
|
||||
return Objects.requireNonNull(server.getLevel(AZEROTH), "Azeroth dimension is required");
|
||||
}
|
||||
|
||||
public static DimensionTransition destination(DimensionTransition original) {
|
||||
if (!original.newLevel().dimension().equals(Level.OVERWORLD)) {
|
||||
return original;
|
||||
}
|
||||
return new DimensionTransition(
|
||||
home(original.newLevel().getServer()), SPAWN, Vec3.ZERO,
|
||||
original.yRot(), original.xRot(), original.missingRespawnBlock(),
|
||||
DimensionTransition.DO_NOTHING
|
||||
);
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void respawn(PlayerRespawnPositionEvent event) {
|
||||
var original = event.getDimensionTransition();
|
||||
if (original.newLevel().dimension().equals(Level.OVERWORLD)) {
|
||||
event.setDimensionTransition(destination(original));
|
||||
event.setCopyOriginalSpawnPosition(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
import qouteall.imm_ptl.peripheral.portal_generation.IntrinsicPortalGeneration;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
/** Keep Immersive Portals' normal/adaptive generators on the Azeroth/void pair. */
|
||||
@Mixin(value = IntrinsicPortalGeneration.class, remap = false)
|
||||
public abstract class ImmersivePortalMixin {
|
||||
@ModifyExpressionValue(
|
||||
method = {"<clinit>", "onFireLitOnObsidian"},
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/level/Level;OVERWORLD:Lnet/minecraft/resources/ResourceKey;")
|
||||
)
|
||||
private static ResourceKey<Level> chooseHome(ResourceKey<Level> original) {
|
||||
return WorldPolicy.AZEROTH;
|
||||
}
|
||||
|
||||
@ModifyExpressionValue(
|
||||
method = {"<clinit>", "onFireLitOnObsidian"},
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/level/Level;NETHER:Lnet/minecraft/resources/ResourceKey;")
|
||||
)
|
||||
private static ResourceKey<Level> chooseVoid(ResourceKey<Level> original) {
|
||||
return WorldPolicy.VOID;
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "<clinit>", constant = @Constant(intValue = 8))
|
||||
private static int useUnitScale(int original) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.players.PlayerList;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
@Mixin(value = PlayerList.class, remap = false)
|
||||
public abstract class LoginMixin {
|
||||
@WrapOperation(
|
||||
method = "placeNewPlayer",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/MinecraftServer;getLevel(Lnet/minecraft/resources/ResourceKey;)Lnet/minecraft/server/level/ServerLevel;")
|
||||
)
|
||||
private ServerLevel chooseLoginLevel(
|
||||
MinecraftServer server, ResourceKey<Level> key, Operation<ServerLevel> original,
|
||||
@Local(argsOnly = true) ServerPlayer player) {
|
||||
var level = original.call(server, key);
|
||||
if (level != null && !level.dimension().equals(Level.OVERWORLD)) {
|
||||
return level;
|
||||
}
|
||||
player.moveTo(
|
||||
WorldPolicy.SPAWN.x, WorldPolicy.SPAWN.y, WorldPolicy.SPAWN.z,
|
||||
player.getYRot(), player.getXRot()
|
||||
);
|
||||
return WorldPolicy.home(server);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.NetherPortalBlock;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
@Mixin(value = NetherPortalBlock.class, remap = false)
|
||||
public abstract class NetherPortalMixin {
|
||||
@ModifyExpressionValue(
|
||||
method = "getPortalDestination",
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/level/Level;NETHER:Lnet/minecraft/resources/ResourceKey;")
|
||||
)
|
||||
private ResourceKey<Level> chooseVoidWorld(ResourceKey<Level> original) {
|
||||
return WorldPolicy.VOID;
|
||||
}
|
||||
|
||||
@ModifyExpressionValue(
|
||||
method = "getPortalDestination",
|
||||
at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/world/level/Level;OVERWORLD:Lnet/minecraft/resources/ResourceKey;")
|
||||
)
|
||||
private ResourceKey<Level> chooseReturnWorld(ResourceKey<Level> original) {
|
||||
return original.equals(Level.OVERWORLD) ? WorldPolicy.AZEROTH : original;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.BaseFireBlock;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
@Mixin(value = BaseFireBlock.class, remap = false)
|
||||
public abstract class PortalIgnitionMixin {
|
||||
@ModifyReturnValue(method = "inPortalDimension", at = @At("RETURN"))
|
||||
private static boolean allowLinkedWorlds(boolean original, Level level) {
|
||||
return original || level.dimension().equals(WorldPolicy.AZEROTH)
|
||||
|| level.dimension().equals(WorldPolicy.VOID);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
/** Azeroth reads the shared clock, so sleep must update that same clock. */
|
||||
@Mixin(value = ServerLevel.class, remap = false)
|
||||
public abstract class SleepClockMixin {
|
||||
@Inject(method = "setDayTime", at = @At("HEAD"), cancellable = true)
|
||||
private void updateSharedClock(long time, CallbackInfo callback) {
|
||||
var level = (ServerLevel) (Object) this;
|
||||
if (level.dimension().equals(WorldPolicy.AZEROTH)
|
||||
|| level.dimension().equals(WorldPolicy.VOID)) {
|
||||
level.getServer().overworld().setDayTime(time);
|
||||
callback.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package wowmine.world.mixin;
|
||||
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.portal.DimensionTransition;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
import wowmine.world.WorldPolicy;
|
||||
|
||||
@Mixin(value = ServerPlayer.class, remap = false)
|
||||
public abstract class TravelMixin {
|
||||
@ModifyVariable(method = "changeDimension", at = @At("HEAD"), argsOnly = true)
|
||||
private DimensionTransition chooseDestination(DimensionTransition original) {
|
||||
return WorldPolicy.destination(original);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
packVersion = "v16-delight-rules-r2";
|
||||
packVersion = "v17-immersive-portals";
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
serverMotd = "wowmine | Warcraft";
|
||||
immersivePortals = pkgs.fetchurl {
|
||||
url = "https://github.com/UpperMoon0/ImmersivePortals/releases/download/v6.1.3.1/immersive_portals-6.1.3.1.jar";
|
||||
hash = "sha256-2i+h2Q6uAx40aQpkyc117Tt01HMlgl+POMBBnhIgvKI=";
|
||||
};
|
||||
worldPolicy = import ./wowmine-world-policy {
|
||||
inherit pkgs immersivePortals;
|
||||
server = config.services.minecraft-servers.servers.wowMineMap.package;
|
||||
};
|
||||
sleepTimeSkip = pkgs.fetchurl {
|
||||
url = "https://edge.forgecdn.net/files/9527/851/sleeptimeskip-neoforge-1.21.1-1.1.0.jar";
|
||||
hash = "sha256-VXyBWvU+P95RMNRs2vTUFcqQPBeit2oJDTbSngwXAIM=";
|
||||
};
|
||||
in
|
||||
{
|
||||
sops.secrets."minecraft/storage-box-pack-key" = {
|
||||
@@ -21,7 +33,7 @@ in
|
||||
remotePath = "minecraft/pack/wowmine-${packVersion}.mrpack";
|
||||
archiveName = "wowmine.mrpack";
|
||||
cacheDir = "/var/lib/minecraft-modpacks/wowmine";
|
||||
archiveSha256 = "a7f474f1431719c6b11707fec05db8b571cb4d1b84d58c20962e771881b0109e";
|
||||
archiveSha256 = "f958597c4bed2da74d3e4c1d52b2773e2292fb9c3d1a4f42ccda76b9c620a9de";
|
||||
expectedDependencies = {
|
||||
minecraft = "1.21.1";
|
||||
neoforge = "21.1.250";
|
||||
@@ -33,11 +45,25 @@ in
|
||||
services.minecraft-servers.servers.wowMineMap.serverProperties.motd =
|
||||
serverMotd;
|
||||
|
||||
services.minecraft-backups.servers.wowMineMap.announcementCommand =
|
||||
pkgs.writeShellScript "wowmine-backup-announce" ''
|
||||
set -eu
|
||||
${pkgs.tmux}/bin/tmux -S /run/minecraft/wowMineMap.sock \
|
||||
send-keys C-u "say $1" Enter
|
||||
'';
|
||||
|
||||
systemd.services.minecraft-server-wowMineMap.preStart =
|
||||
(import ./wowmine-settings.nix {
|
||||
inherit pkgs serverDir;
|
||||
namesOnly = true;
|
||||
}) + ''
|
||||
${pkgs.coreutils}/bin/install -Dm444 \
|
||||
${worldPolicy}/share/java/wowmine-world-policy.jar \
|
||||
"${serverDir}/mods/wowmine-world-policy.jar"
|
||||
${pkgs.coreutils}/bin/install -Dm444 \
|
||||
${sleepTimeSkip} "${serverDir}/mods/wowmine-sleep-time-skip.jar"
|
||||
${pkgs.coreutils}/bin/cp -rT --no-preserve=mode \
|
||||
${./wowmine-server-config} "${serverDir}/config"
|
||||
${pkgs.coreutils}/bin/mkdir -p "${serverDir}/world/datapacks/wowmine-rules"
|
||||
${pkgs.coreutils}/bin/cp -rT --no-preserve=mode \
|
||||
${./wowmine-rules} "${serverDir}/world/datapacks/wowmine-rules"
|
||||
|
||||
Reference in New Issue
Block a user