Skip to content

Commit

Permalink
Merge pull request #134 from TheGlitch76/1.20.1
Browse files Browse the repository at this point in the history
0.89.3 for 1.20.1
  • Loading branch information
TheGlitch76 authored Oct 1, 2023
2 parents 6417ba3 + 0dac690 commit ebad84b
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
import net.minecraft.util.Identifier;

/**
* <b>Experimental feature</b>, may be removed or changed without further notice.
* Provides methods for modifying biomes. To create an instance, call
* {@link BiomeModifications#create(Identifier)}.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
* @see BiomeModifications
* @deprecated Use Quilt Biome API's {@link org.quiltmc.qsl.worldgen.biome.api.BiomeModification} instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ default SpawnSettingsContext getSpawnSettings() {

interface WeatherContext extends org.quiltmc.qsl.worldgen.biome.api.BiomeModificationContext.WeatherContext {
/**
* @see Biome#getPrecipitation()
* @see Biome.Builder#precipitation(Biome.Precipitation)
* @see Biome#hasPrecipitation()
* @see Biome.Builder#precipitation(boolean)
*/
default void setPrecipitation(boolean hasPrecipitation) {
this.setHasPrecipitation(hasPrecipitation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
/**
* Provides an API to modify Biomes after they have been loaded and before they are used in the World.
*
* <p>Any modifications made to biomes will not be available for use in server.properties (as of 1.16.1),
* or the demo level.
* <p>Any modifications made to biomes will not be available for use in the demo level.
*
* <p><b>Experimental feature</b>, may be removed or changed without further notice.
*
Expand Down Expand Up @@ -91,7 +90,7 @@ public static void addSpawn(Predicate<BiomeSelectionContext> biomeSelector,
}

/**
* Create a new biome modification which will be applied whenever biomes are loaded from data packs.
* Creates a new biome modification which will be applied whenever biomes are loaded from data packs.
*
* @param id An identifier for the new set of biome modifications that is returned. Is used for
* guaranteeing consistent ordering between the biome modifications added by different mods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ public non-sealed interface StaticPathNodeTypeProvider extends PathNodeTypeProvi
* <p>You can specify what to return if the block state is a direct target of an entity path,
* or a neighbor block of the entity path.
*
* <p>For example, for a cactus-like block you should use {@link PathNodeType#DAMAGE_CACTUS} if the block
* <p>For example, for a cactus-like block you should use {@link PathNodeType#DAMAGE_OTHER} if the block
* is a direct target in the entity path ({@code neighbor == false}) to specify that an entity should not pass
* through or above the block because it will cause damage, and you should use{@link PathNodeType#DANGER_CACTUS}
* through or above the block because it will cause damage, and you should use {@link PathNodeType#DANGER_OTHER}
* if the block is a neighbor block in the entity path ({@code neighbor == true}) to specify that the entity
* should not get close to the block because it is dangerous.
*
Expand All @@ -212,9 +212,9 @@ public non-sealed interface DynamicPathNodeTypeProvider extends PathNodeTypeProv
* <p>You can specify what to return if the block state is a direct target of an entity path,
* or a neighbor block of the entity path.
*
* <p>For example, for a cactus-like block you should specify {@link PathNodeType#DAMAGE_CACTUS} if the block
* <p>For example, for a cactus-like block you should specify {@link PathNodeType#DAMAGE_OTHER} if the block
* is a direct target ({@code neighbor == false}) to specify that an entity should not pass through or above
* the block because it will cause damage, and {@link PathNodeType#DANGER_CACTUS} if the cactus will be found
* the block because it will cause damage, and {@link PathNodeType#DANGER_OTHER} if the cactus will be found
* as a neighbor block in the entity path ({@code neighbor == true}) to specify that the entity should not get
* close to the block because is dangerous.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
/**
* Registries for modifying villager interactions that
* villagers have with the world.
* @see VillagerPlantableRegistry for registering plants that farmers can plant
*/
public final class VillagerInteractionRegistries {
private static final Logger LOGGER = LoggerFactory.getLogger(VillagerInteractionRegistries.class);
Expand All @@ -59,7 +58,7 @@ public static void registerCollectable(ItemConvertible item) {
}

/**
* Registers an item to be use in a composter by farmer villagers.
* Registers an item to be used in a composter by farmer villagers.
* @param item the item to register
*/
public static void registerCompostable(ItemConvertible item) {
Expand All @@ -74,7 +73,6 @@ public static void registerCompostable(ItemConvertible item) {
*/
public static void registerFood(ItemConvertible item, int foodValue) {
Objects.requireNonNull(item.asItem(), "Item cannot be null!");
Objects.requireNonNull(foodValue, "Food value cannot be null!");
Integer oldValue = getFoodRegistry().put(item.asItem(), foodValue);

if (oldValue != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2016, 2017, 2018, 2019 FabricMC
* Copyright 2022 The Quilt Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Includes methods for registering in-game logics.
*/
package net.fabricmc.fabric.api.registry;
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void onInitialize() {
// - copper ore, iron ore, gold ore, and diamond ore can be waxed into their deepslate variants and scraped back again
// - aforementioned ores can be scraped from diamond -> gold -> iron -> copper
// - villagers can now collect, consume (at the same level of bread) and compost apples
// - villagers can now collect and plant oak saplings
// - villagers can now collect oak saplings
// - assign a loot table to the nitwit villager type
// - right-clicking a 'test_event' block will emit a 'test_event' game event, which will have a sculk sensor frequency of 2
// - instant health potions can be brewed from awkward potions with any item in the 'minecraft:small_flowers' tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public static final class Entries {
Entries(RegistryWrapper.WrapperLookup registries, String modId) {
this.registries = registries;
this.queuedEntries = DynamicRegistries.getDynamicRegistries().stream()
// Some modded dynamic registries might not be in the wrapper lookup, filter them out
.filter(e -> registries.getOptionalWrapper(e.key()).isPresent())
.collect(Collectors.toMap(
e -> e.key().getValue(),
e -> RegistryEntries.create(registries, e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class DataGeneratorTestContent implements ModInitializer {
TEST_DATAGEN_DYNAMIC_REGISTRY_KEY,
new Identifier(MOD_ID, "tiny_potato")
);
// Empty registry
public static final RegistryKey<Registry<TestDatagenObject>> TEST_DATAGEN_DYNAMIC_EMPTY_REGISTRY_KEY =
RegistryKey.ofRegistry(new Identifier("fabric", "test_datagen_dynamic_empty"));

@Override
public void onInitialize() {
Expand All @@ -74,6 +77,7 @@ public void onInitialize() {
.build());

DynamicRegistries.register(TEST_DATAGEN_DYNAMIC_REGISTRY_KEY, TestDatagenObject.CODEC);
DynamicRegistries.register(TEST_DATAGEN_DYNAMIC_EMPTY_REGISTRY_KEY, TestDatagenObject.CODEC);
}

private static Block createBlock(String name, boolean hasItem, AbstractBlock.Settings settings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void buildRegistry(RegistryBuilder registryBuilder) {
TEST_DATAGEN_DYNAMIC_REGISTRY_KEY,
this::bootstrapTestDatagenRegistry
);
// do NOT add TEST_DATAGEN_DYNAMIC_EMPTY_REGISTRY_KEY, should still work without it
}

private void bootstrapTestDatagenRegistry(Registerable<DataGeneratorTestContent.TestDatagenObject> registerable) {
Expand Down Expand Up @@ -163,7 +164,7 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
// - Create a new fabric server with the ingredient API.
// - Copy the generated recipes to a datapack, for example to world/datapacks/<packname>/data/test/recipes/.
// - Remember to also include a pack.mcmeta file in world/datapacks/<packname>.
// (see https://minecraft.fandom.com/wiki/Tutorials/Creating_a_data_pack)
// (see https://minecraft.wiki/w/Tutorials/Creating_a_data_pack)
// - Start the server and connect to it with a vanilla client.
// - Test all the following recipes

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true

archivesBaseName=quilted_fabric_api
version=7.3.0
upstream_version=0.89.0
version=7.3.1
upstream_version=0.89.3
minecraft_version=1.20.1
yarn_version=+build.1
loader_version=0.20.2
Expand All @@ -16,17 +16,17 @@ prerelease=false
# The upstream version list. Each quilted module should aim to be compatible with them
fabric-api-base-version=0.4.30
fabric-api-lookup-api-v1-version=1.6.35
fabric-biome-api-v1-version=13.0.10
fabric-biome-api-v1-version=13.0.11
fabric-block-api-v1-version=1.0.10
fabric-block-view-api-v2-version=1.0.0
fabric-blockrenderlayer-v1-version=1.1.40
fabric-command-api-v1-version=1.2.33
fabric-command-api-v2-version=2.2.12
fabric-commands-v0-version=0.2.50
fabric-containers-v0-version=0.1.63
fabric-content-registries-v0-version=4.0.9
fabric-content-registries-v0-version=4.0.10
fabric-crash-report-info-v1-version=0.2.18
fabric-data-generation-api-v1-version=12.3.0
fabric-data-generation-api-v1-version=12.3.1
fabric-dimensions-v1-version=2.1.53
fabric-entity-events-v1-version=1.5.22
fabric-events-interaction-v0-version=0.6.1
Expand Down

0 comments on commit ebad84b

Please sign in to comment.