From 31764f6d65be7f7f5b586cc5e71e52312efcb53d Mon Sep 17 00:00:00 2001 From: SquidDev Date: Sat, 18 Jul 2020 11:14:04 +0100 Subject: [PATCH] Register various gold items as piglin_loved --- .../data/minecraft/tags/items/piglin_loved.json | 10 ++++++++++ src/main/java/dan200/computercraft/data/Tags.java | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/generated/resources/data/minecraft/tags/items/piglin_loved.json diff --git a/src/generated/resources/data/minecraft/tags/items/piglin_loved.json b/src/generated/resources/data/minecraft/tags/items/piglin_loved.json new file mode 100644 index 000000000..8eedcc427 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/piglin_loved.json @@ -0,0 +1,10 @@ +{ + "replace": false, + "values": [ + "computercraft:computer_advanced", + "computercraft:turtle_advanced", + "computercraft:wireless_modem_advanced", + "computercraft:pocket_computer_advanced", + "computercraft:monitor_advanced" + ] +} \ No newline at end of file diff --git a/src/main/java/dan200/computercraft/data/Tags.java b/src/main/java/dan200/computercraft/data/Tags.java index a8f981b2e..2920548a4 100644 --- a/src/main/java/dan200/computercraft/data/Tags.java +++ b/src/main/java/dan200/computercraft/data/Tags.java @@ -20,6 +20,8 @@ import static dan200.computercraft.data.Tags.CCTags.*; public class Tags extends ItemTagsProvider { + private static final ITag.INamedTag PIGLIN_LOVED = ItemTags.field_232903_N_; + public static class CCTags { public static final ITag.INamedTag COMPUTER = item( "computer" ); @@ -44,6 +46,12 @@ public class Tags extends ItemTagsProvider func_240522_a_( TURTLE ).func_240534_a_( Registry.ModItems.TURTLE_NORMAL.get(), Registry.ModItems.TURTLE_ADVANCED.get() ); func_240522_a_( WIRED_MODEM ).func_240534_a_( Registry.ModItems.WIRED_MODEM.get(), Registry.ModItems.WIRED_MODEM_FULL.get() ); func_240522_a_( MONITOR ).func_240534_a_( Registry.ModItems.MONITOR_NORMAL.get(), Registry.ModItems.MONITOR_ADVANCED.get() ); + + func_240522_a_( PIGLIN_LOVED ).func_240534_a_( + Registry.ModItems.COMPUTER_ADVANCED.get(), Registry.ModItems.TURTLE_ADVANCED.get(), + Registry.ModItems.WIRELESS_MODEM_ADVANCED.get(), Registry.ModItems.POCKET_COMPUTER_ADVANCED.get(), + Registry.ModItems.MONITOR_ADVANCED.get() + ); } private static ITag.INamedTag item( String name )