Fixes for 1.19-pre1
This commit is contained in:
parent
d533f93113
commit
c6742982df
13 changed files with 165 additions and 174 deletions
152
bclib.gradle
152
bclib.gradle
|
@ -1,11 +1,11 @@
|
|||
buildscript {
|
||||
dependencies {
|
||||
classpath 'org.kohsuke:github-api:1.114'
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.kohsuke:github-api:1.114'
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
@ -15,70 +15,70 @@ version = project.mod_version
|
|||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
maven { url "https://maven.dblsaiko.net/" }
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
maven { url 'https://maven.blamejared.com' }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "https://maven.dblsaiko.net/" }
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
maven { url 'https://maven.blamejared.com' }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://maven.terraformersmc.com/releases' }
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/bclib.accesswidener")
|
||||
accessWidenerPath = file("src/main/resources/bclib.accesswidener")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
|
||||
//useApi "vazkii.patchouli:Patchouli:1.16.4-${project.patchouli_version}"
|
||||
//useApi "vazkii.patchouli:Patchouli:1.16.4-${project.patchouli_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
println "Version: ${project.mod_version}"
|
||||
inputs.property "version", project.mod_version
|
||||
println "Version: ${project.mod_version}"
|
||||
inputs.property "version", project.mod_version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.mod_version
|
||||
}
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.mod_version
|
||||
}
|
||||
}
|
||||
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.tags = [ "reason" ]
|
||||
options.stylesheetFile = new File(projectDir, "javadoc.css");
|
||||
options.tags = ["reason"]
|
||||
options.stylesheetFile = new File(projectDir, "javadoc.css");
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
jar {
|
||||
from "LICENSE"
|
||||
from "LICENSE"
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
def env = System.getenv()
|
||||
|
@ -87,60 +87,60 @@ import org.kohsuke.github.GHReleaseBuilder
|
|||
import org.kohsuke.github.GitHub
|
||||
|
||||
task release(dependsOn: [remapJar, sourcesJar, javadocJar]) {
|
||||
onlyIf {
|
||||
env.GITHUB_TOKEN
|
||||
}
|
||||
onlyIf {
|
||||
env.GITHUB_TOKEN
|
||||
}
|
||||
|
||||
doLast {
|
||||
def github = GitHub.connectUsingOAuth(env.GITHUB_TOKEN as String)
|
||||
def repository = github.getRepository("paulevsGitch/BCLib")
|
||||
doLast {
|
||||
def github = GitHub.connectUsingOAuth(env.GITHUB_TOKEN as String)
|
||||
def repository = github.getRepository("quiqueck/BCLib")
|
||||
|
||||
def releaseBuilder = new GHReleaseBuilder(repository, version as String)
|
||||
releaseBuilder.name("${archivesBaseName}-${version}")
|
||||
releaseBuilder.body("A changelog can be found at https://github.com/paulevsGitch/BCLib/commits")
|
||||
releaseBuilder.commitish("main")
|
||||
def releaseBuilder = new GHReleaseBuilder(repository, version as String)
|
||||
releaseBuilder.name("${archivesBaseName}-${version}")
|
||||
releaseBuilder.body("A changelog can be found at https://github.com/quiqueck/BCLib/commits")
|
||||
releaseBuilder.commitish("main")
|
||||
|
||||
def ghRelease = releaseBuilder.create()
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-sources.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-javadoc.jar"), "application/java-archive");
|
||||
}
|
||||
def ghRelease = releaseBuilder.create()
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-sources.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-javadoc.jar"), "application/java-archive");
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
gpr(MavenPublication) {
|
||||
artifactId archivesBaseName
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
gpr(MavenPublication) {
|
||||
artifactId archivesBaseName
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// select the repositories you want to publish to
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/paulevsgitch/bclib")
|
||||
credentials {
|
||||
username = env.GITHUB_USER
|
||||
password = env.GITHUB_TOKEN
|
||||
}
|
||||
}
|
||||
}
|
||||
// select the repositories you want to publish to
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/quiqueck/bclib")
|
||||
credentials {
|
||||
username = env.GITHUB_USER
|
||||
password = env.GITHUB_TOKEN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
dev {
|
||||
canBeResolved = false
|
||||
canBeConsumed = true
|
||||
}
|
||||
dev {
|
||||
canBeResolved = false
|
||||
canBeConsumed = true
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
dev jar
|
||||
dev jar
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ loom_version=0.11-SNAPSHOT
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version= 22w18a
|
||||
loader_version= 0.14.3
|
||||
fabric_version = 0.52.1+1.19
|
||||
minecraft_version= 1.19-pre1
|
||||
loader_version= 0.14.5
|
||||
fabric_version = 0.52.4+1.19
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 2.0.0
|
||||
|
|
|
@ -22,18 +22,14 @@ import net.minecraft.world.level.biome.BiomeGenerationSettings;
|
|||
import net.minecraft.world.level.biome.BiomeSource;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.chunk.PalettedContainer;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Carving;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
import net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator;
|
||||
import net.minecraft.world.level.levelgen.NoiseGeneratorSettings;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules.RuleSource;
|
||||
import net.minecraft.world.level.levelgen.carver.ConfiguredWorldCarver;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
|
@ -53,8 +49,10 @@ import org.apache.commons.lang3.mutable.MutableInt;
|
|||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.tag.CommonBiomeTags;
|
||||
import org.betterx.bclib.api.tag.TagAPI;
|
||||
import org.betterx.bclib.entity.BCLEntityWrapper;
|
||||
import org.betterx.bclib.interfaces.*;
|
||||
import org.betterx.bclib.interfaces.BiomeSourceAccessor;
|
||||
import org.betterx.bclib.interfaces.NoiseGeneratorSettingsProvider;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.bclib.interfaces.SurfaceRuleProvider;
|
||||
import org.betterx.bclib.mixin.client.MinecraftMixin;
|
||||
import org.betterx.bclib.mixin.common.BiomeGenerationSettingsAccessor;
|
||||
import org.betterx.bclib.mixin.common.MobSpawnSettingsAccessor;
|
||||
|
@ -483,7 +481,7 @@ public class BiomeAPI {
|
|||
|
||||
FabricBiomesData.END_VOID_BIOMES.forEach((key, weight) -> {
|
||||
if (!hasBiome(key.location())) {
|
||||
registerEndVoidBiome(BuiltinRegistries.BIOME.getOrCreateHolder(key), weight);
|
||||
registerEndVoidBiome(BuiltinRegistries.BIOME.getOrCreateHolderOrThrow(key), weight);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -495,7 +493,7 @@ public class BiomeAPI {
|
|||
|
||||
@Nullable
|
||||
public static Holder<Biome> getFromRegistry(ResourceKey<Biome> key) {
|
||||
return BuiltinRegistries.BIOME.getOrCreateHolder(key);
|
||||
return BuiltinRegistries.BIOME.getOrCreateHolderOrThrow(key);
|
||||
}
|
||||
|
||||
public static boolean isDatapackBiome(ResourceLocation biomeID) {
|
||||
|
@ -858,6 +856,7 @@ public class BiomeAPI {
|
|||
public static Optional<BlockState> findUnderMaterial(Holder<Biome> biome) {
|
||||
return findUnderMaterial(getBiome(biome.value()));
|
||||
}
|
||||
|
||||
public static Optional<BlockState> findUnderMaterial(BCLBiome biome) {
|
||||
if (biome instanceof SurfaceMaterialProvider smp) {
|
||||
return Optional.of(smp.getUnderMaterial());
|
||||
|
|
|
@ -5,8 +5,9 @@ import net.minecraft.core.Registry;
|
|||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagEntry;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
@ -16,9 +17,11 @@ import net.minecraft.world.level.block.Block;
|
|||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.mixin.common.DiggerItemAccessor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
@ -229,8 +232,8 @@ public class TagAPI {
|
|||
* @param tagsMap The map that will hold the registered Tags
|
||||
* @return The {@code tagsMap} Parameter.
|
||||
*/
|
||||
public static <T> Map<ResourceLocation, Tag.Builder> apply(String directory,
|
||||
Map<ResourceLocation, Tag.Builder> tagsMap) {
|
||||
public static <T> Map<ResourceLocation, List<TagLoader.EntryWithSource>> apply(String directory,
|
||||
Map<ResourceLocation, List<TagLoader.EntryWithSource>> tagsMap) {
|
||||
|
||||
TagType<?> type = TYPES.get(directory);
|
||||
if (type != null) {
|
||||
|
@ -259,8 +262,9 @@ public class TagAPI {
|
|||
* @param ids
|
||||
* @return The Builder passed as {@code builder}.
|
||||
*/
|
||||
public static Tag.Builder apply(Tag.Builder builder, Set<ResourceLocation> ids) {
|
||||
ids.forEach(value -> builder.addElement(value, "BCLib Code"));
|
||||
public static List<TagLoader.EntryWithSource> apply(List<TagLoader.EntryWithSource> builder,
|
||||
Set<ResourceLocation> ids) {
|
||||
ids.forEach(value -> builder.add(new TagLoader.EntryWithSource(TagEntry.element(value), BCLib.MOD_ID)));
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,16 +4,18 @@ import net.minecraft.core.DefaultedRegistry;
|
|||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
import net.minecraft.tags.TagManager;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.biomes.BiomeAPI;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
|
@ -190,10 +192,10 @@ public class TagType<T> {
|
|||
tags.forEach(consumer);
|
||||
}
|
||||
|
||||
public void apply(Map<ResourceLocation, Tag.Builder> tagsMap) {
|
||||
public void apply(Map<ResourceLocation, List<TagLoader.EntryWithSource>> tagsMap) {
|
||||
if (Registry.BIOME_REGISTRY.equals(registryKey)) BiomeAPI._runTagAdders();
|
||||
|
||||
//this.isFrozen = true;
|
||||
this.forEach((id, ids) -> TagAPI.apply(tagsMap.computeIfAbsent(id, key -> Tag.Builder.tag()), ids));
|
||||
this.forEach((id, ids) -> TagAPI.apply(tagsMap.computeIfAbsent(id, key -> Lists.newArrayList()), ids));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,35 +2,23 @@ package org.betterx.bclib.mixin.common;
|
|||
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.BiomeSource;
|
||||
import net.minecraft.world.level.biome.BiomeSource.StepFeatureData;
|
||||
|
||||
import com.google.common.base.Suppliers;
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.interfaces.BiomeSourceAccessor;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Mixin(BiomeSource.class)
|
||||
public abstract class BiomeSourceMixin implements BiomeSourceAccessor {
|
||||
@Shadow
|
||||
protected abstract List<StepFeatureData> buildFeaturesPerStep(List<Biome> list, boolean bl);
|
||||
|
||||
@Shadow
|
||||
public abstract Set<Biome> possibleBiomes();
|
||||
|
||||
@Mutable
|
||||
@Shadow
|
||||
@Final
|
||||
private Supplier<List<StepFeatureData>> featuresPerStep;
|
||||
|
||||
public void bclRebuildFeatures() {
|
||||
//Feature sorting is now a task in ChunkGenerator
|
||||
BCLib.LOGGER.info("Rebuilding features in BiomeSource " + this);
|
||||
featuresPerStep = Suppliers.memoize(() -> buildFeaturesPerStep(this.possibleBiomes().stream().toList(), true));
|
||||
//featuresPerStep = Suppliers.memoize(() -> FeatureSorter.buildFeaturesPerStep(this.possibleBiomes().stream().toList(), true));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,16 @@ package org.betterx.bclib.mixin.common;
|
|||
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.Services;
|
||||
import net.minecraft.server.WorldStem;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.server.level.progress.ChunkProgressListenerFactory;
|
||||
import net.minecraft.server.packs.repository.PackRepository;
|
||||
import net.minecraft.server.players.GameProfileCache;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess;
|
||||
import net.minecraft.world.level.storage.WorldData;
|
||||
|
||||
import com.mojang.authlib.GameProfileRepository;
|
||||
import com.mojang.authlib.minecraft.MinecraftSessionService;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import org.betterx.bclib.api.dataexchange.DataExchangeAPI;
|
||||
import org.betterx.bclib.recipes.BCLRecipeManager;
|
||||
|
@ -50,9 +48,7 @@ public class MinecraftServerMixin {
|
|||
WorldStem worldStem,
|
||||
Proxy proxy,
|
||||
DataFixer dataFixer,
|
||||
MinecraftSessionService minecraftSessionService,
|
||||
GameProfileRepository gameProfileRepository,
|
||||
GameProfileCache gameProfileCache,
|
||||
Services services,
|
||||
ChunkProgressListenerFactory chunkProgressListenerFactory,
|
||||
CallbackInfo ci) {
|
||||
DataExchangeAPI.prepareServerside();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.betterx.bclib.mixin.common;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
|
||||
import org.betterx.bclib.api.tag.TagAPI;
|
||||
|
@ -11,6 +10,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mixin(TagLoader.class)
|
||||
|
@ -20,7 +20,7 @@ public class TagLoaderMixin {
|
|||
private String directory;
|
||||
|
||||
@ModifyArg(method = "loadAndBuild", at = @At(value = "INVOKE", target = "Lnet/minecraft/tags/TagLoader;build(Ljava/util/Map;)Ljava/util/Map;"))
|
||||
public Map<ResourceLocation, Tag.Builder> be_modifyTags(Map<ResourceLocation, Tag.Builder> tagsMap) {
|
||||
public Map<ResourceLocation, List<TagLoader.EntryWithSource>> be_modifyTags(Map<ResourceLocation, List<TagLoader.EntryWithSource>> tagsMap) {
|
||||
return TagAPI.apply(directory, tagsMap);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ public class BCLBiome extends BCLBiomeSettings {
|
|||
|
||||
|
||||
public Holder<Biome> getBiomeHolder() {
|
||||
return BuiltinRegistries.BIOME.getOrCreateHolder(BiomeAPI.getBiomeKey(biome));
|
||||
return BuiltinRegistries.BIOME.getOrCreateHolderOrThrow(BiomeAPI.getBiomeKey(biome));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -102,8 +102,8 @@ public class BCLibEndBiomeSource extends BCLBiomeSource {
|
|||
endVoidBiomePicker.rebuild();
|
||||
|
||||
|
||||
this.centerBiome = biomeRegistry.getOrCreateHolder(Biomes.THE_END);
|
||||
this.barrens = biomeRegistry.getOrCreateHolder(Biomes.END_BARRENS);
|
||||
this.centerBiome = biomeRegistry.getOrCreateHolderOrThrow(Biomes.THE_END);
|
||||
this.barrens = biomeRegistry.getOrCreateHolderOrThrow(Biomes.END_BARRENS);
|
||||
|
||||
this.endLandFunction = GeneratorOptions.getEndLandFunction();
|
||||
this.pos = new Point();
|
||||
|
@ -119,7 +119,8 @@ public class BCLibEndBiomeSource extends BCLBiomeSource {
|
|||
|
||||
return biomeRegistry.stream()
|
||||
.filter(biome -> biomeRegistry.getResourceKey(biome).isPresent())
|
||||
.map(biome -> biomeRegistry.getOrCreateHolder(biomeRegistry.getResourceKey(biome).get()))
|
||||
.map(biome -> biomeRegistry.getOrCreateHolderOrThrow(biomeRegistry.getResourceKey(biome)
|
||||
.get()))
|
||||
.filter(biome -> {
|
||||
ResourceLocation key = biome.unwrapKey().orElseThrow().location();
|
||||
|
||||
|
|
|
@ -105,7 +105,8 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource {
|
|||
|
||||
return biomeRegistry.stream()
|
||||
.filter(biome -> biomeRegistry.getResourceKey(biome).isPresent())
|
||||
.map(biome -> biomeRegistry.getOrCreateHolder(biomeRegistry.getResourceKey(biome).get()))
|
||||
.map(biome -> biomeRegistry.getOrCreateHolderOrThrow(biomeRegistry.getResourceKey(biome)
|
||||
.get()))
|
||||
.filter(biome -> {
|
||||
ResourceLocation location = biome.unwrapKey().orElseThrow().location();
|
||||
final String strLocation = location.toString();
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BiomePicker {
|
|||
this.bclBiome = bclBiome;
|
||||
|
||||
this.key = biomeRegistry.getResourceKey(biomeRegistry.get(bclBiome.getID())).orElseThrow();
|
||||
this.biome = biomeRegistry.getOrCreateHolder(key);
|
||||
this.biome = biomeRegistry.getOrCreateHolderOrThrow(key);
|
||||
|
||||
bclBiome.forEachSubBiome((b, w) -> {
|
||||
subbiomes.add(create(b), w);
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "bclib",
|
||||
"version": "${version}",
|
||||
"name": "BCLib",
|
||||
"description": "A library for BetterX team mods",
|
||||
"authors": [
|
||||
"paulevs",
|
||||
"Quiqueck",
|
||||
"Bulldog83"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/bclib",
|
||||
"issues": "https://github.com/paulevsGitch/bclib/issues",
|
||||
"sources": "https://github.com/paulevsGitch/bclib"
|
||||
},
|
||||
"license": "MIT",
|
||||
"icon": "assets/bclib/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"ru.bclib.BCLib"
|
||||
],
|
||||
"client": [
|
||||
"ru.bclib.client.BCLibClient"
|
||||
],
|
||||
"server": [
|
||||
"ru.bclib.server.BCLibServer"
|
||||
],
|
||||
"modmenu": [
|
||||
"ru.bclib.integration.modmenu.ModMenuEntryPoint"
|
||||
]
|
||||
},
|
||||
"accessWidener" : "bclib.accesswidener",
|
||||
"mixins": [
|
||||
"bclib.mixins.common.json",
|
||||
"bclib.mixins.client.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.3",
|
||||
"fabric": ">=0.52.0",
|
||||
"minecraft": "1.19-alpha.22.18.a"
|
||||
},
|
||||
"custom":{
|
||||
"modmenu":{
|
||||
"links":{
|
||||
"title.link.bclib.discord":"https://discord.gg/kYuATbYbKW"
|
||||
}
|
||||
}
|
||||
}
|
||||
"schemaVersion": 1,
|
||||
"id": "bclib",
|
||||
"version": "2.0.0",
|
||||
"name": "BCLib",
|
||||
"description": "A library for BetterX team mods",
|
||||
"authors": [
|
||||
"paulevs",
|
||||
"Quiqueck",
|
||||
"Bulldog83"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/bclib",
|
||||
"issues": "https://github.com/paulevsGitch/bclib/issues",
|
||||
"sources": "https://github.com/paulevsGitch/bclib"
|
||||
},
|
||||
"license": "MIT",
|
||||
"icon": "assets/bclib/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"org.betterx.bclib.BCLib"
|
||||
],
|
||||
"client": [
|
||||
"org.betterx.bclib.client.BCLibClient"
|
||||
],
|
||||
"server": [
|
||||
"org.betterx.bclib.server.BCLibServer"
|
||||
],
|
||||
"modmenu": [
|
||||
"org.betterx.bclib.integration.modmenu.ModMenuEntryPoint"
|
||||
]
|
||||
},
|
||||
"accessWidener": "bclib.accesswidener",
|
||||
"mixins": [
|
||||
"bclib.mixins.common.json",
|
||||
"bclib.mixins.client.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.5",
|
||||
"fabric": ">=0.52.4",
|
||||
"minecraft": "1.19-beta.1"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"links": {
|
||||
"title.link.bclib.discord": "https://discord.gg/kYuATbYbKW"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue