Added the Fungal charge.

Fungal Charges work on all nether and giant mushrooms.
This commit is contained in:
WayofTime 2021-01-23 19:06:35 -05:00
parent 2c3af715d7
commit df286a73f1
26 changed files with 281 additions and 3 deletions

View file

@ -3,6 +3,9 @@ Version 3.1.0
------------------------------------------------------ ------------------------------------------------------
- Fixed Plunderer's Glint - Fixed Plunderer's Glint
- Fixed the Blood Altar not being able to input fluids. About time, Way! - Fixed the Blood Altar not being able to input fluids. About time, Way!
- Added new Shaped Charges
-> Fungal Charge, which is very useful for giant mushrooms and nether mushrooms
-> Controlled Charge, which will destroy only blocks that match the block it is placed on.
------------------------------------------------------ ------------------------------------------------------

View file

@ -36,6 +36,7 @@ f5b4cda776f7aabe537ca843e41074c03429cdfb assets/bloodmagic/blockstates/dungeon_s
ba1cd8a9475212843e3b26232c8a9943fa0d2d20 assets/bloodmagic/blockstates/duskritualstone.json ba1cd8a9475212843e3b26232c8a9943fa0d2d20 assets/bloodmagic/blockstates/duskritualstone.json
bb3db171734f511fc0c259d86e869b49aa1d0c77 assets/bloodmagic/blockstates/earthritualstone.json bb3db171734f511fc0c259d86e869b49aa1d0c77 assets/bloodmagic/blockstates/earthritualstone.json
e780d6d9e891082dc6ce83fde1697ce36281a02a assets/bloodmagic/blockstates/fireritualstone.json e780d6d9e891082dc6ce83fde1697ce36281a02a assets/bloodmagic/blockstates/fireritualstone.json
e2c9c08bab702938e1a861d096526f16f68f6691 assets/bloodmagic/blockstates/fungal_charge.json
f78ce2be09ab794bf5f5679414eee0dc85cf4fb1 assets/bloodmagic/blockstates/largebloodstonebrick.json f78ce2be09ab794bf5f5679414eee0dc85cf4fb1 assets/bloodmagic/blockstates/largebloodstonebrick.json
002795212cc7bf2cad2a91f873d85e2204c6367d assets/bloodmagic/blockstates/lightritualstone.json 002795212cc7bf2cad2a91f873d85e2204c6367d assets/bloodmagic/blockstates/lightritualstone.json
e1a98bd53fca155e4bbb03c1e548341af0f84bd7 assets/bloodmagic/blockstates/masterritualstone.json e1a98bd53fca155e4bbb03c1e548341af0f84bd7 assets/bloodmagic/blockstates/masterritualstone.json
@ -59,7 +60,7 @@ e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritu
42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json 42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json
3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json 3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json
d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json
ecf65a425fa9999726baa714503e7bd701c169ce assets/bloodmagic/lang/en_us.json c6b526280893eb282ee8284df5668b0c7597200c assets/bloodmagic/lang/en_us.json
34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json 34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json
bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json
adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json
@ -164,6 +165,7 @@ d4e4cbb3a24e069a8e6c8e60764f8bbb7b3adb2b assets/bloodmagic/models/block/dungeon_
c30064f4aa09c42d23e94d118ae5b148eadb3a6c assets/bloodmagic/models/block/earthritualstone.json c30064f4aa09c42d23e94d118ae5b148eadb3a6c assets/bloodmagic/models/block/earthritualstone.json
44c4d3178261b3756987643b62f263c91fa74198 assets/bloodmagic/models/block/etherealopaquemimic.json 44c4d3178261b3756987643b62f263c91fa74198 assets/bloodmagic/models/block/etherealopaquemimic.json
4ff1cab1014cd8f655e5f032ecf60dd371f421c3 assets/bloodmagic/models/block/fireritualstone.json 4ff1cab1014cd8f655e5f032ecf60dd371f421c3 assets/bloodmagic/models/block/fireritualstone.json
0fb05dea521223c58619fd71ccc2bcdf82ba7563 assets/bloodmagic/models/block/fungal_charge.json
d6bf1482345199e7d056a60865024ea5d480b986 assets/bloodmagic/models/block/largebloodstonebrick.json d6bf1482345199e7d056a60865024ea5d480b986 assets/bloodmagic/models/block/largebloodstonebrick.json
2e1a81c758bfeec2aee807b48239f23241302268 assets/bloodmagic/models/block/lightritualstone.json 2e1a81c758bfeec2aee807b48239f23241302268 assets/bloodmagic/models/block/lightritualstone.json
eab1713a8879decb2ae05258a6bcfa9da78ec67b assets/bloodmagic/models/block/masterritualstone.json eab1713a8879decb2ae05258a6bcfa9da78ec67b assets/bloodmagic/models/block/masterritualstone.json
@ -262,6 +264,7 @@ c36bde4f98c0aeb3bf0f369ad3bc067e5f0dc916 assets/bloodmagic/models/item/fireritua
0a3dcea188a3e5cf5f7c9a2cc4ad62667ac5821b assets/bloodmagic/models/item/firescribetool.json 0a3dcea188a3e5cf5f7c9a2cc4ad62667ac5821b assets/bloodmagic/models/item/firescribetool.json
dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/fortune_anointment.json dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/fortune_anointment.json
0392d220dc92ab8abad335e620b011e000b61ef9 assets/bloodmagic/models/item/fragment_netherite_scrap.json 0392d220dc92ab8abad335e620b011e000b61ef9 assets/bloodmagic/models/item/fragment_netherite_scrap.json
4228d831053597cbb7d7e5fb68b7a6dbf1dbf977 assets/bloodmagic/models/item/fungal_charge.json
27ce75b6179a4620fd23aa07568c47fad36a14eb assets/bloodmagic/models/item/furnacecell_primitive.json 27ce75b6179a4620fd23aa07568c47fad36a14eb assets/bloodmagic/models/item/furnacecell_primitive.json
72386afa0dcb2444a8072d1618425038c73106c7 assets/bloodmagic/models/item/goldfragment.json 72386afa0dcb2444a8072d1618425038c73106c7 assets/bloodmagic/models/item/goldfragment.json
2bf9f4f4901425531903ace1cebee594bc37e55a assets/bloodmagic/models/item/goldgravel.json 2bf9f4f4901425531903ace1cebee594bc37e55a assets/bloodmagic/models/item/goldgravel.json
@ -505,6 +508,7 @@ b6732b30df9e946739a1913671a60f56090679f8 data/bloodmagic/loot_tables/blocks/dung
26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/earthritualstone.json 26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/earthritualstone.json
2f27b244e5b3459408e9519dde05dc70cbb03998 data/bloodmagic/loot_tables/blocks/ethereal_mimic.json 2f27b244e5b3459408e9519dde05dc70cbb03998 data/bloodmagic/loot_tables/blocks/ethereal_mimic.json
26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/fireritualstone.json 26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/fireritualstone.json
70ecedd4cea1655ce9fe5b1d3f72796a5c0ff133 data/bloodmagic/loot_tables/blocks/fungal_charge.json
59dd54a876b7ccd0b6c90f409753c2af2d687f03 data/bloodmagic/loot_tables/blocks/incensealtar.json 59dd54a876b7ccd0b6c90f409753c2af2d687f03 data/bloodmagic/loot_tables/blocks/incensealtar.json
462a82b07e7fe3e479a2c072c73507686c339346 data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json 462a82b07e7fe3e479a2c072c73507686c339346 data/bloodmagic/loot_tables/blocks/largebloodstonebrick.json
26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/lightritualstone.json 26e3f34021426def32602e5ae7755e4672878320 data/bloodmagic/loot_tables/blocks/lightritualstone.json
@ -682,6 +686,7 @@ d4ee90b52934c7c530fb031dcf81d4f1ccb27a9b data/bloodmagic/recipes/soul_forge.json
2c90f1da43a79e61d2b6b09c012d08f53b133264 data/bloodmagic/recipes/soulforge/demon_crucible.json 2c90f1da43a79e61d2b6b09c012d08f53b133264 data/bloodmagic/recipes/soulforge/demon_crucible.json
bc4ad3b44720a3f7363ef53027b4aae35622e7c1 data/bloodmagic/recipes/soulforge/demon_crystallizer.json bc4ad3b44720a3f7363ef53027b4aae35622e7c1 data/bloodmagic/recipes/soulforge/demon_crystallizer.json
759279a190f3bc74e162dedf0f5d311267e06fbc data/bloodmagic/recipes/soulforge/destructive_crystal_block.json 759279a190f3bc74e162dedf0f5d311267e06fbc data/bloodmagic/recipes/soulforge/destructive_crystal_block.json
78f0e3dc5fa61d8f9c182a3608184f21925f79db data/bloodmagic/recipes/soulforge/fungal_charge.json
0b82d2354aaa635b4fe5514e4815298ee0dedf80 data/bloodmagic/recipes/soulforge/greatertartaricgem.json 0b82d2354aaa635b4fe5514e4815298ee0dedf80 data/bloodmagic/recipes/soulforge/greatertartaricgem.json
d46b61779b3c8382862d4e66c3909a1241ecca18 data/bloodmagic/recipes/soulforge/lessertartaricgem.json d46b61779b3c8382862d4e66c3909a1241ecca18 data/bloodmagic/recipes/soulforge/lessertartaricgem.json
d6e06747c75fc06e708a15358911f1c63eee86b1 data/bloodmagic/recipes/soulforge/pettytartaricgem.json d6e06747c75fc06e708a15358911f1c63eee86b1 data/bloodmagic/recipes/soulforge/pettytartaricgem.json
@ -729,4 +734,8 @@ ca758f49ba878f8e498fe156d4916c1e332d552c data/forge/tags/items/ingots/hellforged
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/osmium.json 74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/osmium.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/silver.json 74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/silver.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/tin.json 74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/forge/tags/items/ores/tin.json
d348e6ef5f30db7c6c6ef2aac89c45e9c4c6fef7 data/minecraft/tags/blocks/mushroom_hyphae.json
95fd3a7b178a92c5aecdd097fec5359f14a06c13 data/minecraft/tags/blocks/mushroom_stem.json
2ba6f93ee0567360afa3ae9999027b839ed06532 data/minecraft/tags/blocks/walls.json 2ba6f93ee0567360afa3ae9999027b839ed06532 data/minecraft/tags/blocks/walls.json
d348e6ef5f30db7c6c6ef2aac89c45e9c4c6fef7 data/minecraft/tags/items/mushroom_hyphae.json
95fd3a7b178a92c5aecdd097fec5359f14a06c13 data/minecraft/tags/items/mushroom_stem.json

