added receipeGroupPrefix otherwise everything will have the end-group

This commit is contained in:
Frank Bauer 2021-07-30 10:17:53 +02:00
parent dca77a58ae
commit d33187d204
2 changed files with 20 additions and 18 deletions

View file

@ -38,10 +38,12 @@ public abstract class ComplexMaterial {
protected final String baseName; protected final String baseName;
protected final String modID; protected final String modID;
protected final String receipGroupPrefix;
public ComplexMaterial(String modID, String baseName) { public ComplexMaterial(String modID, String baseName, String receipGroupPrefix) {
this.baseName = baseName; this.baseName = baseName;
this.modID = modID; this.modID = modID;
this.receipGroupPrefix = receipGroupPrefix;
MATERIALS.add(this); MATERIALS.add(this);
} }

View file

@ -67,8 +67,8 @@ public class WoodenComplexMaterial extends ComplexMaterial {
public final MaterialColor planksColor; public final MaterialColor planksColor;
public final MaterialColor woodColor; public final MaterialColor woodColor;
public WoodenComplexMaterial(String modID, String baseName, MaterialColor woodColor, MaterialColor planksColor) { public WoodenComplexMaterial(String modID, String baseName, String receipGroupPrefix, MaterialColor woodColor, MaterialColor planksColor) {
super(modID, baseName); super(modID, baseName, receipGroupPrefix);
this.planksColor = planksColor; this.planksColor = planksColor;
this.woodColor = woodColor; this.woodColor = woodColor;
} }
@ -217,7 +217,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setOutputCount(4) .setOutputCount(4)
.setList("#") .setList("#")
.addMaterial('#', log, bark, log_stripped, bark_stripped) .addMaterial('#', log, bark, log_stripped, bark_stripped)
.setGroup("end_planks") .setGroup(receipGroupPrefix +"_planks")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("stairs", (material, config, id) -> { addRecipeEntry(new RecipeEntry("stairs", (material, config, id) -> {
@ -226,7 +226,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setOutputCount(4) .setOutputCount(4)
.setShape("# ", "## ", "###") .setShape("# ", "## ", "###")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_planks_stairs") .setGroup(receipGroupPrefix +"_planks_stairs")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("slab", (material, config, id) -> { addRecipeEntry(new RecipeEntry("slab", (material, config, id) -> {
@ -235,7 +235,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setOutputCount(6) .setOutputCount(6)
.setShape("###") .setShape("###")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_planks_slabs") .setGroup(receipGroupPrefix +"_planks_slabs")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("fence", (material, config, id) -> { addRecipeEntry(new RecipeEntry("fence", (material, config, id) -> {
@ -245,7 +245,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("#I#", "#I#") .setShape("#I#", "#I#")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('I', Items.STICK) .addMaterial('I', Items.STICK)
.setGroup("end_planks_fences") .setGroup(receipGroupPrefix +"_planks_fences")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("gate", (material, config, id) -> { addRecipeEntry(new RecipeEntry("gate", (material, config, id) -> {
@ -254,7 +254,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("I#I", "I#I") .setShape("I#I", "I#I")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('I', Items.STICK) .addMaterial('I', Items.STICK)
.setGroup("end_planks_gates") .setGroup(receipGroupPrefix +"_planks_gates")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("button", (material, config, id) -> { addRecipeEntry(new RecipeEntry("button", (material, config, id) -> {
@ -262,7 +262,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.checkConfig(config) .checkConfig(config)
.setList("#") .setList("#")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_planks_buttons") .setGroup(receipGroupPrefix +"_planks_buttons")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("pressure_plate", (material, config, id) -> { addRecipeEntry(new RecipeEntry("pressure_plate", (material, config, id) -> {
@ -270,7 +270,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.checkConfig(config) .checkConfig(config)
.setShape("##") .setShape("##")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_planks_plates") .setGroup(receipGroupPrefix +"_planks_plates")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("trapdoor", (material, config, id) -> { addRecipeEntry(new RecipeEntry("trapdoor", (material, config, id) -> {
@ -279,7 +279,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setOutputCount(2) .setOutputCount(2)
.setShape("###", "###") .setShape("###", "###")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_trapdoors") .setGroup(receipGroupPrefix +"_trapdoors")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("door", (material, config, id) -> { addRecipeEntry(new RecipeEntry("door", (material, config, id) -> {
@ -288,7 +288,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setOutputCount(3) .setOutputCount(3)
.setShape("##", "##", "##") .setShape("##", "##", "##")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_doors") .setGroup(receipGroupPrefix +"_doors")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("crafting_table", (material, config, id) -> { addRecipeEntry(new RecipeEntry("crafting_table", (material, config, id) -> {
@ -296,7 +296,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.checkConfig(config) .checkConfig(config)
.setShape("##", "##") .setShape("##", "##")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_tables") .setGroup(receipGroupPrefix +"_tables")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("ladder", (material, config, id) -> { addRecipeEntry(new RecipeEntry("ladder", (material, config, id) -> {
@ -306,7 +306,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("I I", "I#I", "I I") .setShape("I I", "I#I", "I I")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('I', Items.STICK) .addMaterial('I', Items.STICK)
.setGroup("end_ladders") .setGroup(receipGroupPrefix +"_ladders")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("sign", (material, config, id) -> { addRecipeEntry(new RecipeEntry("sign", (material, config, id) -> {
@ -316,7 +316,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("###", "###", " I ") .setShape("###", "###", " I ")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('I', Items.STICK) .addMaterial('I', Items.STICK)
.setGroup("end_signs") .setGroup(receipGroupPrefix +"_signs")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("chest", (material, config, id) -> { addRecipeEntry(new RecipeEntry("chest", (material, config, id) -> {
@ -324,7 +324,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.checkConfig(config) .checkConfig(config)
.setShape("###", "# #", "###") .setShape("###", "# #", "###")
.addMaterial('#', planks) .addMaterial('#', planks)
.setGroup("end_chests") .setGroup(receipGroupPrefix +"_chests")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("barrel", (material, config, id) -> { addRecipeEntry(new RecipeEntry("barrel", (material, config, id) -> {
@ -333,7 +333,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("#S#", "# #", "#S#") .setShape("#S#", "# #", "#S#")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('S', getBlock(BLOCK_SLAB)) .addMaterial('S', getBlock(BLOCK_SLAB))
.setGroup("end_barrels") .setGroup(receipGroupPrefix +"_barrels")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("bookshelf", (material, config, id) -> { addRecipeEntry(new RecipeEntry("bookshelf", (material, config, id) -> {
@ -342,7 +342,7 @@ public class WoodenComplexMaterial extends ComplexMaterial {
.setShape("###", "PPP", "###") .setShape("###", "PPP", "###")
.addMaterial('#', planks) .addMaterial('#', planks)
.addMaterial('P', Items.BOOK) .addMaterial('P', Items.BOOK)
.setGroup("end_bookshelves") .setGroup(receipGroupPrefix +"_bookshelves")
.build(); .build();
})); }));
addRecipeEntry(new RecipeEntry("bark", (material, config, id) -> { addRecipeEntry(new RecipeEntry("bark", (material, config, id) -> {