Update mod to Minecraft snapshot 24w40a ()

* Update mod to Minecraft snapshot 24w40a

* Bump versions

* Add new items to tags

* Add more missing boats

* Turns out they werent missing

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
haykam821 2024-10-02 15:44:30 -04:00 committed by GitHub
parent 8b2c555745
commit 86ae0e5586
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 201 additions and 203 deletions
fabric-client-tags-api-v1/src/client/java/net/fabricmc/fabric/impl/tag/client
fabric-convention-tags-v2/src
datagen/java/net/fabricmc/fabric/impl/tag/convention/datagen/generators
generated/resources
main/java/net/fabricmc/fabric/api/tag/convention/v2
fabric-data-generation-api-v1/src/main
java/net/fabricmc/fabric/api/datagen/v1/provider
resources
fabric-dimensions-v1/src/testmod/java/net/fabricmc/fabric/test/dimension
fabric-item-api-v1/src
fabric-lifecycle-events-v1/src/main/java/net/fabricmc/fabric/mixin/event/lifecycle
fabric-loot-api-v3/src/testmod/java/net/fabricmc/fabric/test/loot
fabric-recipe-api-v1/src/testmod/java/net/fabricmc/fabric/test/recipe/ingredient
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync
fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering
fabric-resource-conditions-api-v1/src/testmod/java/net/fabricmc/fabric/test/resource/conditions
fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/mixin/transfer
gradle.properties

View file

