mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Reformat and cleanup merged PR, bump minor version
This commit is contained in:
@@ -22,7 +22,6 @@ package dev.architectury.registry.level.biome;
|
|||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import dev.architectury.hooks.level.biome.BiomeProperties;
|
import dev.architectury.hooks.level.biome.BiomeProperties;
|
||||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||||
import net.minecraft.core.Holder;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.tags.TagKey;
|
import net.minecraft.tags.TagKey;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
@@ -46,7 +45,7 @@ import java.util.function.Predicate;
|
|||||||
* <li>{@linkplain #replaceProperties(Predicate, BiConsumer) Replacing} existing features with new ones. [LOW]</li>
|
* <li>{@linkplain #replaceProperties(Predicate, BiConsumer) Replacing} existing features with new ones. [LOW]</li>
|
||||||
* <li>Generic {@linkplain #postProcessProperties(Predicate, BiConsumer) Post-Processing} of already modified biome features. [LOWEST]</li>
|
* <li>Generic {@linkplain #postProcessProperties(Predicate, BiConsumer) Post-Processing} of already modified biome features. [LOWEST]</li>
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
* <p>
|
||||||
* Keep in mind that it isn't strictly <b>required</b> that you use these phases accordingly
|
* Keep in mind that it isn't strictly <b>required</b> that you use these phases accordingly
|
||||||
* (i.e., you may also add features during Post-Processing, for example); they mostly serve to
|
* (i.e., you may also add features during Post-Processing, for example); they mostly serve to
|
||||||
* add a predictable order to biome modifications.
|
* add a predictable order to biome modifications.
|
||||||
@@ -93,7 +92,7 @@ public final class BiomeModifications {
|
|||||||
Optional<ResourceLocation> getKey();
|
Optional<ResourceLocation> getKey();
|
||||||
|
|
||||||
BiomeProperties getProperties();
|
BiomeProperties getProperties();
|
||||||
|
|
||||||
boolean hasTag(TagKey<Biome> tag);
|
boolean hasTag(TagKey<Biome> tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class BiomeModificationsImpl {
|
|||||||
public BiomeProperties getProperties() {
|
public BiomeProperties getProperties() {
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasTag(TagKey<Biome> tag) {
|
public boolean hasTag(TagKey<Biome> tag) {
|
||||||
return context.hasTag(tag);
|
return context.hasTag(tag);
|
||||||
|
|||||||
@@ -144,11 +144,11 @@ public class BiomeModificationsImpl {
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasTag(TagKey<Biome> tag) {
|
public boolean hasTag(TagKey<Biome> tag) {
|
||||||
MinecraftServer server = GameInstance.getServer();
|
MinecraftServer server = GameInstance.getServer();
|
||||||
if(server != null) {
|
if (server != null) {
|
||||||
Optional<? extends Registry<Biome>> registry = server.registryAccess().registry(Registry.BIOME_REGISTRY);
|
Optional<? extends Registry<Biome>> registry = server.registryAccess().registry(Registry.BIOME_REGISTRY);
|
||||||
if(registry.isPresent()) {
|
if (registry.isPresent()) {
|
||||||
Optional<Holder<Biome>> holder = registry.get().getHolder(biomeResourceKey.get());
|
Optional<Holder<Biome>> holder = registry.get().getHolder(biomeResourceKey.get());
|
||||||
if(holder.isPresent()) {
|
if (holder.isPresent()) {
|
||||||
return holder.get().is(tag);
|
return holder.get().is(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ artifact_type=release
|
|||||||
|
|
||||||
archives_base_name=architectury
|
archives_base_name=architectury
|
||||||
archives_base_name_snapshot=architectury-snapshot
|
archives_base_name_snapshot=architectury-snapshot
|
||||||
base_version=5.5
|
base_version=5.6
|
||||||
maven_group=dev.architectury
|
maven_group=dev.architectury
|
||||||
|
|
||||||
fabric_loader_version=0.14.6
|
fabric_loader_version=0.14.6
|
||||||
|
|||||||
Reference in New Issue
Block a user