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

Add new Variants for Podium #5355

Open
wants to merge 21 commits into
base: 1.20
Choose a base branch
from
Open
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 @@ -37,6 +37,11 @@ public class IafBlockRegistry {
public static final RegistryObject<Block> PODIUM_JUNGLE = register("podium_jungle", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_DARK_OAK = register("podium_dark_oak", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_ACACIA = register("podium_acacia", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_CRIMSON = register("podium_crimson", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_WARPED = register("podium_warped", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_MANGROVE = register("podium_mangrove", BlockPodium::new);
public static final RegistryObject<Block> PODIUM_CHERRY = register("podium_cherry", BlockPodium::new);

public static final RegistryObject<Block> FIRE_LILY = register("fire_lily", BlockElementalFlower::new);
public static final RegistryObject<Block> FROST_LILY = register("frost_lily", BlockElementalFlower::new);
public static final RegistryObject<Block> LIGHTNING_LILY = register("lightning_lily", BlockElementalFlower::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ public static void setupClient(FMLClientSetupEvent event) {
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_JUNGLE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_ACACIA.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_DARK_OAK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_CRIMSON.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_WARPED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_MANGROVE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.PODIUM_CHERRY.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.FIRE_LILY.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.FROST_LILY.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(IafBlockRegistry.LIGHTNING_LILY.get(), RenderType.cutout());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,17 @@ private void createShaped(@NotNull final Consumer<FinishedRecipe> consumer) {
forgeCore(consumer, IafBlockRegistry.DRAGONFORGE_LIGHTNING_BRICK.get(), IafItemRegistry.LIGHTNING_DRAGON_HEART.get(), IafBlockRegistry.DRAGONFORGE_LIGHTNING_CORE_DISABLED.get());
forgeInput(consumer, IafBlockRegistry.DRAGONFORGE_LIGHTNING_BRICK.get(), Tags.Items.INGOTS_IRON, IafBlockRegistry.DRAGONFORGE_LIGHTNING_INPUT.get());

podium(consumer, Blocks.OAK_PLANKS, Blocks.OAK_SLAB, IafBlockRegistry.PODIUM_OAK.get());
podium(consumer, Blocks.BIRCH_PLANKS, Blocks.BIRCH_SLAB, IafBlockRegistry.PODIUM_BIRCH.get());
podium(consumer, Blocks.SPRUCE_PLANKS, Blocks.SPRUCE_SLAB, IafBlockRegistry.PODIUM_SPRUCE.get());
podium(consumer, Blocks.JUNGLE_PLANKS, Blocks.JUNGLE_SLAB, IafBlockRegistry.PODIUM_JUNGLE.get());
podium(consumer, Blocks.DARK_OAK_PLANKS, Blocks.DARK_OAK_SLAB, IafBlockRegistry.PODIUM_DARK_OAK.get());
podium(consumer, Blocks.ACACIA_PLANKS, Blocks.ACACIA_SLAB, IafBlockRegistry.PODIUM_ACACIA.get());
podium(consumer, Blocks.CRIMSON_PLANKS, Blocks.CRIMSON_SLAB, IafBlockRegistry.PODIUM_CRIMSON.get());
podium(consumer, Blocks.WARPED_PLANKS, Blocks.WARPED_SLAB, IafBlockRegistry.PODIUM_WARPED.get());
podium(consumer, Blocks.MANGROVE_PLANKS, Blocks.MANGROVE_SLAB, IafBlockRegistry.PODIUM_MANGROVE.get());
podium(consumer, Blocks.CHERRY_PLANKS, Blocks.CHERRY_SLAB, IafBlockRegistry.PODIUM_CHERRY.get());

ShapedRecipeBuilder.shaped(RecipeCategory.MISC, IafItemRegistry.DRAGON_MEAL.get())
.pattern("BMB")
.pattern("MBM")
Expand Down Expand Up @@ -995,6 +1006,18 @@ private void forgeInput(@NotNull final Consumer<FinishedRecipe> consumer, final
.save(consumer);
}

private void podium(@NotNull final Consumer<FinishedRecipe> consumer, final ItemLike planks, final ItemLike slab, final ItemLike result) {
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, result)
.pattern("SPS")
.pattern(" P ")
.pattern("SPS")
.define('S', slab)
.define('P', planks)
.unlockedBy("has_planks", has(planks.asItem()))
.unlockedBy("has_slab", has(slab.asItem()))
.save(consumer);
}

private static ResourceLocation location(final String path) {
return new ResourceLocation(IceAndFire.MODID, path);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@

public class IafTileEntityRegistry {

public static final DeferredRegister<BlockEntityType<?>> TYPES = DeferredRegister
.create(ForgeRegistries.BLOCK_ENTITY_TYPES, IceAndFire.MODID);
public static final DeferredRegister<BlockEntityType<?>> TYPES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, IceAndFire.MODID);

//@formatter:off
public static final RegistryObject<BlockEntityType<TileEntityLectern>> IAF_LECTERN = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityLectern::new, IafBlockRegistry.LECTERN.get()), "lectern");
public static final RegistryObject<BlockEntityType<TileEntityPodium>> PODIUM = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityPodium::new, IafBlockRegistry.PODIUM_OAK.get(), IafBlockRegistry.PODIUM_BIRCH.get(), IafBlockRegistry.PODIUM_SPRUCE.get(), IafBlockRegistry.PODIUM_JUNGLE.get(), IafBlockRegistry.PODIUM_DARK_OAK.get(), IafBlockRegistry.PODIUM_ACACIA.get()), "podium");
public static final RegistryObject<BlockEntityType<TileEntityPodium>> PODIUM = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityPodium::new, IafBlockRegistry.PODIUM_OAK.get(), IafBlockRegistry.PODIUM_BIRCH.get(), IafBlockRegistry.PODIUM_SPRUCE.get(), IafBlockRegistry.PODIUM_JUNGLE.get(), IafBlockRegistry.PODIUM_DARK_OAK.get(), IafBlockRegistry.PODIUM_ACACIA.get(), IafBlockRegistry.PODIUM_CRIMSON.get(), IafBlockRegistry.PODIUM_WARPED.get(), IafBlockRegistry.PODIUM_MANGROVE.get(), IafBlockRegistry.PODIUM_CHERRY.get()), "podium");
public static final RegistryObject<BlockEntityType<TileEntityEggInIce>> EGG_IN_ICE = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityEggInIce::new, IafBlockRegistry.EGG_IN_ICE.get()), "egginice");
public static final RegistryObject<BlockEntityType<TileEntityPixieHouse>> PIXIE_HOUSE = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityPixieHouse::new, IafBlockRegistry.PIXIE_HOUSE_MUSHROOM_RED.get(), IafBlockRegistry.PIXIE_HOUSE_MUSHROOM_BROWN.get(), IafBlockRegistry.PIXIE_HOUSE_OAK.get(), IafBlockRegistry.PIXIE_HOUSE_BIRCH.get(), IafBlockRegistry.PIXIE_HOUSE_BIRCH.get(), IafBlockRegistry.PIXIE_HOUSE_SPRUCE.get(), IafBlockRegistry.PIXIE_HOUSE_DARK_OAK.get()), "pixie_house");
public static final RegistryObject<BlockEntityType<TileEntityJar>> PIXIE_JAR = registerTileEntity(() -> BlockEntityType.Builder.of(TileEntityJar::new, IafBlockRegistry.JAR_EMPTY.get(), IafBlockRegistry.JAR_PIXIE_0.get(), IafBlockRegistry.JAR_PIXIE_1.get(), IafBlockRegistry.JAR_PIXIE_2.get(), IafBlockRegistry.JAR_PIXIE_3.get(), IafBlockRegistry.JAR_PIXIE_4.get()), "pixie_jar");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "iceandfire:block/podium_cherry"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "iceandfire:block/podium_crimson"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "iceandfire:block/podium_mangrove"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "iceandfire:block/podium_warped"
}
}
}
4 changes: 4 additions & 0 deletions src/main/resources/assets/iceandfire/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"block.iceandfire.podium_jungle": "Jungle Podium",
"block.iceandfire.podium_acacia": "Acacia Podium",
"block.iceandfire.podium_dark_oak": "Dark Oak Podium",
"block.iceandfire.podium_crimson": "Crimson Podium",
"block.iceandfire.podium_warped": "Warped Podium",
"block.iceandfire.podium_mangrove": "Mangrove Podium",
"block.iceandfire.podium_cherry": "Cherry Podium",
"block.iceandfire.fire_lily": "Fire Lily",
"block.iceandfire.frost_lily": "Frost Lily",
"block.iceandfire.lightning_lily": "Lightning Lily",
Expand Down
Loading