tags everywhere

This commit is contained in:
yrsegal@gmail.com 2022-04-21 11:19:44 -04:00
parent 1b64679308
commit c9792bdbf6
19 changed files with 157 additions and 40 deletions

View file

@ -522,25 +522,37 @@ f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/hexcasting/tags/blocks/akashic_log
b596d96eebb4f7bad5930f4eebc589f292b59c98 data/hexcasting/tags/blocks/akashic_planks.json
f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/hexcasting/tags/items/akashic_logs.json
b596d96eebb4f7bad5930f4eebc589f292b59c98 data/hexcasting/tags/items/akashic_planks.json
fe60c763bfe0afa0a266b7390edfc62bde8941b7 data/hexcasting/tags/items/phial_base.json
3c004e7bc6a3560c8ace5d7e775497f3e342157e data/hexcasting/tags/items/wands.json
5f3e3813757d8300acad523d45ac7c4d85728399 data/minecraft/tags/blocks/buttons.json
1dc89dff5d4fadb95d9b5a2a5a910f63ea4b02bf data/minecraft/tags/blocks/crystal_sound_blocks.json
556d2e6068965e90c307a435b372ae761cd1c606 data/minecraft/tags/blocks/doors.json
c25784941d6416744fb2ca2d43a3203e5c3e7c8a data/minecraft/tags/blocks/leaves.json
f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/minecraft/tags/blocks/logs.json
f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/minecraft/tags/blocks/logs_that_burn.json
766fac802aa499c8341dca1bf9dc94782e6d385e data/minecraft/tags/blocks/mineable/axe.json
7c08784f2de139be380b5299f8ea8b8c78126ed8 data/minecraft/tags/blocks/mineable/axe.json
c25784941d6416744fb2ca2d43a3203e5c3e7c8a data/minecraft/tags/blocks/mineable/hoe.json
eb4bfbd7fc7632a5c16aa1d50d6090a1f466069b data/minecraft/tags/blocks/mineable/pickaxe.json
f55afc2c05d93b5a44bc9fd73c5e81e71b183965 data/minecraft/tags/blocks/mineable/shovel.json
b596d96eebb4f7bad5930f4eebc589f292b59c98 data/minecraft/tags/blocks/planks.json
2d79a41ba8697f9e1fa26b1bff48f33c824d3823 data/minecraft/tags/blocks/pressure_plates.json
48e782ce4fbd486dd0d6ceb9fdcb94d0e0c727d4 data/minecraft/tags/blocks/slabs.json
b8b58bbaf1ddca3514896af14db83f304e415305 data/minecraft/tags/blocks/trapdoors.json
5f3e3813757d8300acad523d45ac7c4d85728399 data/minecraft/tags/blocks/wooden_buttons.json
556d2e6068965e90c307a435b372ae761cd1c606 data/minecraft/tags/blocks/wooden_doors.json
2d79a41ba8697f9e1fa26b1bff48f33c824d3823 data/minecraft/tags/blocks/wooden_pressure_plates.json
48e782ce4fbd486dd0d6ceb9fdcb94d0e0c727d4 data/minecraft/tags/blocks/wooden_slabs.json
b8b58bbaf1ddca3514896af14db83f304e415305 data/minecraft/tags/blocks/wooden_trapdoors.json
5f3e3813757d8300acad523d45ac7c4d85728399 data/minecraft/tags/items/buttons.json
556d2e6068965e90c307a435b372ae761cd1c606 data/minecraft/tags/items/doors.json
c25784941d6416744fb2ca2d43a3203e5c3e7c8a data/minecraft/tags/items/leaves.json
f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/minecraft/tags/items/logs.json
f3c6b6917e504e1c3d5d8875f7cce6f311e791d2 data/minecraft/tags/items/logs_that_burn.json
b596d96eebb4f7bad5930f4eebc589f292b59c98 data/minecraft/tags/items/planks.json
48e782ce4fbd486dd0d6ceb9fdcb94d0e0c727d4 data/minecraft/tags/items/slabs.json
b8b58bbaf1ddca3514896af14db83f304e415305 data/minecraft/tags/items/trapdoors.json
5f3e3813757d8300acad523d45ac7c4d85728399 data/minecraft/tags/items/wooden_buttons.json
556d2e6068965e90c307a435b372ae761cd1c606 data/minecraft/tags/items/wooden_doors.json
2d79a41ba8697f9e1fa26b1bff48f33c824d3823 data/minecraft/tags/items/wooden_pressure_plates.json
48e782ce4fbd486dd0d6ceb9fdcb94d0e0c727d4 data/minecraft/tags/items/wooden_slabs.json
b8b58bbaf1ddca3514896af14db83f304e415305 data/minecraft/tags/items/wooden_trapdoors.json

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:glass_bottle"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_button"
]
}