View file

@ -0,0 +1,29 @@
{
"variants": {
"attached=down": {
"model": "bloodmagic:block/fungal_charge",
"x": 180
},
"attached=up": {
"model": "bloodmagic:block/fungal_charge"
},
"attached=north": {
"model": "bloodmagic:block/fungal_charge",
"x": 90
},
"attached=south": {
"model": "bloodmagic:block/fungal_charge",
"x": 270
},
"attached=west": {
"model": "bloodmagic:block/fungal_charge",
"x": 90,
"y": 270
},
"attached=east": {
"model": "bloodmagic:block/fungal_charge",
"x": 90,
"y": 90
}
}
}

View file

@ -47,6 +47,7 @@
"block.bloodmagic.duskritualstone": "Dusk Ritual Stone", "block.bloodmagic.duskritualstone": "Dusk Ritual Stone",
"block.bloodmagic.earthritualstone": "Earth Ritual Stone", "block.bloodmagic.earthritualstone": "Earth Ritual Stone",
"block.bloodmagic.fireritualstone": "Fire Ritual Stone", "block.bloodmagic.fireritualstone": "Fire Ritual Stone",
"block.bloodmagic.fungal_charge": "Fungal Charge",
"block.bloodmagic.incensealtar": "Incense Altar", "block.bloodmagic.incensealtar": "Incense Altar",
"block.bloodmagic.largebloodstonebrick": "Large Bloodstone Brick", "block.bloodmagic.largebloodstonebrick": "Large Bloodstone Brick",
"block.bloodmagic.lightritualstone": "Dawn Ritual Stone", "block.bloodmagic.lightritualstone": "Dawn Ritual Stone",

