diff --git a/src/main/generated/data/alchemist/tags/blocks/obsidian.json b/src/main/generated/data/alchemist/tags/blocks/obsidian.json new file mode 100644 index 0000000..a14881d --- /dev/null +++ b/src/main/generated/data/alchemist/tags/blocks/obsidian.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:obsidian", + "minecraft:crying_obsidian" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/alchemist/tags/blocks/stone.json b/src/main/generated/data/alchemist/tags/blocks/stone.json index fde14e1..43f2801 100644 --- a/src/main/generated/data/alchemist/tags/blocks/stone.json +++ b/src/main/generated/data/alchemist/tags/blocks/stone.json @@ -4,6 +4,8 @@ "minecraft:andesite", "minecraft:diorite", "minecraft:granite", + "minecraft:sandstone", + "minecraft:red_sandstone", "minecraft:clay" ] } \ No newline at end of file diff --git a/src/main/generated/data/alchemist/tags/blocks/stonebricks.json b/src/main/generated/data/alchemist/tags/blocks/stonebricks.json new file mode 100644 index 0000000..d844aac --- /dev/null +++ b/src/main/generated/data/alchemist/tags/blocks/stonebricks.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:stone_bricks", + "minecraft:mossy_stone_bricks" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/alchemist/tags/blocks/terra.json b/src/main/generated/data/alchemist/tags/blocks/terra.json index a11c64b..5791ec0 100644 --- a/src/main/generated/data/alchemist/tags/blocks/terra.json +++ b/src/main/generated/data/alchemist/tags/blocks/terra.json @@ -5,6 +5,7 @@ "minecraft:dirt", "minecraft:coarse_dirt", "minecraft:cobblestone", + "minecraft:mossy_cobblestone", "minecraft:cobbled_deepslate", "minecraft:stone", "minecraft:deepslate", diff --git a/src/main/java/io/github/unix_supremacist/block/TransmutionCircleBlock.java b/src/main/java/io/github/unix_supremacist/block/TransmutionCircleBlock.java index c49576a..1241bee 100644 --- a/src/main/java/io/github/unix_supremacist/block/TransmutionCircleBlock.java +++ b/src/main/java/io/github/unix_supremacist/block/TransmutionCircleBlock.java @@ -34,12 +34,6 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); return transmuteEntity(villagerList.get(0), level); } - - List wolfList = level.getEntitiesOfClass(Wolf.class, aABB); - if(!wolfList.isEmpty()){ - level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); - return transmuteEntity(wolfList.get(0), level); - } } return InteractionResult.PASS; diff --git a/src/main/java/io/github/unix_supremacist/data/BlockTag.java b/src/main/java/io/github/unix_supremacist/data/BlockTag.java index 622734f..dd1712b 100644 --- a/src/main/java/io/github/unix_supremacist/data/BlockTag.java +++ b/src/main/java/io/github/unix_supremacist/data/BlockTag.java @@ -21,6 +21,8 @@ public class BlockTag extends FabricTagProvider.BlockTagProvider { public static TagKey netherwoodtag = TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Alchemist.MODID, "netherwood")); public static TagKey leavetag = TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Alchemist.MODID, "leave")); public static TagKey stonetag = TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Alchemist.MODID, "stone")); + public static TagKey obsidiantag = TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Alchemist.MODID, "obsidian")); + public static TagKey stonebrickstag = TagKey.create(BuiltInRegistries.BLOCK.key(), new ResourceLocation(Alchemist.MODID, "stonebricks")); public BlockTag(FabricDataOutput output, CompletableFuture completableFuture) { super(output, completableFuture); @@ -38,6 +40,8 @@ public static void init(){ addExchange(netherwoodtag); addExchange(leavetag); addExchange(stonetag); + addExchange(obsidiantag); + addExchange(stonebrickstag); } @Override @@ -47,6 +51,7 @@ protected void addTags(HolderLookup.Provider arg) { terra.add(Blocks.DIRT); terra.add(Blocks.COARSE_DIRT); terra.add(Blocks.COBBLESTONE); + terra.add(Blocks.MOSSY_COBBLESTONE); terra.add(Blocks.COBBLED_DEEPSLATE); terra.add(Blocks.STONE); terra.add(Blocks.DEEPSLATE); @@ -102,7 +107,17 @@ protected void addTags(HolderLookup.Provider arg) { stone.add(Blocks.ANDESITE); stone.add(Blocks.DIORITE); stone.add(Blocks.GRANITE); + stone.add(Blocks.SANDSTONE); + stone.add(Blocks.RED_SANDSTONE); stone.add(Blocks.CLAY); + + FabricTagBuilder obsidian = getOrCreateTagBuilder(obsidiantag); + obsidian.add(Blocks.OBSIDIAN); + obsidian.add(Blocks.CRYING_OBSIDIAN); + + FabricTagBuilder stonebricks = getOrCreateTagBuilder(stonebrickstag); + stonebricks.add(Blocks.STONE_BRICKS); + stonebricks.add(Blocks.MOSSY_STONE_BRICKS); } public static Block getBlockWithOffset(Block b, ArrayList exchange, int o){ diff --git a/src/main/java/io/github/unix_supremacist/interfaces/AreaBox.java b/src/main/java/io/github/unix_supremacist/interfaces/AreaBox.java index 0020d42..286ce56 100644 --- a/src/main/java/io/github/unix_supremacist/interfaces/AreaBox.java +++ b/src/main/java/io/github/unix_supremacist/interfaces/AreaBox.java @@ -18,7 +18,6 @@ default ArrayList getArea(Direction dir, BlockPos anchor, BlockPos neg } default ArrayList getAreaFromFacing(Direction dir, BlockPos anchor, int size, int depth){ - Alchemist.LOGGER.error(size+" "+depth); switch(dir) { case SOUTH: return getArea(dir, anchor, new BlockPos(-size, -size, -depth), new BlockPos(size, size, 0)); diff --git a/src/main/java/io/github/unix_supremacist/item/DestructionItem.java b/src/main/java/io/github/unix_supremacist/item/DestructionItem.java index 13f4e32..e02c4cb 100644 --- a/src/main/java/io/github/unix_supremacist/item/DestructionItem.java +++ b/src/main/java/io/github/unix_supremacist/item/DestructionItem.java @@ -42,9 +42,11 @@ public InteractionResult useOn(UseOnContext context) { if(!blocks.isEmpty()){ if (!context.getLevel().isClientSide()) for (BlockPos b : blocks){ - context.getLevel().destroyBlock(b, !context.getPlayer().isCreative()); - ItemStack stack = context.getPlayer().getItemInHand(context.getHand()).copy(); - context.getPlayer().setItemInHand(context.getHand(), stack); + if(!(context.getLevel().getBlockState(b).getBlock().defaultDestroyTime() < 0)){ + context.getLevel().destroyBlock(b, !context.getPlayer().isCreative()); + ItemStack stack = context.getPlayer().getItemInHand(context.getHand()).copy(); + context.getPlayer().setItemInHand(context.getHand(), stack); + } } result = InteractionResult.SUCCESS; } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b64abaa..fc2f81c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -7,6 +7,9 @@ "authors": [ "unix-supremacist" ], + "contributors": [ + "Nolij" + ], "contact": { "homepage": "https://unix-supremacist.github.io", "sources": "https://github.com/unix-supremacist/alchemist" @@ -29,6 +32,8 @@ "fabricloader": ">=0.14.21", "minecraft": "~1.20.1", "java": ">=17", - "fabric-api": "*" + "fabric-api": "*", + "trinkets": "*", + "playerabilitylib": "*" } } \ No newline at end of file