View file

@ -12,6 +12,8 @@
"hexcasting:akashic_panel",
"hexcasting:akashic_tile",
"hexcasting:akashic_door",
"hexcasting:akashic_trapdoor"
"hexcasting:akashic_trapdoor",
"hexcasting:akashic_slab",
"hexcasting:akashic_button"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_pressure_plate"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_slab"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_button"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_pressure_plate"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_slab"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_button"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_slab"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_button"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_pressure_plate"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"hexcasting:akashic_slab"
]
}

View file

@ -9,6 +9,7 @@ public class HexItemTags {
public static final TagKey<Item> AKASHIC_LOGS = create("akashic_logs");
public static final TagKey<Item> AKASHIC_PLANKS = create("akashic_planks");
public static final TagKey<Item> WANDS = create("wands");
public static final TagKey<Item> PHIAL_BASE = create("phial_base");
public static final TagKey<Item> AMETHYST_DUST = ItemTags.create(new ResourceLocation("forge", "dusts/amethyst"));

View file

@ -35,7 +35,7 @@ public class HexBlocks {
public static final RegistryObject<Block> CONJURED_LIGHT = blockNoItem("conjured",
() -> new BlockConjuredLight(
BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.DIAMOND)
BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.NONE)
.sound(SoundType.AMETHYST)
.lightLevel((state) -> 15)
.noDrops()
@ -47,7 +47,7 @@ public class HexBlocks {
public static final RegistryObject<Block> CONJURED_BLOCK = blockNoItem("conjured_block",
() -> new BlockConjured(
BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.DIAMOND)
BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.NONE)
.sound(SoundType.AMETHYST)
.lightLevel((state) -> 2)
.noDrops()
@ -64,27 +64,35 @@ public class HexBlocks {
.strength(4f, 4f);
}
private static BlockBehaviour.Properties papery() {
private static BlockBehaviour.Properties papery(MaterialColor color) {
return BlockBehaviour.Properties
.of(Material.PLANT, MaterialColor.TERRACOTTA_WHITE)
.of(Material.PLANT, color)
.sound(SoundType.GRASS)
.instabreak();
}
private static BlockBehaviour.Properties woodyHard() {
return BlockBehaviour.Properties.of(Material.WOOD)
private static BlockBehaviour.Properties akashicWoodyHard() {
return woodyHard(MaterialColor.COLOR_PURPLE);
}
private static BlockBehaviour.Properties woodyHard(MaterialColor color) {
return BlockBehaviour.Properties.of(Material.WOOD, color)
.sound(SoundType.WOOD)
.strength(3f, 4f);
}
private static BlockBehaviour.Properties woody() {
return BlockBehaviour.Properties.of(Material.WOOD)
private static BlockBehaviour.Properties akashicWoody() {
return woody(MaterialColor.COLOR_PURPLE);
}
private static BlockBehaviour.Properties woody(MaterialColor color) {
return BlockBehaviour.Properties.of(Material.WOOD, color)
.sound(SoundType.WOOD)
.strength(2f);
}
private static BlockBehaviour.Properties leaves() {
return BlockBehaviour.Properties.of(Material.LEAVES)
private static BlockBehaviour.Properties leaves(MaterialColor color) {
return BlockBehaviour.Properties.of(Material.LEAVES, color)
.strength(0.2F)
.randomTicks()
.sound(SoundType.GRASS)
@ -120,12 +128,12 @@ public class HexBlocks {
() -> new BlockRedstoneDirectrix(slateish()));
public static final RegistryObject<BlockAkashicRecord> AKASHIC_RECORD = blockItem("akashic_record",
() -> new BlockAkashicRecord(woodyHard().lightLevel(bs -> 15)));
() -> new BlockAkashicRecord(akashicWoodyHard().lightLevel(bs -> 15)));
public static final RegistryObject<BlockAkashicBookshelf> AKASHIC_BOOKSHELF = blockItem("akashic_bookshelf",
() -> new BlockAkashicBookshelf(woodyHard()
() -> new BlockAkashicBookshelf(akashicWoodyHard()
.lightLevel(bs -> (bs.getValue(BlockAkashicBookshelf.DATUM_TYPE) == DatumType.EMPTY) ? 0 : 4)));
public static final RegistryObject<BlockAkashicFloodfiller> AKASHIC_CONNECTOR = blockItem("akashic_connector",
() -> new BlockAkashicFloodfiller(woodyHard().lightLevel(bs -> 10)));
() -> new BlockAkashicFloodfiller(akashicWoodyHard().lightLevel(bs -> 10)));
// Decoration?!
public static final RegistryObject<Block> SLATE_BLOCK = blockItem("slate_block",
@ -136,51 +144,51 @@ public class HexBlocks {
public static final RegistryObject<AmethystBlock> AMETHYST_TILES = blockItem("amethyst_tiles",
() -> new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK)));
public static final RegistryObject<Block> SCROLL_PAPER = blockItem("scroll_paper",
() -> new Block(papery()));
() -> new Block(papery(MaterialColor.TERRACOTTA_WHITE)));
public static final RegistryObject<Block> ANCIENT_SCROLL_PAPER = blockItem("ancient_scroll_paper",
() -> new Block(papery()));
() -> new Block(papery(MaterialColor.TERRACOTTA_ORANGE)));
public static final RegistryObject<Block> SCROLL_PAPER_LANTERN = blockItem("scroll_paper_lantern",
() -> new Block(papery().lightLevel($ -> 15)));
() -> new Block(papery(MaterialColor.TERRACOTTA_WHITE).lightLevel($ -> 15)));
public static final RegistryObject<Block> ANCIENT_SCROLL_PAPER_LANTERN = blockItem(
"ancient_scroll_paper_lantern",
() -> new Block(papery().lightLevel($ -> 12)));
() -> new Block(papery(MaterialColor.TERRACOTTA_ORANGE).lightLevel($ -> 12)));
public static final RegistryObject<BlockSconce> SCONCE = blockItem("amethyst_sconce",
() -> new BlockSconce(BlockBehaviour.Properties.of(Material.AMETHYST, MaterialColor.COLOR_PURPLE)
.sound(SoundType.AMETHYST)
.strength(1f)
.lightLevel($ -> 15)));
public static final RegistryObject<BlockAxis> AKASHIC_LOG_STRIPPED = blockItem("akashic_log_stripped",
() -> new BlockAxis(woody()));
() -> new BlockAxis(akashicWoody()));
public static final RegistryObject<BlockStrippable> AKASHIC_LOG = blockItem("akashic_log",
() -> new BlockStrippable(woody(), AKASHIC_LOG_STRIPPED));
() -> new BlockStrippable(akashicWoody(), AKASHIC_LOG_STRIPPED));
public static final RegistryObject<Block> AKASHIC_WOOD_STRIPPED = blockItem("akashic_wood_stripped",
() -> new Block(woody()));
() -> new Block(akashicWoody()));
public static final RegistryObject<BlockStrippable> AKASHIC_WOOD = blockItem("akashic_wood",
() -> new BlockStrippable(woody(), AKASHIC_WOOD_STRIPPED));
() -> new BlockStrippable(akashicWoody(), AKASHIC_WOOD_STRIPPED));
public static final RegistryObject<Block> AKASHIC_PLANKS = blockItem("akashic_planks",
() -> new Block(woody()));
() -> new Block(akashicWoody()));
public static final RegistryObject<Block> AKASHIC_PANEL = blockItem("akashic_panel",
() -> new Block(woody()));
() -> new Block(akashicWoody()));
public static final RegistryObject<Block> AKASHIC_TILE = blockItem("akashic_tile",
() -> new Block(woody()));
() -> new Block(akashicWoody()));
public static final RegistryObject<DoorBlock> AKASHIC_DOOR = blockItem("akashic_door",
() -> new DoorBlock(woody().noOcclusion()));
() -> new DoorBlock(akashicWoody().noOcclusion()));
public static final RegistryObject<TrapDoorBlock> AKASHIC_TRAPDOOR = blockItem("akashic_trapdoor",
() -> new TrapDoorBlock(woody().noOcclusion()));
() -> new TrapDoorBlock(akashicWoody().noOcclusion()));
public static final RegistryObject<StairBlock> AKASHIC_STAIRS = blockItem("akashic_stairs",
() -> new StairBlock(() -> AKASHIC_PLANKS.get().defaultBlockState(), woody().noOcclusion()));
() -> new StairBlock(() -> AKASHIC_PLANKS.get().defaultBlockState(), akashicWoody().noOcclusion()));
public static final RegistryObject<SlabBlock> AKASHIC_SLAB = blockItem("akashic_slab",
() -> new SlabBlock(woody().noOcclusion()));
() -> new SlabBlock(akashicWoody().noOcclusion()));
public static final RegistryObject<WoodButtonBlock> AKASHIC_BUTTON = blockItem("akashic_button",
() -> new WoodButtonBlock(woody().noOcclusion()));
() -> new WoodButtonBlock(akashicWoody().noOcclusion()));
public static final RegistryObject<PressurePlateBlock> AKASHIC_PRESSURE_PLATE = blockItem("akashic_pressure_plate",
() -> new PressurePlateBlock(PressurePlateBlock.Sensitivity.EVERYTHING, woody().noOcclusion()));
() -> new PressurePlateBlock(PressurePlateBlock.Sensitivity.EVERYTHING, akashicWoody().noOcclusion()));
public static final RegistryObject<LeavesBlock> AKASHIC_LEAVES1 = blockItem("akashic_leaves1",
() -> new LeavesBlock(leaves()));
() -> new LeavesBlock(leaves(MaterialColor.COLOR_PURPLE)));
public static final RegistryObject<LeavesBlock> AKASHIC_LEAVES2 = blockItem("akashic_leaves2",
() -> new LeavesBlock(leaves()));
() -> new LeavesBlock(leaves(MaterialColor.COLOR_BLUE)));
public static final RegistryObject<LeavesBlock> AKASHIC_LEAVES3 = blockItem("akashic_leaves3",
() -> new LeavesBlock(leaves()));
() -> new LeavesBlock(leaves(MaterialColor.COLOR_YELLOW)));
private static boolean never(Object... args) {
return false;

View file

@ -1,5 +1,6 @@
package at.petrak.hexcasting.common.casting.operators.spells
import at.petrak.hexcasting.api.mod.HexItemTags
import at.petrak.hexcasting.api.spell.Operator.Companion.getChecked
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
@ -23,9 +24,9 @@ object OpMakeBattery : SpellOperator {
): Triple<RenderedSpell, Int, List<ParticleSpray>> {
val entity = args.getChecked<ItemEntity>(0)
val (handStack, hand) = ctx.getHeldItemToOperateOn { it.item == Items.GLASS_BOTTLE }
val (handStack, hand) = ctx.getHeldItemToOperateOn { it.`is`(HexItemTags.PHIAL_BASE) }
if (handStack.item != Items.GLASS_BOTTLE) {
if (handStack.`is`(HexItemTags.PHIAL_BASE)) {
throw MishapBadOffhandItem.of(
handStack,
hand,
@ -59,8 +60,8 @@ object OpMakeBattery : SpellOperator {
private data class Spell(val itemEntity: ItemEntity) : RenderedSpell {
override fun cast(ctx: CastingContext) {
val (handStack, hand) = ctx.getHeldItemToOperateOn { it.item == Items.GLASS_BOTTLE }
if (handStack.item == Items.GLASS_BOTTLE && itemEntity.isAlive) {
val (handStack, hand) = ctx.getHeldItemToOperateOn { it.`is`(HexItemTags.PHIAL_BASE) }
if (handStack.`is`(HexItemTags.PHIAL_BASE) && itemEntity.isAlive) {
val entityStack = itemEntity.item.copy()
val manaAmt = ManaHelper.extractMana(entityStack, drainForBatteries = true)
if (manaAmt > 0) {

View file

@ -32,7 +32,8 @@ public class HexBlockTagProvider extends BlockTagsProvider {
HexBlocks.AKASHIC_LOG.get(), HexBlocks.AKASHIC_LOG_STRIPPED.get(),
HexBlocks.AKASHIC_WOOD.get(), HexBlocks.AKASHIC_WOOD_STRIPPED.get(),
HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get(),
HexBlocks.AKASHIC_DOOR.get(), HexBlocks.AKASHIC_TRAPDOOR.get());
HexBlocks.AKASHIC_DOOR.get(), HexBlocks.AKASHIC_TRAPDOOR.get(), HexBlocks.AKASHIC_SLAB.get(),
HexBlocks.AKASHIC_BUTTON.get());
tag(BlockTags.MINEABLE_WITH_HOE)
.add(HexBlocks.AKASHIC_LEAVES1.get(), HexBlocks.AKASHIC_LEAVES2.get(), HexBlocks.AKASHIC_LEAVES3.get());
@ -56,6 +57,10 @@ public class HexBlockTagProvider extends BlockTagsProvider {
.add(HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get());
tag(HexBlockTags.AKASHIC_PLANKS)
.add(HexBlocks.AKASHIC_PLANKS.get(), HexBlocks.AKASHIC_PANEL.get(), HexBlocks.AKASHIC_TILE.get());
tag(BlockTags.SLABS)
.add(HexBlocks.AKASHIC_SLAB.get());
tag(BlockTags.WOODEN_SLABS)
.add(HexBlocks.AKASHIC_SLAB.get());
tag(BlockTags.DOORS)
.add(HexBlocks.AKASHIC_DOOR.get());
tag(BlockTags.WOODEN_DOORS)
@ -64,5 +69,13 @@ public class HexBlockTagProvider extends BlockTagsProvider {
.add(HexBlocks.AKASHIC_TRAPDOOR.get());
tag(BlockTags.WOODEN_TRAPDOORS)
.add(HexBlocks.AKASHIC_TRAPDOOR.get());
tag(BlockTags.PRESSURE_PLATES)
.add(HexBlocks.AKASHIC_PRESSURE_PLATE.get());
tag(BlockTags.WOODEN_PRESSURE_PLATES)
.add(HexBlocks.AKASHIC_PRESSURE_PLATE.get());
tag(BlockTags.BUTTONS)
.add(HexBlocks.AKASHIC_BUTTON.get());
tag(BlockTags.WOODEN_BUTTONS)
.add(HexBlocks.AKASHIC_BUTTON.get());
}
}

View file

@ -9,6 +9,7 @@ import net.minecraft.data.tags.BlockTagsProvider;
import net.minecraft.data.tags.ItemTagsProvider;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.item.Items;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.data.ExistingFileHelper;
import org.jetbrains.annotations.Nullable;
@ -26,16 +27,23 @@ public class HexItemTagProvider extends ItemTagsProvider {
tag(HexItemTags.WANDS).add(HexItems.WAND_OAK.get(), HexItems.WAND_SPRUCE.get(), HexItems.WAND_BIRCH.get(),
HexItems.WAND_JUNGLE.get(), HexItems.WAND_ACACIA.get(), HexItems.WAND_DARK_OAK.get(),
HexItems.WAND_AKASHIC.get());
tag(HexItemTags.PHIAL_BASE).add(Items.GLASS_BOTTLE);
this.copy(HexBlockTags.AKASHIC_LOGS, HexItemTags.AKASHIC_LOGS);
this.copy(HexBlockTags.AKASHIC_PLANKS, HexItemTags.AKASHIC_PLANKS);
this.copy(BlockTags.LOGS_THAT_BURN, ItemTags.LOGS_THAT_BURN);
this.copy(BlockTags.LOGS, ItemTags.LOGS);
this.copy(BlockTags.PLANKS, ItemTags.PLANKS);
this.copy(BlockTags.SLABS, ItemTags.SLABS);
this.copy(BlockTags.WOODEN_SLABS, ItemTags.WOODEN_SLABS);
this.copy(BlockTags.DOORS, ItemTags.DOORS);
this.copy(BlockTags.WOODEN_DOORS, ItemTags.WOODEN_DOORS);
this.copy(BlockTags.TRAPDOORS, ItemTags.TRAPDOORS);
this.copy(BlockTags.WOODEN_TRAPDOORS, ItemTags.WOODEN_TRAPDOORS);
this.copy(BlockTags.LEAVES, ItemTags.LEAVES);
// Apparently, there's no "Pressure Plates" item tag.
this.copy(BlockTags.WOODEN_PRESSURE_PLATES, ItemTags.WOODEN_PRESSURE_PLATES);
this.copy(BlockTags.BUTTONS, ItemTags.BUTTONS);
this.copy(BlockTags.WOODEN_BUTTONS, ItemTags.WOODEN_BUTTONS);
}
}