mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add '#forge:chorus_additionally_grows_on' tag for similar mechanics to '#minecraft:azalea_grows_on' but for chorus (#10455)
This commit is contained in:
1 parent
fe616ffe20
commit
212da42d6e
8 files changed
+163
-1
No files matched your search
@@ -40,6 +40,7 @@ public class Tags
|
||||
public static final TagKey<Block> CHESTS_ENDER = tag("chests/ender");
|
||||
public static final TagKey<Block> CHESTS_TRAPPED = tag("chests/trapped");
|
||||
public static final TagKey<Block> CHESTS_WOODEN = tag("chests/wooden");
|
||||
public static final TagKey<Block> CHORUS_ADDITIONALLY_GROWS_ON = tag("chorus_additionally_grows_on");
|
||||
public static final TagKey<Block> COBBLESTONE = tag("cobblestone");
|
||||
public static final TagKey<Block> COBBLESTONE_NORMAL = tag("cobblestone/normal");
|
||||
public static final TagKey<Block> COBBLESTONE_INFESTED = tag("cobblestone/infested");
|
||||
|
||||
@@ -42,6 +42,7 @@ public final class ForgeBlockTagsProvider extends BlockTagsProvider
|
||||
tag(CHESTS_ENDER).add(Blocks.ENDER_CHEST);
|
||||
tag(CHESTS_TRAPPED).add(Blocks.TRAPPED_CHEST);
|
||||
tag(CHESTS_WOODEN).add(Blocks.CHEST, Blocks.TRAPPED_CHEST);
|
||||
tag(CHORUS_ADDITIONALLY_GROWS_ON).addTags(END_STONES);
|
||||
tag(COBBLESTONE).addTags(COBBLESTONE_NORMAL, COBBLESTONE_INFESTED, COBBLESTONE_MOSSY, COBBLESTONE_DEEPSLATE);
|
||||
tag(COBBLESTONE_NORMAL).add(Blocks.COBBLESTONE);
|
||||
tag(COBBLESTONE_INFESTED).add(Blocks.INFESTED_COBBLESTONE);
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.function.Supplier;
|
||||
|
||||
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;
|
||||
@@ -159,6 +160,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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user