mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-28 22:05:01 +01:00
1.19.3 Port Part III
- Resolve final error - Fix datagen by making RecipeProvider#getName not final
This commit is contained in:
parent
1be1574fe7
commit
af57857367
7 changed files with 13 additions and 15 deletions
|
@ -30,11 +30,9 @@ public abstract class CreateRecipeProvider extends RecipeProvider {
|
||||||
@Override
|
@Override
|
||||||
protected void buildRecipes(Consumer<FinishedRecipe> p_200404_1_) {
|
protected void buildRecipes(Consumer<FinishedRecipe> p_200404_1_) {
|
||||||
all.forEach(c -> c.register(p_200404_1_));
|
all.forEach(c -> c.register(p_200404_1_));
|
||||||
Create.LOGGER.info(getProviderName() + " registered " + all.size() + " recipe" + (all.size() == 1 ? "" : "s"));
|
Create.LOGGER.info(getName() + " registered " + all.size() + " recipe" + (all.size() == 1 ? "" : "s"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract String getProviderName();
|
|
||||||
|
|
||||||
protected GeneratedRecipe register(GeneratedRecipe recipe) {
|
protected GeneratedRecipe register(GeneratedRecipe recipe) {
|
||||||
all.add(recipe);
|
all.add(recipe);
|
||||||
return recipe;
|
return recipe;
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class MechanicalCraftingRecipeGen extends CreateRecipeProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getProviderName() {
|
public String getName() {
|
||||||
return "Create's Mechanical Crafting Recipes";
|
return "Create's Mechanical Crafting Recipes";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ public abstract class ProcessingRecipeGen extends CreateRecipeProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getProviderName() {
|
public String getName() {
|
||||||
return "Create's Processing Recipes: " + getRecipeType().getId()
|
return "Create's Processing Recipes: " + getRecipeType().getId()
|
||||||
.getPath();
|
.getPath();
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class SequencedAssemblyRecipeGen extends CreateRecipeProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getProviderName() {
|
public String getName() {
|
||||||
return "Create's Sequenced Assembly Recipes";
|
return "Create's Sequenced Assembly Recipes";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1377,7 +1377,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getProviderName() {
|
public String getName() {
|
||||||
return "Create's Standard Recipes";
|
return "Create's Standard Recipes";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.block.model.ItemTransforms;
|
import net.minecraft.client.renderer.block.model.ItemTransforms;
|
||||||
import net.minecraft.client.resources.model.BakedModel;
|
import net.minecraft.client.resources.model.BakedModel;
|
||||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
import net.minecraft.client.resources.model.ModelManager;
|
||||||
import net.minecraft.client.resources.model.ModelBakery;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraftforge.client.event.ModelEvent;
|
import net.minecraftforge.client.event.ModelEvent;
|
||||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||||
|
@ -58,14 +57,13 @@ public abstract class CustomRenderedItemModel extends BakedModelWrapper<BakedMod
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadPartials(ModelEvent.BakingCompleted event) {
|
public void loadPartials(ModelEvent.BakingCompleted event) {
|
||||||
ModelBakery modelLoader = event.getModelBakery();
|
ModelManager modelManager = event.getModelManager();
|
||||||
for (String name : partials.keySet())
|
for (String name : partials.keySet())
|
||||||
partials.put(name, loadPartial(modelLoader, name));
|
partials.put(name, loadPartial(modelManager, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
protected BakedModel loadPartial(ModelManager modelManager, String name) {
|
||||||
protected BakedModel loadPartial(ModelBakery modelLoader, String name) {
|
return modelManager.getModel(getPartialModelLocation(name));
|
||||||
return modelLoader.bake(getPartialModelLocation(name), BlockModelRotation.X0_Y0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ResourceLocation getPartialModelLocation(String name) {
|
protected ResourceLocation getPartialModelLocation(String name) {
|
||||||
|
|
|
@ -41,4 +41,6 @@ public net.minecraft.client.model.AgeableListModel f_102011_ # babyBodyScale
|
||||||
public net.minecraft.client.model.AgeableListModel f_102012_ # bodyYOffset
|
public net.minecraft.client.model.AgeableListModel f_102012_ # bodyYOffset
|
||||||
|
|
||||||
public net.minecraft.client.gui.components.CommandSuggestions f_93866_ # suggestions
|
public net.minecraft.client.gui.components.CommandSuggestions f_93866_ # suggestions
|
||||||
public net.minecraft.client.gui.components.CommandSuggestions$SuggestionsList <init>(Lnet/minecraft/client/gui/components/CommandSuggestions;IIILjava/util/List;Z)V # <init>
|
public net.minecraft.client.gui.components.CommandSuggestions$SuggestionsList <init>(Lnet/minecraft/client/gui/components/CommandSuggestions;IIILjava/util/List;Z)V # <init>
|
||||||
|
|
||||||
|
public-f net.minecraft.data.recipes.RecipeProvider m_6055_()Ljava/lang/String; # getName
|
||||||
|
|
Loading…
Reference in a new issue