diff --git a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LandPathNodeTypesRegistry.java b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LandPathNodeTypesRegistry.java index e74eff6711..c7407355b5 100644 --- a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LandPathNodeTypesRegistry.java +++ b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/LandPathNodeTypesRegistry.java @@ -185,9 +185,9 @@ public non-sealed interface StaticPathNodeTypeProvider extends PathNodeTypeProvi *
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. * - *
For example, for a cactus-like block you should use {@link PathNodeType#DAMAGE_CACTUS} if the block + *
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. * @@ -211,9 +211,9 @@ public non-sealed interface DynamicPathNodeTypeProvider extends PathNodeTypeProv *
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. * - *
For example, for a cactus-like block you should specify {@link PathNodeType#DAMAGE_CACTUS} if the block + *
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. * diff --git a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/VillagerInteractionRegistries.java b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/VillagerInteractionRegistries.java index cfde391765..bc8691d791 100644 --- a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/VillagerInteractionRegistries.java +++ b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/VillagerInteractionRegistries.java @@ -38,7 +38,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); @@ -58,7 +57,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) { @@ -73,7 +72,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) { diff --git a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/package-info.java b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/package-info.java new file mode 100644 index 0000000000..0697c3f03e --- /dev/null +++ b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2016, 2017, 2018, 2019 FabricMC + * + * 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; diff --git a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/impl/content/registry/FlammableBlockRegistryImpl.java b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/impl/content/registry/FlammableBlockRegistryImpl.java index eea4fe822d..09f0bc7d68 100644 --- a/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/impl/content/registry/FlammableBlockRegistryImpl.java +++ b/fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/impl/content/registry/FlammableBlockRegistryImpl.java @@ -40,7 +40,7 @@ public class FlammableBlockRegistryImpl implements FlammableBlockRegistry { private FlammableBlockRegistryImpl(Block key) { this.key = key; - // Reset computed values after tags change since they depends on tags. + // Reset computed values after tags change since they depend on tags. CommonLifecycleEvents.TAGS_LOADED.register((registries, client) -> { computedEntries = null; }); diff --git a/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java b/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java index 02ae19cecb..3395994a0a 100644 --- a/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java +++ b/fabric-content-registries-v0/src/testmod/java/net/fabricmc/fabric/test/content/registry/ContentRegistryTest.java @@ -81,7 +81,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