View file

@ -0,0 +1,11 @@
{
"parent": "bloodmagic:block/sub/shaped_charge",
"textures": {
"1": "minecraft:block/crimson_planks",
"3": "minecraft:block/nether_wart_block",
"4": "bloodmagic:block/blankrune",
"5": "minecraft:block/crimson_stem",
"6": "bloodmagic:models/defaultcrystal",
"particle": "bloodmagic:models/defaultcrystal"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "bloodmagic:block/fungal_charge"
}

View file

@ -0,0 +1,10 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "bloodmagic:fungal_charge",
"rolls": 1.0,
"entries": []
}
]
}

View file

@ -0,0 +1,21 @@
{
"type": "bloodmagic:soulforge",
"input0": {
"tag": "forge:cobblestone"
},
"input1": {
"item": "minecraft:charcoal"
},
"input2": {
"tag": "minecraft:mushroom_hyphae"
},
"input3": {
"tag": "forge:mushrooms"
},
"output": {
"item": "bloodmagic:fungal_charge",
"count": 8
},
"minimumDrain": 10.0,
"drain": 0.5
}

View file

@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"minecraft:brown_mushroom_block",
"minecraft:red_mushroom_block",
"minecraft:crimson_hyphae",
"minecraft:warped_hyphae",
"minecraft:stripped_crimson_hyphae",
"minecraft:stripped_warped_hyphae",
"minecraft:nether_wart_block",
"minecraft:warped_wart_block",
"minecraft:shroomlight"
]
}

View file

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"minecraft:mushroom_stem",
"minecraft:crimson_stem",
"minecraft:warped_stem"
]
}

View file

@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"minecraft:brown_mushroom_block",
"minecraft:red_mushroom_block",
"minecraft:crimson_hyphae",
"minecraft:warped_hyphae",
"minecraft:stripped_crimson_hyphae",
"minecraft:stripped_warped_hyphae",
"minecraft:nether_wart_block",
"minecraft:warped_wart_block",
"minecraft:shroomlight"
]
}

View file

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"minecraft:mushroom_stem",
"minecraft:crimson_stem",
"minecraft:warped_stem"
]
}

View file

