StoneLabs / working-graves

They are graves. They work. Fabricmc mod.
5 stars 3 forks source link

Interdimensonal graving is not working #26

Closed JustusJG closed 1 month ago

JustusJG commented 1 month ago

I was working on the permissions and saw it. Didn't test it but I'm pretty sure with this code it can't work.

public BlockPos gravePlayer(ServerPlayerEntity player)
    {
        // TODO: Remove for interdimensional graving (settings check happens inside GraveHandler.GravePlayerInAllManagers)
        if (player.getWorld() != world)
        {
            WorkingGraves.LOGGER.warn("Attempting to grave player in incorrect dimension.");
            return null;
        }

        // TODO: How should the nearest grave be defined in interdimensional graving?
        Grave grave = findGrave(player.getBlockPos());
        if (grave == null)
        {
            WorkingGraves.LOGGER.info("No grave found for player %s".formatted(player.getGameProfile().getName()));
            return null;
        }

        WorkingGraves.LOGGER.info("Found grave for player %s at %s".formatted(player.getGameProfile().getName(), grave.position().toShortString()));
        grave.gravePlayer(player);
        removeGrave(grave.position());
        return grave.position();
    }
StoneLabs commented 1 month ago

Thanks for the pointers, I'll fix it when i get my testing setup working but might be a week or two. Ill close this for now as it is related to non release WIP code. Thanks :)

JustusJG commented 1 month ago

Thanks for the pointers, I'll fix it when i get my testing setup working but might be a week or two. Ill close this for now as it is related to non release WIP code. Thanks :)

I had to change my loom and gradle version to get the develpoment server running. Maybe it'll help.

Subject: [PATCH] Bugfix development server
---
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle  (revision abab1d994d692d084ac2d00bc5668d73559bf9c4)
+++ b/build.gradle  (date 1715518241904)
@@ -1,7 +1,7 @@
 plugins {
    // Loom 1.2 is recommended by fabric but can't be used because of trinkets#244
    // https://github.com/emilyploszaj/trinkets/issues/244
-   id 'fabric-loom' version '1.0-SNAPSHOT'
+   id 'fabric-loom' version '1.6-SNAPSHOT'
    id 'maven-publish'
 }

Index: gradle/wrapper/gradle-wrapper.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
--- a/gradle/wrapper/gradle-wrapper.properties  (revision abab1d994d692d084ac2d00bc5668d73559bf9c4)
+++ b/gradle/wrapper/gradle-wrapper.properties  (date 1715518093666)
@@ -1,6 +1,6 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
 networkTimeout=10000
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
StoneLabs commented 1 month ago

Thanks for the pointers, I'll fix it when i get my testing setup working but might be a week or two. Ill close this for now as it is related to non release WIP code. Thanks :)

I had to change my loom and gradle version to get the develpoment server running. Maybe it'll help.

That indeed worked。thanks.

StoneLabs commented 1 month ago

Working and tested in newest commit.