use proper registires, still issues.
This commit is contained in:
1 parent
aab3de671e
commit
d1f3886845
3 files changed
+6
-4
No files matched your search
@@ -2,6 +2,8 @@ package carpet.fakes;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
//import net.minecraft.server.ServerResources;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@@ -13,5 +15,5 @@ public interface MinecraftServerInterface
|
||||
void forceTick(BooleanSupplier sup);
|
||||
LevelStorageSource.LevelStorageAccess getCMSession();
|
||||
Map<ResourceKey<Level>, ServerLevel> getCMWorlds();
|
||||
void reloadAfterReload();
|
||||
void reloadAfterReload(RegistryAccess newRegs);
|
||||
}
|
||||
@@ -99,9 +99,9 @@ public abstract class MinecraftServer_scarpetMixin extends ReentrantBlockableEve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadAfterReload()
|
||||
public void reloadAfterReload(RegistryAccess newRegs)
|
||||
{
|
||||
resources.managers().updateRegistryTags(registryAccess());
|
||||
resources.managers().updateRegistryTags(newRegs);
|
||||
getPlayerList().saveAll();
|
||||
getPlayerList().reloadResources();
|
||||
functionManager.replaceLibrary(this.resources.managers().getFunctionLibrary());
|
||||
|
||||
@@ -1154,7 +1154,7 @@ public class Auxiliary {
|
||||
addeds.add(ValueConversions.of(registryKey.location()));
|
||||
}
|
||||
}
|
||||
((MinecraftServerInterface)server).reloadAfterReload();
|
||||
((MinecraftServerInterface)server).reloadAfterReload(data.registryAccess());
|
||||
return ListValue.wrap(addeds);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user