@ -73,6 +73,7 @@ import wayoftime.bloodmagic.tile.TileDeforesterCharge;
import wayoftime.bloodmagic.tile.TileDemonCrucible; import wayoftime.bloodmagic.tile.TileDemonCrucible;
import wayoftime.bloodmagic.tile.TileDemonCrystal; import wayoftime.bloodmagic.tile.TileDemonCrystal;
import wayoftime.bloodmagic.tile.TileDemonCrystallizer; import wayoftime.bloodmagic.tile.TileDemonCrystallizer;
import wayoftime.bloodmagic.tile.TileFungalCharge;
import wayoftime.bloodmagic.tile.TileIncenseAltar; import wayoftime.bloodmagic.tile.TileIncenseAltar;
import wayoftime.bloodmagic.tile.TileMasterRitualStone; import wayoftime.bloodmagic.tile.TileMasterRitualStone;
import wayoftime.bloodmagic.tile.TileMimic; import wayoftime.bloodmagic.tile.TileMimic;
@ -203,6 +204,7 @@ public class BloodMagic
event.getRegistry().register(TileEntityType.Builder.create(TileShapedExplosive::new, BloodMagicBlocks.SHAPED_CHARGE.get()).build(null).setRegistryName("shaped_explosive")); event.getRegistry().register(TileEntityType.Builder.create(TileShapedExplosive::new, BloodMagicBlocks.SHAPED_CHARGE.get()).build(null).setRegistryName("shaped_explosive"));
event.getRegistry().register(TileEntityType.Builder.create(TileDeforesterCharge::new, BloodMagicBlocks.DEFORESTER_CHARGE.get()).build(null).setRegistryName("deforester_charge")); event.getRegistry().register(TileEntityType.Builder.create(TileDeforesterCharge::new, BloodMagicBlocks.DEFORESTER_CHARGE.get()).build(null).setRegistryName("deforester_charge"));
event.getRegistry().register(TileEntityType.Builder.create(TileVeinMineCharge::new, BloodMagicBlocks.VEINMINE_CHARGE.get()).build(null).setRegistryName("veinmine_charge")); event.getRegistry().register(TileEntityType.Builder.create(TileVeinMineCharge::new, BloodMagicBlocks.VEINMINE_CHARGE.get()).build(null).setRegistryName("veinmine_charge"));
event.getRegistry().register(TileEntityType.Builder.create(TileFungalCharge::new, BloodMagicBlocks.FUNGAL_CHARGE.get()).build(null).setRegistryName("fungal_charge"));
} }

View file

@ -0,0 +1,20 @@
package wayoftime.bloodmagic.common.block;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import wayoftime.bloodmagic.tile.TileFungalCharge;
public class BlockFungalCharge extends BlockShapedExplosive
{
public BlockFungalCharge(int explosionSize, Properties properties)
{
super(explosionSize, properties);
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world)
{
return new TileFungalCharge();
}
}

View file

@ -177,6 +177,7 @@ public class BloodMagicBlocks
public static final RegistryObject<Block> SHAPED_CHARGE = BLOCKS.register("shaped_charge", () -> new BlockShapedExplosive(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); public static final RegistryObject<Block> SHAPED_CHARGE = BLOCKS.register("shaped_charge", () -> new BlockShapedExplosive(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool()));
public static final RegistryObject<Block> DEFORESTER_CHARGE = BLOCKS.register("deforester_charge", () -> new BlockDeforesterCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); public static final RegistryObject<Block> DEFORESTER_CHARGE = BLOCKS.register("deforester_charge", () -> new BlockDeforesterCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool()));
public static final RegistryObject<Block> VEINMINE_CHARGE = BLOCKS.register("veinmine_charge", () -> new BlockVeinMineCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool())); public static final RegistryObject<Block> VEINMINE_CHARGE = BLOCKS.register("veinmine_charge", () -> new BlockVeinMineCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool()));
public static final RegistryObject<Block> FUNGAL_CHARGE = BLOCKS.register("fungal_charge", () -> new BlockFungalCharge(3, Properties.create(Material.IRON).hardnessAndResistance(5.0F, 6.0F).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(1).setRequiresTool()));
// //
//// private static <T extends Block> RegistryObject<T> register(String name, Supplier<? extends T> sup, Function<RegistryObject<T>, Supplier<? extends Item>> itemCreator) //// private static <T extends Block> RegistryObject<T> register(String name, Supplier<? extends T> sup, Function<RegistryObject<T>, Supplier<? extends Item>> itemCreator)

View file