@ -80,7 +80,7 @@ public class ClientTagsLoader {
tagEntry.resolve(new TagEntry.ValueGetter<>() {
@Nullable
@Override
public Identifier direct(Identifier id) {
public Identifier direct(Identifier id, boolean required) {
immediateChildIds.add(id);
return id;
}

View file

@ -18,6 +18,7 @@ package net.fabricmc.fabric.impl.tag.convention.datagen.generators;
import java.util.concurrent.CompletableFuture;
import net.minecraft.class_10351;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BiomeTags;
@ -94,6 +95,9 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
getOrCreateTagBuilder(ConventionalBiomeTags.IS_BIRCH_FOREST)
.add(BiomeKeys.BIRCH_FOREST)
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST);
getOrCreateTagBuilder(ConventionalBiomeTags.IS_DARK_FOREST)
.add(BiomeKeys.DARK_FOREST)
.addOptional(class_10351.PALE_GARDEN);
getOrCreateTagBuilder(ConventionalBiomeTags.IS_OCEAN)
.addOptionalTag(BiomeTags.IS_OCEAN)
.addOptionalTag(ConventionalBiomeTags.IS_DEEP_OCEAN)
@ -175,6 +179,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
.add(BiomeKeys.SWAMP)
.add(BiomeKeys.STONY_SHORE)
.add(BiomeKeys.DARK_FOREST)
.addOptional(class_10351.PALE_GARDEN)
.add(BiomeKeys.WINDSWEPT_FOREST)
.add(BiomeKeys.BIRCH_FOREST)
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST)
@ -247,6 +252,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
getOrCreateTagBuilder(ConventionalBiomeTags.IS_VEGETATION_DENSE_OVERWORLD)
.add(BiomeKeys.DARK_FOREST)
.addOptional(class_10351.PALE_GARDEN)
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST)
.add(BiomeKeys.OLD_GROWTH_SPRUCE_TAIGA)
.add(BiomeKeys.JUNGLE)
@ -279,6 +285,7 @@ public final class BiomeTagGenerator extends FabricTagProvider<Biome> {
.add(BiomeKeys.FLOWER_FOREST)
.add(BiomeKeys.BIRCH_FOREST)
.add(BiomeKeys.DARK_FOREST)
.addOptional(class_10351.PALE_GARDEN)
.add(BiomeKeys.OLD_GROWTH_BIRCH_FOREST);
getOrCreateTagBuilder(ConventionalBiomeTags.IS_JUNGLE_TREE)
.addOptionalTag(ConventionalBiomeTags.IS_JUNGLE);

View file

@ -385,6 +385,7 @@ public class EnglishTagLangGenerator extends FabricLanguageProvider {
translationBuilder.add(ConventionalBiomeTags.IS_SNOWY_PLAINS, "Snowy Plains");
translationBuilder.add(ConventionalBiomeTags.IS_FOREST, "Forest");
translationBuilder.add(ConventionalBiomeTags.IS_BIRCH_FOREST, "Birch Forest");
translationBuilder.add(ConventionalBiomeTags.IS_DARK_FOREST, "Dark Forest");
translationBuilder.add(ConventionalBiomeTags.IS_FLOWER_FOREST, "Flower Forest");
translationBuilder.add(ConventionalBiomeTags.IS_TAIGA, "Taiga");
translationBuilder.add(ConventionalBiomeTags.IS_OLD_GROWTH, "Old Growth");

View file

@ -52,6 +52,7 @@ public final class EntityTypeTagGenerator extends FabricTagProvider.EntityTypeTa
.add(EntityType.JUNGLE_CHEST_BOAT)
.add(EntityType.ACACIA_CHEST_BOAT)
.add(EntityType.CHERRY_CHEST_BOAT)
.add(EntityType.PALE_OAK_CHEST_BOAT)
.add(EntityType.DARK_OAK_CHEST_BOAT)
.add(EntityType.MANGROVE_CHEST_BOAT)
.add(EntityType.BAMBOO_CHEST_RAFT);

View file

@ -772,97 +772,97 @@ public final class ItemTagGenerator extends FabricTagProvider.ItemTagProvider {
.add(Items.BLACK_BANNER).add(Items.BLACK_BED).add(Items.BLACK_CANDLE).add(Items.BLACK_CARPET)
.add(Items.BLACK_CONCRETE).add(Items.BLACK_CONCRETE_POWDER).add(Items.BLACK_GLAZED_TERRACOTTA)
.add(Items.BLACK_SHULKER_BOX).add(Items.BLACK_STAINED_GLASS).add(Items.BLACK_STAINED_GLASS_PANE)
.add(Items.BLACK_TERRACOTTA).add(Items.BLACK_WOOL);
.add(Items.BLACK_TERRACOTTA).add(Items.BLACK_WOOL).add(Items.BLACK_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.BLUE_DYED)
.add(Items.BLUE_BANNER).add(Items.BLUE_BED).add(Items.BLUE_CANDLE).add(Items.BLUE_CARPET)
.add(Items.BLUE_CONCRETE).add(Items.BLUE_CONCRETE_POWDER).add(Items.BLUE_GLAZED_TERRACOTTA)
.add(Items.BLUE_SHULKER_BOX).add(Items.BLUE_STAINED_GLASS).add(Items.BLUE_STAINED_GLASS_PANE)
.add(Items.BLUE_TERRACOTTA).add(Items.BLUE_WOOL);
.add(Items.BLUE_TERRACOTTA).add(Items.BLUE_WOOL).add(Items.BLUE_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.BROWN_DYED)
.add(Items.BROWN_BANNER).add(Items.BROWN_BED).add(Items.BROWN_CANDLE).add(Items.BROWN_CARPET)
.add(Items.BROWN_CONCRETE).add(Items.BROWN_CONCRETE_POWDER).add(Items.BROWN_GLAZED_TERRACOTTA)
.add(Items.BROWN_SHULKER_BOX).add(Items.BROWN_STAINED_GLASS).add(Items.BROWN_STAINED_GLASS_PANE)
.add(Items.BROWN_TERRACOTTA).add(Items.BROWN_WOOL);
.add(Items.BROWN_TERRACOTTA).add(Items.BROWN_WOOL).add(Items.BROWN_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.CYAN_DYED)
.add(Items.CYAN_BANNER).add(Items.CYAN_BED).add(Items.CYAN_CANDLE).add(Items.CYAN_CARPET)
.add(Items.CYAN_CONCRETE).add(Items.CYAN_CONCRETE_POWDER).add(Items.CYAN_GLAZED_TERRACOTTA)
.add(Items.CYAN_SHULKER_BOX).add(Items.CYAN_STAINED_GLASS).add(Items.CYAN_STAINED_GLASS_PANE)
.add(Items.CYAN_TERRACOTTA).add(Items.CYAN_WOOL);
.add(Items.CYAN_TERRACOTTA).add(Items.CYAN_WOOL).add(Items.CYAN_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.GRAY_DYED)
.add(Items.GRAY_BANNER).add(Items.GRAY_BED).add(Items.GRAY_CANDLE).add(Items.GRAY_CARPET)
.add(Items.GRAY_CONCRETE).add(Items.GRAY_CONCRETE_POWDER).add(Items.GRAY_GLAZED_TERRACOTTA)
.add(Items.GRAY_SHULKER_BOX).add(Items.GRAY_STAINED_GLASS).add(Items.GRAY_STAINED_GLASS_PANE)
.add(Items.GRAY_TERRACOTTA).add(Items.GRAY_WOOL);
.add(Items.GRAY_TERRACOTTA).add(Items.GRAY_WOOL).add(Items.GRAY_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.GREEN_DYED)
.add(Items.GREEN_BANNER).add(Items.GREEN_BED).add(Items.GREEN_CANDLE).add(Items.GREEN_CARPET)
.add(Items.GREEN_CONCRETE).add(Items.GREEN_CONCRETE_POWDER).add(Items.GREEN_GLAZED_TERRACOTTA)
.add(Items.GREEN_SHULKER_BOX).add(Items.GREEN_STAINED_GLASS).add(Items.GREEN_STAINED_GLASS_PANE)
.add(Items.GREEN_TERRACOTTA).add(Items.GREEN_WOOL);
.add(Items.GREEN_TERRACOTTA).add(Items.GREEN_WOOL).add(Items.GREEN_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.LIGHT_BLUE_DYED)
.add(Items.LIGHT_BLUE_BANNER).add(Items.LIGHT_BLUE_BED).add(Items.LIGHT_BLUE_CANDLE).add(Items.LIGHT_BLUE_CARPET)
.add(Items.LIGHT_BLUE_CONCRETE).add(Items.LIGHT_BLUE_CONCRETE_POWDER).add(Items.LIGHT_BLUE_GLAZED_TERRACOTTA)
.add(Items.LIGHT_BLUE_SHULKER_BOX).add(Items.LIGHT_BLUE_STAINED_GLASS).add(Items.LIGHT_BLUE_STAINED_GLASS_PANE)
.add(Items.LIGHT_BLUE_TERRACOTTA).add(Items.LIGHT_BLUE_WOOL);
.add(Items.LIGHT_BLUE_TERRACOTTA).add(Items.LIGHT_BLUE_WOOL).add(Items.LIGHT_BLUE_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.LIGHT_GRAY_DYED)
.add(Items.LIGHT_GRAY_BANNER).add(Items.LIGHT_GRAY_BED).add(Items.LIGHT_GRAY_CANDLE).add(Items.LIGHT_GRAY_CARPET)
.add(Items.LIGHT_GRAY_CONCRETE).add(Items.LIGHT_GRAY_CONCRETE_POWDER).add(Items.LIGHT_GRAY_GLAZED_TERRACOTTA)
.add(Items.LIGHT_GRAY_SHULKER_BOX).add(Items.LIGHT_GRAY_STAINED_GLASS).add(Items.LIGHT_GRAY_STAINED_GLASS_PANE)
.add(Items.LIGHT_GRAY_TERRACOTTA).add(Items.LIGHT_GRAY_WOOL);
.add(Items.LIGHT_GRAY_TERRACOTTA).add(Items.LIGHT_GRAY_WOOL).add(Items.LIGHT_GRAY_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.LIME_DYED)
.add(Items.LIME_BANNER).add(Items.LIME_BED).add(Items.LIME_CANDLE).add(Items.LIME_CARPET)
.add(Items.LIME_CONCRETE).add(Items.LIME_CONCRETE_POWDER).add(Items.LIME_GLAZED_TERRACOTTA)
.add(Items.LIME_SHULKER_BOX).add(Items.LIME_STAINED_GLASS).add(Items.LIME_STAINED_GLASS_PANE)
.add(Items.LIME_TERRACOTTA).add(Items.LIME_WOOL);
.add(Items.LIME_TERRACOTTA).add(Items.LIME_WOOL).add(Items.LIME_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.MAGENTA_DYED)
.add(Items.MAGENTA_BANNER).add(Items.MAGENTA_BED).add(Items.MAGENTA_CANDLE).add(Items.MAGENTA_CARPET)
.add(Items.MAGENTA_CONCRETE).add(Items.MAGENTA_CONCRETE_POWDER).add(Items.MAGENTA_GLAZED_TERRACOTTA)
.add(Items.MAGENTA_SHULKER_BOX).add(Items.MAGENTA_STAINED_GLASS).add(Items.MAGENTA_STAINED_GLASS_PANE)
.add(Items.MAGENTA_TERRACOTTA).add(Items.MAGENTA_WOOL);
.add(Items.MAGENTA_TERRACOTTA).add(Items.MAGENTA_WOOL).add(Items.MAGENTA_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.ORANGE_DYED)
.add(Items.ORANGE_BANNER).add(Items.ORANGE_BED).add(Items.ORANGE_CANDLE).add(Items.ORANGE_CARPET)
.add(Items.ORANGE_CONCRETE).add(Items.ORANGE_CONCRETE_POWDER).add(Items.ORANGE_GLAZED_TERRACOTTA)
.add(Items.ORANGE_SHULKER_BOX).add(Items.ORANGE_STAINED_GLASS).add(Items.ORANGE_STAINED_GLASS_PANE)
.add(Items.ORANGE_TERRACOTTA).add(Items.ORANGE_WOOL);
.add(Items.ORANGE_TERRACOTTA).add(Items.ORANGE_WOOL).add(Items.ORANGE_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.PINK_DYED)
.add(Items.PINK_BANNER).add(Items.PINK_BED).add(Items.PINK_CANDLE).add(Items.PINK_CARPET)
.add(Items.PINK_CONCRETE).add(Items.PINK_CONCRETE_POWDER).add(Items.PINK_GLAZED_TERRACOTTA)
.add(Items.PINK_SHULKER_BOX).add(Items.PINK_STAINED_GLASS).add(Items.PINK_STAINED_GLASS_PANE)
.add(Items.PINK_TERRACOTTA).add(Items.PINK_WOOL);
.add(Items.PINK_TERRACOTTA).add(Items.PINK_WOOL).add(Items.PINK_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.PURPLE_DYED)
.add(Items.PURPLE_BANNER).add(Items.PURPLE_BED).add(Items.PURPLE_CANDLE).add(Items.PURPLE_CARPET)
.add(Items.PURPLE_CONCRETE).add(Items.PURPLE_CONCRETE_POWDER).add(Items.PURPLE_GLAZED_TERRACOTTA)
.add(Items.PURPLE_SHULKER_BOX).add(Items.PURPLE_STAINED_GLASS).add(Items.PURPLE_STAINED_GLASS_PANE)
.add(Items.PURPLE_TERRACOTTA).add(Items.PURPLE_WOOL);
.add(Items.PURPLE_TERRACOTTA).add(Items.PURPLE_WOOL).add(Items.PURPLE_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.RED_DYED)
.add(Items.RED_BANNER).add(Items.RED_BED).add(Items.RED_CANDLE).add(Items.RED_CARPET)
.add(Items.RED_CONCRETE).add(Items.RED_CONCRETE_POWDER).add(Items.RED_GLAZED_TERRACOTTA)
.add(Items.RED_SHULKER_BOX).add(Items.RED_STAINED_GLASS).add(Items.RED_STAINED_GLASS_PANE)
.add(Items.RED_TERRACOTTA).add(Items.RED_WOOL);
.add(Items.RED_TERRACOTTA).add(Items.RED_WOOL).add(Items.RED_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.WHITE_DYED)
.add(Items.WHITE_BANNER).add(Items.WHITE_BED).add(Items.WHITE_CANDLE).add(Items.WHITE_CARPET)
.add(Items.WHITE_CONCRETE).add(Items.WHITE_CONCRETE_POWDER).add(Items.WHITE_GLAZED_TERRACOTTA)
.add(Items.WHITE_SHULKER_BOX).add(Items.WHITE_STAINED_GLASS).add(Items.WHITE_STAINED_GLASS_PANE)
.add(Items.WHITE_TERRACOTTA).add(Items.WHITE_WOOL);
.add(Items.WHITE_TERRACOTTA).add(Items.WHITE_WOOL).add(Items.WHITE_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.YELLOW_DYED)
.add(Items.YELLOW_BANNER).add(Items.YELLOW_BED).add(Items.YELLOW_CANDLE).add(Items.YELLOW_CARPET)
.add(Items.YELLOW_CONCRETE).add(Items.YELLOW_CONCRETE_POWDER).add(Items.YELLOW_GLAZED_TERRACOTTA)
.add(Items.YELLOW_SHULKER_BOX).add(Items.YELLOW_STAINED_GLASS).add(Items.YELLOW_STAINED_GLASS_PANE)
.add(Items.YELLOW_TERRACOTTA).add(Items.YELLOW_WOOL);
.add(Items.YELLOW_TERRACOTTA).add(Items.YELLOW_WOOL).add(Items.YELLOW_BUNDLE);
getOrCreateTagBuilder(ConventionalItemTags.DYED)
.addTag(ConventionalItemTags.WHITE_DYED)

View file

@ -309,6 +309,7 @@
"tag.worldgen.biome.c.is_cold": "Cold",
"tag.worldgen.biome.c.is_cold.end": "Cold End",
"tag.worldgen.biome.c.is_cold.overworld": "Cold Overworld",
"tag.worldgen.biome.c.is_dark_forest": "Dark Forest",
"tag.worldgen.biome.c.is_dead": "Dead",
"tag.worldgen.biome.c.is_deep_ocean": "Deep Ocean",
"tag.worldgen.biome.c.is_dense_vegetation": "Dense Vegetation",

View file

@ -10,6 +10,7 @@
"minecraft:jungle_chest_boat",
"minecraft:acacia_chest_boat",
"minecraft:cherry_chest_boat",
"minecraft:pale_oak_chest_boat",
"minecraft:dark_oak_chest_boat",
"minecraft:mangrove_chest_boat",
"minecraft:bamboo_chest_raft"

View file

@ -11,6 +11,7 @@
"minecraft:black_stained_glass",
"minecraft:black_stained_glass_pane",
"minecraft:black_terracotta",
"minecraft:black_wool"
"minecraft:black_wool",
"minecraft:black_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:blue_stained_glass",
"minecraft:blue_stained_glass_pane",
"minecraft:blue_terracotta",
"minecraft:blue_wool"
"minecraft:blue_wool",
"minecraft:blue_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:brown_stained_glass",
"minecraft:brown_stained_glass_pane",
"minecraft:brown_terracotta",
"minecraft:brown_wool"
"minecraft:brown_wool",
"minecraft:brown_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:cyan_stained_glass",
"minecraft:cyan_stained_glass_pane",
"minecraft:cyan_terracotta",
"minecraft:cyan_wool"
"minecraft:cyan_wool",
"minecraft:cyan_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:gray_stained_glass",
"minecraft:gray_stained_glass_pane",
"minecraft:gray_terracotta",
"minecraft:gray_wool"
"minecraft:gray_wool",
"minecraft:gray_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:green_stained_glass",
"minecraft:green_stained_glass_pane",
"minecraft:green_terracotta",
"minecraft:green_wool"
"minecraft:green_wool",
"minecraft:green_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:light_blue_stained_glass",
"minecraft:light_blue_stained_glass_pane",
"minecraft:light_blue_terracotta",
"minecraft:light_blue_wool"
"minecraft:light_blue_wool",
"minecraft:light_blue_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:light_gray_stained_glass",
"minecraft:light_gray_stained_glass_pane",
"minecraft:light_gray_terracotta",
"minecraft:light_gray_wool"
"minecraft:light_gray_wool",
"minecraft:light_gray_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:lime_stained_glass",
"minecraft:lime_stained_glass_pane",
"minecraft:lime_terracotta",
"minecraft:lime_wool"
"minecraft:lime_wool",
"minecraft:lime_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:magenta_stained_glass",
"minecraft:magenta_stained_glass_pane",
"minecraft:magenta_terracotta",
"minecraft:magenta_wool"
"minecraft:magenta_wool",
"minecraft:magenta_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:orange_stained_glass",
"minecraft:orange_stained_glass_pane",
"minecraft:orange_terracotta",
"minecraft:orange_wool"
"minecraft:orange_wool",
"minecraft:orange_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:pink_stained_glass",
"minecraft:pink_stained_glass_pane",
"minecraft:pink_terracotta",
"minecraft:pink_wool"
"minecraft:pink_wool",
"minecraft:pink_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:purple_stained_glass",
"minecraft:purple_stained_glass_pane",
"minecraft:purple_terracotta",
"minecraft:purple_wool"
"minecraft:purple_wool",
"minecraft:purple_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:red_stained_glass",
"minecraft:red_stained_glass_pane",
"minecraft:red_terracotta",
"minecraft:red_wool"
"minecraft:red_wool",
"minecraft:red_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:white_stained_glass",
"minecraft:white_stained_glass_pane",
"minecraft:white_terracotta",
"minecraft:white_wool"
"minecraft:white_wool",
"minecraft:white_bundle"
]
}

View file

@ -11,6 +11,7 @@
"minecraft:yellow_stained_glass",
"minecraft:yellow_stained_glass_pane",
"minecraft:yellow_terracotta",
"minecraft:yellow_wool"
"minecraft:yellow_wool",
"minecraft:yellow_bundle"
]
}

