Update to 1.18.2
Swapped arguments for wh replace
This commit is contained in:
@@ -13,8 +13,8 @@ import net.minecraft.server.packs.PackResources;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.repository.Pack;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import net.minecraft.server.packs.resources.ReloadableResourceManager;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.server.packs.resources.SimpleReloadableResourceManager;
|
||||
import net.minecraft.util.Unit;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
import net.minecraft.world.level.storage.loot.PredicateManager;
|
||||
@@ -29,7 +29,7 @@ public class AdvancementHelper implements PreparableReloadListener
|
||||
{
|
||||
return CompletableFuture.supplyAsync(() ->
|
||||
{
|
||||
SimpleReloadableResourceManager serverResourceManager = new SimpleReloadableResourceManager(PackType.SERVER_DATA);
|
||||
ReloadableResourceManager serverResourceManager = new ReloadableResourceManager(PackType.SERVER_DATA);
|
||||
serverResourceManager.registerReloadListener(this.manager);
|
||||
return serverResourceManager;
|
||||
}).thenCompose(stage::wait).thenAcceptAsync(serverResourceManager ->
|
||||
|
||||
@@ -1,38 +1,22 @@
|
||||
package exopandora.worldhandler.util;
|
||||
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.world.level.LevelSettings;
|
||||
import net.minecraft.world.level.levelgen.WorldGenSettings;
|
||||
|
||||
public interface IConnection
|
||||
{
|
||||
public static class IntegratedConnection implements IConnection
|
||||
{
|
||||
private final String folder;
|
||||
private final LevelSettings levelSettings;
|
||||
private final WorldGenSettings worldGenSettings;
|
||||
|
||||
public IntegratedConnection(String folderName, LevelSettings levelSettings, WorldGenSettings worldGenSettings)
|
||||
public IntegratedConnection(String folderName)
|
||||
{
|
||||
this.folder = folderName;
|
||||
this.levelSettings = levelSettings;
|
||||
this.worldGenSettings = worldGenSettings;
|
||||
}
|
||||
|
||||
public String getFolder()
|
||||
{
|
||||
return this.folder;
|
||||
}
|
||||
|
||||
public LevelSettings getWorldSettings()
|
||||
{
|
||||
return this.levelSettings;
|
||||
}
|
||||
|
||||
public WorldGenSettings getWorldGenSettings()
|
||||
{
|
||||
return this.worldGenSettings;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DedicatedConnection implements IConnection
|
||||
|
||||
@@ -7,15 +7,12 @@ import java.util.function.Function;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import exopandora.worldhandler.Main;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.locale.Language;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.effect.MobEffect;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.enchantment.Enchantment;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.ForgeRegistryEntry;
|
||||
@@ -33,8 +30,7 @@ public class RegistryHelper
|
||||
registerRegistry(ForgeRegistries.MOB_EFFECTS, MobEffect::getDescriptionId);
|
||||
registerRegistry(ForgeRegistries.BIOMES, biome ->
|
||||
{
|
||||
Registry<Biome> registry = RegistryAccess.builtin().registryOrThrow(Registry.BIOME_REGISTRY);
|
||||
ResourceLocation resource = registry.getKey(biome);
|
||||
ResourceLocation resource = biome.getRegistryName();
|
||||
String key = "biome." + biome.getRegistryName().getNamespace() + "." + resource.getPath();
|
||||
return Language.getInstance().has(key) ? key : resource.toString();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user