@ -95,6 +95,7 @@ public class GeneratorBlockStates extends BlockStateProvider
buildOrientable(BloodMagicBlocks.SHAPED_CHARGE.get(), "shaped_charge", modLoc("block/sub/shaped_charge"), modLoc("block/dungeon/dungeon_stone"), modLoc("block/dungeon/dungeon_tile"), modLoc("block/blankrune"), modLoc("block/largebloodstonebrick"), modLoc("models/defaultcrystal")); buildOrientable(BloodMagicBlocks.SHAPED_CHARGE.get(), "shaped_charge", modLoc("block/sub/shaped_charge"), modLoc("block/dungeon/dungeon_stone"), modLoc("block/dungeon/dungeon_tile"), modLoc("block/blankrune"), modLoc("block/largebloodstonebrick"), modLoc("models/defaultcrystal"));
buildOrientable(BloodMagicBlocks.DEFORESTER_CHARGE.get(), "deforester_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/oak_log_top"), new ResourceLocation("block/oak_log_top"), modLoc("block/blankrune"), new ResourceLocation("block/oak_planks"), modLoc("models/defaultcrystal")); buildOrientable(BloodMagicBlocks.DEFORESTER_CHARGE.get(), "deforester_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/oak_log_top"), new ResourceLocation("block/oak_log_top"), modLoc("block/blankrune"), new ResourceLocation("block/oak_planks"), modLoc("models/defaultcrystal"));
buildOrientable(BloodMagicBlocks.VEINMINE_CHARGE.get(), "veinmine_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/sandstone_bottom"), new ResourceLocation("block/sandstone_bottom"), modLoc("block/blankrune"), new ResourceLocation("block/sand"), modLoc("models/defaultcrystal")); buildOrientable(BloodMagicBlocks.VEINMINE_CHARGE.get(), "veinmine_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/sandstone_bottom"), new ResourceLocation("block/sandstone_bottom"), modLoc("block/blankrune"), new ResourceLocation("block/sand"), modLoc("models/defaultcrystal"));
buildOrientable(BloodMagicBlocks.FUNGAL_CHARGE.get(), "fungal_charge", modLoc("block/sub/shaped_charge"), new ResourceLocation("block/nether_wart_block"), new ResourceLocation("block/crimson_planks"), modLoc("block/blankrune"), new ResourceLocation("block/crimson_stem"), modLoc("models/defaultcrystal"));
} }
private void buildOrientable(Block block, String name, ResourceLocation modelPath, ResourceLocation base, ResourceLocation edges, ResourceLocation centerCap, ResourceLocation binding, ResourceLocation core) private void buildOrientable(Block block, String name, ResourceLocation modelPath, ResourceLocation base, ResourceLocation edges, ResourceLocation centerCap, ResourceLocation binding, ResourceLocation core)

View file

