Add #forge:chorus_additionally_grows_on (#10460)

This commit is contained in:
Jonathing authored and GitHub committed 2025-04-11 09:49:46 -07:00
1 parent c047cf136c
commit 371938199e
8 files changed
+161 -1

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)
@@ -16,6 +16,7 @@ import net.minecraft.Util;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
import com.mojang.authlib.GameProfile;
@@ -186,6 +187,26 @@ public interface IForgeGameTestHelper {
}
}
default BlockState setAndAssertBlock(int x, int y, int z, Block block) {
return this.setAndAssertBlock(x, y, z, block.defaultBlockState());
}
default BlockState setAndAssertBlock(int x, int y, int z, BlockState state) {
return this.setAndAssertBlock(new BlockPos(x, y, z), state);
}
default BlockState setAndAssertBlock(BlockPos pos, Block block) {
return this.setAndAssertBlock(pos, block.defaultBlockState());
}
default BlockState setAndAssertBlock(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 <T> Flag<T> flag(String name) {
return new Flag<>(name);
}