diff --git a/patches/minecraft/net/minecraft/tileentity/ConduitTileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/ConduitTileEntity.java.patch index 7e7d2e5ba..9bec7d39c 100644 --- a/patches/minecraft/net/minecraft/tileentity/ConduitTileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/ConduitTileEntity.java.patch @@ -1,11 +1,14 @@ --- a/net/minecraft/tileentity/ConduitTileEntity.java +++ b/net/minecraft/tileentity/ConduitTileEntity.java -@@ -131,7 +131,7 @@ +@@ -131,10 +131,8 @@ BlockPos blockpos1 = this.field_174879_c.func_177982_a(j1, k1, l1); BlockState blockstate = this.field_145850_b.func_180495_p(blockpos1); - for(Block block : field_205042_e) { -+ for(Block block : net.minecraftforge.common.Tags.Blocks.SUPPORTS_CONDUIT.func_199885_a()) { - if (blockstate.func_177230_c() == block) { +- if (blockstate.func_177230_c() == block) { ++ if (blockstate.isConduitFrame(this.field_145850_b, blockpos1, func_174877_v())) { this.field_205046_i.add(blockpos1); - } +- } + } + } + } diff --git a/src/generated/resources/data/forge/tags/blocks/supports_beacon.json b/src/generated/resources/data/forge/tags/blocks/supports_beacon.json deleted file mode 100644 index 6d57a4ccc..000000000 --- a/src/generated/resources/data/forge/tags/blocks/supports_beacon.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:emerald_block", - "minecraft:gold_block", - "minecraft:diamond_block", - "minecraft:iron_block" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/supports_conduit.json b/src/generated/resources/data/forge/tags/blocks/supports_conduit.json deleted file mode 100644 index a69cffe27..000000000 --- a/src/generated/resources/data/forge/tags/blocks/supports_conduit.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:prismarine", - "minecraft:prismarine_bricks", - "minecraft:sea_lantern", - "minecraft:dark_prismarine" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/supports_beacon.json b/src/generated/resources/data/forge/tags/items/supports_beacon.json deleted file mode 100644 index 6d57a4ccc..000000000 --- a/src/generated/resources/data/forge/tags/items/supports_beacon.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:emerald_block", - "minecraft:gold_block", - "minecraft:diamond_block", - "minecraft:iron_block" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/supports_conduit.json b/src/generated/resources/data/forge/tags/items/supports_conduit.json deleted file mode 100644 index a69cffe27..000000000 --- a/src/generated/resources/data/forge/tags/items/supports_conduit.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:prismarine", - "minecraft:prismarine_bricks", - "minecraft:sea_lantern", - "minecraft:dark_prismarine" - ] -} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/common/Tags.java b/src/main/java/net/minecraftforge/common/Tags.java index 5c0920e50..e0a094511 100644 --- a/src/main/java/net/minecraftforge/common/Tags.java +++ b/src/main/java/net/minecraftforge/common/Tags.java @@ -112,9 +112,6 @@ public class Tags public static final Tag STORAGE_BLOCKS_QUARTZ = tag("storage_blocks/quartz"); public static final Tag STORAGE_BLOCKS_REDSTONE = tag("storage_blocks/redstone"); - public static final Tag SUPPORTS_BEACON = tag("supports_beacon"); - public static final Tag SUPPORTS_CONDUIT = tag("supports_conduit"); - private static Tag tag(String name) { return new BlockTags.Wrapper(new ResourceLocation("forge", name)); @@ -270,9 +267,6 @@ public class Tags public static final Tag STORAGE_BLOCKS_REDSTONE = tag("storage_blocks/redstone"); public static final Tag STRING = tag("string"); - public static final Tag SUPPORTS_BEACON = tag("supports_beacon"); - public static final Tag SUPPORTS_CONDUIT = tag("supports_conduit"); - private static Tag tag(String name) { return new ItemTags.Wrapper(new ResourceLocation("forge", name)); diff --git a/src/main/java/net/minecraftforge/common/data/ForgeBlockTagsProvider.java b/src/main/java/net/minecraftforge/common/data/ForgeBlockTagsProvider.java index 6c7fdbcfd..6cdb1f4a2 100644 --- a/src/main/java/net/minecraftforge/common/data/ForgeBlockTagsProvider.java +++ b/src/main/java/net/minecraftforge/common/data/ForgeBlockTagsProvider.java @@ -96,8 +96,6 @@ public class ForgeBlockTagsProvider extends BlockTagsProvider getBuilder(STORAGE_BLOCKS_LAPIS).add(Blocks.LAPIS_BLOCK); getBuilder(STORAGE_BLOCKS_QUARTZ).add(Blocks.QUARTZ_BLOCK); getBuilder(STORAGE_BLOCKS_REDSTONE).add(Blocks.REDSTONE_BLOCK); - getBuilder(SUPPORTS_BEACON).add(Blocks.EMERALD_BLOCK, Blocks.GOLD_BLOCK, Blocks.DIAMOND_BLOCK, Blocks.IRON_BLOCK); - getBuilder(SUPPORTS_CONDUIT).add(Blocks.PRISMARINE, Blocks.PRISMARINE_BRICKS, Blocks.SEA_LANTERN, Blocks.DARK_PRISMARINE); } private void addColored(Consumer consumer, Tag group, String pattern) diff --git a/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java b/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java index ca27bc773..f8ca6bc80 100644 --- a/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java +++ b/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java @@ -142,8 +142,6 @@ public class ForgeItemTagsProvider extends ItemTagsProvider copy(Tags.Blocks.STORAGE_BLOCKS_QUARTZ, Tags.Items.STORAGE_BLOCKS_QUARTZ); copy(Tags.Blocks.STORAGE_BLOCKS_REDSTONE, Tags.Items.STORAGE_BLOCKS_REDSTONE); getBuilder(Tags.Items.STRING).add(Items.STRING); - copy(Tags.Blocks.SUPPORTS_BEACON, Tags.Items.SUPPORTS_BEACON); - copy(Tags.Blocks.SUPPORTS_CONDUIT, Tags.Items.SUPPORTS_CONDUIT); } private void addColored(Consumer> consumer, Tag group, String pattern) diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java index 6a45cc79f..e5422d836 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java @@ -40,7 +40,6 @@ import net.minecraft.block.material.Material; import net.minecraft.block.BlockState; import net.minecraft.client.particle.ParticleManager; import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.MobEntity; @@ -55,7 +54,6 @@ import net.minecraft.fluid.IFluidState; import net.minecraft.block.Blocks; import net.minecraft.potion.Effects; import net.minecraft.item.DyeColor; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.pathfinding.PathNodeType; import net.minecraft.state.IProperty; @@ -82,7 +80,6 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.Tags; import net.minecraftforge.common.ToolType; @SuppressWarnings("deprecation") @@ -570,7 +567,26 @@ public interface IForgeBlock */ default boolean isBeaconBase(BlockState state, IWorldReader world, BlockPos pos, BlockPos beacon) { - return Tags.Blocks.SUPPORTS_BEACON.contains(state.getBlock()); + return state.getBlock() == Blocks.IRON_BLOCK || + state.getBlock() == Blocks.GOLD_BLOCK || + state.getBlock() == Blocks.DIAMOND_BLOCK || + state.getBlock() == Blocks.EMERALD_BLOCK; + } + + /** + * Determines if this block can be used as the frame of a conduit. + * + * @param world The current world + * @param pos Block position in world + * @param conduit Conduit position in world + * @return True, to support the conduit, and make it active with this block. + */ + default boolean isConduitFrame(BlockState state, IWorldReader world, BlockPos pos, BlockPos conduit) + { + return state.getBlock() == Blocks.PRISMARINE || + state.getBlock() == Blocks.PRISMARINE_BRICKS || + state.getBlock() == Blocks.SEA_LANTERN || + state.getBlock() == Blocks.DARK_PRISMARINE; } /** diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java index 754161cb0..6d3d3a103 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java @@ -495,6 +495,19 @@ public interface IForgeBlockState return getBlockState().getBlock().isBeaconBase(getBlockState(), world, pos, beacon); } + /** + * Determines if this block can be used as the frame of a conduit. + * + * @param world The current world + * @param pos Block position in world + * @param conduit Conduit position in world + * @return True, to support the conduit, and make it active with this block. + */ + default boolean isConduitFrame(IWorldReader world, BlockPos pos, BlockPos conduit) + { + return getBlockState().getBlock().isConduitFrame(getBlockState(), world, pos, conduit); + } + /** * Determines if this block can be used as part of a frame of a nether portal. *