@ -2,6 +2,7 @@ package wayoftime.bloodmagic.common.data;
import java.nio.file.Path; import java.nio.file.Path;
import net.minecraft.block.Blocks;
import net.minecraft.data.BlockTagsProvider; import net.minecraft.data.BlockTagsProvider;
import net.minecraft.data.DataGenerator; import net.minecraft.data.DataGenerator;
import net.minecraft.tags.BlockTags; import net.minecraft.tags.BlockTags;
@ -9,6 +10,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.ExistingFileHelper;
import wayoftime.bloodmagic.BloodMagic; import wayoftime.bloodmagic.BloodMagic;
import wayoftime.bloodmagic.common.block.BloodMagicBlocks; import wayoftime.bloodmagic.common.block.BloodMagicBlocks;
import wayoftime.bloodmagic.common.tags.BloodMagicTags;
public class GeneratorBlockTags extends BlockTagsProvider public class GeneratorBlockTags extends BlockTagsProvider
{ {
@ -22,6 +24,8 @@ public class GeneratorBlockTags extends BlockTagsProvider
{ {
this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_BRICK_WALL.get()); this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_BRICK_WALL.get());
this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get()); this.getOrCreateBuilder(BlockTags.WALLS).add(BloodMagicBlocks.DUNGEON_POLISHED_WALL.get());
this.getOrCreateBuilder(BloodMagicTags.Blocks.MUSHROOM_STEM).add(Blocks.MUSHROOM_STEM).add(Blocks.CRIMSON_STEM).add(Blocks.WARPED_STEM);
this.getOrCreateBuilder(BloodMagicTags.Blocks.MUSHROOM_HYPHAE).add(Blocks.BROWN_MUSHROOM_BLOCK).add(Blocks.RED_MUSHROOM_BLOCK).add(Blocks.CRIMSON_HYPHAE).add(Blocks.WARPED_HYPHAE).add(Blocks.STRIPPED_CRIMSON_HYPHAE).add(Blocks.STRIPPED_WARPED_HYPHAE).add(Blocks.NETHER_WART_BLOCK).add(Blocks.WARPED_WART_BLOCK).add(Blocks.SHROOMLIGHT);
} }
/** /**

View file

@ -92,6 +92,7 @@ public class GeneratorItemModels extends ItemModelProvider
registerBlockModel(BloodMagicBlocks.SHAPED_CHARGE.get()); registerBlockModel(BloodMagicBlocks.SHAPED_CHARGE.get());
registerBlockModel(BloodMagicBlocks.DEFORESTER_CHARGE.get()); registerBlockModel(BloodMagicBlocks.DEFORESTER_CHARGE.get());
registerBlockModel(BloodMagicBlocks.VEINMINE_CHARGE.get()); registerBlockModel(BloodMagicBlocks.VEINMINE_CHARGE.get());
registerBlockModel(BloodMagicBlocks.FUNGAL_CHARGE.get());
registerMultiLayerItem(BloodMagicItems.SLATE_VIAL.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_ribbon")); registerMultiLayerItem(BloodMagicItems.SLATE_VIAL.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_ribbon"));
registerMultiLayerItem(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); registerMultiLayerItem(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon"));

View file

@ -53,6 +53,9 @@ public class GeneratorItemTags extends ItemTagsProvider
this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.VENGEFUL_CRYSTAL.get()); this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.VENGEFUL_CRYSTAL.get());
this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.STEADFAST_CRYSTAL.get()); this.getOrCreateBuilder(BloodMagicTags.CRYSTAL_DEMON).add(BloodMagicItems.STEADFAST_CRYSTAL.get());
this.copy(BloodMagicTags.Blocks.MUSHROOM_STEM, BloodMagicTags.MUSHROOM_STEM);
this.copy(BloodMagicTags.Blocks.MUSHROOM_HYPHAE, BloodMagicTags.MUSHROOM_HYPHAE);
// this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.DOORS); // this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.DOORS);
// this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.BEDS); // this.getOrCreateBuilder(GOORESISTANT).addTag(BlockTags.BEDS);
// this.getOrCreateBuilder(GOORESISTANT).add(Blocks.PISTON, Blocks.PISTON_HEAD, Blocks.STICKY_PISTON, Blocks.MOVING_PISTON); // this.getOrCreateBuilder(GOORESISTANT).add(Blocks.PISTON, Blocks.PISTON_HEAD, Blocks.STICKY_PISTON, Blocks.MOVING_PISTON);

View file

@ -451,7 +451,8 @@ public class GeneratorLanguage extends LanguageProvider
addBlock(BloodMagicBlocks.SHAPED_CHARGE, "Shaped Charge"); addBlock(BloodMagicBlocks.SHAPED_CHARGE, "Shaped Charge");
addBlock(BloodMagicBlocks.DEFORESTER_CHARGE, "Deforester Charge"); addBlock(BloodMagicBlocks.DEFORESTER_CHARGE, "Deforester Charge");
addBlock(BloodMagicBlocks.VEINMINE_CHARGE, "Vein Charge"); addBlock(BloodMagicBlocks.VEINMINE_CHARGE, "Controlled Charge");
addBlock(BloodMagicBlocks.FUNGAL_CHARGE, "Fungal Charge");
// Item names // Item names
addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb"); addItem(BloodMagicItems.WEAK_BLOOD_ORB, "Weak Blood Orb");

View file

@ -135,6 +135,7 @@ public class GeneratorLootTable extends LootTableProvider
registerNoDropLootTable(BloodMagicBlocks.SHAPED_CHARGE.get()); registerNoDropLootTable(BloodMagicBlocks.SHAPED_CHARGE.get());
registerNoDropLootTable(BloodMagicBlocks.DEFORESTER_CHARGE.get()); registerNoDropLootTable(BloodMagicBlocks.DEFORESTER_CHARGE.get());
registerNoDropLootTable(BloodMagicBlocks.VEINMINE_CHARGE.get()); registerNoDropLootTable(BloodMagicBlocks.VEINMINE_CHARGE.get());
registerNoDropLootTable(BloodMagicBlocks.FUNGAL_CHARGE.get());
} }
private void registerNoDropLootTable(Block block) private void registerNoDropLootTable(Block block)

View file

@ -102,6 +102,7 @@ public class BloodMagicItems
public static final RegistryObject<Item> SHAPED_CHARGE_ITEM = ITEMS.register("shaped_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.SHAPED_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject<Item> SHAPED_CHARGE_ITEM = ITEMS.register("shaped_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.SHAPED_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> DEFORESTER_CHARGE_ITEM = ITEMS.register("deforester_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.DEFORESTER_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject<Item> DEFORESTER_CHARGE_ITEM = ITEMS.register("deforester_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.DEFORESTER_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> VEINMINE_CHARGE_ITEM = ITEMS.register("veinmine_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.VEINMINE_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject<Item> VEINMINE_CHARGE_ITEM = ITEMS.register("veinmine_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.VEINMINE_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB)));
public static final RegistryObject<Item> FUNGAL_CHARGE_ITEM = ITEMS.register("fungal_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.FUNGAL_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB)));
// TODO: Need to rework the above instantiations for the ItemBlocks so that it's // TODO: Need to rework the above instantiations for the ItemBlocks so that it's
// done with the Blocks. // done with the Blocks.

View file

@ -50,6 +50,7 @@ public class TartaricForgeRecipeProvider implements ISubRecipeProvider
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.SHAPED_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SAND), Ingredient.fromTag(Tags.Items.STONE)).build(consumer, BloodMagic.rl(basePath + "shaped_charge")); TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.SHAPED_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SAND), Ingredient.fromTag(Tags.Items.STONE)).build(consumer, BloodMagic.rl(basePath + "shaped_charge"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(ItemTags.LOGS), Ingredient.fromTag(ItemTags.PLANKS)).build(consumer, BloodMagic.rl(basePath + "deforester_charge")); TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(ItemTags.LOGS), Ingredient.fromTag(ItemTags.PLANKS)).build(consumer, BloodMagic.rl(basePath + "deforester_charge"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.VEINMINE_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SANDSTONE), Ingredient.fromTag(Tags.Items.SAND)).build(consumer, BloodMagic.rl(basePath + "vein_charge")); TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.VEINMINE_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(Tags.Items.SANDSTONE), Ingredient.fromTag(Tags.Items.SAND)).build(consumer, BloodMagic.rl(basePath + "vein_charge"));
TartaricForgeRecipeBuilder.tartaricForge(new ItemStack(BloodMagicBlocks.FUNGAL_CHARGE.get(), 8), 10, 0.5, Ingredient.fromTag(Tags.Items.COBBLESTONE), Ingredient.fromItems(Items.CHARCOAL), Ingredient.fromTag(BloodMagicTags.MUSHROOM_HYPHAE), Ingredient.fromTag(Tags.Items.MUSHROOMS)).build(consumer, BloodMagic.rl(basePath + "fungal_charge"));
ItemStack stack = new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get()); ItemStack stack = new ItemStack(BloodMagicBlocks.DEFORESTER_CHARGE.get());
AnointmentHolder smeltingHolder = new AnointmentHolder(); AnointmentHolder smeltingHolder = new AnointmentHolder();

View file

@ -1,7 +1,9 @@
package wayoftime.bloodmagic.common.tags; package wayoftime.bloodmagic.common.tags;
import net.minecraft.block.Block;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.FluidTags; import net.minecraft.tags.FluidTags;
import net.minecraft.tags.ITag; import net.minecraft.tags.ITag;
import net.minecraft.tags.ItemTags; import net.minecraft.tags.ItemTags;
@ -21,6 +23,9 @@ public class BloodMagicTags
public static final ITag.INamedTag<Fluid> LIFE_ESSENCE = FluidTags.makeWrapperTag("forge:life"); public static final ITag.INamedTag<Fluid> LIFE_ESSENCE = FluidTags.makeWrapperTag("forge:life");
public static final ITag.INamedTag<Item> MUSHROOM_STEM = ItemTags.makeWrapperTag("minecraft:mushroom_stem");
public static final ITag.INamedTag<Item> MUSHROOM_HYPHAE = ItemTags.makeWrapperTag("minecraft:mushroom_hyphae");
// Ores // Ores
public static final ITag.INamedTag<Item> ORE_COPPER = getForgeOreTag("copper"); public static final ITag.INamedTag<Item> ORE_COPPER = getForgeOreTag("copper");
public static final ITag.INamedTag<Item> ORE_TIN = getForgeOreTag("tin"); public static final ITag.INamedTag<Item> ORE_TIN = getForgeOreTag("tin");
@ -52,6 +57,12 @@ public class BloodMagicTags
public static final ITag.INamedTag<Item> GRAVEL_GOLD = getGravelTag("gold"); public static final ITag.INamedTag<Item> GRAVEL_GOLD = getGravelTag("gold");
public static final ITag.INamedTag<Item> GRAVEL_NETHERITE_SCRAP = getGravelTag("netherite_scrap"); public static final ITag.INamedTag<Item> GRAVEL_NETHERITE_SCRAP = getGravelTag("netherite_scrap");
public static class Blocks
{
public static final ITag.INamedTag<Block> MUSHROOM_STEM = BlockTags.makeWrapperTag("minecraft:mushroom_stem");
public static final ITag.INamedTag<Block> MUSHROOM_HYPHAE = BlockTags.makeWrapperTag("minecraft:mushroom_hyphae");
}
public static ITag.INamedTag<Item> getForgeOreTag(String name) public static ITag.INamedTag<Item> getForgeOreTag(String name)
{ {
return ItemTags.makeWrapperTag("forge:ores/" + name); return ItemTags.makeWrapperTag("forge:ores/" + name);

View file

@ -0,0 +1,40 @@
package wayoftime.bloodmagic.tile;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntityType;
import net.minecraftforge.registries.ObjectHolder;
import wayoftime.bloodmagic.common.tags.BloodMagicTags;
public class TileFungalCharge extends TileVeinMineCharge
{
@ObjectHolder("bloodmagic:fungal_charge")
public static TileEntityType<TileFungalCharge> TYPE;
public TileFungalCharge(TileEntityType<?> type, int maxBlocks)
{
super(type, maxBlocks);
}
public TileFungalCharge()
{
this(TYPE, 64 * 3);
}
@Override
public boolean isValidBlock(BlockState originalBlockState, BlockState testState)
{
return isValidStartingBlock(testState);
}
@Override
public boolean isValidStartingBlock(BlockState originalBlockState)
{
return BloodMagicTags.Blocks.MUSHROOM_HYPHAE.contains(originalBlockState.getBlock()) || BloodMagicTags.Blocks.MUSHROOM_STEM.contains(originalBlockState.getBlock());
}
@Override
public boolean checkDiagonals()
{
return true;
}
}

View file

@ -24,6 +24,7 @@ import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents; import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3i;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.registries.ObjectHolder; import net.minecraftforge.registries.ObjectHolder;
import wayoftime.bloodmagic.common.block.BlockShapedExplosive; import wayoftime.bloodmagic.common.block.BlockShapedExplosive;
@ -37,6 +38,11 @@ public class TileVeinMineCharge extends TileExplosiveCharge
private List<BlockPos> veinPartsCache; private List<BlockPos> veinPartsCache;
private boolean finishedAnalysis; private boolean finishedAnalysis;
private Vector3i[] diagonals = new Vector3i[] { new Vector3i(0, 1, 1), new Vector3i(0, 1, -1),
new Vector3i(0, -1, 1), new Vector3i(0, -1, -1), new Vector3i(1, 0, 1), new Vector3i(-1, 0, 1),
new Vector3i(1, 0, -1), new Vector3i(-1, 0, -1), new Vector3i(1, 1, 0), new Vector3i(-1, 1, 0),
new Vector3i(1, -1, 0), new Vector3i(-1, -1, 0) };
public double internalCounter = 0; public double internalCounter = 0;
public int currentBlocks = 0; public int currentBlocks = 0;
@ -67,6 +73,10 @@ public class TileVeinMineCharge extends TileExplosiveCharge
Direction explosiveDirection = this.getBlockState().get(BlockShapedExplosive.ATTACHED).getOpposite(); Direction explosiveDirection = this.getBlockState().get(BlockShapedExplosive.ATTACHED).getOpposite();
BlockState attachedState = world.getBlockState(pos.offset(explosiveDirection)); BlockState attachedState = world.getBlockState(pos.offset(explosiveDirection));
Block attachedBlock = attachedState.getBlock(); Block attachedBlock = attachedState.getBlock();
if (!isValidStartingBlock(attachedState))
{
return;
}
// if (!BlockTags.LOGS.contains(attachedState.getBlock()) && !BlockTags.LEAVES.contains(attachedState.getBlock())) // if (!BlockTags.LOGS.contains(attachedState.getBlock()) && !BlockTags.LEAVES.contains(attachedState.getBlock()))
// { // {
// return; // return;
@ -104,7 +114,7 @@ public class TileVeinMineCharge extends TileExplosiveCharge
{ {
continue; continue;
} }
if (attachedBlock.equals(checkState.getBlock())) if (isValidBlock(attachedState, checkState))
{ {
currentBlocks++; currentBlocks++;
isTree = true; isTree = true;
@ -119,6 +129,39 @@ public class TileVeinMineCharge extends TileExplosiveCharge
} }
} }
if (this.checkDiagonals())
{
for (Vector3i vec : this.diagonals)
{
BlockPos checkPos = currentPos.add(vec);
if (veinPartsMap.containsKey(checkPos))
{
continue;
}
BlockState checkState = world.getBlockState(checkPos);
boolean isTree = false;
if (currentBlocks >= maxBlocks)
{
continue;
}
if (isValidBlock(attachedState, checkState))
{
currentBlocks++;
isTree = true;
}
if (isTree)
{
veinPartsMap.put(checkPos, false);
newPositions.add(checkPos);
foundNew = true;
}
}
}
veinPartsMap.put(currentPos, true); veinPartsMap.put(currentPos, true);
if (currentBlocks >= maxBlocks) if (currentBlocks >= maxBlocks)
{ {
@ -214,12 +257,29 @@ public class TileVeinMineCharge extends TileExplosiveCharge
public void deserialize(CompoundNBT tag) public void deserialize(CompoundNBT tag)
{ {
internalCounter = tag.getDouble("internalCounter"); internalCounter = tag.getDouble("internalCounter");
maxBlocks = tag.getInt("maxBlocks");
} }
@Override @Override
public CompoundNBT serialize(CompoundNBT tag) public CompoundNBT serialize(CompoundNBT tag)
{ {
tag.putDouble("internalCounter", internalCounter); tag.putDouble("internalCounter", internalCounter);
tag.putInt("maxBlocks", maxBlocks);
return tag; return tag;
} }
public boolean isValidBlock(BlockState originalBlockState, BlockState testState)
{
return originalBlockState.getBlock() == testState.getBlock();
}
public boolean isValidStartingBlock(BlockState originalBlockState)
{
return true;
}
public boolean checkDiagonals()
{
return true;
}
} }