mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-27 13:28:00 +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
|
||||
protected void buildRecipes(Consumer<FinishedRecipe> 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) {
|
||||
all.add(recipe);
|
||||
return recipe;
|
||||
|
|
|
@ -107,7 +107,7 @@ public class MechanicalCraftingRecipeGen extends CreateRecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String getProviderName() {
|
||||
public String getName() {
|
||||
return "Create's Mechanical Crafting Recipes";
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ public abstract class ProcessingRecipeGen extends CreateRecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getProviderName() {
|
||||
public String getName() {
|
||||
return "Create's Processing Recipes: " + getRecipeType().getId()
|
||||
.getPath();
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class SequencedAssemblyRecipeGen extends CreateRecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getProviderName() {
|
||||
public String getName() {
|
||||
return "Create's Sequenced Assembly Recipes";
|
||||
}
|
||||
|
||||
|
|
|
@ -1377,7 +1377,7 @@ public class StandardRecipeGen extends CreateRecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getProviderName() {
|
||||
public String getName() {
|
||||
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.resources.model.BakedModel;
|
||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelEvent;
|
||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||
|
@ -58,14 +57,13 @@ public abstract class CustomRenderedItemModel extends BakedModelWrapper<BakedMod
|
|||
}
|
||||
|
||||
public void loadPartials(ModelEvent.BakingCompleted event) {
|
||||
ModelBakery modelLoader = event.getModelBakery();
|
||||
ModelManager modelManager = event.getModelManager();
|
||||
for (String name : partials.keySet())
|
||||
partials.put(name, loadPartial(modelLoader, name));
|
||||
partials.put(name, loadPartial(modelManager, name));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected BakedModel loadPartial(ModelBakery modelLoader, String name) {
|
||||
return modelLoader.bake(getPartialModelLocation(name), BlockModelRotation.X0_Y0);
|
||||
protected BakedModel loadPartial(ModelManager modelManager, String name) {
|
||||
return modelManager.getModel(getPartialModelLocation(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.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