mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
Add '#forge:chorus_additionally_grows_on' tag for similar mechanics to '#minecraft:azalea_grows_on' but for chorus (#10459)
This commit is contained in:
1 parent
c97eabc0c4
commit
b864faf0ef
8 files changed
+160
-4
No files matched your search
@@ -55,6 +55,7 @@ public class Tags {
|
||||
|
||||
public static final TagKey<Block> CHESTS_ENDER = forgeTag("chests/ender");
|
||||
public static final TagKey<Block> CHESTS_TRAPPED = forgeTag("chests/trapped");
|
||||
public static final TagKey<Block> CHORUS_ADDITIONALLY_GROWS_ON = forgeTag("chorus_additionally_grows_on");
|
||||
public static final TagKey<Block> COBBLESTONE_NORMAL = forgeTag("cobblestone/normal");
|
||||
public static final TagKey<Block> COBBLESTONE_INFESTED = forgeTag("cobblestone/infested");
|
||||
public static final TagKey<Block> COBBLESTONE_MOSSY = forgeTag("cobblestone/mossy");
|
||||
|
||||
@@ -55,6 +55,8 @@ public final class ForgeBlockTagsProvider extends BlockTagsProvider {
|
||||
tag(CHESTS_WOODEN)
|
||||
.add(Blocks.CHEST, Blocks.TRAPPED_CHEST)
|
||||
.addOptionalTag(forgeTagKey("chests/wooden"));
|
||||
tag(CHORUS_ADDITIONALLY_GROWS_ON)
|
||||
.addTag(END_STONES);
|
||||
tag(CLUSTERS).add(Blocks.AMETHYST_CLUSTER);
|
||||
tag(COBBLESTONES)
|
||||
.addTags(COBBLESTONE_NORMAL, COBBLESTONE_INFESTED, COBBLESTONE_MOSSY, COBBLESTONE_DEEPSLATE)
|
||||
|
||||
@@ -196,22 +196,39 @@ public interface IForgeGameTestHelper {
|
||||
}
|
||||
|
||||
default void setAndAssertBlock(int x, int y, int z, Block block) {
|
||||
this.setAndAssertBlock(x, y, z, block.defaultBlockState());
|
||||
this.setAssertAndGetBlock(x, y, z, block);
|
||||
}
|
||||
|
||||
default void setAndAssertBlock(int x, int y, int z, BlockState state) {
|
||||
this.setAndAssertBlock(new BlockPos(x, y, z), state);
|
||||
this.setAssertAndGetBlock(x, y, z, state);
|
||||
}
|
||||
|
||||
default void setAndAssertBlock(BlockPos pos, Block block) {
|
||||
this.setAndAssertBlock(pos, block.defaultBlockState());
|
||||
this.setAssertAndGetBlock(pos, block);
|
||||
}
|
||||
|
||||
default void setAndAssertBlock(BlockPos pos, BlockState state) {
|
||||
this.setAssertAndGetBlock(pos, state);
|
||||
}
|
||||
|
||||
default BlockState setAssertAndGetBlock(int x, int y, int z, Block block) {
|
||||
return this.setAssertAndGetBlock(x, y, z, block.defaultBlockState());
|
||||
}
|
||||
|
||||
default BlockState setAssertAndGetBlock(int x, int y, int z, BlockState state) {
|
||||
return this.setAssertAndGetBlock(new BlockPos(x, y, z), state);
|
||||
}
|
||||
|
||||
default BlockState setAssertAndGetBlock(BlockPos pos, Block block) {
|
||||
return this.setAssertAndGetBlock(pos, block.defaultBlockState());
|
||||
}
|
||||
|
||||
default BlockState setAssertAndGetBlock(BlockPos pos, BlockState state) {
|
||||
this.assertTrue(
|
||||
this.self().getLevel().setBlock(this.self().absolutePos(pos), state, Block.UPDATE_ALL),
|
||||
() -> "Failed to set block at pos %s : %s".formatted(pos, state.getBlock())
|
||||
);
|
||||
return state;
|
||||
}
|
||||
|
||||
default void removeAllItemEntitiesInRange(BlockPos pos, double range) {
|
||||
|
||||
Reference in new issue
Block a user