From c40c4afb7ec972fc78f410764e87436adf34aaca Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:01:03 -0600 Subject: [PATCH 01/29] Update ACTagRegistry.java --- .../github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index c6d051a9a..449498977 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -93,6 +93,7 @@ public class ACTagRegistry { public static final TagKey GINGERBREAD_MEN_WANDER_THROUGH = registerStructureTag("gingerbread_men_wander_through"); public static final TagKey DEEP_ONE_IGNORES = registerDamageTypeTag("deep_one_ignores"); public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); + public static final TagKey HAZMAT_PROT = registerItemTag("hazmat_prot"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From f77c890d40699d0579167336a24a448c06f7994e Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:12:39 -0600 Subject: [PATCH 02/29] hopefully make hazmat protection use tags instead --- .../alexscaves/server/item/HazmatArmorItem.java | 8 ++++---- .../resources/data/alexscaves/tags/items/hazmat_prot.json | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/data/alexscaves/tags/items/hazmat_prot.json diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java index 225b83654..04784f42d 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java @@ -52,16 +52,16 @@ public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot public static int getWornAmount(LivingEntity entity) { int i = 0; - if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACItemRegistry.HAZMAT_MASK.get())) { + if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.HAZMAT_PROT.get())) { i++; } - if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACItemRegistry.HAZMAT_CHESTPLATE.get())) { + if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.HAZMAT_PROT.get())) { i++; } - if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACItemRegistry.HAZMAT_LEGGINGS.get())) { + if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.HAZMAT_PROT.get())) { i++; } - if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACItemRegistry.HAZMAT_BOOTS.get())) { + if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.HAZMAT_PROT.get())) { i++; } return i; diff --git a/src/main/resources/data/alexscaves/tags/items/hazmat_prot.json b/src/main/resources/data/alexscaves/tags/items/hazmat_prot.json new file mode 100644 index 000000000..3f342758b --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/hazmat_prot.json @@ -0,0 +1,8 @@ +{ + "values": [ + "alexscaves:hazmat_mask", + "alexscaves:hazmat_chestplate", + "alexscaves:hazmat_leggings", + "alexscaves:hazmat_boots" + ] + } \ No newline at end of file From e9d68cf7a8ccf63df386a9316d5aa686603bb248 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:41:20 -0600 Subject: [PATCH 03/29] fix method --- .../alexscaves/server/item/HazmatArmorItem.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java index 04784f42d..8fe08c951 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java @@ -1,6 +1,7 @@ package com.github.alexmodguy.alexscaves.server.item; import com.github.alexmodguy.alexscaves.AlexsCaves; +import com.github.alexmodguy.alexscaves.server.misc.ACTagRegistry; import com.github.alexmodguy.alexscaves.client.particle.ACParticleRegistry; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; @@ -52,16 +53,16 @@ public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot public static int getWornAmount(LivingEntity entity) { int i = 0; - if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.HAZMAT_PROT.get())) { + if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.HAZMAT_PROT)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.HAZMAT_PROT.get())) { + if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.HAZMAT_PROT)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.HAZMAT_PROT.get())) { + if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.HAZMAT_PROT)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.HAZMAT_PROT.get())) { + if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.HAZMAT_PROT)) { i++; } return i; From 64db89d695708e5f6291fe104f57657e3ac90105 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 25 Dec 2024 04:44:34 -0600 Subject: [PATCH 04/29] Adding acid tag support --- .../alexscaves/server/block/AcidBlock.java | 4 ++-- .../alexscaves/server/item/HazmatArmorItem.java | 17 +++++++++++++++++ .../alexscaves/server/misc/ACTagRegistry.java | 1 + .../data/alexscaves/tags/items/acid_prot.json | 8 ++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/data/alexscaves/tags/items/acid_prot.json diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java b/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java index 6366afb1c..c00e3f639 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java @@ -59,7 +59,7 @@ public void entityInside(BlockState blockState, Level level, BlockPos pos, Entit for (EquipmentSlot slot : EquipmentSlot.values()) { if (slot.isArmor()) { ItemStack item = living.getItemBySlot(slot); - if (item != null && item.isDamageableItem() && !(item.getItem() instanceof HazmatArmorItem)) { + if (item != null && item.isDamageableItem() && !(living.getItemBySlot(slot).is(ACTagRegistry.ACID_PROT))) { armor = true; if (living.getRandom().nextFloat() < 0.05F && !(entity instanceof Player player && player.isCreative())) { item.hurtAndBreak(1, living, e -> e.broadcastBreakEvent(slot)); @@ -67,7 +67,7 @@ public void entityInside(BlockState blockState, Level level, BlockPos pos, Entit } } } - dmgMultiplier = 1.0F - (HazmatArmorItem.getWornAmount(living) / 4F); + dmgMultiplier = 1.0F - (HazmatArmorItem.getAcidAmount(living) / 4F); } if (armor) { ACAdvancementTriggerRegistry.ENTER_ACID_WITH_ARMOR.triggerForEntity(entity); diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java index 8fe08c951..331a9e8b9 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java @@ -67,4 +67,21 @@ public static int getWornAmount(LivingEntity entity) { } return i; } + + public static int getAcidAmount(LivingEntity entity) { + int i = 0; + if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.ACID_PROT)) { + i++; + } + if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.ACID_PROT)) { + i++; + } + if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.ACID_PROT)) { + i++; + } + if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.ACID_PROT)) { + i++; + } + return i; + } } diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 449498977..38212c6ce 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -94,6 +94,7 @@ public class ACTagRegistry { public static final TagKey DEEP_ONE_IGNORES = registerDamageTypeTag("deep_one_ignores"); public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); public static final TagKey HAZMAT_PROT = registerItemTag("hazmat_prot"); + public static final TagKey ACID_PROT = registerItemTag("acid_prot"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); diff --git a/src/main/resources/data/alexscaves/tags/items/acid_prot.json b/src/main/resources/data/alexscaves/tags/items/acid_prot.json new file mode 100644 index 000000000..3f342758b --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/acid_prot.json @@ -0,0 +1,8 @@ +{ + "values": [ + "alexscaves:hazmat_mask", + "alexscaves:hazmat_chestplate", + "alexscaves:hazmat_leggings", + "alexscaves:hazmat_boots" + ] + } \ No newline at end of file From a54d95103cfd2d7d0f02328808446678eb1f6095 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 25 Dec 2024 06:54:25 -0600 Subject: [PATCH 05/29] Update naming Updates naming of tags and shit to make more sense. --- .../alexscaves/server/block/AcidBlock.java | 4 ++-- .../server/item/HazmatArmorItem.java | 20 +++++++++---------- .../server/item/RadioactiveBlockItem.java | 2 +- .../server/item/RadioactiveItem.java | 2 +- .../alexscaves/server/misc/ACTagRegistry.java | 4 ++-- .../server/potion/IrradiatedEffect.java | 2 +- ...d_prot.json => acid_protective_armor.json} | 0 ...at_prot.json => rad_protective_armor.json} | 0 8 files changed, 17 insertions(+), 17 deletions(-) rename src/main/resources/data/alexscaves/tags/items/{acid_prot.json => acid_protective_armor.json} (100%) rename src/main/resources/data/alexscaves/tags/items/{hazmat_prot.json => rad_protective_armor.json} (100%) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java b/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java index c00e3f639..ac767f1ec 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/block/AcidBlock.java @@ -59,7 +59,7 @@ public void entityInside(BlockState blockState, Level level, BlockPos pos, Entit for (EquipmentSlot slot : EquipmentSlot.values()) { if (slot.isArmor()) { ItemStack item = living.getItemBySlot(slot); - if (item != null && item.isDamageableItem() && !(living.getItemBySlot(slot).is(ACTagRegistry.ACID_PROT))) { + if (item != null && item.isDamageableItem() && !(item.is(ACTagRegistry.ACID_PROTECTIVE_ARMOR))) { armor = true; if (living.getRandom().nextFloat() < 0.05F && !(entity instanceof Player player && player.isCreative())) { item.hurtAndBreak(1, living, e -> e.broadcastBreakEvent(slot)); @@ -67,7 +67,7 @@ public void entityInside(BlockState blockState, Level level, BlockPos pos, Entit } } } - dmgMultiplier = 1.0F - (HazmatArmorItem.getAcidAmount(living) / 4F); + dmgMultiplier = 1.0F - (HazmatArmorItem.getAcidProtection(living) / 4F); } if (armor) { ACAdvancementTriggerRegistry.ENTER_ACID_WITH_ARMOR.triggerForEntity(entity); diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java index 331a9e8b9..50466aede 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/HazmatArmorItem.java @@ -51,35 +51,35 @@ public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot } } - public static int getWornAmount(LivingEntity entity) { + public static int getRadProtection(LivingEntity entity) { int i = 0; - if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.HAZMAT_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.RAD_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.HAZMAT_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.RAD_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.HAZMAT_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.RAD_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.HAZMAT_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.RAD_PROTECTIVE_ARMOR)) { i++; } return i; } - public static int getAcidAmount(LivingEntity entity) { + public static int getAcidProtection(LivingEntity entity) { int i = 0; - if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.ACID_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.HEAD).is(ACTagRegistry.ACID_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.ACID_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.ACID_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.ACID_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.ACID_PROTECTIVE_ARMOR)) { i++; } - if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.ACID_PROT)) { + if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.ACID_PROTECTIVE_ARMOR)) { i++; } return i; diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java index c1bb41972..9892bdcc2 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java @@ -26,7 +26,7 @@ public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, bo super.inventoryTick(stack, level, entity, i, held); if (!level.isClientSide && entity instanceof LivingEntity living && !(living instanceof Player player && player.isCreative())) { float stackChance = stack.getCount() * randomChanceOfRadiation; - float hazmatMultiplier = 1F - HazmatArmorItem.getWornAmount(living) / 4F; + float hazmatMultiplier = 1F - HazmatArmorItem.getRadProtection(living) / 4F; if (!living.hasEffect(ACEffectRegistry.IRRADIATED.get()) && level.random.nextFloat() < stackChance * hazmatMultiplier) { MobEffectInstance instance = new MobEffectInstance(ACEffectRegistry.IRRADIATED.get(), 1800); living.addEffect(instance); diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java index 26fdfc56e..ac326c75f 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java @@ -24,7 +24,7 @@ public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, bo super.inventoryTick(stack, level, entity, i, held); if (!level.isClientSide && entity instanceof LivingEntity living && !(living instanceof Player player && player.isCreative())) { float stackChance = stack.getCount() * randomChanceOfRadiation; - float hazmatMultiplier = 1F - HazmatArmorItem.getWornAmount(living) / 4F; + float hazmatMultiplier = 1F - HazmatArmorItem.getRadProtection(living) / 4F; if (!living.hasEffect(ACEffectRegistry.IRRADIATED.get()) && level.random.nextFloat() < stackChance * hazmatMultiplier) { MobEffectInstance instance = new MobEffectInstance(ACEffectRegistry.IRRADIATED.get(), 1800); living.addEffect(instance); diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 38212c6ce..b4b898f55 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -93,8 +93,8 @@ public class ACTagRegistry { public static final TagKey GINGERBREAD_MEN_WANDER_THROUGH = registerStructureTag("gingerbread_men_wander_through"); public static final TagKey DEEP_ONE_IGNORES = registerDamageTypeTag("deep_one_ignores"); public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); - public static final TagKey HAZMAT_PROT = registerItemTag("hazmat_prot"); - public static final TagKey ACID_PROT = registerItemTag("acid_prot"); + public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); + public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/potion/IrradiatedEffect.java b/src/main/java/com/github/alexmodguy/alexscaves/server/potion/IrradiatedEffect.java index 668185e81..de281952e 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/potion/IrradiatedEffect.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/potion/IrradiatedEffect.java @@ -20,7 +20,7 @@ protected IrradiatedEffect() { } public void applyEffectTick(LivingEntity entity, int tick) { - int hazmat = HazmatArmorItem.getWornAmount(entity); + int hazmat = HazmatArmorItem.getRadProtection(entity); float damageScale = 1F - hazmat * 0.25F; if (entity instanceof Player player && hazmat == 0) { player.causeFoodExhaustion(0.4F); diff --git a/src/main/resources/data/alexscaves/tags/items/acid_prot.json b/src/main/resources/data/alexscaves/tags/items/acid_protective_armor.json similarity index 100% rename from src/main/resources/data/alexscaves/tags/items/acid_prot.json rename to src/main/resources/data/alexscaves/tags/items/acid_protective_armor.json diff --git a/src/main/resources/data/alexscaves/tags/items/hazmat_prot.json b/src/main/resources/data/alexscaves/tags/items/rad_protective_armor.json similarity index 100% rename from src/main/resources/data/alexscaves/tags/items/hazmat_prot.json rename to src/main/resources/data/alexscaves/tags/items/rad_protective_armor.json From d0fd19b103e82dc8e1da704236fd91fec784ba06 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 26 Jan 2025 19:05:28 -0600 Subject: [PATCH 06/29] fix addons breaking --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 78f0888c0..a4cb28b43 100644 --- a/build.gradle +++ b/build.gradle @@ -133,7 +133,7 @@ jar { "Specification-Title": "alexscaves", "Specification-Vendor": "alexthe668", "Specification-Version": "1.0", // We are version 1 of ourselves - "Implementation-Title": project.name, + "Implementation-Title": "AlexsCaves", "Implementation-Version": "${version}", "Implementation-Vendor" :"alexthe668", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") From e8b114f8a08c32a2253d6273fbbc8b4fd736e7bf Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Thu, 24 Apr 2025 02:15:31 -0500 Subject: [PATCH 07/29] Update ACTagRegistry.java Setup for a test. --- .../github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index b4b898f55..9bbdee8d8 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -95,6 +95,8 @@ public class ACTagRegistry { public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); + public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); + public static final TagKey RADIOACTIVE_BLOCKS = registerItemTag("radioactive_blocks"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 75bba539180079d6ee80d78c78a7db63b7f0758d Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Thu, 24 Apr 2025 02:37:07 -0500 Subject: [PATCH 08/29] add varying radiation levels --- .../alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 9bbdee8d8..297d2b376 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -95,8 +95,12 @@ public class ACTagRegistry { public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); + public static final TagKey WEAK_RADIOACTIVE_ITEMS = registerItemTag("weak_radioactive_items"); + public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerItemTag("weak_radioactive_blocks"); public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); public static final TagKey RADIOACTIVE_BLOCKS = registerItemTag("radioactive_blocks"); + public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); + public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerItemTag("strong_radioactive_blocks"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 908726b9b5a85e7b2677c3693e2dc18953823e8a Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 20:28:55 -0500 Subject: [PATCH 09/29] fix the damned tags --- .../alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 297d2b376..68107302c 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -96,11 +96,11 @@ public class ACTagRegistry { public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); public static final TagKey WEAK_RADIOACTIVE_ITEMS = registerItemTag("weak_radioactive_items"); - public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerItemTag("weak_radioactive_blocks"); + public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerBlockTag("weak_radioactive_blocks"); public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); - public static final TagKey RADIOACTIVE_BLOCKS = registerItemTag("radioactive_blocks"); + public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); - public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerItemTag("strong_radioactive_blocks"); + public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 9d4f33aa62ffc58902981873cb3d0dc1c04075ff Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 20:36:13 -0500 Subject: [PATCH 10/29] comment the tags gotta remember what they mean, after all --- .../alexscaves/server/misc/ACTagRegistry.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 68107302c..44b1c47e3 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -95,12 +95,12 @@ public class ACTagRegistry { public static final TagKey DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks"); public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); - public static final TagKey WEAK_RADIOACTIVE_ITEMS = registerItemTag("weak_radioactive_items"); - public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerBlockTag("weak_radioactive_blocks"); - public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); - public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); - public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); - public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); + public static final TagKey WEAK_RADIOACTIVE_ITEMS = registerItemTag("weak_radioactive_items"); // 0.0005F + public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerBlockTag("weak_radioactive_blocks"); // 0.0005F + public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); // 0.001F + public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); // 0.001F + public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); // 0.01F + public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); // 0.01F private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 26a46c3f7493ae6388996cd50059269a49cfc754 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:26:54 -0500 Subject: [PATCH 11/29] adding group tags hopefully i actually use these --- .../github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index 44b1c47e3..eb0498bfe 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -101,6 +101,8 @@ public class ACTagRegistry { public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); // 0.001F public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); // 0.01F public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); // 0.01F + public static final TagKey ALL_RADIOACTIVE_ITEMS = registerItemTag("all_radioactive_items"); // contains a list of all radioactive items + public static final TagKey ALL_RADIOACTIVE_BLOCKS = registerBlockTag("all_radioactive_blocks"); // contains a list of all radioactive blocks private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 011390dd69d52abb4ea05b6fdc3208687c6792c9 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:29:59 -0500 Subject: [PATCH 12/29] populating radioactive blocks list hopefully this works, i don't usually contain tags inside a tag --- .../alexscaves/tags/blocks/all_radioactive_blocks.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json diff --git a/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json b/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json new file mode 100644 index 000000000..9e2e53ea5 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "#weak_radioactive_blocks", + "#radioactive_blocks", + "#strong_radioactive_blocks" + ] +} From e3c7df89f1be01465fef27bc811d33635a5f68b3 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:31:49 -0500 Subject: [PATCH 13/29] populating radioactive items list --- .../data/alexscaves/tags/items/all_radioactive_items.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/items/all_radioactive_items.json diff --git a/src/main/resources/data/alexscaves/tags/items/all_radioactive_items.json b/src/main/resources/data/alexscaves/tags/items/all_radioactive_items.json new file mode 100644 index 000000000..e4268371d --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/all_radioactive_items.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "#alexscaves:weak_radioactive_items", + "#alexscaves:radioactive_items", + "#alexscaves:strong_radioactive_items" + ] +} From 0b85d0295c338b433f1f3a066808012250fbf348 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:32:07 -0500 Subject: [PATCH 14/29] remembered i need the mod id --- .../data/alexscaves/tags/blocks/all_radioactive_blocks.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json b/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json index 9e2e53ea5..497085d72 100644 --- a/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json +++ b/src/main/resources/data/alexscaves/tags/blocks/all_radioactive_blocks.json @@ -1,8 +1,8 @@ { "replace": false, "values": [ - "#weak_radioactive_blocks", - "#radioactive_blocks", - "#strong_radioactive_blocks" + "#alexscaves:weak_radioactive_blocks", + "#alexscaves:radioactive_blocks", + "#alexscaves:strong_radioactive_blocks" ] } From 6579ce6da60186e952009afb303daec274dcd67b Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:49:55 -0500 Subject: [PATCH 15/29] Create weak_radioactive_blocks.json I don't know if I need to create this tag since nothing uses it, but the registry is black magic to me so better safe than sorry. --- .../data/alexscaves/tags/blocks/weak_radioactive_blocks.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/blocks/weak_radioactive_blocks.json diff --git a/src/main/resources/data/alexscaves/tags/blocks/weak_radioactive_blocks.json b/src/main/resources/data/alexscaves/tags/blocks/weak_radioactive_blocks.json new file mode 100644 index 000000000..d275da3f4 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/blocks/weak_radioactive_blocks.json @@ -0,0 +1,5 @@ +{ + "replace": false, + "values": [ + ] +} From fa70f8677aca9da7ad77d49c9e1b243d79f0c438 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:53:00 -0500 Subject: [PATCH 16/29] Populate the radiactive blocks tag god interpreting these into radiation values is going to be a pain probably... --- .../data/alexscaves/tags/blocks/radioactive_blocks.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/blocks/radioactive_blocks.json diff --git a/src/main/resources/data/alexscaves/tags/blocks/radioactive_blocks.json b/src/main/resources/data/alexscaves/tags/blocks/radioactive_blocks.json new file mode 100644 index 000000000..f77e34bab --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/blocks/radioactive_blocks.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "alexscaves:radrock_uranium_ore", + "alexscaves:block_of_uranium", + "alexscaves:unrefined_waste" + ] +} From 9a22b3e6a808a9fbdf3ab4ba72d2cddb3dc9acf9 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:53:56 -0500 Subject: [PATCH 17/29] populate strong radioactive blocks list --- .../alexscaves/tags/blocks/strong_radioactive_blocks.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/blocks/strong_radioactive_blocks.json diff --git a/src/main/resources/data/alexscaves/tags/blocks/strong_radioactive_blocks.json b/src/main/resources/data/alexscaves/tags/blocks/strong_radioactive_blocks.json new file mode 100644 index 000000000..c2d555762 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/blocks/strong_radioactive_blocks.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "alexscaves:waste_drum" + ] +} From 24c051a89bee8bd63699f2b484534795968fe450 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:57:35 -0500 Subject: [PATCH 18/29] populate weak radioactive items list --- .../data/alexscaves/tags/items/weak_radioactive_items.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/items/weak_radioactive_items.json diff --git a/src/main/resources/data/alexscaves/tags/items/weak_radioactive_items.json b/src/main/resources/data/alexscaves/tags/items/weak_radioactive_items.json new file mode 100644 index 000000000..7d2e1bda4 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/weak_radioactive_items.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "alexscaves:charred_remnant" + ] +} From af6eefeb30328ea2b5a97a33b53cdfcf0c25b24d Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Mon, 28 Apr 2025 00:01:30 -0500 Subject: [PATCH 19/29] Populate radioactive items list Might be better to reference the block tag instead of each block, but IMO the more configurability, the better. --- .../data/alexscaves/tags/items/radioactive_items.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/items/radioactive_items.json diff --git a/src/main/resources/data/alexscaves/tags/items/radioactive_items.json b/src/main/resources/data/alexscaves/tags/items/radioactive_items.json new file mode 100644 index 000000000..df30a48d7 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/radioactive_items.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "alexscaves:radrock_uranium_ore", + "alexscaves:block_of_uranium", + "alexscaves:unrefined_waste", + "alexscaves:fissile_core", + "alexscaves:uranium_shard", + "alexscaves:uranium" + ] +} From 7e2c9f4bd5ee89ff3038205cdf77f6e2119fd9c4 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Mon, 28 Apr 2025 00:02:42 -0500 Subject: [PATCH 20/29] populating strong radioactive item list --- .../alexscaves/tags/items/strong_radioactive_items.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/resources/data/alexscaves/tags/items/strong_radioactive_items.json diff --git a/src/main/resources/data/alexscaves/tags/items/strong_radioactive_items.json b/src/main/resources/data/alexscaves/tags/items/strong_radioactive_items.json new file mode 100644 index 000000000..c2d555762 --- /dev/null +++ b/src/main/resources/data/alexscaves/tags/items/strong_radioactive_items.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "alexscaves:waste_drum" + ] +} From 4552229da2b711baab45b9cfee627e7ff1ea2477 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:03:16 -0500 Subject: [PATCH 21/29] add a tag-based way of making items radioactive --- .../alexscaves/mixin/ItemMixin.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/main/java/com/github/alexmodguy/alexscaves/mixin/ItemMixin.java diff --git a/src/main/java/com/github/alexmodguy/alexscaves/mixin/ItemMixin.java b/src/main/java/com/github/alexmodguy/alexscaves/mixin/ItemMixin.java new file mode 100644 index 000000000..aec1ab02f --- /dev/null +++ b/src/main/java/com/github/alexmodguy/alexscaves/mixin/ItemMixin.java @@ -0,0 +1,56 @@ +package com.github.alexmodguy.alexscaves.mixin; + +import com.github.alexmodguy.alexscaves.AlexsCaves; +import com.github.alexmodguy.alexscaves.server.item.HazmatArmorItem; +import com.github.alexmodguy.alexscaves.server.message.UpdateEffectVisualityEntityMessage; +import com.github.alexmodguy.alexscaves.server.potion.ACEffectRegistry; +import com.github.alexmodguy.alexscaves.server.misc.ACTagRegistry; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.Level; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Item.class) +public class ItemMixin { + + @Inject(method = "inventoryTick", at = @At("HEAD")) + public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, boolean held, CallbackInfo info) { + + if (!stack.is(ACTagRegistry.ALL_RADIOACTIVE_ITEMS)) { + return; + } + + if (!level.isClientSide && entity instanceof LivingEntity living && !(living instanceof Player player && player.isCreative())) { + + float randomChanceOfRadiation = 0.0F; + + if (stack.is(ACTagRegistry.WEAK_RADIOACTIVE_ITEMS)) { + randomChanceOfRadiation = 0.0005F; + } + + if (stack.is(ACTagRegistry.RADIOACTIVE_ITEMS)) { + randomChanceOfRadiation = 0.001F; + } + + if (stack.is(ACTagRegistry.STRONG_RADIOACTIVE_ITEMS)) { + randomChanceOfRadiation = 0.01F; + } + + float stackChance = stack.getCount() * randomChanceOfRadiation; + float hazmatMultiplier = 1F - HazmatArmorItem.getRadProtection(living) / 4F; + + if (!living.hasEffect(ACEffectRegistry.IRRADIATED.get()) && level.random.nextFloat() < stackChance * hazmatMultiplier) { + MobEffectInstance instance = new MobEffectInstance(ACEffectRegistry.IRRADIATED.get(), 1800); + living.addEffect(instance); + AlexsCaves.sendMSGToAll(new UpdateEffectVisualityEntityMessage(entity.getId(), entity.getId(), 0, instance.getDuration())); + } + } + } +} From 343b1b71dded7fbe46332f2bc11fa7e0fc4d86c4 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:03:50 -0500 Subject: [PATCH 22/29] enable the item mixin --- src/main/resources/alexscaves.mixins.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/alexscaves.mixins.json b/src/main/resources/alexscaves.mixins.json index adb5f6892..d0f7cde8e 100644 --- a/src/main/resources/alexscaves.mixins.json +++ b/src/main/resources/alexscaves.mixins.json @@ -12,6 +12,7 @@ "CoralFeatureMixin", "EnchantRandomlyFunctionMixin", "EntityMixin", + "ItemMixin", "FallingBlockEntityMixin", "FlowingFluidMixin", "FoodDataMixin", @@ -64,4 +65,4 @@ "defaultRequire": 1 }, "minVersion": "0.8" -} \ No newline at end of file +} From cba4eacf802b7d78968e6e5a84189111ecb00cb3 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:06:36 -0500 Subject: [PATCH 23/29] remove unused item properties --- .../alexscaves/server/item/ACItemRegistry.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java index 9b5977860..8dfbbd499 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java @@ -113,8 +113,8 @@ public class ACItemRegistry { public static final RegistryObject RADGILL_BUCKET = DEF_REG.register("radgill_bucket", () -> new ModFishBucketItem(ACEntityRegistry.RADGILL, ACFluidRegistry.ACID_FLUID_SOURCE, new Item.Properties().craftRemainder(Items.BUCKET).stacksTo(1))); public static final RegistryObject RADGILL = DEF_REG.register("radgill", () -> new Item(new Item.Properties().food(ACFoods.RADGILL))); public static final RegistryObject COOKED_RADGILL = DEF_REG.register("cooked_radgill", () -> new Item(new Item.Properties().food(ACFoods.RADGILL_COOKED))); - public static final RegistryObject URANIUM = DEF_REG.register("uranium", () -> new RadioactiveItem(new Item.Properties(), 0.001F)); - public static final RegistryObject URANIUM_SHARD = DEF_REG.register("uranium_shard", () -> new RadioactiveItem(new Item.Properties(), 0.001F)); + public static final RegistryObject URANIUM = DEF_REG.register("uranium", () -> new Item(new Item.Properties())); + public static final RegistryObject URANIUM_SHARD = DEF_REG.register("uranium_shard", () -> new Item(new Item.Properties())); public static final RegistryObject SULFUR_DUST = DEF_REG.register("sulfur_dust", () -> new Item(new Item.Properties())); public static final RegistryObject RADON_BOTTLE = DEF_REG.register("radon_bottle", () -> new Item(new Item.Properties().craftRemainder(Items.GLASS_BOTTLE).stacksTo(16))); public static final RegistryObject CINDER_BRICK = DEF_REG.register("cinder_brick", () -> new ThrownProjectileItem(new Item.Properties(), player -> new CinderBrickEntity(player.level(), player), -20.0F, 0.65F, 0.9F)); @@ -127,8 +127,8 @@ public class ACItemRegistry { public static final RegistryObject HAZMAT_CHESTPLATE = DEF_REG.register("hazmat_chestplate", () -> new HazmatArmorItem(HAZMAT_SUIT_ARMOR_MATERIAL, ArmorItem.Type.CHESTPLATE)); public static final RegistryObject HAZMAT_LEGGINGS = DEF_REG.register("hazmat_leggings", () -> new HazmatArmorItem(HAZMAT_SUIT_ARMOR_MATERIAL, ArmorItem.Type.LEGGINGS)); public static final RegistryObject HAZMAT_BOOTS = DEF_REG.register("hazmat_boots", () -> new HazmatArmorItem(HAZMAT_SUIT_ARMOR_MATERIAL, ArmorItem.Type.BOOTS)); - public static final RegistryObject FISSILE_CORE = DEF_REG.register("fissile_core", () -> new RadioactiveItem(new Item.Properties().rarity(Rarity.UNCOMMON), 0.001F)); - public static final RegistryObject CHARRED_REMNANT = DEF_REG.register("charred_remnant", () -> new RadioactiveItem(new Item.Properties(), 0.0005F)); + public static final RegistryObject FISSILE_CORE = DEF_REG.register("fissile_core", () -> new Item(new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final RegistryObject CHARRED_REMNANT = DEF_REG.register("charred_remnant", () -> new Item(new Item.Properties())); public static final RegistryObject REMOTE_DETONATOR = DEF_REG.register("remote_detonator", () -> new RemoteDetonatorItem()); public static final RegistryObject RAYGUN = DEF_REG.register("raygun", () -> new RaygunItem()); public static final RegistryObject MUSIC_DISC_FUSION_FRAGMENT = DEF_REG.register("disc_fragment_fusion", () -> new DiscFragmentItem(new Item.Properties())); @@ -162,14 +162,14 @@ public class ACItemRegistry { public static final RegistryObject SEA_STAFF_SPRITE = DEF_REG.register("sea_staff_inventory", () -> new Item(new Item.Properties())); public static final RegistryObject ORTHOLANCE = DEF_REG.register("ortholance", () -> new OrtholanceItem(new Item.Properties().defaultDurability(340).rarity(Rarity.UNCOMMON))); public static final RegistryObject ORTHOLANCE_SPRITE = DEF_REG.register("ortholance_inventory", () -> new Item(new Item.Properties())); - public static final RegistryObject DEPTH_CHARGE = DEF_REG.register("depth_charge", () -> new ThrownProjectileItem(new Item.Properties(), player -> new DepthChargeEntity(player.level(), player), -10.0F, 0.65F, 1.5F)); + public static final RegistryObject DEPTH_CHARGE = DEF_REG.register("depth_charge", () -> new ThrownProjectileItem(new Item.Properties(), player -> new DepthChargeEntity(player.level(), player), -10.0F, 0.65F, 1.5); public static final RegistryObject GUARDIAN_POTTERY_SHERD = DEF_REG.register("guardian_pottery_sherd", () -> new Item(new Item.Properties())); public static final RegistryObject HERO_POTTERY_SHERD = DEF_REG.register("hero_pottery_sherd", () -> new Item(new Item.Properties())); public static final RegistryObject BIOLUMINESCENT_TORCH = DEF_REG.register("bioluminescent_torch", () -> new StandingAndWallBlockItem(ACBlockRegistry.BIOLUMINESCENT_TORCH.get(), ACBlockRegistry.BIOLUMINESCENT_WALL_TORCH.get(), new Item.Properties(), Direction.DOWN)); public static final RegistryObject GAME_CONTROLLER = DEF_REG.register("game_controller", () -> new Item(new Item.Properties().rarity(Rarity.RARE))); public static final RegistryObject STINKY_FISH = DEF_REG.register("stinky_fish", () -> new Item(new Item.Properties().rarity(Rarity.RARE).food(ACFoods.STINKY_FISH))); public static final RegistryObject IMMORTAL_EMBRYO = DEF_REG.register("immortal_embryo", () -> new Item(new Item.Properties().rarity(Rarity.EPIC))); - public static final RegistryObject GUANO = DEF_REG.register("guano", () -> new ThrownProjectileItem(new Item.Properties(), player -> new GuanoEntity(player.level(), player), 0.0F, 1.0F, 1.0F)); + public static final RegistryObject GUANO = DEF_REG.register("guano", () -> new ThrownProjectileItem(new Item.Properties(), player -> new GuanoEntity(player.level(), player), 0.0F, 1.0F, 1.0); public static final RegistryObject MOTH_DUST = DEF_REG.register("moth_dust", () -> new MothDustItem()); public static final RegistryObject FERTILIZER = DEF_REG.register("fertilizer", () -> new FertilizerItem()); public static final RegistryObject DARK_TATTERS = DEF_REG.register("dark_tatters", () -> new Item(new Item.Properties())); @@ -213,9 +213,9 @@ public class ACItemRegistry { public static final RegistryObject GELATIN_YELLOW = DEF_REG.register("gelatin_yellow", () -> new Item(new Item.Properties().food(ACFoods.GELATIN))); public static final RegistryObject GELATIN_PINK = DEF_REG.register("gelatin_pink", () -> new Item(new Item.Properties().food(ACFoods.GELATIN))); public static final RegistryObject HOT_CHOCOLATE_BOTTLE = DEF_REG.register("hot_chocolate_bottle", () -> new HotChocolateBottleItem()); - public static final RegistryObject VANILLA_ICE_CREAM_SCOOP = DEF_REG.register("vanilla_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); - public static final RegistryObject CHOCOLATE_ICE_CREAM_SCOOP = DEF_REG.register("chocolate_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); - public static final RegistryObject SWEETBERRY_ICE_CREAM_SCOOP = DEF_REG.register("sweetberry_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); + public static final RegistryObject VANILLA_ICE_CREAM_SCOOP = DEF_REG.register("vanilla_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); + public static final RegistryObject CHOCOLATE_ICE_CREAM_SCOOP = DEF_REG.register("chocolate_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); + public static final RegistryObject SWEETBERRY_ICE_CREAM_SCOOP = DEF_REG.register("sweetberry_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); public static final RegistryObject SUNDAE = DEF_REG.register("sundae", () -> new BowlFoodItem(new Item.Properties().food(ACFoods.SUNDAE).rarity(RARITY_SWEET).stacksTo(1))); public static final RegistryObject SHARPENED_CANDY_CANE = DEF_REG.register("sharpened_candy_cane", () -> new SharpenedCandyCaneItem(new Item.Properties().food(ACFoods.CANDY_CANE))); public static final RegistryObject PEPPERMINT_POWDER = DEF_REG.register("peppermint_powder", () -> new Item(new Item.Properties().food(ACFoods.PEPPERMINT_POWDER))); From 3eaa74c3010923f6529481e9884f56a9ff3e1a1b Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:07:21 -0500 Subject: [PATCH 24/29] disable old radioactive item method --- .../alexmodguy/alexscaves/server/item/RadioactiveItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java index ac326c75f..7f23a3ceb 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveItem.java @@ -1,4 +1,4 @@ -package com.github.alexmodguy.alexscaves.server.item; +/*package com.github.alexmodguy.alexscaves.server.item; import com.github.alexmodguy.alexscaves.AlexsCaves; import com.github.alexmodguy.alexscaves.server.message.UpdateEffectVisualityEntityMessage; @@ -33,3 +33,4 @@ public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, bo } } } +*/ From dece615c25b78613a41f3f0939b954d212ac8858 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:08:47 -0500 Subject: [PATCH 25/29] disable the radioactive block item math covered by the new mixin. still required by the ondestroyed function. --- .../alexscaves/server/item/RadioactiveBlockItem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java index 9892bdcc2..b5a4d59be 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveBlockItem.java @@ -22,7 +22,7 @@ public RadioactiveBlockItem(RegistryObject blockSupplier, Properties prop this.randomChanceOfRadiation = randomChanceOfRadiation; } - public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, boolean held) { + /*public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, boolean held) { super.inventoryTick(stack, level, entity, i, held); if (!level.isClientSide && entity instanceof LivingEntity living && !(living instanceof Player player && player.isCreative())) { float stackChance = stack.getCount() * randomChanceOfRadiation; @@ -33,7 +33,7 @@ public void inventoryTick(ItemStack stack, Level level, Entity entity, int i, bo AlexsCaves.sendMSGToAll(new UpdateEffectVisualityEntityMessage(entity.getId(), entity.getId(), 0, instance.getDuration())); } } - } + }*/ } From 482c6deb741d3003651306fde68cd253a0a61fae Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:17:10 -0500 Subject: [PATCH 26/29] fix a stupid mistake i made think i accidentally pressed "replace all" --- .../alexscaves/server/item/ACItemRegistry.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java index 8dfbbd499..e0509915b 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/ACItemRegistry.java @@ -162,14 +162,14 @@ public class ACItemRegistry { public static final RegistryObject SEA_STAFF_SPRITE = DEF_REG.register("sea_staff_inventory", () -> new Item(new Item.Properties())); public static final RegistryObject ORTHOLANCE = DEF_REG.register("ortholance", () -> new OrtholanceItem(new Item.Properties().defaultDurability(340).rarity(Rarity.UNCOMMON))); public static final RegistryObject ORTHOLANCE_SPRITE = DEF_REG.register("ortholance_inventory", () -> new Item(new Item.Properties())); - public static final RegistryObject DEPTH_CHARGE = DEF_REG.register("depth_charge", () -> new ThrownProjectileItem(new Item.Properties(), player -> new DepthChargeEntity(player.level(), player), -10.0F, 0.65F, 1.5); + public static final RegistryObject DEPTH_CHARGE = DEF_REG.register("depth_charge", () -> new ThrownProjectileItem(new Item.Properties(), player -> new DepthChargeEntity(player.level(), player), -10.0F, 0.65F, 1.5F)); public static final RegistryObject GUARDIAN_POTTERY_SHERD = DEF_REG.register("guardian_pottery_sherd", () -> new Item(new Item.Properties())); public static final RegistryObject HERO_POTTERY_SHERD = DEF_REG.register("hero_pottery_sherd", () -> new Item(new Item.Properties())); public static final RegistryObject BIOLUMINESCENT_TORCH = DEF_REG.register("bioluminescent_torch", () -> new StandingAndWallBlockItem(ACBlockRegistry.BIOLUMINESCENT_TORCH.get(), ACBlockRegistry.BIOLUMINESCENT_WALL_TORCH.get(), new Item.Properties(), Direction.DOWN)); public static final RegistryObject GAME_CONTROLLER = DEF_REG.register("game_controller", () -> new Item(new Item.Properties().rarity(Rarity.RARE))); public static final RegistryObject STINKY_FISH = DEF_REG.register("stinky_fish", () -> new Item(new Item.Properties().rarity(Rarity.RARE).food(ACFoods.STINKY_FISH))); public static final RegistryObject IMMORTAL_EMBRYO = DEF_REG.register("immortal_embryo", () -> new Item(new Item.Properties().rarity(Rarity.EPIC))); - public static final RegistryObject GUANO = DEF_REG.register("guano", () -> new ThrownProjectileItem(new Item.Properties(), player -> new GuanoEntity(player.level(), player), 0.0F, 1.0F, 1.0); + public static final RegistryObject GUANO = DEF_REG.register("guano", () -> new ThrownProjectileItem(new Item.Properties(), player -> new GuanoEntity(player.level(), player), 0.0F, 1.0F, 1.0F)); public static final RegistryObject MOTH_DUST = DEF_REG.register("moth_dust", () -> new MothDustItem()); public static final RegistryObject FERTILIZER = DEF_REG.register("fertilizer", () -> new FertilizerItem()); public static final RegistryObject DARK_TATTERS = DEF_REG.register("dark_tatters", () -> new Item(new Item.Properties())); @@ -213,9 +213,9 @@ public class ACItemRegistry { public static final RegistryObject GELATIN_YELLOW = DEF_REG.register("gelatin_yellow", () -> new Item(new Item.Properties().food(ACFoods.GELATIN))); public static final RegistryObject GELATIN_PINK = DEF_REG.register("gelatin_pink", () -> new Item(new Item.Properties().food(ACFoods.GELATIN))); public static final RegistryObject HOT_CHOCOLATE_BOTTLE = DEF_REG.register("hot_chocolate_bottle", () -> new HotChocolateBottleItem()); - public static final RegistryObject VANILLA_ICE_CREAM_SCOOP = DEF_REG.register("vanilla_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); - public static final RegistryObject CHOCOLATE_ICE_CREAM_SCOOP = DEF_REG.register("chocolate_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); - public static final RegistryObject SWEETBERRY_ICE_CREAM_SCOOP = DEF_REG.register("sweetberry_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2); + public static final RegistryObject VANILLA_ICE_CREAM_SCOOP = DEF_REG.register("vanilla_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); + public static final RegistryObject CHOCOLATE_ICE_CREAM_SCOOP = DEF_REG.register("chocolate_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); + public static final RegistryObject SWEETBERRY_ICE_CREAM_SCOOP = DEF_REG.register("sweetberry_ice_cream_scoop", () -> new ThrownProjectileItem(new Item.Properties(), player -> new ThrownIceCreamScoopEntity(player.level(), player), -10.0F, 1.0F, 0.2F)); public static final RegistryObject SUNDAE = DEF_REG.register("sundae", () -> new BowlFoodItem(new Item.Properties().food(ACFoods.SUNDAE).rarity(RARITY_SWEET).stacksTo(1))); public static final RegistryObject SHARPENED_CANDY_CANE = DEF_REG.register("sharpened_candy_cane", () -> new SharpenedCandyCaneItem(new Item.Properties().food(ACFoods.CANDY_CANE))); public static final RegistryObject PEPPERMINT_POWDER = DEF_REG.register("peppermint_powder", () -> new Item(new Item.Properties().food(ACFoods.PEPPERMINT_POWDER))); From dadf893ec51d37bcd322121085b0e4db1eac41d6 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:19:05 -0500 Subject: [PATCH 27/29] whoops, forgot about this --- .../alexmodguy/alexscaves/server/misc/ACTagRegistry.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java index eb0498bfe..f6e86a86c 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/misc/ACTagRegistry.java @@ -96,13 +96,13 @@ public class ACTagRegistry { public static final TagKey RAD_PROTECTIVE_ARMOR = registerItemTag("rad_protective_armor"); public static final TagKey ACID_PROTECTIVE_ARMOR = registerItemTag("acid_protective_armor"); public static final TagKey WEAK_RADIOACTIVE_ITEMS = registerItemTag("weak_radioactive_items"); // 0.0005F - public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerBlockTag("weak_radioactive_blocks"); // 0.0005F + public static final TagKey WEAK_RADIOACTIVE_BLOCKS = registerBlockTag("weak_radioactive_blocks"); // 0.0005F public static final TagKey RADIOACTIVE_ITEMS = registerItemTag("radioactive_items"); // 0.001F - public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); // 0.001F + public static final TagKey RADIOACTIVE_BLOCKS = registerBlockTag("radioactive_blocks"); // 0.001F public static final TagKey STRONG_RADIOACTIVE_ITEMS = registerItemTag("strong_radioactive_items"); // 0.01F - public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); // 0.01F + public static final TagKey STRONG_RADIOACTIVE_BLOCKS = registerBlockTag("strong_radioactive_blocks"); // 0.01F public static final TagKey ALL_RADIOACTIVE_ITEMS = registerItemTag("all_radioactive_items"); // contains a list of all radioactive items - public static final TagKey ALL_RADIOACTIVE_BLOCKS = registerBlockTag("all_radioactive_blocks"); // contains a list of all radioactive blocks + public static final TagKey ALL_RADIOACTIVE_BLOCKS = registerBlockTag("all_radioactive_blocks"); // contains a list of all radioactive blocks private static TagKey> registerEntityTag(String name) { return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name)); From 4a5b326cf7eb6653b1dd5904a367da67ab436760 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sat, 9 Aug 2025 00:20:38 -0500 Subject: [PATCH 28/29] Tag support for RadioactiveOnDestroyedBlockItem? So much hoping here. --- .../server/item/RadioactiveOnDestroyedBlockItem.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveOnDestroyedBlockItem.java b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveOnDestroyedBlockItem.java index b9f4cc4e5..01641878d 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveOnDestroyedBlockItem.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/item/RadioactiveOnDestroyedBlockItem.java @@ -2,6 +2,7 @@ import com.github.alexmodguy.alexscaves.client.particle.ACParticleRegistry; import com.github.alexmodguy.alexscaves.server.potion.ACEffectRegistry; +import com.github.alexmodguy.alexscaves.server.misc.ACTagRegistry; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.AreaEffectCloud; @@ -18,6 +19,10 @@ public RadioactiveOnDestroyedBlockItem(RegistryObject blockSupplier, Prop @Override public void onDestroyed(ItemEntity itemEntity, DamageSource damageSource){ + var stack = itemEntity.getItem(); + if (!stack.is(ACTagRegistry.ALL_RADIOACTIVE_ITEMS)) { + return; + } super.onDestroyed(itemEntity, damageSource); if(!damageSource.isCreativePlayer() && !itemEntity.isRemoved()){ itemEntity.discard(); From c4a6d42a12325532741a0b52400150be02175189 Mon Sep 17 00:00:00 2001 From: PikachuGabe <84477180+PikachuGabe@users.noreply.github.com> Date: Sat, 9 Aug 2025 14:33:51 -0500 Subject: [PATCH 29/29] Revert d0fd19b103e82dc8e1da704236fd91fec784ba06 That change was only needed for my curseforge upload. Now that this is complete I can revert it for when this is merged into Alex's Caves. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a4cb28b43..457f35e0b 100644 --- a/build.gradle +++ b/build.gradle @@ -133,7 +133,7 @@ jar { "Specification-Title": "alexscaves", "Specification-Vendor": "alexthe668", "Specification-Version": "1.0", // We are version 1 of ourselves - "Implementation-Title": "AlexsCaves", + "Implementation-Title": "project.name", "Implementation-Version": "${version}", "Implementation-Vendor" :"alexthe668", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")