Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stone recipe tweaks #2498

Draft
wants to merge 6 commits into
base: yo/slab-cutting
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class StoneTypeEntry {
@Nullable
public final Item chiselStone;
@Nullable
public final Item crackedStone;
@Nullable
public final Item slab;
@Nullable
public final Item stair;
Expand All @@ -45,6 +47,7 @@ public class StoneTypeEntry {
public final boolean addPolishedStoneUnificationInfo;
public final boolean addSmeltStoneUnificationInfo;
public final boolean addChiselStoneUnificationInfo;
public final boolean addCrackedStoneUnificationInfo;
public final boolean addSlabUnificationInfo;
public final boolean addStairUnificationInfo;
public final boolean addButtonUnificationInfo;
Expand All @@ -54,7 +57,7 @@ public class StoneTypeEntry {
private StoneTypeEntry(@NotNull String modid, @NotNull String stoneName,
@Nullable Item stone, @Nullable Item polishedStone,
@Nullable Item smeltStone, @Nullable Item chiselStone,
@Nullable Item slab,
@Nullable Item crackedStone, @Nullable Item slab,
@Nullable Item stair, @Nullable Item button,
@Nullable Item wall, @Nullable Item pressurePlate,
@Nullable Material material, long materialAmount,
Expand All @@ -64,7 +67,7 @@ private StoneTypeEntry(@NotNull String modid, @NotNull String stoneName,
boolean addWallOreDict, boolean addPressurePlateOreDict,
boolean addStoneUnificationInfo, boolean addPolishedStoneUnificationInfo,
boolean addSmeltStoneUnificationInfo, boolean addChiselStoneUnificationInfo,
boolean addSlabUnificationInfo,
boolean addCrackedStoneUnificationInfo, boolean addSlabUnificationInfo,
boolean addStairUnificationInfo, boolean addButtonUnificationInfo,
boolean addWallUnificationInfo, boolean addPressurePlateUnificationInfo) {
this.modid = modid;
Expand All @@ -73,6 +76,7 @@ private StoneTypeEntry(@NotNull String modid, @NotNull String stoneName,
this.polishedStone = polishedStone;
this.smeltStone = smeltStone;
this.chiselStone = chiselStone;
this.crackedStone = crackedStone;
this.slab = slab;
this.stair = stair;
this.button = button;
Expand All @@ -90,6 +94,7 @@ private StoneTypeEntry(@NotNull String modid, @NotNull String stoneName,
this.addStoneUnificationInfo = addStoneUnificationInfo;
this.addPolishedStoneUnificationInfo = addPolishedStoneUnificationInfo;
this.addChiselStoneUnificationInfo = addChiselStoneUnificationInfo;
this.addCrackedStoneUnificationInfo = addCrackedStoneUnificationInfo;
this.addSmeltStoneUnificationInfo = addSmeltStoneUnificationInfo;
this.addSlabUnificationInfo = addSlabUnificationInfo;
this.addStairUnificationInfo = addStairUnificationInfo;
Expand All @@ -106,6 +111,7 @@ public static class Builder {
public Item polishedStone = null;
public Item smeltStone = null;
public Item chiselStone = null;
public Item crackedStone = null;
public Item slab = null;
public Item stair = null;
public Item button = null;
Expand All @@ -125,6 +131,7 @@ public static class Builder {
public boolean addPolishedStoneUnificationInfo = false;
public boolean addSmeltStoneUnificationInfo = false;
public boolean addChiselStoneUnificationInfo = false;
public boolean addCrackedStoneUnificationInfo = false;
public boolean addSlabUnificationInfo = false;
public boolean addStairUnificationInfo = false;
public boolean addButtonUnificationInfo = false;
Expand Down Expand Up @@ -156,6 +163,11 @@ public Builder chiselStone(@NotNull Item chiselStone) {
return this;
}

public Builder crackedStone(@NotNull Item crackedStone) {
this.crackedStone = crackedStone;
return this;
}

public Builder slab(@NotNull Item slab) {
this.slab = slab;
return this;
Expand Down Expand Up @@ -212,12 +224,13 @@ public Builder registerUnificationInfo(boolean stone, boolean polishedStone, boo

public StoneTypeEntry build() {
return new StoneTypeEntry(modid, stoneName,
stone, polishedStone, smeltStone, chiselStone, slab, stair, button, wall, pressurePlate,
stone, polishedStone, smeltStone, chiselStone, crackedStone, slab, stair, button, wall,
pressurePlate,
material, materialAmount,
addStoneOreDict, addPolishedStoneOreDict, addSlabOreDict, addStairOreDict,
addButtonOreDict, addWallOreDict, addPressurePlateOreDict,
addStoneUnificationInfo, addPolishedStoneUnificationInfo, addSmeltStoneUnificationInfo,
addChiselStoneUnificationInfo, addSlabUnificationInfo,
addChiselStoneUnificationInfo, addCrackedStoneUnificationInfo, addSlabUnificationInfo,
addStairUnificationInfo, addButtonUnificationInfo,
addWallUnificationInfo, addPressurePlateUnificationInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@ public static void addSmeltingRecipe(Consumer<FinishedRecipe> provider, @NotNull
addSmeltingRecipe(provider, GTCEu.id(regName), input, output, 0.0f);
}

public static void addSmeltingRecipe(Consumer<FinishedRecipe> provider, @NotNull String regName, Item input,
Item output) {
addSmeltingRecipe(provider, GTCEu.id(regName), input.getDefaultInstance(), output.getDefaultInstance(), 0.0f);
}

public static void addSmeltingRecipe(Consumer<FinishedRecipe> provider, @NotNull String regName, Item input,
Item output, float experience) {
addSmeltingRecipe(provider, GTCEu.id(regName), input.getDefaultInstance(), output.getDefaultInstance(),
experience);
}

public static void addSmeltingRecipe(Consumer<FinishedRecipe> provider, @NotNull String regName, ItemStack input,
ItemStack output, float experience) {
addSmeltingRecipe(provider, GTCEu.id(regName), input, output, experience);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private static void hardRedstoneRecipes(Consumer<ResourceLocation> registry) {
registry.accept(new ResourceLocation("minecraft:light_weighted_pressure_plate"));
registry.accept(new ResourceLocation("minecraft:stone_button"));
registry.accept(new ResourceLocation("minecraft:polished_blackstone_button"));
registry.accept(new ResourceLocation("minecraft:calibrated_sculk_sensor"));
}

private static void hardToolArmorRecipes(Consumer<ResourceLocation> registry) {
Expand Down Expand Up @@ -355,7 +356,6 @@ private static void removeVanillaBlockRecipes(Consumer<ResourceLocation> registr
registry.accept(new ResourceLocation("minecraft:polished_diorite"));
registry.accept(new ResourceLocation("minecraft:polished_granite"));
registry.accept(new ResourceLocation("minecraft:coarse_dirt"));
registry.accept(new ResourceLocation("minecraft:smooth_sandstone"));
registry.accept(new ResourceLocation("minecraft:chiseled_sandstone"));
registry.accept(new ResourceLocation("minecraft:chiseled_quartz_block"));
registry.accept(new ResourceLocation("minecraft:stone_bricks"));
Expand All @@ -365,7 +365,6 @@ private static void removeVanillaBlockRecipes(Consumer<ResourceLocation> registr
registry.accept(new ResourceLocation("minecraft:red_nether_bricks"));
registry.accept(new ResourceLocation("minecraft:red_sandstone"));
registry.accept(new ResourceLocation("minecraft:chiseled_red_sandstone"));
registry.accept(new ResourceLocation("minecraft:smooth_red_sandstone"));
registry.accept(new ResourceLocation("minecraft:bookshelf"));
registry.accept(new ResourceLocation("minecraft:quartz_pillar"));
registry.accept(new ResourceLocation("minecraft:sea_lantern"));
Expand Down Expand Up @@ -397,9 +396,12 @@ private static void removeVanillaBlockRecipes(Consumer<ResourceLocation> registr
registry.accept(new ResourceLocation("minecraft:waxed_exposed_cut_copper"));
registry.accept(new ResourceLocation("minecraft:waxed_weathered_cut_copper"));
registry.accept(new ResourceLocation("minecraft:waxed_oxidized_cut_copper"));
// registry.accept(new ResourceLocation("minecraft:end_crystal"));
registry.accept(new ResourceLocation("minecraft:end_crystal"));
registry.accept(new ResourceLocation("minecraft:end_rod"));
registry.accept(new ResourceLocation("minecraft:mud_bricks"));
registry.accept(new ResourceLocation("minecraft:mossy_stone_bricks_from_vine"));
registry.accept(new ResourceLocation("minecraft:mossy_stone_bricks_from_moss_block"));
registry.accept(new ResourceLocation("minecraft:packed_mud"));

// Carpet replacement
for (DyeColor color : DyeColor.values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1299,11 +1299,19 @@ private static void registerMossRecipe(Consumer<FinishedRecipe> provider, List<I
List<ItemStack> mossStack) {
for (int i = 0; i < regularStack.size(); i++) {
ResourceLocation mossId = BuiltInRegistries.ITEM.getKey(mossStack.get(i).getItem());
CHEMICAL_BATH_RECIPES.recipeBuilder("bath_" + mossId.getPath())
MIXER_RECIPES.recipeBuilder(mossId.getPath() + "_from_moss_block")
.inputItems(regularStack.get(i))
.inputFluids(Water.getFluid(100))
.inputItems(new ItemStack(Blocks.MOSS_BLOCK))
.inputFluids(Water.getFluid(250))
.outputItems(mossStack.get(i))
.duration(50).EUt(16).save(provider);
.duration(40).EUt(1).save(provider);

MIXER_RECIPES.recipeBuilder(mossId.getPath() + "_from_vine")
.inputItems(regularStack.get(i))
.inputItems(new ItemStack(Blocks.VINE))
.inputFluids(Water.getFluid(250))
.outputItems(mossStack.get(i))
.duration(40).EUt(1).save(provider);
}
}

Expand Down
Loading
Loading