mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-05-19 16:20:46 +00:00
Fixed compilation errors
This commit is contained in:
+2
-1
@@ -7,6 +7,7 @@ import ca.solostudios.strata.version.Version;
|
|||||||
import com.dfsek.terra.api.util.reflection.ReflectionUtil;
|
import com.dfsek.terra.api.util.reflection.ReflectionUtil;
|
||||||
|
|
||||||
import net.minecraft.MinecraftVersion;
|
import net.minecraft.MinecraftVersion;
|
||||||
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.enchantment.Enchantment;
|
import net.minecraft.enchantment.Enchantment;
|
||||||
import net.minecraft.registry.Registry;
|
import net.minecraft.registry.Registry;
|
||||||
import net.minecraft.registry.RegistryKeys;
|
import net.minecraft.registry.RegistryKeys;
|
||||||
@@ -107,7 +108,7 @@ public abstract class LifecyclePlatform extends ModPlatform {
|
|||||||
|
|
||||||
super.platformAddon().forEach(addons::add);
|
super.platformAddon().forEach(addons::add);
|
||||||
|
|
||||||
String mcVersion = MinecraftVersion.CURRENT.name();
|
String mcVersion = SharedConstants.getGameVersion().name();
|
||||||
try {
|
try {
|
||||||
addons.add(new EphemeralAddon(Versions.parseVersion(mcVersion), "minecraft"));
|
addons.add(new EphemeralAddon(Versions.parseVersion(mcVersion), "minecraft"));
|
||||||
} catch(ParseException e) {
|
} catch(ParseException e) {
|
||||||
|
|||||||
+3
-6
@@ -1,14 +1,11 @@
|
|||||||
package com.dfsek.terra.lifecycle.mixin.lifecycle;
|
package com.dfsek.terra.lifecycle.mixin.lifecycle;
|
||||||
|
|
||||||
import com.dfsek.terra.mod.CommonPlatform;
|
|
||||||
import com.dfsek.terra.mod.ModPlatform;
|
|
||||||
|
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import net.minecraft.resource.ResourcePackManager;
|
import net.minecraft.resource.ResourcePackManager;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.SaveLoader;
|
import net.minecraft.server.SaveLoader;
|
||||||
import net.minecraft.server.WorldGenerationProgressListenerFactory;
|
|
||||||
import net.minecraft.util.ApiServices;
|
import net.minecraft.util.ApiServices;
|
||||||
|
import net.minecraft.world.chunk.ChunkLoadProgress;
|
||||||
import net.minecraft.world.level.storage.LevelStorage;
|
import net.minecraft.world.level.storage.LevelStorage;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -25,11 +22,11 @@ public class MinecraftServerMixin {
|
|||||||
@Inject(method = "<init>(Ljava/lang/Thread;Lnet/minecraft/world/level/storage/LevelStorage$Session;" +
|
@Inject(method = "<init>(Ljava/lang/Thread;Lnet/minecraft/world/level/storage/LevelStorage$Session;" +
|
||||||
"Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/server/SaveLoader;Ljava/net/Proxy;" +
|
"Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/server/SaveLoader;Ljava/net/Proxy;" +
|
||||||
"Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/util/ApiServices;" +
|
"Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/util/ApiServices;" +
|
||||||
"Lnet/minecraft/server/WorldGenerationProgressListenerFactory;)V",
|
"Lnet/minecraft/world/chunk/ChunkLoadProgress;)V",
|
||||||
at = @At("RETURN"))
|
at = @At("RETURN"))
|
||||||
private void injectConstructor(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager,
|
private void injectConstructor(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager,
|
||||||
SaveLoader saveLoader, Proxy proxy, DataFixer dataFixer, ApiServices apiServices,
|
SaveLoader saveLoader, Proxy proxy, DataFixer dataFixer, ApiServices apiServices,
|
||||||
WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory, CallbackInfo ci) {
|
ChunkLoadProgress chunkLoadProgress, CallbackInfo ci) {
|
||||||
LifecyclePlatform.setServer((MinecraftServer) (Object) this);
|
LifecyclePlatform.setServer((MinecraftServer) (Object) this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user