1.20.2-pre1

This commit is contained in:
modmuss50 2023-09-05 16:31:02 +01:00
parent 462ea84f7d
commit 435112151c
23 changed files with 134 additions and 129 deletions

View file

@ -28,7 +28,7 @@ import com.google.common.collect.Sets;
import com.google.gson.JsonObject;
import net.minecraft.advancement.Advancement;
import net.minecraft.class_8779;
import net.minecraft.advancement.AdvancementEntry;
import net.minecraft.data.DataOutput;
import net.minecraft.data.DataProvider;
import net.minecraft.data.DataWriter;
@ -58,12 +58,12 @@ public abstract class FabricAdvancementProvider implements DataProvider {
*
* <p>Use {@link Advancement.Builder#build(Consumer, String)} to help build advancements.
*/
public abstract void generateAdvancement(Consumer<class_8779> consumer);
public abstract void generateAdvancement(Consumer<AdvancementEntry> consumer);
/**
* Return a new exporter that applies the specified conditions to any advancement it receives.
*/
protected Consumer<class_8779> withConditions(Consumer<class_8779> exporter, ConditionJsonProvider... conditions) {
protected Consumer<AdvancementEntry> withConditions(Consumer<AdvancementEntry> exporter, ConditionJsonProvider... conditions) {
Preconditions.checkArgument(conditions.length > 0, "Must add at least one condition.");
return advancement -> {
FabricDataGenHelper.addConditions(advancement, conditions);
@ -74,18 +74,18 @@ public abstract class FabricAdvancementProvider implements DataProvider {
@Override
public CompletableFuture<?> run(DataWriter writer) {
final Set<Identifier> identifiers = Sets.newHashSet();
final Set<class_8779> advancements = Sets.newHashSet();
final Set<AdvancementEntry> advancements = Sets.newHashSet();
generateAdvancement(advancements::add);
final List<CompletableFuture<?>> futures = new ArrayList<>();
for (class_8779 advancement : advancements) {
if (!identifiers.add(advancement.comp_1919())) {
throw new IllegalStateException("Duplicate advancement " + advancement.comp_1919());
for (AdvancementEntry advancement : advancements) {
if (!identifiers.add(advancement.id())) {
throw new IllegalStateException("Duplicate advancement " + advancement.id());
}
JsonObject advancementJson = advancement.comp_1920().method_53621();
JsonObject advancementJson = advancement.value().toJson();
ConditionJsonProvider.write(advancementJson, FabricDataGenHelper.consumeConditions(advancement));
futures.add(DataProvider.writeToPath(writer, advancementJson, getOutputPath(advancement)));
@ -94,8 +94,8 @@ public abstract class FabricAdvancementProvider implements DataProvider {
return CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new));
}
private Path getOutputPath(class_8779 advancement) {
return pathResolver.resolveJson(advancement.comp_1919());
private Path getOutputPath(AdvancementEntry advancement) {
return pathResolver.resolveJson(advancement.id());
}
@Override

View file

@ -26,11 +26,11 @@ import com.google.common.collect.Sets;
import com.google.gson.JsonObject;
import net.minecraft.advancement.Advancement;
import net.minecraft.class_8779;
import net.minecraft.class_8790;
import net.minecraft.advancement.AdvancementEntry;
import net.minecraft.data.DataProvider;
import net.minecraft.data.DataWriter;
import net.minecraft.data.server.recipe.CraftingRecipeJsonBuilder;
import net.minecraft.data.server.recipe.RecipeExporter;
import net.minecraft.data.server.recipe.RecipeJsonProvider;
import net.minecraft.data.server.recipe.RecipeProvider;
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
@ -59,23 +59,23 @@ public abstract class FabricRecipeProvider extends RecipeProvider {
* Implement this method and then use the range of methods in {@link RecipeProvider} or from one of the recipe json factories such as {@link ShapedRecipeJsonBuilder} or {@link ShapelessRecipeJsonBuilder}.
*/
@Override
public abstract void generate(class_8790 exporter);
public abstract void generate(RecipeExporter exporter);
/**
* Return a new exporter that applies the specified conditions to any recipe json provider it receives.
*/
protected class_8790 withConditions(class_8790 exporter, ConditionJsonProvider... conditions) {
protected RecipeExporter withConditions(RecipeExporter exporter, ConditionJsonProvider... conditions) {
Preconditions.checkArgument(conditions.length > 0, "Must add at least one condition.");
return new class_8790() {
return new RecipeExporter() {
@Override
public void method_53819(RecipeJsonProvider provider) {
public void accept(RecipeJsonProvider provider) {
FabricDataGenHelper.addConditions(provider, conditions);
exporter.method_53819(provider);
exporter.accept(provider);
}
@Override
public Advancement.Builder method_53818() {
return exporter.method_53818();
public Advancement.Builder getAdvancementBuilder() {
return exporter.getAdvancementBuilder();
}
};
}
@ -84,10 +84,10 @@ public abstract class FabricRecipeProvider extends RecipeProvider {
public CompletableFuture<?> run(DataWriter writer) {
Set<Identifier> generatedRecipes = Sets.newHashSet();
List<CompletableFuture<?>> list = new ArrayList<>();
generate(new class_8790() {
generate(new RecipeExporter() {
@Override
public void method_53819(RecipeJsonProvider provider) {
Identifier identifier = getRecipeIdentifier(provider.recipeId());
public void accept(RecipeJsonProvider provider) {
Identifier identifier = getRecipeIdentifier(provider.id());
if (!generatedRecipes.add(identifier)) {
throw new IllegalStateException("Duplicate recipe " + identifier);
@ -99,17 +99,17 @@ public abstract class FabricRecipeProvider extends RecipeProvider {
list.add(DataProvider.writeToPath(writer, recipeJson, recipesPathResolver.resolveJson(identifier)));
class_8779 advancementBuilder = provider.advancementBuilder();
AdvancementEntry advancement = provider.advancement();
if (advancementBuilder != null) {
JsonObject advancementJson = advancementBuilder.comp_1920().method_53621();
if (advancement != null) {
JsonObject advancementJson = advancement.value().toJson();
ConditionJsonProvider.write(advancementJson, conditions);
list.add(DataProvider.writeToPath(writer, advancementJson, advancementsPathResolver.resolveJson(getRecipeIdentifier(advancementBuilder.comp_1919()))));
list.add(DataProvider.writeToPath(writer, advancementJson, advancementsPathResolver.resolveJson(getRecipeIdentifier(advancement.id()))));
}
}
@Override
public Advancement.Builder method_53818() {
public Advancement.Builder getAdvancementBuilder() {
return Advancement.Builder.createUntelemetered().parent(CraftingRecipeJsonBuilder.ROOT);
}
});

View file

@ -64,68 +64,68 @@ transitive-accessible field net/minecraft/data/server/loottable/BlockLootTableGe
### Generated access wideners below
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider saveRecipeAdvancement (Lnet/minecraft/data/DataWriter;Lnet/minecraft/class_8779;)Ljava/util/concurrent/CompletableFuture;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generate (Lnet/minecraft/class_8790;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateFamilies (Lnet/minecraft/class_8790;Lnet/minecraft/resource/featuretoggle/FeatureSet;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSingleOutputShapelessRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerShapelessRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmelting (Lnet/minecraft/class_8790;Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBlasting (Lnet/minecraft/class_8790;Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerMultipleOptions (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/RecipeSerializer;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/RecipeProvider offerNetheriteUpgradeRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/Item;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/Item;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTrimRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/Item;Lnet/minecraft/util/Identifier;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offer2x2CompactingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCompactingRecipe (Lnet/minecraft/class_8790;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/RecipeProvider offerCompactingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPlanksRecipe2 (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPlanksRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBarkBlockRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBoatRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerChestBoatRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider saveRecipeAdvancement (Lnet/minecraft/data/DataWriter;Lnet/minecraft/advancement/AdvancementEntry;)Ljava/util/concurrent/CompletableFuture;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generate (Lnet/minecraft/data/server/recipe/RecipeExporter;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateFamilies (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/resource/featuretoggle/FeatureSet;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSingleOutputShapelessRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerShapelessRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmelting (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBlasting (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/util/List;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;FILjava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerMultipleOptions (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/RecipeSerializer;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/RecipeProvider offerNetheriteUpgradeRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/Item;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/Item;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTrimRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/Item;Lnet/minecraft/util/Identifier;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offer2x2CompactingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCompactingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;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/RecipeProvider offerCompactingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPlanksRecipe2 (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPlanksRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBarkBlockRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBoatRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerChestBoatRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createTransmutationRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createDoorRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createFenceRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createFenceGateRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPressurePlateRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPressurePlateRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createPressurePlateRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSlabRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSlabRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createSlabRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createStairsRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createTrapdoorRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createSignRecipe (Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerHangingSignRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerDyeableRecipes (Lnet/minecraft/class_8790;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCarpetRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBedRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBannerRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassDyeingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassPaneRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassPaneDyeingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerTerracottaDyeingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerConcretePowderDyeingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCandleDyeingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerWallRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerHangingSignRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerDyeableRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCarpetRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBedRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerBannerRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassDyeingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassPaneRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStainedGlassPaneDyeingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerTerracottaDyeingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerConcretePowderDyeingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCandleDyeingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerWallRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider getWallRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPolishedStoneRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerPolishedStoneRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createCondensingRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/CraftingRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCutCopperRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCutCopperRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createCutCopperRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/ShapedRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerChiseledBlockRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerMosaicRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerChiseledBlockRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerMosaicRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider createChiseledBlockRecipe (Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/Ingredient;)Lnet/minecraft/data/server/recipe/ShapedRecipeJsonBuilder;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStonecuttingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStonecuttingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCrackingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipes (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipesWithCompactingRecipeGroup (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipesWithReverseRecipeGroup (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipes (Lnet/minecraft/class_8790;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/class_8790;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateCookingRecipes (Lnet/minecraft/class_8790;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerFoodCookingRecipe (Lnet/minecraft/class_8790;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;ILnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;F)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerWaxingRecipes (Lnet/minecraft/class_8790;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateFamily (Lnet/minecraft/class_8790;Lnet/minecraft/data/family/BlockFamily;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStonecuttingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerStonecuttingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerCrackingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipesWithCompactingRecipeGroup (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipesWithReverseRecipeGroup (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerReversibleCompactingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/recipe/book/RecipeCategory;Lnet/minecraft/item/ItemConvertible;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/registry/tag/TagKey;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerSmithingTemplateCopyingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateCookingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;I)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerFoodCookingRecipe (Lnet/minecraft/data/server/recipe/RecipeExporter;Ljava/lang/String;Lnet/minecraft/recipe/RecipeSerializer;ILnet/minecraft/item/ItemConvertible;Lnet/minecraft/item/ItemConvertible;F)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider offerWaxingRecipes (Lnet/minecraft/data/server/recipe/RecipeExporter;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider generateFamily (Lnet/minecraft/data/server/recipe/RecipeExporter;Lnet/minecraft/data/family/BlockFamily;)V
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider getVariantRecipeInput (Lnet/minecraft/data/family/BlockFamily;Lnet/minecraft/data/family/BlockFamily$Variant;)Lnet/minecraft/block/Block;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider requireEnteringFluid (Lnet/minecraft/block/Block;)Lnet/minecraft/advancement/AdvancementCriterion;
transitive-accessible method net/minecraft/data/server/recipe/RecipeProvider conditionsFromItem (Lnet/minecraft/predicate/NumberRange$IntRange;Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/advancement/AdvancementCriterion;

View file

@ -38,13 +38,13 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.minecraft.advancement.Advancement;
import net.minecraft.advancement.AdvancementEntry;
import net.minecraft.advancement.AdvancementFrame;
import net.minecraft.advancement.criterion.OnKilledCriterion;
import net.minecraft.block.Blocks;
import net.minecraft.class_8779;
import net.minecraft.class_8790;
import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.data.client.ItemModelGenerator;
import net.minecraft.data.server.recipe.RecipeExporter;
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.attribute.EntityAttributes;
@ -139,7 +139,7 @@ public class DataGeneratorTestEntrypoint implements DataGeneratorEntrypoint {
}
@Override
public void generate(class_8790 exporter) {
public void generate(RecipeExporter exporter) {
offerPlanksRecipe2(exporter, SIMPLE_BLOCK, ItemTags.ACACIA_LOGS, 1);
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, Items.LEATHER, 4).input(Items.ITEM_FRAME)
@ -329,8 +329,8 @@ public class DataGeneratorTestEntrypoint implements DataGeneratorEntrypoint {
}
@Override
public void generateAdvancement(Consumer<class_8779> consumer) {
class_8779 root = Advancement.Builder.create()
public void generateAdvancement(Consumer<AdvancementEntry> consumer) {
AdvancementEntry root = Advancement.Builder.create()
.display(
SIMPLE_BLOCK,
Text.translatable("advancements.test.root.title"),
@ -340,7 +340,7 @@ public class DataGeneratorTestEntrypoint implements DataGeneratorEntrypoint {
false, false, false)
.criterion("killed_something", OnKilledCriterion.Conditions.createPlayerKilledEntity())
.build(consumer, MOD_ID + ":test/root");
class_8779 rootNotLoaded = Advancement.Builder.create()
AdvancementEntry rootNotLoaded = Advancement.Builder.create()
.display(
SIMPLE_BLOCK,
Text.translatable("advancements.test.root_not_loaded.title"),

View file

@ -26,11 +26,11 @@ import com.mojang.authlib.GameProfile;
import org.jetbrains.annotations.Nullable;
import net.minecraft.block.entity.SignBlockEntity;
import net.minecraft.class_8791;
import net.minecraft.entity.Entity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.passive.AbstractHorseEntity;
import net.minecraft.inventory.Inventory;
import net.minecraft.network.packet.c2s.play.ClientSettingsC2SPacket;
import net.minecraft.scoreboard.AbstractTeam;
import net.minecraft.screen.NamedScreenHandlerFactory;
import net.minecraft.server.network.ServerPlayerEntity;
@ -102,7 +102,7 @@ public class FakePlayer extends ServerPlayerEntity {
private static final Map<FakePlayerKey, FakePlayer> FAKE_PLAYER_MAP = new MapMaker().weakValues().makeMap();
protected FakePlayer(ServerWorld world, GameProfile profile) {
super(world.getServer(), world, profile);
super(world.getServer(), world, profile, class_8791.method_53821());
this.networkHandler = new FakePlayerNetworkHandler(this);
}
@ -111,7 +111,7 @@ public class FakePlayer extends ServerPlayerEntity {
public void tick() { }
@Override
public void setClientSettings(ClientSettingsC2SPacket packet) { }
public void setClientSettings(class_8791 settings) { }
@Override
public void increaseStat(Stat<?> stat, int amount) { }

View file

@ -18,6 +18,7 @@ package net.fabricmc.fabric.impl.event.interaction;
import org.jetbrains.annotations.Nullable;
import net.minecraft.class_8792;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.NetworkSide;
import net.minecraft.network.PacketCallbacks;
@ -30,7 +31,7 @@ public class FakePlayerNetworkHandler extends ServerPlayNetworkHandler {
private static final ClientConnection FAKE_CONNECTION = new FakeClientConnection();
public FakePlayerNetworkHandler(ServerPlayerEntity player) {
super(player.getServer(), FAKE_CONNECTION, player, 0);
super(player.getServer(), FAKE_CONNECTION, player, new class_8792(null, 0, null));
}
@Override

View file

@ -24,7 +24,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import net.minecraft.advancement.PlayerAdvancementTracker;
import net.minecraft.class_8779;
import net.minecraft.advancement.AdvancementEntry;
import net.minecraft.server.network.ServerPlayerEntity;
import net.fabricmc.fabric.api.entity.FakePlayer;
@ -43,7 +43,7 @@ public class PlayerAdvancementTrackerMixin {
}
@Inject(method = "grantCriterion", at = @At("HEAD"), cancellable = true)
void preventGrantCriterion(class_8779 advancement, String criterionName, CallbackInfoReturnable<Boolean> ci) {
void preventGrantCriterion(AdvancementEntry advancement, String criterionName, CallbackInfoReturnable<Boolean> ci) {
if (owner instanceof FakePlayer) {
// Prevent granting advancements to fake players.
ci.setReturnValue(false);

View file

@ -26,7 +26,7 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.class_8786;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@ -37,7 +37,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, boolean bl3, boolean bl4, class_8786<?> recipe, int i) {
private static void getStackRemainder(World world, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity blockEntity, CallbackInfo ci, boolean bl, boolean bl2, ItemStack itemStack, boolean bl3, boolean bl4, RecipeEntry<?> recipe, int i) {
REMAINDER_STACK.set(itemStack.getRecipeRemainder());
}

View file

@ -91,7 +91,7 @@ public class RecipeGameTest implements FabricGameTest {
}
@Override
public ItemStack getOutput(DynamicRegistryManager dynamicRegistryManager) {
public ItemStack getResult(DynamicRegistryManager registryManager) {
return null;
}

View file

@ -21,6 +21,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.class_8792;
import net.minecraft.network.ClientConnection;
import net.minecraft.server.PlayerManager;
import net.minecraft.server.network.ServerPlayerEntity;
@ -33,7 +34,7 @@ public class PlayerManagerMixin {
method = "onPlayerConnect",
at = @At(value = "INVOKE", target = "net/minecraft/network/packet/s2c/play/SynchronizeRecipesS2CPacket.<init>(Ljava/util/Collection;)V")
)
private void hookOnPlayerConnect(ClientConnection connection, ServerPlayerEntity player, int latency, CallbackInfo ci) {
private void hookOnPlayerConnect(ClientConnection connection, ServerPlayerEntity player, class_8792 arg, CallbackInfo ci) {
ServerLifecycleEvents.SYNC_DATA_PACK_CONTENTS.invoker().onSyncDataPackContents(player, true);
}

View file

@ -21,6 +21,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.class_8792;
import net.minecraft.network.ClientConnection;
import net.minecraft.server.PlayerManager;
import net.minecraft.server.network.ServerPlayerEntity;
@ -30,7 +31,7 @@ import net.fabricmc.fabric.impl.networking.server.ServerNetworkingImpl;
@Mixin(PlayerManager.class)
abstract class PlayerManagerMixin {
@Inject(method = "onPlayerConnect", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/PlayerAbilitiesS2CPacket;<init>(Lnet/minecraft/entity/player/PlayerAbilities;)V"))
private void handlePlayerConnection(ClientConnection connection, ServerPlayerEntity player, int latency, CallbackInfo ci) {
private void handlePlayerConnection(ClientConnection connection, ServerPlayerEntity player, class_8792 arg, CallbackInfo ci) {
ServerNetworkingImpl.getAddon(player.networkHandler).onClientReady();
}
}

View file

@ -27,6 +27,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.class_8792;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.common.DisconnectS2CPacket;
@ -70,8 +71,8 @@ public abstract class ServerConfigurationNetworkHandlerMixin extends ServerCommo
@Unique
private boolean earlyTaskExecution;
public ServerConfigurationNetworkHandlerMixin(MinecraftServer server, ClientConnection connection, int keepAliveId) {
super(server, connection, keepAliveId);
public ServerConfigurationNetworkHandlerMixin(MinecraftServer server, ClientConnection connection, class_8792 arg) {
super(server, connection, arg);
}
@Inject(method = "<init>", at = @At("RETURN"))

View file

@ -22,6 +22,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.class_8792;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.common.DisconnectS2CPacket;
@ -40,8 +41,8 @@ abstract class ServerPlayNetworkHandlerMixin extends ServerCommonNetworkHandler
@Unique
private ServerPlayNetworkAddon addon;
private ServerPlayNetworkHandlerMixin(MinecraftServer server, ClientConnection connection, int keepAliveId) {
super(server, connection, keepAliveId);
ServerPlayNetworkHandlerMixin(MinecraftServer server, ClientConnection connection, class_8792 arg) {
super(server, connection, arg);
}
@Inject(method = "<init>", at = @At("RETURN"))

View file

@ -29,8 +29,8 @@ import net.minecraft.util.Identifier;
import net.fabricmc.fabric.api.recipe.v1.ingredient.CustomIngredientSerializer;
public class AllIngredient extends CombinedIngredient {
private static final Codec<AllIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46095);
private static final Codec<AllIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46096);
private static final Codec<AllIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.ALLOW_EMPTY_CODEC);
private static final Codec<AllIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.DISALLOW_EMPTY_CODEC);
private static Codec<AllIngredient> createCodec(Codec<Ingredient> ingredientCodec) {
return ingredientCodec

View file

@ -29,8 +29,8 @@ import net.minecraft.util.Identifier;
import net.fabricmc.fabric.api.recipe.v1.ingredient.CustomIngredientSerializer;
public class AnyIngredient extends CombinedIngredient {
private static final Codec<AnyIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46095);
private static final Codec<AnyIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46096);
private static final Codec<AnyIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.ALLOW_EMPTY_CODEC);
private static final Codec<AnyIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.DISALLOW_EMPTY_CODEC);
private static Codec<AnyIngredient> createCodec(Codec<Ingredient> ingredientCodec) {
return ingredientCodec

View file

@ -73,8 +73,8 @@ public class DifferenceIngredient implements CustomIngredient {
private static class Serializer implements CustomIngredientSerializer<DifferenceIngredient> {
private static final Identifier ID = new Identifier("fabric", "difference");
private static final Codec<DifferenceIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46095);
private static final Codec<DifferenceIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46096);
private static final Codec<DifferenceIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.ALLOW_EMPTY_CODEC);
private static final Codec<DifferenceIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.DISALLOW_EMPTY_CODEC);
private static Codec<DifferenceIngredient> createCodec(Codec<Ingredient> ingredientCodec) {
return RecordCodecBuilder.create(instance ->

View file

@ -120,8 +120,8 @@ public class NbtIngredient implements CustomIngredient {
}
}, DataResult::success), nbtCompound -> DataResult.success(Either.left(nbtCompound.asString())));
private static final Codec<NbtIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46095);
private static final Codec<NbtIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.field_46096);
private static final Codec<NbtIngredient> ALLOW_EMPTY_CODEC = createCodec(Ingredient.ALLOW_EMPTY_CODEC);
private static final Codec<NbtIngredient> DISALLOW_EMPTY_CODEC = createCodec(Ingredient.DISALLOW_EMPTY_CODEC);
private static Codec<NbtIngredient> createCodec(Codec<Ingredient> ingredientCodec) {
return RecordCodecBuilder.create(instance ->

View file

@ -33,7 +33,7 @@ import net.fabricmc.fabric.impl.recipe.ingredient.CustomIngredientImpl;
@Mixin(Ingredient.class)
public class IngredientMixin implements FabricIngredient {
@Inject(method = "method_53725", at = @At("RETURN"), cancellable = true)
@Inject(method = "createCodec", at = @At("RETURN"), cancellable = true)
private static void injectCodec(boolean allowEmpty, CallbackInfoReturnable<Codec<Ingredient>> cir) {
final Codec<CustomIngredient> customIngredientCodec = allowEmpty ? CustomIngredientImpl.ALLOW_EMPTY_INGREDIENT_CODECS : CustomIngredientImpl.DISALLOW_EMPTY_INGREDIENT_CODECS;
Codec<Ingredient> ingredientCodec = customIngredientCodec.xmap(CustomIngredient::toVanilla, FabricIngredient::getCustomIngredient);

View file

@ -42,7 +42,7 @@ import net.fabricmc.fabric.impl.recipe.ingredient.ShapelessMatch;
public class ShapelessRecipeMixin {
@Final
@Shadow
DefaultedList<Ingredient> input;
DefaultedList<Ingredient> ingredients;
@Unique
private boolean fabric_requiresTesting = false;
@ -69,7 +69,7 @@ public class ShapelessRecipeMixin {
}
}
cir.setReturnValue(ShapelessMatch.isMatch(nonEmptyStacks, input));
cir.setReturnValue(ShapelessMatch.isMatch(nonEmptyStacks, ingredients));
}
}
}

View file

@ -56,7 +56,7 @@ public class SerializationTests {
JsonElement json = JsonParser.parseString(ingredientJson);
try {
Util.getResult(Ingredient.field_46096.parse(JsonOps.INSTANCE, json), JsonParseException::new);
Util.getResult(Ingredient.DISALLOW_EMPTY_CODEC.parse(JsonOps.INSTANCE, json), JsonParseException::new);
throw new GameTestException("Using a custom ingredient inside an array ingredient should have failed.");
} catch (JsonParseException e) {
context.complete();

View file

@ -36,7 +36,7 @@ public class ShapelessRecipeMatchTests {
@GameTest(templateName = FabricGameTest.EMPTY_STRUCTURE)
public void testShapelessMatch(TestContext context) {
Identifier recipeId = new Identifier("fabric-recipe-api-v1-testmod", "test_shapeless_match");
ShapelessRecipe recipe = (ShapelessRecipe) context.getWorld().getRecipeManager().get(recipeId).get().comp_1933();
ShapelessRecipe recipe = (ShapelessRecipe) context.getWorld().getRecipeManager().get(recipeId).get().value();
ItemStack undamagedPickaxe = new ItemStack(Items.DIAMOND_PICKAXE);
ItemStack damagedPickaxe = new ItemStack(Items.DIAMOND_PICKAXE);

View file

@ -64,7 +64,7 @@ public class ConditionalResourcesTest {
throw new AssertionError("features_enabled recipe should have been loaded.");
}
long loadedRecipes = manager.values().stream().filter(r -> r.comp_1932().getNamespace().equals(MOD_ID)).count();
long loadedRecipes = manager.values().stream().filter(r -> r.id().getNamespace().equals(MOD_ID)).count();
if (loadedRecipes != 5) throw new AssertionError("Unexpected loaded recipe count: " + loadedRecipes);
context.complete();

View file

@ -2,9 +2,9 @@ org.gradle.jvmargs=-Xmx2560M
org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true
version=0.88.1
minecraft_version=23w35a
yarn_version=+build.4
version=0.88.2
minecraft_version=1.20.2-pre1
yarn_version=+build.2
loader_version=0.14.22
installer_version=0.11.1
@ -13,7 +13,7 @@ curseforge_minecraft_version=1.20.2-Snapshot
# Do not manually update, use the bumpversions task:
fabric-api-base-version=0.4.32
fabric-api-lookup-api-v1-version=1.6.38
fabric-api-lookup-api-v1-version=1.6.39
fabric-biome-api-v1-version=13.0.11
fabric-block-api-v1-version=1.0.11
fabric-block-view-api-v2-version=1.0.0
@ -21,31 +21,31 @@ fabric-blockrenderlayer-v1-version=1.1.42
fabric-command-api-v1-version=1.2.35
fabric-command-api-v2-version=2.2.14
fabric-commands-v0-version=0.2.52
fabric-containers-v0-version=0.1.67
fabric-content-registries-v0-version=5.0.1
fabric-containers-v0-version=0.1.68
fabric-content-registries-v0-version=5.0.2
fabric-crash-report-info-v1-version=0.2.19
fabric-data-generation-api-v1-version=13.0.0
fabric-data-generation-api-v1-version=13.0.1
fabric-dimensions-v1-version=2.1.55
fabric-entity-events-v1-version=1.5.24
fabric-events-interaction-v0-version=0.6.5
fabric-events-lifecycle-v0-version=0.2.65
fabric-events-interaction-v0-version=0.6.6
fabric-events-lifecycle-v0-version=0.2.66
fabric-game-rule-api-v1-version=1.0.39
fabric-gametest-api-v1-version=1.2.14
fabric-item-api-v1-version=2.1.30
fabric-item-api-v1-version=2.1.31
fabric-item-group-api-v1-version=4.0.12
fabric-key-binding-api-v1-version=1.0.37
fabric-keybindings-v0-version=0.2.35
fabric-lifecycle-events-v1-version=2.2.23
fabric-lifecycle-events-v1-version=2.2.24
fabric-loot-api-v2-version=2.0.1
fabric-message-api-v1-version=6.0.0
fabric-mining-level-api-v1-version=2.1.51
fabric-mining-level-api-v1-version=2.1.52
fabric-model-loading-api-v1-version=1.0.4
fabric-models-v0-version=0.4.3
fabric-networking-api-v1-version=3.0.3
fabric-networking-api-v1-version=3.0.4
fabric-object-builder-api-v1-version=12.0.0
fabric-particles-v1-version=1.1.3
fabric-recipe-api-v1-version=2.0.0
fabric-registry-sync-v0-version=3.0.4
fabric-recipe-api-v1-version=2.0.1
fabric-registry-sync-v0-version=3.0.5
fabric-renderer-api-v1-version=3.1.5
fabric-renderer-indigo-version=1.4.5
fabric-renderer-registries-v1-version=3.2.47
@ -53,12 +53,12 @@ fabric-rendering-data-attachment-v1-version=0.3.38
fabric-rendering-fluids-v1-version=3.0.29
fabric-rendering-v0-version=1.1.50
fabric-rendering-v1-version=3.0.9
fabric-resource-conditions-api-v1-version=2.3.7
fabric-resource-conditions-api-v1-version=2.3.8
fabric-resource-loader-v0-version=0.11.10
fabric-screen-api-v1-version=2.0.10
fabric-screen-handler-api-v1-version=1.3.33
fabric-screen-handler-api-v1-version=1.3.34
fabric-sound-api-v1-version=1.0.13
fabric-transfer-api-v1-version=3.3.4
fabric-transfer-api-v1-version=3.3.5
fabric-transitive-access-wideners-v1-version=5.0.2
fabric-convention-tags-v1-version=1.5.6
fabric-client-tags-api-v1-version=1.1.3