From c1a7a1896842556033c917aeedc433a777d0babd Mon Sep 17 00:00:00 2001 From: Cody <90773155+jetpacker06@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:58:25 -0600 Subject: [PATCH] Sugar Cane Variants tag (#7263) --- .../.cache/2d64935085b86659cb7857bad9701dbf9bab6e4c | 3 ++- .../data/create/tags/blocks/sugar_cane_variants.json | 5 +++++ src/main/java/com/simibubi/create/AllTags.java | 1 + .../actors/harvester/HarvesterMovementBehaviour.java | 3 ++- .../create/infrastructure/data/CreateRegistrateTags.java | 3 +++ 5 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/generated/resources/data/create/tags/blocks/sugar_cane_variants.json diff --git a/src/generated/resources/.cache/2d64935085b86659cb7857bad9701dbf9bab6e4c b/src/generated/resources/.cache/2d64935085b86659cb7857bad9701dbf9bab6e4c index 5777ab3d8..65c9cefcc 100644 --- a/src/generated/resources/.cache/2d64935085b86659cb7857bad9701dbf9bab6e4c +++ b/src/generated/resources/.cache/2d64935085b86659cb7857bad9701dbf9bab6e4c @@ -1,4 +1,4 @@ -// 1.20.1 2024-10-11T10:29:49.10689745 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)] +// 1.20.1 2025-01-04T09:59:54.9600791 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)] 60bbdf92d2ac9824ea6144955c74043a6005f79d assets/create/blockstates/acacia_window.json 6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json c3ae87b62e81d8e9476eccd793bb1548d74c66a1 assets/create/blockstates/adjustable_chain_gearshift.json @@ -4185,6 +4185,7 @@ a5874f73c7dc0a3ae12999e6ae8abf45bc7fb9be data/create/tags/blocks/passive_boiler_ 9bc8c13fd80bdbe7f767b91ee1a1042e9aff02b0 data/create/tags/blocks/roots.json 79ed9149ee2ce143114db4ccafda8a2b6a293aac data/create/tags/blocks/safe_nbt.json 79418bd729cef417b322cef9b491e7ae83317d61 data/create/tags/blocks/seats.json +f02fc9781e8f0ae33ed3b98cf4f46ba6927c7ff8 data/create/tags/blocks/sugar_cane_variants.json 5def5088f7fd31b80e6f28c1c4ea146aa9d7d15b data/create/tags/blocks/toolboxes.json 2589b135c0e96ad29076569e144528fe32ea5b39 data/create/tags/blocks/tracks.json 1b6977d9a399cf6ee042e3f8f5e64e4d3cda5489 data/create/tags/blocks/tree_attachments.json diff --git a/src/generated/resources/data/create/tags/blocks/sugar_cane_variants.json b/src/generated/resources/data/create/tags/blocks/sugar_cane_variants.json new file mode 100644 index 000000000..6e3dc8c98 --- /dev/null +++ b/src/generated/resources/data/create/tags/blocks/sugar_cane_variants.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:sugar_cane" + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index a48d8602f..49a98d557 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -104,6 +104,7 @@ public class AllTags { WINDMILL_SAILS, WRENCH_PICKUP, ROOTS, + SUGAR_CANE_VARIANTS, CORALS, diff --git a/src/main/java/com/simibubi/create/content/contraptions/actors/harvester/HarvesterMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/actors/harvester/HarvesterMovementBehaviour.java index 8680025d7..63de5f379 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/actors/harvester/HarvesterMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/actors/harvester/HarvesterMovementBehaviour.java @@ -4,6 +4,7 @@ import javax.annotation.Nullable; import org.apache.commons.lang3.mutable.MutableBoolean; +import com.simibubi.create.AllTags; import com.simibubi.create.content.contraptions.behaviour.MovementBehaviour; import com.simibubi.create.content.contraptions.behaviour.MovementContext; import com.simibubi.create.content.contraptions.render.ActorVisual; @@ -173,7 +174,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour { if (block == Blocks.SWEET_BERRY_BUSH) { return state.setValue(BlockStateProperties.AGE_3, Integer.valueOf(1)); } - if (block == Blocks.SUGAR_CANE || block instanceof GrowingPlantBlock) { + if (state.is(AllTags.AllBlockTags.SUGAR_CANE_VARIANTS.tag) || block instanceof GrowingPlantBlock) { if (state.getFluidState() .isEmpty()) return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/com/simibubi/create/infrastructure/data/CreateRegistrateTags.java b/src/main/java/com/simibubi/create/infrastructure/data/CreateRegistrateTags.java index 157577e50..56a6e75df 100644 --- a/src/main/java/com/simibubi/create/infrastructure/data/CreateRegistrateTags.java +++ b/src/main/java/com/simibubi/create/infrastructure/data/CreateRegistrateTags.java @@ -111,6 +111,9 @@ public class CreateRegistrateTags { prov.tag(AllBlockTags.ROOTS.tag) .add(Blocks.MANGROVE_ROOTS); + prov.tag(AllBlockTags.SUGAR_CANE_VARIANTS.tag) + .add(Blocks.SUGAR_CANE); + prov.tag(AllBlockTags.CORALS.tag) .add(Blocks.DEAD_TUBE_CORAL, Blocks.DEAD_BRAIN_CORAL, Blocks.DEAD_BUBBLE_CORAL, Blocks.DEAD_FIRE_CORAL, Blocks.DEAD_HORN_CORAL, Blocks.TUBE_CORAL, Blocks.BRAIN_CORAL, Blocks.BUBBLE_CORAL,