From c1d88bbad47c6ea0caf94bb752ae541db8990e27 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Thu, 17 Jun 2021 22:27:48 +0200 Subject: [PATCH] Shut up non_movable. Please. --- src/generated/resources/.cache/cache | 2 +- .../data/create/advancements/aesthetics.json | 4 ++-- src/main/java/com/simibubi/create/AllTags.java | 11 +---------- .../structureMovement/BlockMovementChecks.java | 5 ++++- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 84342cd60..4c2b0b830 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -1654,7 +1654,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json 6490fa0587db770cf7c794b47f3bcd2b691f4226 assets/create/sounds.json -0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json +5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index d723cbe38..59a86f429 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:cogwheel", - "create:large_cogwheel" + "create:large_cogwheel", + "create:cogwheel" ] } }, diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index c99c08cff..291f4608b 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -146,7 +146,6 @@ public class AllTags { WINDMILL_SAILS, FAN_HEATERS, WINDOWABLE, - NON_MOVABLE(false), BRITTLE, SEATS, SAILS, @@ -168,25 +167,17 @@ public class AllTags { } private AllBlockTags(NameSpace namespace, String path) { - this(namespace, path, true); - } - - private AllBlockTags(NameSpace namespace, String path, boolean generateData) { ResourceLocation id = new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())); if (ModList.get() .isLoaded(namespace.id)) { tag = BlockTags.makeWrapperTag(id.toString()); - if (generateData) - REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.getOrCreateTagBuilder(tag)); + REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.getOrCreateTagBuilder(tag)); } else { tag = new EmptyNamedTag<>(id); } } - AllBlockTags(boolean generateData) { - this(MOD, "", generateData); - } public boolean matches(BlockState block) { return tag.contains(block.getBlock()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java index c0889389a..0e326beeb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/BlockMovementChecks.java @@ -5,6 +5,7 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTags.AllBlockTags; +import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.components.actors.AttachedActorBlock; import com.simibubi.create.content.contraptions.components.actors.HarvesterBlock; import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceBlock; @@ -62,6 +63,7 @@ import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.DoubleBlockHalf; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -72,6 +74,7 @@ public class BlockMovementChecks { private static final List BRITTLE_CHECKS = new ArrayList<>(); private static final List ATTACHED_CHECKS = new ArrayList<>(); private static final List NOT_SUPPORTIVE_CHECKS = new ArrayList<>(); + public static final ResourceLocation NON_MOVABLE = new ResourceLocation(Create.ID, "non_movable"); // Registration // Add new checks to the front instead of the end @@ -190,7 +193,7 @@ public class BlockMovementChecks { return true; if (state.getBlockHardness(world, pos) == -1) return false; - if (AllBlockTags.NON_MOVABLE.matches(state)) + if (state.getBlock().getTags().contains(NON_MOVABLE)) return false; if (!AllConfigs.SERVER.kinetics.movableSpawners.get() && block instanceof SpawnerBlock) return false;