diff --git a/src/generated/resources/.cache/b88694b447b21b9bd0a9c83c8957ae2b7a409eb1 b/src/generated/resources/.cache/b88694b447b21b9bd0a9c83c8957ae2b7a409eb1 index e33f2e5c..eb964788 100644 --- a/src/generated/resources/.cache/b88694b447b21b9bd0a9c83c8957ae2b7a409eb1 +++ b/src/generated/resources/.cache/b88694b447b21b9bd0a9c83c8957ae2b7a409eb1 @@ -1,4 +1,4 @@ -// 1.21.1 2024-09-25T19:57:16.0643187 JustDireThings Item Tags +// 1.21.1 2024-09-25T22:41:05.4413696 JustDireThings Item Tags c144a5adcf337b1e974a62a8dc0d8f29311210b4 data/c/tags/item/gems.json 55719b9c6f0430ad38bf081d697aa5406cc27cfb data/c/tags/item/ingots.json d7ad09b1e8fb0835b7f14f744fa7866dd3521c60 data/c/tags/item/ingots/blazegold.json @@ -23,6 +23,7 @@ efe9e0caf089100a228c46379f3aa70d7f602ddc data/justdirethings/tags/item/deny_fuel eeef6ccb8e598e021db2f245fbdff673e3106bf6 data/justdirethings/tags/item/goo_revive_tier_2.json 2b5f0c660ffe0de7f842859234134966481a7dfa data/justdirethings/tags/item/goo_revive_tier_3.json 76917a9392dc09a91e434edafbe257771ad2b621 data/justdirethings/tags/item/goo_revive_tier_4.json +cfab2ab481bf476a645d326b87627918009b9e50 data/justdirethings/tags/item/paradox_deny.json 1c8b03c523f967d55db17d349712035ad95cb1cd data/minecraft/tags/item/axes.json 873813c87b7f12c654fdc3272d5a65755a12146d data/minecraft/tags/item/chest_armor.json 37c1e694624af60a6cd59abf99cd9ad69c0d16ca data/minecraft/tags/item/cluster_max_harvestables.json diff --git a/src/generated/resources/data/justdirethings/tags/item/paradox_deny.json b/src/generated/resources/data/justdirethings/tags/item/paradox_deny.json new file mode 100644 index 00000000..6f3f6528 --- /dev/null +++ b/src/generated/resources/data/justdirethings/tags/item/paradox_deny.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:bedrock" + ] +} \ No newline at end of file diff --git a/src/main/java/com/direwolf20/justdirethings/common/entities/ParadoxEntity.java b/src/main/java/com/direwolf20/justdirethings/common/entities/ParadoxEntity.java index f17c033d..dbd85065 100644 --- a/src/main/java/com/direwolf20/justdirethings/common/entities/ParadoxEntity.java +++ b/src/main/java/com/direwolf20/justdirethings/common/entities/ParadoxEntity.java @@ -3,6 +3,7 @@ import com.direwolf20.justdirethings.client.particles.paradoxparticle.ParadoxParticleData; import com.direwolf20.justdirethings.datagen.JustDireBlockTags; import com.direwolf20.justdirethings.datagen.JustDireEntityTags; +import com.direwolf20.justdirethings.datagen.JustDireItemTags; import com.direwolf20.justdirethings.setup.Registration; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; @@ -211,6 +212,13 @@ private void handleItemsPostShrink(int targetRadius) { } } + private boolean isValidItem(ItemEntity entity) { + ItemStack itemStack = entity.getItem(); + if (itemStack.is(JustDireItemTags.PARADOX_DENY)) + return false; + return true; + } + private boolean isValidEntity(Entity entity) { if (entity.isMultipartEntity()) return false; @@ -229,6 +237,8 @@ private void handleItemAbsorption(int currentRadius) { List items = level().getEntitiesOfClass(ItemEntity.class, getBoundingBox().inflate(currentRadius + 0.25f)); for (ItemEntity item : items) { + if (!isValidItem(item)) + continue; if (collapsing) break; Vec3 itemPosition = item.position(); Vec3 direction = position().subtract(itemPosition).normalize().scale(itemSuckSpeed); diff --git a/src/main/java/com/direwolf20/justdirethings/datagen/JustDireItemTags.java b/src/main/java/com/direwolf20/justdirethings/datagen/JustDireItemTags.java index 541f174c..76465a7f 100644 --- a/src/main/java/com/direwolf20/justdirethings/datagen/JustDireItemTags.java +++ b/src/main/java/com/direwolf20/justdirethings/datagen/JustDireItemTags.java @@ -48,6 +48,7 @@ private static TagKey forgeTag(String name) { public static final TagKey GOO_REVIVE_TIER_2 = ItemTags.create(ResourceLocation.fromNamespaceAndPath(JustDireThings.MODID, "goo_revive_tier_2")); public static final TagKey GOO_REVIVE_TIER_3 = ItemTags.create(ResourceLocation.fromNamespaceAndPath(JustDireThings.MODID, "goo_revive_tier_3")); public static final TagKey GOO_REVIVE_TIER_4 = ItemTags.create(ResourceLocation.fromNamespaceAndPath(JustDireThings.MODID, "goo_revive_tier_4")); + public static final TagKey PARADOX_DENY = ItemTags.create(ResourceLocation.fromNamespaceAndPath(JustDireThings.MODID, "paradox_deny")); @Override protected void addTags(HolderLookup.Provider provider) { @@ -208,7 +209,8 @@ protected void addTags(HolderLookup.Provider provider) { .add(Registration.EclipseAlloyPickaxe.get()) .add(Registration.CelestigemPaxel.get()) .add(Registration.EclipseAlloyPaxel.get()); - + tag(PARADOX_DENY) + .add(Items.BEDROCK); } @Override