View file

@ -0,0 +1,9 @@
{
"values": [
"minecraft:dark_forest",
{
"id": "minecraft:pale_garden",
"required": false
}
]
}

View file

@ -1,6 +1,10 @@
{
"values": [
"minecraft:dark_forest",
{
"id": "minecraft:pale_garden",
"required": false
},
"minecraft:old_growth_birch_forest",
"minecraft:old_growth_spruce_taiga",
"minecraft:jungle",

View file

@ -5,6 +5,10 @@
"minecraft:swamp",
"minecraft:stony_shore",
"minecraft:dark_forest",
{
"id": "minecraft:pale_garden",
"required": false
},
"minecraft:windswept_forest",
"minecraft:birch_forest",
"minecraft:old_growth_birch_forest",

View file

@ -5,6 +5,10 @@
"minecraft:flower_forest",
"minecraft:birch_forest",
"minecraft:dark_forest",
{
"id": "minecraft:pale_garden",
"required": false
},
"minecraft:old_growth_birch_forest",
{
"id": "#c:tree_deciduous",

View file

@ -104,6 +104,7 @@ public final class ConventionalBiomeTags {
*/
public static final TagKey<Biome> IS_FOREST = register("is_forest");
public static final TagKey<Biome> IS_BIRCH_FOREST = register("is_birch_forest");
public static final TagKey<Biome> IS_DARK_FOREST = register("is_dark_forest");
public static final TagKey<Biome> IS_FLOWER_FOREST = register("is_flower_forest");
public static final TagKey<Biome> IS_TAIGA = register("is_taiga");
public static final TagKey<Biome> IS_OLD_GROWTH = register("is_old_growth");

View file

@ -39,6 +39,7 @@ import net.minecraft.data.server.recipe.RecipeGenerator;
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
import net.minecraft.recipe.Recipe;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryOps;
import net.minecraft.registry.RegistryWrapper;
@ -77,9 +78,9 @@ public abstract class FabricRecipeProvider extends RecipeGenerator.RecipeProvide
Preconditions.checkArgument(conditions.length > 0, "Must add at least one condition.");
return new RecipeExporter() {
@Override
public void accept(Identifier identifier, Recipe<?> recipe, @Nullable AdvancementEntry advancementEntry) {
public void accept(RegistryKey<Recipe<?>> key, Recipe<?> recipe, @Nullable AdvancementEntry advancementEntry) {
FabricDataGenHelper.addConditions(recipe, conditions);
exporter.accept(identifier, recipe, advancementEntry);
exporter.accept(key, recipe, advancementEntry);
}
@Override
@ -100,8 +101,8 @@ public abstract class FabricRecipeProvider extends RecipeGenerator.RecipeProvide
List<CompletableFuture<?>> list = new ArrayList<>();
RecipeGenerator recipeGenerator = getRecipeGenerator(wrapperLookup, new RecipeExporter() {
@Override
public void accept(Identifier recipeId, Recipe<?> recipe, @Nullable AdvancementEntry advancement) {
Identifier identifier = getRecipeIdentifier(recipeId);
public void accept(RegistryKey<Recipe<?>> recipeKey, Recipe<?> recipe, @Nullable AdvancementEntry advancement) {
Identifier identifier = getRecipeIdentifier(recipeKey.getValue());
if (!generatedRecipes.add(identifier)) {
throw new IllegalStateException("Duplicate recipe " + identifier);

View file

@ -64,7 +64,7 @@ transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator of
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerBlasting (Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerMultipleOptions (Lnet/minecraft/recipe/RecipeSerializer;Lnet/minecraft/recipe/AbstractCookingRecipe$RecipeFactory;Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerNetheriteUpgradeRecipe (Lnet/minecraft/item/Item;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/Item;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerSmithingTrimRecipe (Lnet/minecraft/item/Item;Lnet/minecraft/util/Identifier;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerSmithingTrimRecipe (Lnet/minecraft/item/Item;Lnet/minecraft/registry/RegistryKey;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offer2x2CompactingRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerCompactingRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeGenerator offerCompactingRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
@ -178,6 +178,7 @@ transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerNorthDefaultHorizontalRotated (Lnet/minecraft/block/Block;Lnet/minecraft/data/client/TexturedModel$Factory;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createAxisRotatedBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/data/client/BlockStateSupplier;
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerAxisRotated (Lnet/minecraft/block/Block;Lnet/minecraft/data/client/TexturedModel$Factory;Lnet/minecraft/data/client/TexturedModel$Factory;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_64949 (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createSubModel (Lnet/minecraft/block/Block;Ljava/lang/String;Lnet/minecraft/data/client/Model;Ljava/util/function/Function;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createPressurePlateBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/data/client/BlockStateSupplier;
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator createSlabBlockState (Lnet/minecraft/block/Block;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)Lnet/minecraft/data/client/BlockStateSupplier;
@ -249,6 +250,8 @@ transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator getTurtleEggModel (ILjava/lang/String;Lnet/minecraft/data/client/TextureMap;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator getTurtleEggModel (Ljava/lang/Integer;Ljava/lang/Integer;)Lnet/minecraft/util/Identifier;
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerWallPlant (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_64940 (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator method_64941 (Lnet/minecraft/block/Block;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator supplyChiseledBookshelfModels (Lnet/minecraft/data/client/MultipartBlockStateSupplier;Lnet/minecraft/data/client/When$PropertyCondition;Lnet/minecraft/data/client/VariantSettings$Rotation;)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator supplyChiseledBookshelfModel (Lnet/minecraft/data/client/MultipartBlockStateSupplier;Lnet/minecraft/data/client/When$PropertyCondition;Lnet/minecraft/data/client/VariantSettings$Rotation;Lnet/minecraft/state/property/BooleanProperty;Lnet/minecraft/data/client/Model;Z)V
transitive-accessible method net/minecraft/data/client/BlockStateModelGenerator registerShulkerBox (Lnet/minecraft/block/Block;)V
@ -289,6 +292,7 @@ transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableG
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator shortPlantDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator dropsWithShears (Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator multifaceGrowthDrops (Lnet/minecraft/block/Block;Lnet/minecraft/loot/condition/LootCondition$Builder;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator method_64930 (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator leavesDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;[F)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator oakLeavesDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;[F)Lnet/minecraft/loot/LootTable$Builder;
transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator mangroveLeavesDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder;

View file

@ -98,6 +98,6 @@ public class VoidChunkGenerator extends ChunkGenerator {
}
@Override
public void getDebugHudText(List<String> list, NoiseConfig noiseConfig, BlockPos blockPos) {
public void appendDebugHudText(List<String> list, NoiseConfig noiseConfig, BlockPos blockPos) {
}
}

View file

@ -92,7 +92,7 @@ public interface FabricItem {
* @return the leftover item stack
*/
default ItemStack getRecipeRemainder(ItemStack stack) {
return ((Item) this).hasRecipeRemainder() ? ((Item) this).getRecipeRemainder().getDefaultStack() : ItemStack.EMPTY;
return ((Item) this).getRecipeRemainder();
}
/**

View file

@ -28,8 +28,9 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.recipe.input.SingleStackRecipeInput;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@Mixin(AbstractFurnaceBlockEntity.class)
public abstract class AbstractFurnaceBlockEntityMixin {
@ -37,7 +38,7 @@ public abstract class AbstractFurnaceBlockEntityMixin {
private static final ThreadLocal<ItemStack> REMAINDER_STACK = new ThreadLocal<>();
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;"), locals = LocalCapture.CAPTURE_FAILHARD, allow = 1)
private static void getStackRemainder(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity, CallbackInfo ci, boolean bl, boolean bl2, ItemStack itemStack, ItemStack itemStack2, boolean bl3, boolean bl4, RecipeEntry recipeEntry, int i) {
private static void getStackRemainder(ServerWorld world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity, CallbackInfo ci, boolean bl, boolean bl2, ItemStack itemStack, ItemStack itemStack2, boolean bl3, boolean bl4, RecipeEntry recipeEntry, SingleStackRecipeInput input, int i) {
REMAINDER_STACK.set(itemStack.getRecipeRemainder());
}

View file

@ -30,13 +30,14 @@ import net.minecraft.screen.AnvilScreenHandler;
import net.minecraft.screen.ForgingScreenHandler;
import net.minecraft.screen.ScreenHandlerContext;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.screen.slot.ForgingSlotsManager;
import net.fabricmc.fabric.api.item.v1.EnchantingContext;
@Mixin(AnvilScreenHandler.class)
abstract class AnvilScreenHandlerMixin extends ForgingScreenHandler {
AnvilScreenHandlerMixin(@Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) {
super(type, syncId, playerInventory, context);
AnvilScreenHandlerMixin(@Nullable ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context, ForgingSlotsManager forgingSlotsManager) {
super(type, syncId, playerInventory, context, forgingSlotsManager);
}
@Redirect(

View file

@ -16,8 +16,6 @@
package net.fabricmc.fabric.mixin.item;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
@ -28,7 +26,6 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import net.minecraft.block.entity.BrewingStandBlockEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemStack;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos;
@ -44,16 +41,11 @@ public class BrewingStandBlockEntityMixin {
REMAINDER_STACK.set(itemStack.getRecipeRemainder());
}
@Redirect(method = "craft", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;hasRecipeRemainder()Z"))
private static boolean hasStackRecipeRemainder(Item instance) {
return !REMAINDER_STACK.get().isEmpty();
}
/**
* Injected after the {@link Item#getRecipeRemainder} to replace the old remainder with are new one.
* Wrap the {@link Item#getRecipeRemainder} call to replace the old remainder with the new one.
*/
@WrapOperation(method = "craft", at = @At(value = "NEW", target = "(Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/item/ItemStack;"))
private static ItemStack createStackRecipeRemainder(ItemConvertible item, Operation<ItemStack> original) {
@Redirect(method = "craft", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/ItemStack;"))
private static ItemStack createStackRecipeRemainder(Item item) {
ItemStack remainder = REMAINDER_STACK.get();
REMAINDER_STACK.remove();
return remainder;

View file

@ -0,0 +1,45 @@
/*
* 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.
*/
package net.fabricmc.fabric.mixin.item;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.CraftingRecipe;
import net.fabricmc.fabric.impl.item.RecipeRemainderHandler;
@Mixin(CraftingRecipe.class)
public interface CraftingRecipeMixin {
@WrapOperation(method = "method_64671", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItem()Lnet/minecraft/item/Item;"))
private static Item captureStack(ItemStack stack, Operation<Item> operation) {
RecipeRemainderHandler.REMAINDER_STACK.set(stack.getRecipeRemainder());
return operation.call(stack);
}
@Redirect(method = "method_64671", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/ItemStack;"))
private static ItemStack getStackRemainder(Item item) {
ItemStack remainder = RecipeRemainderHandler.REMAINDER_STACK.get();
RecipeRemainderHandler.REMAINDER_STACK.remove();
return remainder;
}
}

View file

@ -1,58 +0,0 @@
/*
* 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.
*/
package net.fabricmc.fabric.mixin.item;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.input.RecipeInput;
import net.minecraft.util.collection.DefaultedList;
import net.fabricmc.fabric.impl.item.RecipeRemainderHandler;
@Mixin(Recipe.class)
public interface RecipeMixin<T extends RecipeInput> {
@Inject(method = "getRemainder", at = @At(value = "INVOKE", target = "Lnet/minecraft/recipe/input/RecipeInput;getStackInSlot(I)Lnet/minecraft/item/ItemStack;"), locals = LocalCapture.CAPTURE_FAILHARD)
default void captureStack(T inventory, CallbackInfoReturnable<DefaultedList<ItemStack>> cir, DefaultedList<ItemStack> defaultedList, int i) {
RecipeRemainderHandler.REMAINDER_STACK.set(inventory.getStackInSlot(i).getRecipeRemainder());
}
@Redirect(method = "getRemainder", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;hasRecipeRemainder()Z"))
private boolean hasStackRemainder(Item instance) {
return !RecipeRemainderHandler.REMAINDER_STACK.get().isEmpty();
}
@Redirect(method = "getRemainder", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getRecipeRemainder()Lnet/minecraft/item/Item;"))
private Item replaceGetRecipeRemainder(Item instance) {
return Items.AIR;
}
@Redirect(method = "getRemainder", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/collection/DefaultedList;set(ILjava/lang/Object;)Ljava/lang/Object;"))
private Object getStackRemainder(DefaultedList<ItemStack> inventory, int index, Object element) {
Object remainder = inventory.set(index, RecipeRemainderHandler.REMAINDER_STACK.get());
RecipeRemainderHandler.REMAINDER_STACK.remove();
return remainder;
}
}

View file

@ -7,6 +7,7 @@
"AnvilScreenHandlerMixin",
"BrewingStandBlockEntityMixin",
"ComponentMapBuilderMixin",
"CraftingRecipeMixin",
"EnchantmentBuilderAccessor",
"EnchantCommandMixin",
"EnchantmentHelperMixin",
@ -16,7 +17,6 @@
"ItemSettingsMixin",
"ItemStackMixin",
"LivingEntityMixin",
"RecipeMixin",
"RegistriesMixin",
"RegistryLoaderMixin"
],

View file

@ -20,17 +20,12 @@ import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.IngredientPlacement;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.RecipeType;
import net.minecraft.recipe.CraftingRecipe;
import net.minecraft.recipe.input.CraftingRecipeInput;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.test.GameTest;
import net.minecraft.test.GameTestException;
import net.minecraft.test.TestContext;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.world.World;
import net.fabricmc.fabric.api.gametest.v1.FabricGameTest;
import net.fabricmc.fabric.test.item.CustomDamageTest;
@ -38,13 +33,11 @@ import net.fabricmc.fabric.test.item.CustomDamageTest;
public class RecipeGameTest implements FabricGameTest {
@GameTest(templateName = EMPTY_STRUCTURE)
public void vanillaRemainderTest(TestContext context) {
Recipe<CraftingRecipeInput> testRecipe = createTestingRecipeInstance();
CraftingRecipeInput inventory = CraftingRecipeInput.create(1, 2, List.of(
new ItemStack(Items.WATER_BUCKET),
new ItemStack(Items.DIAMOND)));
DefaultedList<ItemStack> remainderList = testRecipe.getRemainder(inventory);
DefaultedList<ItemStack> remainderList = CraftingRecipe.method_64671(inventory);
assertStackList(remainderList, "Testing vanilla recipe remainder.",
new ItemStack(Items.BUCKET),
@ -55,15 +48,13 @@ public class RecipeGameTest implements FabricGameTest {
@GameTest(templateName = EMPTY_STRUCTURE)
public void fabricRemainderTest(TestContext context) {
Recipe<CraftingRecipeInput> testRecipe = createTestingRecipeInstance();
CraftingRecipeInput inventory = CraftingRecipeInput.create(1, 4, List.of(
new ItemStack(CustomDamageTest.WEIRD_PICK),
withDamage(new ItemStack(CustomDamageTest.WEIRD_PICK), 10),
withDamage(new ItemStack(CustomDamageTest.WEIRD_PICK), 31),
new ItemStack(Items.DIAMOND)));
DefaultedList<ItemStack> remainderList = testRecipe.getRemainder(inventory);
DefaultedList<ItemStack> remainderList = CraftingRecipe.method_64671(inventory);
assertStackList(remainderList, "Testing fabric recipe remainder.",
withDamage(new ItemStack(CustomDamageTest.WEIRD_PICK), 1),
@ -74,45 +65,6 @@ public class RecipeGameTest implements FabricGameTest {
context.complete();
}
private Recipe<CraftingRecipeInput> createTestingRecipeInstance() {
return new Recipe<>() {
@Override
public boolean matches(CraftingRecipeInput recipeInput, World world) {
return true;
}
@Override
public ItemStack craft(CraftingRecipeInput recipeInput, RegistryWrapper.WrapperLookup wrapperLookup) {
return null;
}
@Override
public boolean fits(int width, int height) {
return true;
}
@Override
public ItemStack getResult(RegistryWrapper.WrapperLookup wrapperLookup) {
return null;
}
@Override
public RecipeSerializer<?> getSerializer() {
return null;
}
@Override
public RecipeType<?> getType() {
return null;
}
@Override
public IngredientPlacement getIngredientPlacement() {
return IngredientPlacement.NONE;
}
};
}
private void assertStackList(DefaultedList<ItemStack> stackList, String extraErrorInfo, ItemStack... stacks) {
for (int i = 0; i < stackList.size(); i++) {
ItemStack currentStack = stackList.get(i);

View file

@ -32,7 +32,7 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
public class PlayerManagerMixin {
@Inject(
method = "onPlayerConnect",
at = @At(value = "INVOKE", target = "net/minecraft/network/packet/s2c/play/SynchronizeRecipesS2CPacket.<init>(Ljava/util/Collection;)V")
at = @At(value = "NEW", target = "net/minecraft/network/packet/s2c/play/SynchronizeRecipesS2CPacket")
)
private void hookOnPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData arg, CallbackInfo ci) {
ServerLifecycleEvents.SYNC_DATA_PACK_CONTENTS.invoker().onSyncDataPackContents(player, true);

View file

@ -103,7 +103,7 @@ public class LootTest implements ModInitializer {
});
LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> {
if (EntityType.SALMON.getLootTable().orElse(null) == key) {
if (EntityType.SALMON.getLootTableKey().orElse(null) == key) {
Optional<RegistryEntry<Enchantment>> lure = registries.getOptional(RegistryKeys.ENCHANTMENT).flatMap(registry -> registry.getOptional(Enchantments.LURE));
lure.ifPresent((lureEnchantment) -> tableBuilder.pool(LootPool.builder().with(

View file

@ -22,8 +22,11 @@ import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.ShapelessRecipe;
import net.minecraft.recipe.input.CraftingRecipeInput;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.test.GameTest;
import net.minecraft.test.GameTestException;
import net.minecraft.test.TestContext;
@ -37,8 +40,8 @@ public class ShapelessRecipeMatchTests {
*/
@GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE)
public void testShapelessMatch(TestContext context) {
Identifier recipeId = Identifier.of("fabric-recipe-api-v1-testmod", "test_shapeless_match");
ShapelessRecipe recipe = (ShapelessRecipe) context.getWorld().getRecipeManager().get(recipeId).get().value();
RegistryKey<Recipe<?>> recipeKey = RegistryKey.of(RegistryKeys.RECIPE, Identifier.of("fabric-recipe-api-v1-testmod", "test_shapeless_match"));
ShapelessRecipe recipe = (ShapelessRecipe) context.getWorld().getRecipeManager().get(recipeKey).get().value();
ItemStack undamagedPickaxe = new ItemStack(Items.DIAMOND_PICKAXE);
ItemStack damagedPickaxe = new ItemStack(Items.DIAMOND_PICKAXE);

View file

@ -207,5 +207,13 @@ public class FabricRegistryInit implements ModInitializer {
// Synced via PacketCodecs.registry
RegistryAttributeHolder.get(Registries.CONSUME_EFFECT_TYPE)
.addAttribute(RegistryAttribute.SYNCED);
// Synced via PacketCodecs.registryValue
RegistryAttributeHolder.get(Registries.RECIPE_DISPLAY)
.addAttribute(RegistryAttribute.SYNCED);
// Synced via PacketCodecs.registryValue
RegistryAttributeHolder.get(Registries.SLOT_DISPLAY)
.addAttribute(RegistryAttribute.SYNCED);
}
}

View file

@ -116,7 +116,7 @@ public abstract class WorldRendererMixin {
@SuppressWarnings("ConstantConditions")
@Inject(method = "drawBlockOutline", at = @At("HEAD"), cancellable = true)
private void onDrawBlockOutline(MatrixStack matrixStack, VertexConsumer vertexConsumer, Entity entity, double cameraX, double cameraY, double cameraZ, BlockPos blockPos, BlockState blockState, CallbackInfo ci) {
private void onDrawBlockOutline(MatrixStack matrixStack, VertexConsumer vertexConsumer, Entity entity, double cameraX, double cameraY, double cameraZ, BlockPos blockPos, BlockState blockState, int color, CallbackInfo ci) {
if (!context.renderBlockOutline) {
// Was cancelled before we got here, so do not
// fire the BLOCK_OUTLINE event per contract of the API.

View file

@ -41,35 +41,35 @@ public class ConditionalResourcesTest {
public void conditionalRecipes(TestContext context) {
RecipeManager manager = context.getWorld().getRecipeManager();
if (manager.get(id("not_loaded")).isPresent()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("not_loaded"))).isPresent()) {
throw new AssertionError("not_loaded recipe should not have been loaded.");
}
if (manager.get(id("loaded")).isEmpty()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("loaded"))).isEmpty()) {
throw new AssertionError("loaded recipe should have been loaded.");
}
if (manager.get(id("item_tags_populated")).isEmpty()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("item_tags_populated"))).isEmpty()) {
throw new AssertionError("item_tags_populated recipe should have been loaded.");
}
if (manager.get(id("tags_populated")).isEmpty()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("tags_populated"))).isEmpty()) {
throw new AssertionError("tags_populated recipe should have been loaded.");
}
if (manager.get(id("tags_populated_default")).isEmpty()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("tags_populated_default"))).isEmpty()) {
throw new AssertionError("tags_populated_default recipe should have been loaded.");
}
if (manager.get(id("tags_not_populated")).isPresent()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("tags_not_populated"))).isPresent()) {
throw new AssertionError("tags_not_populated recipe should not have been loaded.");
}
if (manager.get(id("features_enabled")).isEmpty()) {
if (manager.get(RegistryKey.of(RegistryKeys.RECIPE, id("features_enabled"))).isEmpty()) {
throw new AssertionError("features_enabled recipe should have been loaded.");
}
long loadedRecipes = manager.values().stream().filter(r -> r.id().getNamespace().equals(MOD_ID)).count();
long loadedRecipes = manager.values().stream().filter(r -> r.id().getValue().getNamespace().equals(MOD_ID)).count();
if (loadedRecipes != 5) throw new AssertionError("Unexpected loaded recipe count: " + loadedRecipes);
context.complete();

View file

@ -28,9 +28,9 @@ import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.entity.LockableContainerBlockEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.fabricmc.fabric.impl.transfer.item.SpecialLogicInventory;
@ -75,15 +75,15 @@ public abstract class AbstractFurnaceBlockEntityMixin extends LockableContainerB
// Update cook time if needed. Code taken from AbstractFurnaceBlockEntity#setStack.
boolean bl = !stack.isEmpty() && ItemStack.areItemsAndComponentsEqual(stack, itemStack);
if (!bl) {
this.cookTimeTotal = getCookTime(this.world, (AbstractFurnaceBlockEntity) (Object) this);
if (!bl && this.world instanceof ServerWorld world) {
this.cookTimeTotal = getCookTime(world, (AbstractFurnaceBlockEntity) (Object) this);
this.cookTime = 0;
}
}
}
@Shadow
private static int getCookTime(World world, AbstractFurnaceBlockEntity abstractFurnaceBlockEntity) {
private static int getCookTime(ServerWorld world, AbstractFurnaceBlockEntity abstractFurnaceBlockEntity) {
throw new AssertionError();
}
}

View file

@ -2,9 +2,9 @@ org.gradle.jvmargs=-Xmx2560M
org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true
version=0.105.1
minecraft_version=24w39a
yarn_version=+build.4
version=0.105.2
minecraft_version=24w40a
yarn_version=+build.3
loader_version=0.16.4
installer_version=1.0.1
@ -13,7 +13,7 @@ curseforge_minecraft_version=1.21.2-Snapshot
# Do not manually update, use the bumpversions task:
fabric-api-base-version=0.4.46
fabric-api-lookup-api-v1-version=1.6.75
fabric-api-lookup-api-v1-version=1.6.76
fabric-biome-api-v1-version=14.0.3
fabric-block-api-v1-version=1.0.26
fabric-block-view-api-v2-version=1.0.14
@ -21,42 +21,42 @@ fabric-blockrenderlayer-v1-version=2.0.0
fabric-command-api-v1-version=1.2.54
fabric-command-api-v2-version=2.2.33
fabric-commands-v0-version=0.2.71
fabric-content-registries-v0-version=9.1.1
fabric-content-registries-v0-version=9.1.2
fabric-crash-report-info-v1-version=0.3.1
fabric-data-attachment-api-v1-version=1.1.35
fabric-data-generation-api-v1-version=21.0.9
fabric-dimensions-v1-version=4.0.4
fabric-data-generation-api-v1-version=21.0.10
fabric-dimensions-v1-version=4.0.5
fabric-entity-events-v1-version=2.0.3
fabric-events-interaction-v0-version=2.0.6
fabric-game-rule-api-v1-version=1.0.57
fabric-gametest-api-v1-version=2.0.10
fabric-item-api-v1-version=11.1.1
fabric-item-api-v1-version=11.1.2
fabric-item-group-api-v1-version=4.1.11
fabric-key-binding-api-v1-version=1.0.51
fabric-keybindings-v0-version=0.2.49
fabric-lifecycle-events-v1-version=2.3.19
fabric-loot-api-v2-version=3.0.20
fabric-loot-api-v3-version=1.0.8
fabric-lifecycle-events-v1-version=2.3.20
fabric-loot-api-v2-version=3.0.21
fabric-loot-api-v3-version=1.0.9
fabric-message-api-v1-version=6.0.17
fabric-model-loading-api-v1-version=3.0.5
fabric-networking-api-v1-version=4.3.0
fabric-object-builder-api-v1-version=17.0.4
fabric-particles-v1-version=4.0.6
fabric-recipe-api-v1-version=6.0.5
fabric-registry-sync-v0-version=5.1.9
fabric-recipe-api-v1-version=6.0.6
fabric-registry-sync-v0-version=5.1.10
fabric-renderer-api-v1-version=4.0.0
fabric-renderer-indigo-version=1.9.0
fabric-rendering-data-attachment-v1-version=0.3.52
fabric-rendering-fluids-v1-version=3.1.11
fabric-rendering-v0-version=1.1.77
fabric-rendering-v1-version=8.0.1
fabric-resource-conditions-api-v1-version=5.0.4
fabric-rendering-v0-version=1.1.78
fabric-rendering-v1-version=8.0.2
fabric-resource-conditions-api-v1-version=5.0.5
fabric-resource-loader-v0-version=3.0.2
fabric-screen-api-v1-version=2.0.29
fabric-screen-handler-api-v1-version=1.3.93
fabric-screen-handler-api-v1-version=1.3.94
fabric-sound-api-v1-version=1.0.27
fabric-transfer-api-v1-version=5.3.1
fabric-transfer-api-v1-version=5.3.2
fabric-transitive-access-wideners-v1-version=6.1.5
fabric-convention-tags-v1-version=2.0.30
fabric-convention-tags-v2-version=2.8.1
fabric-client-tags-api-v1-version=1.1.19
fabric-convention-tags-v1-version=2.0.31
fabric-convention-tags-v2-version=2.8.2
fabric-client-tags-api-v1-version=1.1.20