Code style fix, interface rename, custom item getter
This commit is contained in:
parent
179ada3296
commit
c6afa74529
134 changed files with 3404 additions and 1244 deletions
|
@ -9,19 +9,79 @@ import ru.bclib.config.Configs;
|
|||
|
||||
public class CraftingRecipes {
|
||||
public static void init() {
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_smith_table", Blocks.SMITHING_TABLE).setShape("II", "##", "##").addMaterial('#', ItemTags.PLANKS).addMaterial('I', TagAPI.IRON_INGOTS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_cauldron", Blocks.CAULDRON).setShape("I I", "I I", "III").addMaterial('I', TagAPI.IRON_INGOTS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_hopper", Blocks.HOPPER).setShape("I I", "ICI", " I ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('C', TagAPI.ITEM_CHEST).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_piston", Blocks.PISTON).setShape("WWW", "CIC", "CDC").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('D', Items.REDSTONE).addMaterial('C', Items.COBBLESTONE).addMaterial('W', ItemTags.PLANKS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_rail", Blocks.RAIL).setOutputCount(16).setShape("I I", "ISI", "I I").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('S', Items.STICK).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_stonecutter", Blocks.STONECUTTER).setShape(" I ", "SSS").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('S', Items.STONE).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_bucket", Items.BUCKET).setShape("I I", " I ").addMaterial('I', TagAPI.IRON_INGOTS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_compass", Items.COMPASS).setShape(" I ", "IDI", " I ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('D', Items.REDSTONE).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_minecart", Items.MINECART).setShape("I I", "III").addMaterial('I', TagAPI.IRON_INGOTS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_shield", Items.SHIELD).setShape("WIW", "WWW", " W ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('W', ItemTags.PLANKS).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_smith_table", Blocks.SMITHING_TABLE)
|
||||
.setShape("II", "##", "##")
|
||||
.addMaterial('#', ItemTags.PLANKS)
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_cauldron", Blocks.CAULDRON)
|
||||
.setShape("I I", "I I", "III")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_hopper", Blocks.HOPPER)
|
||||
.setShape("I I", "ICI", " I ")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('C', TagAPI.ITEM_CHEST)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_piston", Blocks.PISTON)
|
||||
.setShape("WWW", "CIC", "CDC")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('D', Items.REDSTONE)
|
||||
.addMaterial('C', Items.COBBLESTONE)
|
||||
.addMaterial('W', ItemTags.PLANKS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_rail", Blocks.RAIL)
|
||||
.setOutputCount(16)
|
||||
.setShape("I I", "ISI", "I I")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('S', Items.STICK)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_stonecutter", Blocks.STONECUTTER)
|
||||
.setShape(" I ", "SSS")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('S', Items.STONE)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_bucket", Items.BUCKET)
|
||||
.setShape("I I", " I ")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_compass", Items.COMPASS)
|
||||
.setShape(" I ", "IDI", " I ")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('D', Items.REDSTONE)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_minecart", Items.MINECART)
|
||||
.setShape("I I", "III")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_shield", Items.SHIELD)
|
||||
.setShape("WIW", "WWW", " W ")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('W', ItemTags.PLANKS)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_hopper", Blocks.HOPPER).setShape("I I", "ICI", " I ").addMaterial('I', TagAPI.IRON_INGOTS).addMaterial('C', TagAPI.ITEM_CHEST).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_hopper", Blocks.HOPPER)
|
||||
.setShape("I I", "ICI", " I ")
|
||||
.addMaterial('I', TagAPI.IRON_INGOTS)
|
||||
.addMaterial('C', TagAPI.ITEM_CHEST)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_shulker_box", Blocks.SHULKER_BOX).setShape("S", "C", "S").addMaterial('S', Items.SHULKER_SHELL).addMaterial('C', TagAPI.ITEM_CHEST).checkConfig(Configs.RECIPE_CONFIG).build();
|
||||
GridRecipe.make(BCLib.MOD_ID, "tag_shulker_box", Blocks.SHULKER_BOX)
|
||||
.setShape("S", "C", "S")
|
||||
.addMaterial('S', Items.SHULKER_SHELL)
|
||||
.addMaterial('C', TagAPI.ITEM_CHEST)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,21 +77,49 @@ public class FurnaceRecipe {
|
|||
|
||||
public void build(boolean blasting, boolean campfire, boolean smoker) {
|
||||
if (exist) {
|
||||
SmeltingRecipe recipe = new SmeltingRecipe(id, group, Ingredient.of(input), new ItemStack(output, count), xp, time);
|
||||
SmeltingRecipe recipe = new SmeltingRecipe(
|
||||
id,
|
||||
group,
|
||||
Ingredient.of(input),
|
||||
new ItemStack(output, count),
|
||||
xp,
|
||||
time
|
||||
);
|
||||
BCLRecipeManager.addRecipe(RecipeType.SMELTING, recipe);
|
||||
|
||||
if (blasting) {
|
||||
BlastingRecipe recipe2 = new BlastingRecipe(id, group, Ingredient.of(input), new ItemStack(output, count), xp, time / 2);
|
||||
BlastingRecipe recipe2 = new BlastingRecipe(
|
||||
id,
|
||||
group,
|
||||
Ingredient.of(input),
|
||||
new ItemStack(output, count),
|
||||
xp,
|
||||
time / 2
|
||||
);
|
||||
BCLRecipeManager.addRecipe(RecipeType.BLASTING, recipe2);
|
||||
}
|
||||
|
||||
if (campfire) {
|
||||
CampfireCookingRecipe recipe2 = new CampfireCookingRecipe(id, group, Ingredient.of(input), new ItemStack(output, count), xp, time * 3);
|
||||
CampfireCookingRecipe recipe2 = new CampfireCookingRecipe(
|
||||
id,
|
||||
group,
|
||||
Ingredient.of(input),
|
||||
new ItemStack(output, count),
|
||||
xp,
|
||||
time * 3
|
||||
);
|
||||
BCLRecipeManager.addRecipe(RecipeType.CAMPFIRE_COOKING, recipe2);
|
||||
}
|
||||
|
||||
if (smoker) {
|
||||
SmokingRecipe recipe2 = new SmokingRecipe(id, group, Ingredient.of(input), new ItemStack(output, count), xp, time / 2);
|
||||
SmokingRecipe recipe2 = new SmokingRecipe(
|
||||
id,
|
||||
group,
|
||||
Ingredient.of(input),
|
||||
new ItemStack(output, count),
|
||||
xp,
|
||||
time / 2
|
||||
);
|
||||
BCLRecipeManager.addRecipe(RecipeType.SMOKING, recipe2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,14 @@ public class GridRecipe {
|
|||
ItemStack result = new ItemStack(output, count);
|
||||
NonNullList<Ingredient> materials = this.getMaterials(width, height);
|
||||
|
||||
CraftingRecipe recipe = shaped ? new ShapedRecipe(id, group, width, height, materials, result) : new ShapelessRecipe(id, group, result, materials);
|
||||
CraftingRecipe recipe = shaped ? new ShapedRecipe(
|
||||
id,
|
||||
group,
|
||||
width,
|
||||
height,
|
||||
materials,
|
||||
result
|
||||
) : new ShapelessRecipe(id, group, result, materials);
|
||||
BCLRecipeManager.addRecipe(type, recipe);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue