Skip to content

Commit

Permalink
feat: Angilite
Browse files Browse the repository at this point in the history
just need hellfirestite now 🔥 🔥 🔥 🔥 /j
  • Loading branch information
Zepalesque committed Jan 18, 2025
1 parent 2b81c1b commit 2e01fc5
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.aetherteam.aether.block.AetherBlocks;
import com.aetherteam.aether.item.AetherCreativeTabs;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.MapColor;
import net.zepalesque.redux.Redux;
Expand Down Expand Up @@ -50,6 +51,18 @@ public class ReduxStoneSets {
.withTag(AetherTags.Blocks.SENTRY_BLOCKS, false)
.withItemTag(AetherTags.Items.SENTRY_BLOCKS, false);

public static final BaseStoneSet ANGILITE = register(new BaseStoneSet("angilite", MapColor.TERRACOTTA_YELLOW, SoundType.TUFF, 0.5F, 6.0F, "natural/"))
// TODO: Idea: glowstone tiles via enchanting angelic stone? Maybe? Could be nice for ceiling lights in the silver dungeons
.withLore("A stone type found in the Aether. Angilite is commonly used in Valkyrian structures in its tile/brick form, Angelic Stone. Additionally, when enchanted, it buds into a dazzlingly bright glowing stone!")
.craftsInto(AetherBlocks.ANGELIC_STONE, CommonMatrices.SQUARE_2X2)
.enchantsInto(() -> Blocks.GLOWSTONE, 0.0F, 200)
.stonecutInto(AetherBlocks.ANGELIC_STONE, 1)
.stonecutInto(AetherBlocks.ANGELIC_WALL, 1)
.stonecutInto(AetherBlocks.ANGELIC_STAIRS, 1)
.stonecutInto(AetherBlocks.ANGELIC_SLAB, 1)
.tabAfter(AetherCreativeTabs.AETHER_BUILDING_BLOCKS, ReduxStoneSets.SENTRITE::wall, true, BlockSet.TabAdditionPhase.BEFORE)
.tabAfter(AetherCreativeTabs.AETHER_NATURAL_BLOCKS, ReduxStoneSets.SENTRITE::block, false, BlockSet.TabAdditionPhase.BEFORE)
.withTag(BlockTags.MINEABLE_WITH_PICKAXE, true);


public static <T extends AbstractStoneSet> T register(T set) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public class BaseStoneSet extends AbstractStoneSet implements MutableLoreGenerat
protected final List<Supplier<AbstractStoneSet>> stonecut_sets = new ArrayList<>();
protected final Map<Supplier<? extends ItemLike>, Float> smelted_blocks = new HashMap<>();
protected final Map<Supplier<AbstractStoneSet>, Float> smelted_sets = new HashMap<>();
protected final Map<Supplier<? extends ItemLike>, Float> blasted_blocks = new HashMap<>();
protected final Map<Supplier<AbstractStoneSet>, Float> blasted_sets = new HashMap<>();
protected final Map<Supplier<? extends ItemLike>, Pair<Float, Integer>> enchanted_blocks = new HashMap<>();
protected final Map<Supplier<AbstractStoneSet>, Pair<Float, Integer>> enchanted_sets = new HashMap<>();
protected final Table<Supplier<CreativeModeTab>, Supplier<? extends ItemLike>, Pair<Boolean, TabAdditionPhase>> afterOrdering = HashBasedTable.create();
protected final Table<Supplier<CreativeModeTab>, Supplier<? extends ItemLike>, Pair<Boolean, TabAdditionPhase>> beforeOrdering = HashBasedTable.create();
protected final Table<Supplier<CreativeModeTab>, TabAdditionPhase, Boolean> appended = HashBasedTable.create();
Expand Down Expand Up @@ -200,6 +204,26 @@ public BaseStoneSet smeltsInto(Supplier<? extends ItemLike> block, float experie
return this;
}

public BaseStoneSet blastsIntoSet(Supplier<AbstractStoneSet> set, float experience) {
this.blasted_sets.put(set, experience);
return this;
}

public BaseStoneSet blastsInto(Supplier<? extends ItemLike> block, float experience) {
this.blasted_blocks.put(block, experience);
return this;
}

public BaseStoneSet enchantsIntoSet(Supplier<AbstractStoneSet> set, float experience, int time) {
this.enchanted_sets.put(set, Pair.of(experience, time));
return this;
}

public BaseStoneSet enchantsInto(Supplier<? extends ItemLike> block, float experience, int time) {
this.enchanted_blocks.put(block, Pair.of(experience, time));
return this;
}

@Override
public BaseStoneSet withTag(TagKey<Block> tag, boolean allBlocks) {
this.tags.put(tag, allBlocks);
Expand Down Expand Up @@ -310,6 +334,22 @@ public void recipeData(ReduxRecipeProvider data, RecipeOutput consumer) {
data.smeltingOreRecipe(set.get().block().get(), this.block().get(), xp).save(consumer, data.name(ReduxRecipeProvider.getConversionRecipeName(set.get().block().get(), this.block().get()) + "_smelting"))
);

this.blasted_blocks.forEach((block, xp) ->
data.blastingOreRecipe(block.get(), this.block().get(), xp).save(consumer, data.name(ReduxRecipeProvider.getConversionRecipeName(block.get(), this.block().get()) + "_blasting"))
);

this.blasted_sets.forEach((set, xp) ->
data.blastingOreRecipe(set.get().block().get(), this.block().get(), xp).save(consumer, data.name(ReduxRecipeProvider.getConversionRecipeName(set.get().block().get(), this.block().get()) + "_blasting"))
);

this.enchanted_blocks.forEach((block, xpAndTime) ->
data.enchantingRecipe(RecipeCategory.MISC, block.get(), this.block().get(), xpAndTime.getFirst(), xpAndTime.getSecond()).save(consumer, data.name(ReduxRecipeProvider.getConversionRecipeName(block.get(), this.block().get()) + "_enchanting"))
);

this.enchanted_sets.forEach((set, xpAndTime) ->
data.enchantingRecipe(RecipeCategory.MISC, set.get().block().get(), this.block().get(), xpAndTime.getFirst(), xpAndTime.getSecond()).save(consumer, data.name(ReduxRecipeProvider.getConversionRecipeName(set.get().block().get(), this.block().get()) + "_enchanting"))
);


}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.zepalesque.redux.data.prov;

import com.aetherteam.aether.data.providers.AetherRecipeProvider;
import com.aetherteam.aether.recipe.builder.AetherCookingRecipeBuilder;
import net.minecraft.advancements.Criterion;
import net.minecraft.advancements.critereon.InventoryChangeTrigger;
import net.minecraft.core.HolderLookup;
Expand Down Expand Up @@ -130,16 +131,30 @@ public SimpleCookingRecipeBuilder smeltingOreRecipe(ItemLike result, ItemLike in
return super.smeltingOreRecipe(result, ingredient, experience);
}

protected SimpleCookingRecipeBuilder smeltingOreRecipe(ItemLike result, ItemLike ingredient, float experience, int cookTime) {
public SimpleCookingRecipeBuilder blastingOreRecipe(ItemLike result, ItemLike ingredient, float experience) {
return super.blastingOreRecipe(result, ingredient, experience);
}

public SimpleCookingRecipeBuilder smeltingOreRecipe(ItemLike result, ItemLike ingredient, float experience, int cookTime) {
return SimpleCookingRecipeBuilder.smelting(Ingredient.of(ingredient), RecipeCategory.MISC, result, experience, cookTime)
.unlockedBy(getHasName(ingredient), has(ingredient));
}

protected SimpleCookingRecipeBuilder blastingOreRecipe(ItemLike result, ItemLike ingredient, float experience, int cookTime) {
public SimpleCookingRecipeBuilder blastingOreRecipe(ItemLike result, ItemLike ingredient, float experience, int cookTime) {
return SimpleCookingRecipeBuilder.blasting(Ingredient.of(ingredient), RecipeCategory.MISC, result, experience, cookTime)
.unlockedBy(getHasName(ingredient), has(ingredient));
}

@Override
public AetherCookingRecipeBuilder enchantingRecipe(RecipeCategory category, ItemLike result, ItemLike ingredient, float experience, int duration) {
return super.enchantingRecipe(category, result, ingredient, experience, duration);
}

@Override
public AetherCookingRecipeBuilder enchantingRecipe(RecipeCategory category, ItemLike result, TagKey<Item> ingredient, float experience, int duration, String unlockName) {
return super.enchantingRecipe(category, result, ingredient, experience, duration, unlockName);
}

@SuppressWarnings("deprecation")
public StackingRecipeBuilder infuse(ItemLike result, ItemLike ingredient) {
return StackingRecipeBuilder.recipe(Ingredient.of(ingredient), new ItemStackConstructor(result.asItem().builtInRegistryHolder(), Optional.empty()), InfusionRecipe::new);
Expand Down

0 comments on commit 2e01fc5

Please sign in to comment.