Skip to content

Commit

Permalink
Fix stone-cutting recipes for sky stone blocks (#6843)
Browse files Browse the repository at this point in the history
* Fix stone-cutting recipes for sky stone blocks

* Fix stone-cutting recipes for sky stone blocks

* Remove unnecessary SkyStoneBlock class
  • Loading branch information
62832 authored Dec 19, 2022
1 parent e44fa43 commit af62599
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 62 deletions.
11 changes: 4 additions & 7 deletions src/main/java/appeng/core/definitions/AEBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
import appeng.decorative.solid.QuartzGlassBlock;
import appeng.decorative.solid.QuartzLampBlock;
import appeng.decorative.solid.QuartzPillarBlock;
import appeng.decorative.solid.SkyStoneBlock;
import appeng.decorative.solid.SkyStoneBlock.SkystoneType;

/**
* Internal implementation for the API blocks
Expand Down Expand Up @@ -144,12 +142,11 @@ public final class AEBlocks {

public static final BlockDefinition<QuartzFixtureBlock> QUARTZ_FIXTURE = block("Charged Quartz Fixture", AEBlockIds.QUARTZ_FIXTURE, QuartzFixtureBlock::new);
public static final BlockDefinition<AEDecorativeBlock> FLUIX_BLOCK = block("Fluix Block", AEBlockIds.FLUIX_BLOCK, () -> new AEDecorativeBlock(QUARTZ_PROPERTIES));
public static final BlockDefinition<SkyStoneBlock> SKY_STONE_BLOCK = block("Sky Stone", AEBlockIds.SKY_STONE_BLOCK, () -> new SkyStoneBlock(SkystoneType.STONE,
defaultProps(Material.STONE).strength(50, 150).requiresCorrectToolForDrops()));
public static final BlockDefinition<AEDecorativeBlock> SKY_STONE_BLOCK = block("Sky Stone", AEBlockIds.SKY_STONE_BLOCK, () -> new AEDecorativeBlock(defaultProps(Material.STONE).strength(50, 150).requiresCorrectToolForDrops()));

public static final BlockDefinition<SkyStoneBlock> SMOOTH_SKY_STONE_BLOCK = block("Sky Stone Block", AEBlockIds.SMOOTH_SKY_STONE_BLOCK, () -> new SkyStoneBlock(SkystoneType.BLOCK, SKYSTONE_PROPERTIES));
public static final BlockDefinition<SkyStoneBlock> SKY_STONE_BRICK = block("Sky Stone Brick", AEBlockIds.SKY_STONE_BRICK, () -> new SkyStoneBlock(SkystoneType.BRICK, SKYSTONE_PROPERTIES));
public static final BlockDefinition<SkyStoneBlock> SKY_STONE_SMALL_BRICK = block("Sky Stone Small Brick", AEBlockIds.SKY_STONE_SMALL_BRICK, () -> new SkyStoneBlock(SkystoneType.SMALL_BRICK, SKYSTONE_PROPERTIES));
public static final BlockDefinition<AEDecorativeBlock> SMOOTH_SKY_STONE_BLOCK = block("Sky Stone Block", AEBlockIds.SMOOTH_SKY_STONE_BLOCK, () -> new AEDecorativeBlock(SKYSTONE_PROPERTIES));
public static final BlockDefinition<AEDecorativeBlock> SKY_STONE_BRICK = block("Sky Stone Brick", AEBlockIds.SKY_STONE_BRICK, () -> new AEDecorativeBlock(SKYSTONE_PROPERTIES));
public static final BlockDefinition<AEDecorativeBlock> SKY_STONE_SMALL_BRICK = block("Sky Stone Small Brick", AEBlockIds.SKY_STONE_SMALL_BRICK, () -> new AEDecorativeBlock(SKYSTONE_PROPERTIES));

public static final BlockDefinition<SkyChestBlock> SKY_STONE_CHEST = block("Sky Stone Chest", AEBlockIds.SKY_STONE_CHEST, () -> new SkyChestBlock(SkyChestBlock.SkyChestType.STONE, SKY_STONE_CHEST_PROPS));
public static final BlockDefinition<SkyChestBlock> SMOOTH_SKY_STONE_CHEST = block("Sky Stone Block Chest", AEBlockIds.SMOOTH_SKY_STONE_CHEST, () -> new SkyChestBlock(SkyChestBlock.SkyChestType.BLOCK, SKY_STONE_CHEST_PROPS));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,29 @@ public void buildRecipes(Consumer<FinishedRecipe> consumer) {
crystalBlock(consumer, AEItems.CERTUS_QUARTZ_CRYSTAL, AEBlocks.QUARTZ_BLOCK);
crystalBlock(consumer, AEItems.FLUIX_CRYSTAL, AEBlocks.FLUIX_BLOCK);

skyStoneBlock(consumer, AEBlocks.SMOOTH_SKY_STONE_BLOCK, AEBlocks.SKY_STONE_BRICK);
skyStoneBlock(consumer, AEBlocks.SKY_STONE_BRICK, AEBlocks.SKY_STONE_SMALL_BRICK);
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, AEBlocks.SKY_STONE_BRICK, 4)
.pattern("aa")
.pattern("aa")
.define('a', AEBlocks.SMOOTH_SKY_STONE_BLOCK)
.unlockedBy(criterionName(AEBlocks.SMOOTH_SKY_STONE_BLOCK), has(AEBlocks.SMOOTH_SKY_STONE_BLOCK))
.save(consumer, AppEng.makeId("decorative/sky_stone_brick"));
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, AEBlocks.SKY_STONE_SMALL_BRICK, 4)
.pattern("aa")
.pattern("aa")
.define('a', AEBlocks.SKY_STONE_BRICK)
.unlockedBy(criterionName(AEBlocks.SKY_STONE_BRICK), has(AEBlocks.SKY_STONE_BRICK))
.save(consumer, AppEng.makeId("decorative/sky_stone_small_brick"));

SingleItemRecipeBuilder
.stonecutting(Ingredient.of(AEBlocks.SMOOTH_SKY_STONE_BLOCK), RecipeCategory.MISC,
AEBlocks.SKY_STONE_BRICK)
.unlockedBy(criterionName(AEBlocks.SMOOTH_SKY_STONE_BLOCK), has(AEBlocks.SMOOTH_SKY_STONE_BLOCK))
.save(consumer, AppEng.makeId("decorative/sky_stone_brick_from_stonecutting"));
SingleItemRecipeBuilder
.stonecutting(Ingredient.of(AEBlocks.SMOOTH_SKY_STONE_BLOCK), RecipeCategory.MISC,
AEBlocks.SKY_STONE_SMALL_BRICK)
.unlockedBy(criterionName(AEBlocks.SMOOTH_SKY_STONE_BLOCK), has(AEBlocks.SMOOTH_SKY_STONE_BLOCK))
.save(consumer, AppEng.makeId("decorative/sky_stone_small_brick_from_stonecutting"));

ShapedRecipeBuilder.shaped(RecipeCategory.MISC, AEBlocks.CUT_QUARTZ_BLOCK, 4)
.pattern("aa")
Expand Down Expand Up @@ -148,17 +169,4 @@ private void crystalBlock(Consumer<FinishedRecipe> consumer, ItemDefinition<?> c
.unlockedBy(criterionName(crystal), has(crystal))
.save(consumer, AppEng.makeId("decorative/" + block.id().getPath()));
}

private void skyStoneBlock(Consumer<FinishedRecipe> consumer, BlockDefinition<?> input, BlockDefinition<?> output) {
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, output, 4)
.pattern("aa")
.pattern("aa")
.define('a', input)
.unlockedBy(criterionName(input), has(input))
.save(consumer, AppEng.makeId("decorative/" + output.id().getPath()));
SingleItemRecipeBuilder.stonecutting(Ingredient.of(input), RecipeCategory.MISC, output)
.unlockedBy(criterionName(input), has(input))
.save(consumer, AppEng.makeId("decorative/" + output.id().getPath() + "_from_stonecutting"));
}

}
40 changes: 0 additions & 40 deletions src/main/java/appeng/decorative/solid/SkyStoneBlock.java

This file was deleted.

0 comments on commit af62599

Please sign in to comment.