diff --git a/README.md b/README.md index 09f38507..2113171f 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ This mod adds a new dimension called "Sculk Depths" to Minecraft. To access this dimension, follow these steps: 1. Search for a deep dark biome with an ancient city. -2. Summon and defeat a Warden to obtain its new drop, the Soul Heart. -3. Clear all the sculk veins from the middle of the reinforced deepslate in the center of the city. -4. Use the Soul Heart to light the portal. +2. Summon a Warden and let it kill a passive mob like a cow, sheep, or horse OR kill the warden. +3. this will drop Energy Essence which is used to craft an Energized Flint and Steel +4. Clear all the sculk veins from the middle of the reinforced deepslate in the center of the city. +5. Use the Energized Flint and Steel to light the portal. When entering this dimension, it is recommended to bring a netherite pickaxe as the dimension is mostly made of a very hard block called Umbrusk. @@ -24,7 +25,8 @@ When entering this dimension, it is recommended to bring a netherite pickaxe as - Four new biomes. - A new structure (work in progress). - A new hostile mob: The Glomper. It attacks players using an elytra, so be careful while flying around! -- The Warden drops the Soul Heart, which is used to open the portal. +- Energy Essence drops when the warden kills a passive mob or when the warden is killed, this is used to craft an Energized Flint and Steel to open the portal. +- Energized Flint and Steel: can light most blocks with Soul Fire and lights the portal - new blocks: - Cephlera Light - Nine new block sets: @@ -55,5 +57,9 @@ When entering this dimension, it is recommended to bring a netherite pickaxe as ## License Please refer to the [LICENSE.md](https://github.com/warior456/Sculk-Depths/blob/main/LICENSE.md) file for licensing details. -For any questions or issues, please reach out to us on our [GitHub repository](https://github.com/warior456/Sculk-Depths). +For any questions or issues, please reach out to us on our [GitHub repository](https://github.com/warior456/Sculk-Depths) or our [Discord Server](https://discord.gg/dxANwW23Ub) + +## Need a Minecraft server? +[![pebblehost](https://github.com/warior456/Sculk-Depths/assets/66562258/ae831af6-309b-4f11-b896-5f4eb7567088)](https://billing.pebblehost.com/aff.php?aff=2968) +Starting at just 1$/month for 1GB RAM [Check it out](https://billing.pebblehost.com/aff.php?aff=2968) diff --git a/build.gradle b/build.gradle index 7fd9f005..ed43e8ba 100644 --- a/build.gradle +++ b/build.gradle @@ -19,9 +19,12 @@ repositories { maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' } maven { url 'https://maven.kyrptonaught.dev/' } maven { url "https://api.modrinth.com/maven" } + maven { url = "https://jitpack.io" } } dependencies { + + include(implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0-beta.8"))) // To change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" diff --git a/gradle.properties b/gradle.properties index e08cf03d..2e5b7f9a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,14 +9,12 @@ org.gradle.parallel=true loader_version=0.14.21 # Mod Properties - mod_version = 0.0.6_b + mod_version = 0.0.7 maven_group = com.example archives_base_name = sculk_depths # Dependencies - fabric_version= 0.83.0+1.20.1 - customportalapi_version = 0.0.1-beta64-1.20 geckolib_version = fabric-1.20:4.2 diff --git a/src/main/java/net/ugi/sculk_depths/SculkDepths.java b/src/main/java/net/ugi/sculk_depths/SculkDepths.java index 23b23dc0..91f211a9 100644 --- a/src/main/java/net/ugi/sculk_depths/SculkDepths.java +++ b/src/main/java/net/ugi/sculk_depths/SculkDepths.java @@ -13,6 +13,7 @@ import net.ugi.sculk_depths.item.ModItems; import net.ugi.sculk_depths.portal.Portals; import net.ugi.sculk_depths.sound.ModSounds; +import net.ugi.sculk_depths.util.ModLootTableModifiers; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,6 +32,7 @@ public void onInitialize() { ModBlocks.registerModBlocks(); Portals.registerModPortals(); ModSounds.registerModSounds(); + ModLootTableModifiers.modifyLootTables(); FabricDefaultAttributeRegistry.register(ModEntities.GLOMPER, GlomperEntity.setAttributes()); LOGGER.info("sculk_depths has loaded"); diff --git a/src/main/java/net/ugi/sculk_depths/SculkDepthsClient.java b/src/main/java/net/ugi/sculk_depths/SculkDepthsClient.java index 4b3ae5b6..39495a94 100644 --- a/src/main/java/net/ugi/sculk_depths/SculkDepthsClient.java +++ b/src/main/java/net/ugi/sculk_depths/SculkDepthsClient.java @@ -30,6 +30,7 @@ public void onInitializeClient() { BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.VALTROX_SAPLING, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CEPHLERA, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CEPHLERA_LIGHT, RenderLayer.getCutout()); + BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.SOUL_FIRE, RenderLayer.getCutout()); } } \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/block/ModBlocks.java b/src/main/java/net/ugi/sculk_depths/block/ModBlocks.java index 4aa4f504..c1bf538e 100644 --- a/src/main/java/net/ugi/sculk_depths/block/ModBlocks.java +++ b/src/main/java/net/ugi/sculk_depths/block/ModBlocks.java @@ -5,9 +5,14 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.block.*; import net.minecraft.block.piston.PistonBehavior; +import net.minecraft.fluid.Fluid; import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.tag.FluidTags; +import net.minecraft.registry.tag.TagBuilder; import net.minecraft.sound.BlockSoundGroup; import net.ugi.sculk_depths.SculkDepths; +import net.ugi.sculk_depths.block.custom.*; +import net.ugi.sculk_depths.block.custom.SoulFireBlock; import net.ugi.sculk_depths.block.sapling.ValtroxSaplingGenerator; import net.ugi.sculk_depths.fluid.ModFluids; import net.ugi.sculk_depths.item.ModItemGroup; @@ -22,140 +27,147 @@ public class ModBlocks { public static final Block FLUMROCK = registerBlock("flumrock", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block CRUMBLING_DIRT = registerBlock("crumbling_dirt", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(1.0f).requiresTool().sounds(BlockSoundGroup.ROOTED_DIRT)), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.DIRT).strength(1.0f).requiresTool().sounds(BlockSoundGroup.ROOTED_DIRT)), ModItemGroup.SCULK_DEPTHS); + + public static final Block KRYSLUM_ENRICHED_SOIL = registerBlock("kryslum_enriched_soil", + new KryslumEnrichedSoilBLock(FabricBlockSettings.copyOf(Blocks.FARMLAND).ticksRandomly().strength(0.8f).sounds(BlockSoundGroup.GRAVEL)), ModItemGroup.SCULK_DEPTHS); + //umbrusk blockset public static final Block UMBRUSK = registerBlock("umbrusk", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).hardness(5.0f).resistance(8f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).hardness(5.0f).resistance(8f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_STAIRS = registerBlock("umbrusk_stairs", - new StairsBlock(UMBRUSK.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(UMBRUSK.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_SLAB = registerBlock("umbrusk_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_WALL = registerBlock("umbrusk_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); //umbrusk brick blockset public static final Block UMBRUSK_BRICKS = registerBlock("umbrusk_bricks", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_BRICK_STAIRS = registerBlock("umbrusk_brick_stairs", - new StairsBlock(UMBRUSK.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(UMBRUSK.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_BRICK_SLAB = registerBlock("umbrusk_brick_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block UMBRUSK_BRICK_WALL = registerBlock("umbrusk_brick_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(5.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); //valtrox blockset public static final Block VALTROX_LOG = registerBlock("valtrox_log", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.OAK_LOG).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block VALTROX_PLANKS = registerBlock("valtrox_planks", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block VALTROX_WOOD = registerBlock("valtrox_wood", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.OAK_WOOD).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block VALTROX_SLAB = registerBlock("valtrox_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.OAK_SLAB).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block VALTROX_STAIRS = registerBlock("valtrox_stairs", - new StairsBlock(VALTROX_PLANKS.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(5.0f)), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(VALTROX_PLANKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.OAK_STAIRS).strength(5.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block VALTROX_FENCE = registerBlock("valtrox_fence", - new FenceBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); + new FenceBlock(FabricBlockSettings.copyOf(Blocks.OAK_FENCE).strength(2.0f)), ModItemGroup.SCULK_DEPTHS); //dried valtrox blockset public static final Block DRIED_VALTROX_LOG = registerBlock("dried_valtrox_log", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); public static final Block DRIED_VALTROX_PLANKS = registerBlock("dried_valtrox_planks", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); public static final Block DRIED_VALTROX_WOOD = registerBlock("dried_valtrox_wood", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); public static final Block DRIED_VALTROX_SLAB = registerBlock("dried_valtrox_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); public static final Block DRIED_VALTROX_STAIRS = registerBlock("dried_valtrox_stairs", - new StairsBlock(DRIED_VALTROX_PLANKS.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(DRIED_VALTROX_PLANKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); public static final Block DRIED_VALTROX_FENCE = registerBlock("dried_valtrox_fence", - new FenceBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); + new FenceBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(2.5f)), ModItemGroup.SCULK_DEPTHS); //petrified valtrox blockset public static final Block PETRIFIED_VALTROX_LOG = registerBlock("petrified_valtrox_log", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block PETRIFIED_VALTROX_SLATES = registerBlock("petrified_valtrox_slates", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block PETRIFIED_VALTROX_WOOD = registerBlock("petrified_valtrox_wood", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block PETRIFIED_VALTROX_SLAB = registerBlock("petrified_valtrox_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block PETRIFIED_VALTROX_STAIRS = registerBlock("petrified_valtrox_stairs", - new StairsBlock(PETRIFIED_VALTROX_SLATES.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(PETRIFIED_VALTROX_SLATES.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block PETRIFIED_VALTROX_WALL = registerBlock("petrified_valtrox_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(3.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); //zygrin set public static final Block ZYGRIN = registerBlock("zygrin", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_STAIRS = registerBlock("zygrin_stairs", - new StairsBlock(ZYGRIN.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(ZYGRIN.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_SLAB = registerBlock("zygrin_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_WALL = registerBlock("zygrin_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_PILLAR = registerBlock("zygrin_pillar", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block CHISELED_ZYGRIN = registerBlock("chiseled_zygrin", - new PillarBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f)), ModItemGroup.SCULK_DEPTHS); + new PillarBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f)), ModItemGroup.SCULK_DEPTHS); public static final Block POLISHED_ZYGRIN = registerBlock("polished_zygrin", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block POLISHED_ZYGRIN_STAIRS = registerBlock("polished_zygrin_stairs", - new StairsBlock(POLISHED_ZYGRIN.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(POLISHED_ZYGRIN.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block POLISHED_ZYGRIN_SLAB = registerBlock("polished_zygrin_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block POLISHED_ZYGRIN_WALL = registerBlock("polished_zygrin_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_BRICKS = registerBlock("zygrin_bricks", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_BRICK_STAIRS = registerBlock("zygrin_brick_stairs", - new StairsBlock(ZYGRIN_BRICKS.getDefaultState(), AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new StairsBlock(ZYGRIN_BRICKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_BRICK_SLAB = registerBlock("zygrin_brick_slab", - new SlabBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new SlabBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); public static final Block ZYGRIN_BRICK_WALL = registerBlock("zygrin_brick_wall", - new WallBlock(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new WallBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + + public static final Block ZYGRIN_LIGHT = registerBlock("zygrin_light", + new nonConnectingBlock(FabricBlockSettings.copyOf(Blocks.STONE).strength(4.0f).requiresTool().luminance(blockState -> 15)), ModItemGroup.SCULK_DEPTHS); //leaves public static final Block VALTROX_LEAVES = registerBlock("valtrox_leaves", @@ -173,10 +185,12 @@ public class ModBlocks { //ores public static final Block QUAZARITH_ORE = registerBlock("quazarith_ore", - new Block(AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.BLOCK).hardness(6.0f).resistance(10f).requiresTool()), ModItemGroup.SCULK_DEPTHS); + new Block(FabricBlockSettings.copyOf(Blocks.DEEPSLATE).hardness(6.0f).resistance(10f).requiresTool()), ModItemGroup.SCULK_DEPTHS); //fluids - public static final Block KRYSLUM = registerBlockWithoutBlockItem("kryslum", new ModFluidBlock(ModFluids.KRYSLUM_STILL, AbstractBlock.Settings.create().pistonBehavior(PistonBehavior.IGNORE).noCollision().nonOpaque().dropsNothing()), ModItemGroup.SCULK_DEPTHS); + public static final Block KRYSLUM = registerBlockWithoutBlockItem("kryslum", new FluidBlock(ModFluids.KRYSLUM_STILL, FabricBlockSettings.copyOf(Blocks.WATER).replaceable().noCollision().strength(100.0f).pistonBehavior(PistonBehavior.DESTROY).dropsNothing().liquid().solid().sounds(BlockSoundGroup.SCULK)), ModItemGroup.SCULK_DEPTHS); + + public static final Block SOUL_FIRE = registerBlockWithoutBlockItem("soul_fire", new SoulFireBlock( FabricBlockSettings.copyOf(Blocks.SOUL_FIRE)), ModItemGroup.SCULK_DEPTHS); private static Block registerBlock(String name, Block block, RegistryKey group) { registerBlockItem(name, block, group); diff --git a/src/main/java/net/ugi/sculk_depths/block/ModFluidBlock.java b/src/main/java/net/ugi/sculk_depths/block/ModFluidBlock.java deleted file mode 100644 index 2000e668..00000000 --- a/src/main/java/net/ugi/sculk_depths/block/ModFluidBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.ugi.sculk_depths.block; - - -import net.minecraft.block.FluidBlock; -import net.minecraft.fluid.FlowableFluid; - -public class ModFluidBlock extends FluidBlock { - public ModFluidBlock(FlowableFluid fluid, Settings settings) { - super(fluid, settings); - } -} \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/block/CephleraBlock.java b/src/main/java/net/ugi/sculk_depths/block/custom/CephleraBlock.java similarity index 76% rename from src/main/java/net/ugi/sculk_depths/block/CephleraBlock.java rename to src/main/java/net/ugi/sculk_depths/block/custom/CephleraBlock.java index 0ab8f1d6..2dc6e778 100644 --- a/src/main/java/net/ugi/sculk_depths/block/CephleraBlock.java +++ b/src/main/java/net/ugi/sculk_depths/block/custom/CephleraBlock.java @@ -1,9 +1,10 @@ -package net.ugi.sculk_depths.block; +package net.ugi.sculk_depths.block.custom; import net.minecraft.block.*; import net.minecraft.util.math.Direction; import net.minecraft.util.math.random.Random; import net.minecraft.util.shape.VoxelShape; +import net.ugi.sculk_depths.block.ModBlocks; public class CephleraBlock extends AbstractPlantBlock { public static final VoxelShape SHAPE = Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 16.0, 15.0); @@ -13,6 +14,6 @@ public CephleraBlock(AbstractBlock.Settings settings) { } protected AbstractPlantStemBlock getStem() { - return (AbstractPlantStemBlock)ModBlocks.CEPHLERA_LIGHT; + return (AbstractPlantStemBlock) ModBlocks.CEPHLERA_LIGHT; } } \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/block/CephleraLightBlock.java b/src/main/java/net/ugi/sculk_depths/block/custom/CephleraLightBlock.java similarity index 89% rename from src/main/java/net/ugi/sculk_depths/block/CephleraLightBlock.java rename to src/main/java/net/ugi/sculk_depths/block/custom/CephleraLightBlock.java index 64db5e4f..4d5d1bd6 100644 --- a/src/main/java/net/ugi/sculk_depths/block/CephleraLightBlock.java +++ b/src/main/java/net/ugi/sculk_depths/block/custom/CephleraLightBlock.java @@ -1,10 +1,11 @@ -package net.ugi.sculk_depths.block; +package net.ugi.sculk_depths.block.custom; import net.minecraft.block.*; import net.minecraft.util.math.Direction; import net.minecraft.util.math.random.Random; import net.minecraft.util.shape.VoxelShape; +import net.ugi.sculk_depths.block.ModBlocks; public class CephleraLightBlock extends AbstractPlantStemBlock { protected static final VoxelShape SHAPE = Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 16.0, 15.0); diff --git a/src/main/java/net/ugi/sculk_depths/block/custom/KryslumEnrichedSoilBLock.java b/src/main/java/net/ugi/sculk_depths/block/custom/KryslumEnrichedSoilBLock.java new file mode 100644 index 00000000..bd0cab92 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/block/custom/KryslumEnrichedSoilBLock.java @@ -0,0 +1,72 @@ +package net.ugi.sculk_depths.block.custom; + +import com.mojang.datafixers.types.templates.Tag; +import net.minecraft.block.*; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.IntProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.random.Random; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.*; + +public class KryslumEnrichedSoilBLock extends FarmlandBlock { + + public static final IntProperty MOISTURE = Properties.MOISTURE; + protected static final VoxelShape SHAPE = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 15.0, 16.0); + public static final int MAX_MOISTURE = 7; + + public KryslumEnrichedSoilBLock(AbstractBlock.Settings settings) { + super(settings); + this.setDefaultState((BlockState)((BlockState)this.stateManager.getDefaultState()).with(MOISTURE, MAX_MOISTURE)); + } + + + + @Override + public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + if (direction == Direction.UP && !state.canPlaceAt(world, pos)) { + world.scheduleBlockTick(pos, this, 1); + } + return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos); + } + + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + if (!this.getDefaultState().canPlaceAt(ctx.getWorld(), ctx.getBlockPos())) { + return Blocks.DIRT.getDefaultState(); + } + return super.getPlacementState(ctx); + } + + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + return SHAPE; + } + + @Override + public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + } + + @Override + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + } + + @Override + public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { + } + + + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(MOISTURE); + } + +} diff --git a/src/main/java/net/ugi/sculk_depths/block/custom/SoulFireBlock.java b/src/main/java/net/ugi/sculk_depths/block/custom/SoulFireBlock.java new file mode 100644 index 00000000..ea926978 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/block/custom/SoulFireBlock.java @@ -0,0 +1,46 @@ +package net.ugi.sculk_depths.block.custom; + + +import net.kyrptonaught.customportalapi.portal.PortalPlacer; +import net.minecraft.block.*; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.World; +import net.minecraft.world.WorldAccess; +import net.minecraft.world.WorldView; + +import static net.ugi.sculk_depths.portal.Portals.SOUL_FIRE; + + +public class SoulFireBlock extends AbstractFireBlock { + + + + public SoulFireBlock(AbstractBlock.Settings settings) { + super(settings, 2); + } + + @Override + public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) { + if (this.canPlaceAt(state, world, pos)) { + return this.getDefaultState(); + } + return Blocks.AIR.getDefaultState(); + } + + @Override + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + return isSoulBase(world.getBlockState(pos.down())); + } + + public static boolean isSoulBase(BlockState state) { + //return true || state.isOf(Blocks.REINFORCED_DEEPSLATE) || state.isIn(BlockTags.LOGS) || state.isIn(BlockTags.INFINIBURN_END); + return !state.isOf(Blocks.AIR); + } + + @Override + protected boolean isFlammable(BlockState state) { + return true; + } + +} diff --git a/src/main/java/net/ugi/sculk_depths/block/custom/nonConnectingBlock.java b/src/main/java/net/ugi/sculk_depths/block/custom/nonConnectingBlock.java new file mode 100644 index 00000000..03885e83 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/block/custom/nonConnectingBlock.java @@ -0,0 +1,17 @@ +package net.ugi.sculk_depths.block.custom; + +import net.minecraft.block.*; + + +public class nonConnectingBlock extends Block { + + + public nonConnectingBlock(Settings settings) { + super(settings); + } + + //@Override + public static boolean cannotConnect(BlockState state) { + return true; + } +} diff --git a/src/main/java/net/ugi/sculk_depths/entity/client/GlomperRenderer.java b/src/main/java/net/ugi/sculk_depths/entity/client/GlomperRenderer.java index 8f6a157c..fd2161db 100644 --- a/src/main/java/net/ugi/sculk_depths/entity/client/GlomperRenderer.java +++ b/src/main/java/net/ugi/sculk_depths/entity/client/GlomperRenderer.java @@ -23,7 +23,7 @@ public Identifier getTextureLocation(GlomperEntity animatable) { @Override protected int getBlockLight(GlomperEntity entity, BlockPos pos) { - return 14; + return 15; } @Override diff --git a/src/main/java/net/ugi/sculk_depths/entity/custom/GlomperEntity.java b/src/main/java/net/ugi/sculk_depths/entity/custom/GlomperEntity.java index 9940fce3..d3cd542a 100644 --- a/src/main/java/net/ugi/sculk_depths/entity/custom/GlomperEntity.java +++ b/src/main/java/net/ugi/sculk_depths/entity/custom/GlomperEntity.java @@ -79,7 +79,7 @@ protected void initGoals() { } - public class GlomperTargetGoal + public static class GlomperTargetGoal extends ActiveTargetGoal { private boolean pauseWhenMobIdle; @@ -100,6 +100,7 @@ public boolean shouldContinue() { if (!this.pauseWhenMobIdle) { return !this.mob.getNavigation().isIdle(); } + assert this.target != null; if (!this.target.isFallFlying()) { return false; } diff --git a/src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java b/src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java index 1af49f2e..55a0a3da 100644 --- a/src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java +++ b/src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java @@ -13,6 +13,7 @@ import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; import net.minecraft.state.StateManager; +import net.minecraft.state.property.IntProperty; import net.minecraft.state.property.Properties; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; @@ -24,7 +25,8 @@ import java.util.Optional; -public class KryslumFluid extends FlowableFluid { +public abstract class KryslumFluid extends FlowableFluid { + public static final IntProperty LEVEL = Properties.LEVEL_1_8; public KryslumFluid() { } @@ -40,6 +42,7 @@ public Item getBucketItem() { return ModItems.KRYSLUM_BUCKET; } + @Override public void randomDisplayTick(World world, BlockPos pos, FluidState state, Random random) { if (!state.isStill() && !(Boolean) state.get(FALLING)) { if (random.nextInt(64) == 0) { @@ -50,6 +53,7 @@ public void randomDisplayTick(World world, BlockPos pos, FluidState state, Rando } } + @Override @Nullable public ParticleEffect getParticle() { return ParticleTypes.SCULK_CHARGE_POP; @@ -78,23 +82,20 @@ public boolean isStill(FluidState state) { } public boolean matchesType(Fluid fluid) { - return fluid == ModFluids.KRYSLUM_STILL || fluid == ModFluids.KRYSLUM_FLOWING; + return fluid == ModFluids.KRYSLUM_STILL || fluid == ModFluids.KRYSLUM_FLOWING; //perhaps here for adding farmland } public int getLevelDecreasePerBlock(WorldView world) { return 2; } - @Override - public int getLevel(FluidState state) { - return 0; - } public int getTickRate(WorldView world) { return 40; } public boolean canBeReplacedWith(FluidState state, BlockView world, BlockPos pos, Fluid fluid, Direction direction) { + //noinspection deprecation return direction == Direction.DOWN && !fluid.isIn(FluidTags.WATER); } @@ -107,31 +108,26 @@ public Optional getBucketFillSound() { } public static class Flowing extends KryslumFluid { - public Flowing() { - } - + @Override protected void appendProperties(StateManager.Builder builder) { super.appendProperties(builder); builder.add(LEVEL); } + @Override public int getLevel(FluidState state) { return state.get(LEVEL); } - public boolean isStill(FluidState state) { - return false; - } } public static class Still extends KryslumFluid { - public Still() { - } - + @Override public int getLevel(FluidState state) { return 8; } + @Override public boolean isStill(FluidState state) { return true; } diff --git a/src/main/java/net/ugi/sculk_depths/fluid/ModFluids.java b/src/main/java/net/ugi/sculk_depths/fluid/ModFluids.java index b0a56b80..9a0cbb06 100644 --- a/src/main/java/net/ugi/sculk_depths/fluid/ModFluids.java +++ b/src/main/java/net/ugi/sculk_depths/fluid/ModFluids.java @@ -10,6 +10,7 @@ public class ModFluids { public static final FlowableFluid KRYSLUM_STILL = register("kryslum_still", new KryslumFluid.Still()); public static final FlowableFluid KRYSLUM_FLOWING = register("kryslum_flow", new KryslumFluid.Flowing()); + private static FlowableFluid register(String name, FlowableFluid flowableFluid) { return Registry.register(Registries.FLUID, new Identifier(SculkDepths.MOD_ID, name), flowableFluid); } diff --git a/src/main/java/net/ugi/sculk_depths/item/ModItems.java b/src/main/java/net/ugi/sculk_depths/item/ModItems.java index f748b2f6..9810429d 100644 --- a/src/main/java/net/ugi/sculk_depths/item/ModItems.java +++ b/src/main/java/net/ugi/sculk_depths/item/ModItems.java @@ -8,7 +8,9 @@ import net.minecraft.registry.RegistryKey; import net.minecraft.util.Identifier; import net.ugi.sculk_depths.SculkDepths; +import net.ugi.sculk_depths.entity.ModEntities; import net.ugi.sculk_depths.fluid.ModFluids; +import net.ugi.sculk_depths.item.custom.EnergizedFlintAndSteelItem; public class ModItems { @@ -23,6 +25,14 @@ public class ModItems { public static final Item QUAZARITH_PIECES = registerItem("quazarith_pieces", new Item(new FabricItemSettings())); + public static final Item ENERGY_ESSENCE = registerItem("energy_essence", + new Item(new FabricItemSettings())); + public static final Item ENERGISED_FLINT_AND_STEEL = registerItem("energized_flint_and_steel", + new EnergizedFlintAndSteelItem(new FabricItemSettings().maxCount(1).maxDamage(128))); + + public static final Item GLOMPER_SPAWN_EGG = registerItem("glomper_spawn_egg", + new SpawnEggItem(ModEntities.GLOMPER, 1769607, 42751, new FabricItemSettings())); + //quazarith tools public static final Item QUAZARITH_SHOVEL = registerItem("quazarith_shovel", @@ -67,6 +77,9 @@ public static void addItemsToItemGroup() { addToItemGroup(ModItemGroup.SCULK_DEPTHS, KRYSLUM_BUCKET); addToItemGroup(ModItemGroup.SCULK_DEPTHS, SOUL_HEART); + addToItemGroup(ModItemGroup.SCULK_DEPTHS, ENERGY_ESSENCE); + addToItemGroup(ModItemGroup.SCULK_DEPTHS, ENERGISED_FLINT_AND_STEEL); + addToItemGroup(ModItemGroup.SCULK_DEPTHS, GLOMPER_SPAWN_EGG); addToItemGroup(ModItemGroup.SCULK_DEPTHS, QUAZARITH_INGOT); addToItemGroup(ModItemGroup.SCULK_DEPTHS, QUAZARITH_PIECES); diff --git a/src/main/java/net/ugi/sculk_depths/item/custom/EnergizedFlintAndSteelItem.java b/src/main/java/net/ugi/sculk_depths/item/custom/EnergizedFlintAndSteelItem.java new file mode 100644 index 00000000..65d7175c --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/item/custom/EnergizedFlintAndSteelItem.java @@ -0,0 +1,73 @@ +package net.ugi.sculk_depths.item.custom; + +import net.kyrptonaught.customportalapi.portal.PortalPlacer; +import net.minecraft.advancement.criterion.Criteria; +import net.minecraft.block.*; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.FlintAndSteelItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUsageContext; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.state.property.Properties; +import net.minecraft.util.ActionResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.event.GameEvent; +import net.ugi.sculk_depths.block.ModBlocks; + +import static net.ugi.sculk_depths.portal.Portals.SOUL_FIRE; + +public class EnergizedFlintAndSteelItem extends Item { + + public EnergizedFlintAndSteelItem(Settings settings) { + super(settings); + } + + @Override + public ActionResult useOnBlock(ItemUsageContext context) { //originally copied from mc + BlockPos blockPos; + PlayerEntity playerEntity = context.getPlayer(); + World world = context.getWorld(); + BlockState blockState = world.getBlockState(blockPos = context.getBlockPos()); + + boolean portalLighted = PortalPlacer.attemptPortalLight(world, blockPos.offset(context.getSide()), SOUL_FIRE); + System.out.println(portalLighted); + if(portalLighted){ + ItemStack itemStack = context.getStack(); + if (playerEntity instanceof ServerPlayerEntity) { + itemStack.damage(15, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); //todo config damage amount + } + return ActionResult.success(world.isClient()); + } + + if (CampfireBlock.canBeLit(blockState) || CandleBlock.canBeLit(blockState) || CandleCakeBlock.canBeLit(blockState)) { + world.playSound(playerEntity, blockPos, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0f, world.getRandom().nextFloat() * 0.4f + 0.8f); + world.setBlockState(blockPos, (BlockState)blockState.with(Properties.LIT, true), Block.NOTIFY_ALL | Block.REDRAW_ON_MAIN_THREAD); + world.emitGameEvent((Entity)playerEntity, GameEvent.BLOCK_CHANGE, blockPos); + if (playerEntity != null) { + context.getStack().damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); + } + return ActionResult.success(world.isClient()); + } + BlockPos blockPos2 = blockPos.offset(context.getSide()); + if (AbstractFireBlock.canPlaceAt(world, blockPos2, context.getHorizontalPlayerFacing())) { + world.playSound(playerEntity, blockPos2, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0f, world.getRandom().nextFloat() * 0.4f + 0.8f); + BlockState blockState2 = ModBlocks.SOUL_FIRE.getDefaultState(); + world.setBlockState(blockPos2, blockState2, Block.NOTIFY_ALL | Block.REDRAW_ON_MAIN_THREAD); + world.emitGameEvent((Entity)playerEntity, GameEvent.BLOCK_PLACE, blockPos); + ItemStack itemStack = context.getStack(); + if (playerEntity instanceof ServerPlayerEntity) { + Criteria.PLACED_BLOCK.trigger((ServerPlayerEntity)playerEntity, blockPos2, itemStack); + itemStack.damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand())); + } + return ActionResult.success(world.isClient()); + } + + return ActionResult.FAIL; + } + +} diff --git a/src/main/java/net/ugi/sculk_depths/mixin/AttachedStemBlockMixin.java b/src/main/java/net/ugi/sculk_depths/mixin/AttachedStemBlockMixin.java new file mode 100644 index 00000000..067989c1 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/mixin/AttachedStemBlockMixin.java @@ -0,0 +1,23 @@ +package net.ugi.sculk_depths.mixin; + +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import com.llamalad7.mixinextras.sugar.Local; +import net.minecraft.block.AttachedStemBlock; +import net.minecraft.block.BlockState; +import net.minecraft.block.StemBlock; +import net.ugi.sculk_depths.block.custom.KryslumEnrichedSoilBLock; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + + +@Mixin(AttachedStemBlock.class) +public abstract class AttachedStemBlockMixin { + + @ModifyReturnValue( + method = "canPlantOnTop", + at = @At("RETURN") + ) + private boolean allowOnTopOfKryslumEnrichedSoil(boolean original, @Local(ordinal = 0) BlockState floor) { + return original || floor.getBlock() instanceof KryslumEnrichedSoilBLock; + } +} \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/mixin/CropBlockMixin.java b/src/main/java/net/ugi/sculk_depths/mixin/CropBlockMixin.java new file mode 100644 index 00000000..bb82b17a --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/mixin/CropBlockMixin.java @@ -0,0 +1,46 @@ +package net.ugi.sculk_depths.mixin; + +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import com.llamalad7.mixinextras.sugar.Local; +import net.minecraft.block.*; + +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; +import net.ugi.sculk_depths.block.ModBlocks; +import net.ugi.sculk_depths.block.custom.KryslumEnrichedSoilBLock; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyVariable; + + +@Mixin(CropBlock.class) +public abstract class CropBlockMixin { + + @ModifyReturnValue( + method = "canPlantOnTop", + at = @At("RETURN") + ) + private boolean allowOnTopOfKryslumEnrichedSoil(boolean original, @Local(ordinal = 0) BlockState floor) { + return original || floor.getBlock() instanceof KryslumEnrichedSoilBLock; + } + + + @ModifyVariable( + method = "getAvailableMoisture", + at = @At( + value = "STORE" + ), + ordinal = 0 + ) + private static float changeMoistureOnKryslumEnrichedSoil(float originalValue, Block block, BlockView world, BlockPos pos) { + BlockState blockState = world.getBlockState(pos.down()); + if (blockState.isOf(ModBlocks.KRYSLUM_ENRICHED_SOIL)) { + return 7.0f; + + } + return originalValue; + } +} + + + diff --git a/src/main/java/net/ugi/sculk_depths/mixin/FarmLandBlockMixin.java b/src/main/java/net/ugi/sculk_depths/mixin/FarmLandBlockMixin.java new file mode 100644 index 00000000..0906dbb5 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/mixin/FarmLandBlockMixin.java @@ -0,0 +1,28 @@ +package net.ugi.sculk_depths.mixin; + + +import com.llamalad7.mixinextras.injector.ModifyExpressionValue; +import com.llamalad7.mixinextras.sugar.Local; +import net.minecraft.block.FarmlandBlock; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.WorldView; +import net.ugi.sculk_depths.block.ModBlocks; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(FarmlandBlock.class) + + +public abstract class FarmLandBlockMixin { + + + @ModifyExpressionValue( + method = "isWaterNearby", + at = @At(value = "INVOKE", target = "Lnet/minecraft/fluid/FluidState;isIn(Lnet/minecraft/registry/tag/TagKey;)Z") + ) + private static boolean kryslumWetsFarmland(boolean original, @Local(ordinal = 0) WorldView world, @Local(ordinal = 1) BlockPos blockPos ) { + return original || world.getBlockState(blockPos).isOf(ModBlocks.KRYSLUM_ENRICHED_SOIL); + } + + +} diff --git a/src/main/java/net/ugi/sculk_depths/mixin/LivingEntityMixin.java b/src/main/java/net/ugi/sculk_depths/mixin/LivingEntityMixin.java new file mode 100644 index 00000000..3328eef2 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/mixin/LivingEntityMixin.java @@ -0,0 +1,34 @@ +package net.ugi.sculk_depths.mixin; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.mob.WardenEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.ugi.sculk_depths.item.ModItems; +import net.ugi.sculk_depths.tags.ModEntityTags; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(LivingEntity.class) +public abstract class LivingEntityMixin extends Entity { + protected LivingEntityMixin(EntityType type, World world) { + super(type, world); + } + + @Inject(method = "onKilledBy", at = @At("RETURN")) + public void sculkDepths$onKilledBy(@Nullable LivingEntity adversary, CallbackInfo ci) { + if (this.getWorld().isClient) { + return; + } + if (adversary instanceof WardenEntity && this.getType().isIn(ModEntityTags.DROPS_ENERGY_ESSENCE)) { + ItemEntity itemEntity = new ItemEntity(this.getWorld(), this.getX(), this.getY(), this.getZ(), new ItemStack(ModItems.ENERGY_ESSENCE)); + this.getWorld().spawnEntity(itemEntity); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/mixin/StemBlockMixin.java b/src/main/java/net/ugi/sculk_depths/mixin/StemBlockMixin.java new file mode 100644 index 00000000..9b5b1ab4 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/mixin/StemBlockMixin.java @@ -0,0 +1,22 @@ +package net.ugi.sculk_depths.mixin; + +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import com.llamalad7.mixinextras.sugar.Local; +import net.minecraft.block.*; + +import net.ugi.sculk_depths.block.custom.KryslumEnrichedSoilBLock; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + + +@Mixin(StemBlock.class) +public abstract class StemBlockMixin { + + @ModifyReturnValue( + method = "canPlantOnTop", + at = @At("RETURN") + ) + private boolean allowOnTopOfKryslumEnrichedSoil(boolean original, @Local(ordinal = 0) BlockState floor) { + return original || floor.getBlock() instanceof KryslumEnrichedSoilBLock; + } +} \ No newline at end of file diff --git a/src/main/java/net/ugi/sculk_depths/portal/Portals.java b/src/main/java/net/ugi/sculk_depths/portal/Portals.java index e894b296..446bf957 100644 --- a/src/main/java/net/ugi/sculk_depths/portal/Portals.java +++ b/src/main/java/net/ugi/sculk_depths/portal/Portals.java @@ -9,21 +9,24 @@ import net.ugi.sculk_depths.item.ModItems; public class Portals { + public final static PortalIgnitionSource SOUL_FIRE = PortalIgnitionSource.CustomSource(new Identifier("sculk_depths","soul_fire")); public static void registerModPortals() { CustomPortalBuilder.beginPortal() .frameBlock(Blocks.REINFORCED_DEEPSLATE) //.customPortalBlock(Blocks.SCULK) .destDimID(new Identifier("sculk_depths:sculk_depthsdim")) .tintColor(1, 69, 86) - .lightWithItem(ModItems.SOUL_HEART) + .customIgnitionSource(SOUL_FIRE) + //.lightWithItem(ModItems.ENERGISED_FLINT_AND_STEEL) .setPortalSearchYRange(0, 120) .registerIgniteEvent((player, world, portalPos, framePos, portalIgnitionSource) -> { if (portalIgnitionSource.sourceType == PortalIgnitionSource.SourceType.USEITEM && player != null) { if (player.isCreative()) return; - ItemStack heldItem = player.getMainHandStack().getItem() == ModItems.SOUL_HEART ? + ItemStack heldItem = player.getMainHandStack().getItem() == ModItems.ENERGISED_FLINT_AND_STEEL ? player.getMainHandStack() : player.getOffHandStack(); - heldItem.decrement(1); + heldItem.damage(10, player, p -> p.sendToolBreakStatus(player.getActiveHand())); //todo configurable damage + //heldItem.setDamage(heldItem.getDamage() + 10); //if above breaks use this with a custom durability check } }) .registerPortal(); diff --git a/src/main/java/net/ugi/sculk_depths/tags/ModEntityTags.java b/src/main/java/net/ugi/sculk_depths/tags/ModEntityTags.java new file mode 100644 index 00000000..2a27fb2e --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/tags/ModEntityTags.java @@ -0,0 +1,11 @@ +package net.ugi.sculk_depths.tags; + +import net.minecraft.entity.EntityType; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; +import net.ugi.sculk_depths.SculkDepths; + +public class ModEntityTags { + public static final TagKey> DROPS_ENERGY_ESSENCE = TagKey.of(RegistryKeys.ENTITY_TYPE, new Identifier(SculkDepths.MOD_ID, "drops_energy_essence")); +} diff --git a/src/main/java/net/ugi/sculk_depths/util/ModLootTableModifiers.java b/src/main/java/net/ugi/sculk_depths/util/ModLootTableModifiers.java new file mode 100644 index 00000000..6e5f6691 --- /dev/null +++ b/src/main/java/net/ugi/sculk_depths/util/ModLootTableModifiers.java @@ -0,0 +1,23 @@ + + +package net.ugi.sculk_depths.util; + +import net.fabricmc.fabric.api.loot.v2.LootTableEvents; +import net.minecraft.loot.LootPool; +import net.minecraft.loot.LootTable; +import net.minecraft.util.Identifier; +import net.ugi.sculk_depths.SculkDepths; + +public class ModLootTableModifiers { + + private static final Identifier BLAZE_ID = new Identifier("minecraft", "entities/blaze"); + + public static void modifyLootTables() { + + } + + + + + +} diff --git a/src/main/resources/assets/sculk_depths/blockstates/kryslum_enriched_soil.json b/src/main/resources/assets/sculk_depths/blockstates/kryslum_enriched_soil.json new file mode 100644 index 00000000..5a0c316c --- /dev/null +++ b/src/main/resources/assets/sculk_depths/blockstates/kryslum_enriched_soil.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "sculk_depths:block/kryslum_enriched_soil" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/blockstates/soul_fire.json b/src/main/resources/assets/sculk_depths/blockstates/soul_fire.json new file mode 100644 index 00000000..bd637a77 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/blockstates/soul_fire.json @@ -0,0 +1,90 @@ +{ + "multipart": [ + { + "apply": [ + { + "model": "minecraft:block/soul_fire_floor0" + }, + { + "model": "minecraft:block/soul_fire_floor1" + } + ] + }, + { + "apply": [ + { + "model": "minecraft:block/soul_fire_side0" + }, + { + "model": "minecraft:block/soul_fire_side1" + }, + { + "model": "minecraft:block/soul_fire_side_alt0" + }, + { + "model": "minecraft:block/soul_fire_side_alt1" + } + ] + }, + { + "apply": [ + { + "model": "minecraft:block/soul_fire_side0", + "y": 90 + }, + { + "model": "minecraft:block/soul_fire_side1", + "y": 90 + }, + { + "model": "minecraft:block/soul_fire_side_alt0", + "y": 90 + }, + { + "model": "minecraft:block/soul_fire_side_alt1", + "y": 90 + } + ] + }, + { + "apply": [ + { + "model": "minecraft:block/soul_fire_side0", + "y": 180 + }, + { + "model": "minecraft:block/soul_fire_side1", + "y": 180 + }, + { + "model": "minecraft:block/soul_fire_side_alt0", + "y": 180 + }, + { + "model": "minecraft:block/soul_fire_side_alt1", + "y": 180 + } + ] + }, + { + "apply": [ + { + "model": "minecraft:block/soul_fire_side0", + "y": 270 + }, + { + "model": "minecraft:block/soul_fire_side1", + "y": 270 + }, + { + "model": "minecraft:block/soul_fire_side_alt0", + "y": 270 + }, + { + "model": "minecraft:block/soul_fire_side_alt1", + "y": 270 + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/blockstates/zygrin_light.json b/src/main/resources/assets/sculk_depths/blockstates/zygrin_light.json new file mode 100644 index 00000000..7e963699 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/blockstates/zygrin_light.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "sculk_depths:block/zygrin_light" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/lang/en_us.json b/src/main/resources/assets/sculk_depths/lang/en_us.json index 4f6a8143..7539cbbb 100644 --- a/src/main/resources/assets/sculk_depths/lang/en_us.json +++ b/src/main/resources/assets/sculk_depths/lang/en_us.json @@ -1,6 +1,9 @@ { "item.sculk_depths.kryslum_bucket": "Kryslum Bucket", - "item.sculk_depths.soul_heart": "Soul Heart", + "item.sculk_depths.soul_heart": "Soul Heart (DEPRECATED PLEASE CONVERT IN CRAFTING TABLE)", + "item.sculk_depths.energy_essence" : "Energy Essence", + "item.sculk_depths.energized_flint_and_steel" : "Energized Flint and Steel", + "item.sculk_depths.glomper_spawn_egg": "Glomper Spawn Egg", "block.sculk_depths.crumbling_dirt" : "Crumbling Dirt", "block.sculk_depths.umbrusk": "Umbrusk", @@ -73,9 +76,12 @@ "block.sculk_depths.zygrin_brick_wall": "Zygrin Brick Wall", "block.sculk_depths.zygrin_pillar": "Zygrin Pillar", "block.sculk_depths.chiseled_zygrin": "Chiseled Zygrin", + "block.sculk_depths.zygrin_light": "Zygrin Light", "block.sculk_depths.cephlera": "Cephlera", "block.sculk_depths.cephlera_light": "Cephlera Light", + "block.sculk_depths.kryslum_enriched_soil": "Kryslum Enriched Soil", + "entity.sculk_depths.glomper": "Glomper" } \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/block/kryslum_enriched_soil.json b/src/main/resources/assets/sculk_depths/models/block/kryslum_enriched_soil.json new file mode 100644 index 00000000..eeddafbc --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/block/kryslum_enriched_soil.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/template_farmland", + "textures": { + "dirt": "sculk_depths:block/kryslum_enriched_soil_side", + "top": "sculk_depths:block/kryslum_enriched_soil" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/block/zygrin_light.json b/src/main/resources/assets/sculk_depths/models/block/zygrin_light.json new file mode 100644 index 00000000..f4c47709 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/block/zygrin_light.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "sculk_depths:block/zygrin_light" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/energized_flint_and_steel.json b/src/main/resources/assets/sculk_depths/models/item/energized_flint_and_steel.json new file mode 100644 index 00000000..969a6ea5 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/energized_flint_and_steel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "sculk_depths:item/energized_flint_and_steel" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/energizedflint_and_steel.json b/src/main/resources/assets/sculk_depths/models/item/energizedflint_and_steel.json new file mode 100644 index 00000000..5885e1fe --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/energizedflint_and_steel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/energized_flint_and_steel" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/energy_essence.json b/src/main/resources/assets/sculk_depths/models/item/energy_essence.json new file mode 100644 index 00000000..ee4273b6 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/energy_essence.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "sculk_depths:item/energy_essence" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/glomper_spawn_egg.json b/src/main/resources/assets/sculk_depths/models/item/glomper_spawn_egg.json new file mode 100644 index 00000000..d1aaa9d6 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/glomper_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/kryslum_enriched_soil.json b/src/main/resources/assets/sculk_depths/models/item/kryslum_enriched_soil.json new file mode 100644 index 00000000..70cb2ac6 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/kryslum_enriched_soil.json @@ -0,0 +1,3 @@ +{ + "parent": "sculk_depths:block/kryslum_enriched_soil" +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/models/item/zygrin_light.json b/src/main/resources/assets/sculk_depths/models/item/zygrin_light.json new file mode 100644 index 00000000..6cdf6902 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/models/item/zygrin_light.json @@ -0,0 +1,3 @@ +{ + "parent": "sculk_depths:block/zygrin_light" +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png new file mode 100644 index 00000000..1ff26222 Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png.mcmeta b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png.mcmeta new file mode 100644 index 00000000..4fadce8a --- /dev/null +++ b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png new file mode 100644 index 00000000..41011843 Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png.mcmeta b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png.mcmeta new file mode 100644 index 00000000..4fadce8a --- /dev/null +++ b/src/main/resources/assets/sculk_depths/textures/block/kryslum_enriched_soil_side.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png b/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png index 1ef3f8ac..e8b8a748 100644 Binary files a/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png and b/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png.mcmeta b/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png.mcmeta index 8e55e43b..b84e69f2 100644 --- a/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png.mcmeta +++ b/src/main/resources/assets/sculk_depths/textures/block/kryslum_flow.png.mcmeta @@ -1,5 +1,5 @@ { "animation": { - "frametime": 3 + "frametime": 4 } } diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png b/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png index 39339a91..0bcfe9cb 100644 Binary files a/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png and b/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png.mcmeta b/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png.mcmeta index 88b68dab..4fadce8a 100644 --- a/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png.mcmeta +++ b/src/main/resources/assets/sculk_depths/textures/block/kryslum_still.png.mcmeta @@ -1,6 +1,6 @@ { "animation": { - "frametime": 3, + "frametime": 4, "frames": [ 0, 1, diff --git a/src/main/resources/assets/sculk_depths/textures/block/zygrin_light.png b/src/main/resources/assets/sculk_depths/textures/block/zygrin_light.png new file mode 100644 index 00000000..a9379a5b Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/block/zygrin_light.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.pdn b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.pdn new file mode 100644 index 00000000..0fa86d48 Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.pdn differ diff --git a/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png new file mode 100644 index 00000000..ddc1f57c Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png differ diff --git a/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png.mcmeta b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png.mcmeta new file mode 100644 index 00000000..36a0cb36 --- /dev/null +++ b/src/main/resources/assets/sculk_depths/textures/item/energized_flint_and_steel.png.mcmeta @@ -0,0 +1,24 @@ +{ + "animation": { + "frametime": 5, + "interpolate": true, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculk_depths/textures/item/energy_essence.png b/src/main/resources/assets/sculk_depths/textures/item/energy_essence.png new file mode 100644 index 00000000..5c2b3fee Binary files /dev/null and b/src/main/resources/assets/sculk_depths/textures/item/energy_essence.png differ diff --git a/src/main/resources/data/minecraft/loot_tables/entities/warden.json b/src/main/resources/data/minecraft/loot_tables/entities/warden.json index d8859637..6c376cfe 100644 --- a/src/main/resources/data/minecraft/loot_tables/entities/warden.json +++ b/src/main/resources/data/minecraft/loot_tables/entities/warden.json @@ -6,7 +6,7 @@ "entries": [ { "type": "minecraft:item", - "name": "sculk_depths:soul_heart" + "name": "sculk_depths:energy_essence" } ], "rolls": 1.0 diff --git a/src/main/resources/data/minecraft/tags/blocks/dirt.json b/src/main/resources/data/minecraft/tags/blocks/dirt.json index 8a145801..2e297036 100644 --- a/src/main/resources/data/minecraft/tags/blocks/dirt.json +++ b/src/main/resources/data/minecraft/tags/blocks/dirt.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "sculk_depths:crumbling_dirt" + "sculk_depths:kryslum_enriched_soil" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/shovel.json b/src/main/resources/data/minecraft/tags/blocks/mineable/shovel.json index 8a145801..b8e23f16 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/shovel.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/shovel.json @@ -1,6 +1,7 @@ { "replace": false, "values": [ - "sculk_depths:crumbling_dirt" + "sculk_depths:crumbling_dirt", + "sculk_depths:kryslum_enriched_soil" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json b/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json index e6701550..20472e70 100644 --- a/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json +++ b/src/main/resources/data/minecraft/tags/blocks/needs_stone_tool.json @@ -8,6 +8,6 @@ "sculk_depths:petrified_valtrox_wood", "sculk_depths:petrified_valtrox_slab", "sculk_depths:petrified_valtrox_stairs", - "sculk_depths:petrified_valtrox_fence" + "sculk_depths:petrified_valtrox_wall" ] } \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/sand.json b/src/main/resources/data/minecraft/tags/blocks/sand.json new file mode 100644 index 00000000..8a145801 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/sand.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "sculk_depths:crumbling_dirt" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/sculk_depths/loot_tables/blocks/kryslum_enriched_soil.json b/src/main/resources/data/sculk_depths/loot_tables/blocks/kryslum_enriched_soil.json new file mode 100644 index 00000000..19d377a2 --- /dev/null +++ b/src/main/resources/data/sculk_depths/loot_tables/blocks/kryslum_enriched_soil.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "sculk_depths:kryslum_enriched_soil" + } + ] + } + ] +} diff --git a/src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_fence.json b/src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_wall.json similarity index 83% rename from src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_fence.json rename to src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_wall.json index 17e28d17..5a2c82a0 100644 --- a/src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_fence.json +++ b/src/main/resources/data/sculk_depths/loot_tables/blocks/petrified_valtrox_wall.json @@ -7,7 +7,7 @@ "entries": [ { "type": "minecraft:item", - "name": "sculk_depths:petrified_valtrox_fence" + "name": "sculk_depths:petrified_valtrox_wall" } ], "conditions": [ diff --git a/src/main/resources/data/sculk_depths/loot_tables/blocks/valtrox_leaves.json b/src/main/resources/data/sculk_depths/loot_tables/blocks/valtrox_leaves.json index 5265cff9..67624138 100644 --- a/src/main/resources/data/sculk_depths/loot_tables/blocks/valtrox_leaves.json +++ b/src/main/resources/data/sculk_depths/loot_tables/blocks/valtrox_leaves.json @@ -2,18 +2,16 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, - "bonus_rolls": 0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", - "name": "sculk_depths:valtrox_leaves", "conditions": [ { - "condition": "minecraft:alternative", + "condition": "minecraft:any_of", "terms": [ { "condition": "minecraft:match_tool", @@ -38,72 +36,40 @@ } ] } - ] + ], + "name": "sculk_depths:valtrox_leaves" }, { "type": "minecraft:item", - "name": "sculk_depths:valtrox_sapling", "conditions": [ { "condition": "minecraft:survives_explosion" }, { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", "chances": [ 0.05, 0.0625, 0.083333336, 0.1 - ] + ], + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune" } - ] + ], + "name": "sculk_depths:valtrox_sapling" } ] } - ] + ], + "rolls": 1.0 }, { - "rolls": 1, - "bonus_rolls": 0, - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "type": "minecraft:uniform", - "min": 1, - "max": 2 - }, - "add": false - }, - { - "function": "minecraft:explosion_decay" - } - ], - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.02, - 0.022222223, - 0.025, - 0.033333335, - 0.1 - ] - } - ] - } - ], + "bonus_rolls": 0.0, "conditions": [ { "condition": "minecraft:inverted", "term": { - "condition": "minecraft:alternative", + "condition": "minecraft:any_of", "terms": [ { "condition": "minecraft:match_tool", @@ -129,7 +95,42 @@ ] } } - ] + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "chances": [ + 0.02, + 0.022222223, + 0.025, + 0.033333335, + 0.1 + ], + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune" + } + ], + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:stick" + } + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "sculk_depths:valtrox_leaves" } diff --git a/src/main/resources/data/sculk_depths/recipes/dried_valtrox_fence.json b/src/main/resources/data/sculk_depths/recipes/dried_valtrox_fence.json index 6ac5d468..b25d72ef 100644 --- a/src/main/resources/data/sculk_depths/recipes/dried_valtrox_fence.json +++ b/src/main/resources/data/sculk_depths/recipes/dried_valtrox_fence.json @@ -2,16 +2,19 @@ "type": "minecraft:crafting_shaped", "group": "wooden_fence", "pattern": [ - "WWW", - "WWW" + "WIW", + "WIW" ], "key": { "W": { "item": "sculk_depths:dried_valtrox_planks" + }, + "I": { + "item": "minecraft:stick" } }, "result": { - "item": "sculk_depths:dried_valtrox_wall", - "count": 6 + "item": "sculk_depths:dried_valtrox_fence", + "count": 3 } } diff --git a/src/main/resources/data/sculk_depths/recipes/energized_flint_and_steel.json b/src/main/resources/data/sculk_depths/recipes/energized_flint_and_steel.json new file mode 100644 index 00000000..6b33afe0 --- /dev/null +++ b/src/main/resources/data/sculk_depths/recipes/energized_flint_and_steel.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "sculk_depths:energy_essence" + }, + { + "item": "minecraft:flint_and_steel" + } + ], + "result": { + "item": "sculk_depths:energized_flint_and_steel" + } +} \ No newline at end of file diff --git a/src/main/resources/data/sculk_depths/recipes/petrified_valtrox_wall.json b/src/main/resources/data/sculk_depths/recipes/petrified_valtrox_wall.json new file mode 100644 index 00000000..8b1dc6b1 --- /dev/null +++ b/src/main/resources/data/sculk_depths/recipes/petrified_valtrox_wall.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "wooden_wall", + "pattern": [ + "###", + "###" + ], + "key": { + "#": { + "item": "sculk_depths:petrified_valtrox_slates" + } + }, + "result": { + "item": "sculk_depths:petrified_valtrox_wall", + "count": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/data/sculk_depths/recipes/soul_heart_depreciation.json b/src/main/resources/data/sculk_depths/recipes/soul_heart_depreciation.json new file mode 100644 index 00000000..6a89456e --- /dev/null +++ b/src/main/resources/data/sculk_depths/recipes/soul_heart_depreciation.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "sculk_depths:soul_heart" + } + ], + "result": { + "item": "sculk_depths:energy_essence" + } +} diff --git a/src/main/resources/data/sculk_depths/recipes/stick.json b/src/main/resources/data/sculk_depths/recipes/stick.json deleted file mode 100644 index f25c887a..00000000 --- a/src/main/resources/data/sculk_depths/recipes/stick.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "group": "sticks", - "pattern": [ - "#", - "#" - ], - "key": { - "#": { - "tag": "sculk_depths:planks" - } - }, - "result": { - "item": "minecraft:stick", - "count": 4 - } -} diff --git a/src/main/resources/data/sculk_depths/tags/entity_types/drops_energy_essence.json b/src/main/resources/data/sculk_depths/tags/entity_types/drops_energy_essence.json new file mode 100644 index 00000000..d70f743f --- /dev/null +++ b/src/main/resources/data/sculk_depths/tags/entity_types/drops_energy_essence.json @@ -0,0 +1,13 @@ +{ + "values": [ + "minecraft:cow", + "minecraft:horse", + "minecraft:donkey", + "minecraft:mule", + "minecraft:chicken", + "minecraft:pig", + "minecraft:sheep", + "minecraft:bat", + "minecraft:bee" + ] +} \ No newline at end of file diff --git a/src/main/resources/sculk_depths.mixins.json b/src/main/resources/sculk_depths.mixins.json index db11c36b..418db342 100644 --- a/src/main/resources/sculk_depths.mixins.json +++ b/src/main/resources/sculk_depths.mixins.json @@ -4,10 +4,14 @@ "package": "net.ugi.sculk_depths.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ - + "AttachedStemBlockMixin", + "CropBlockMixin", + "FarmLandBlockMixin", + "LivingEntityMixin", + "NoiseChunkGeneratorMixin", + "StemBlockMixin" ], "client": [ - "NoiseChunkGeneratorMixin" ], "injectors": { "defaultRequire": 1