Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c40c4af
Update ACTagRegistry.java
PikachuGabe Dec 23, 2024
f77c890
hopefully make hazmat protection use tags instead
PikachuGabe Dec 23, 2024
e9d68cf
fix method
PikachuGabe Dec 23, 2024
64db89d
Adding acid tag support
PikachuGabe Dec 25, 2024
a54d951
Update naming
PikachuGabe Dec 25, 2024
65b6eb2
Merge pull request #1 from AlexModGuy/main
PikachuGabe Jan 16, 2025
d0fd19b
fix addons breaking
PikachuGabe Jan 27, 2025
e8b114f
Update ACTagRegistry.java
PikachuGabe Apr 24, 2025
75bba53
add varying radiation levels
PikachuGabe Apr 24, 2025
908726b
fix the damned tags
PikachuGabe Apr 28, 2025
9d4f33a
comment the tags
PikachuGabe Apr 28, 2025
26a46c3
adding group tags
PikachuGabe Apr 28, 2025
011390d
populating radioactive blocks list
PikachuGabe Apr 28, 2025
e3c7df8
populating radioactive items list
PikachuGabe Apr 28, 2025
0b85d02
remembered i need the mod id
PikachuGabe Apr 28, 2025
6579ce6
Create weak_radioactive_blocks.json
PikachuGabe Apr 28, 2025
fa70f86
Populate the radiactive blocks tag
PikachuGabe Apr 28, 2025
9a22b3e
populate strong radioactive blocks list
PikachuGabe Apr 28, 2025
24c051a
populate weak radioactive items list
PikachuGabe Apr 28, 2025
af6eefe
Populate radioactive items list
PikachuGabe Apr 28, 2025
7e2c9f4
populating strong radioactive item list
PikachuGabe Apr 28, 2025
4552229
add a tag-based way of making items radioactive
PikachuGabe Apr 30, 2025
343b1b7
enable the item mixin
PikachuGabe Apr 30, 2025
cba4eac
remove unused item properties
PikachuGabe Apr 30, 2025
3eaa74c
disable old radioactive item method
PikachuGabe Apr 30, 2025
dece615
disable the radioactive block item math
PikachuGabe Apr 30, 2025
482c6de
fix a stupid mistake i made
PikachuGabe Apr 30, 2025
dadf893
whoops, forgot about this
PikachuGabe Apr 30, 2025
4a5b326
Tag support for RadioactiveOnDestroyedBlockItem?
PikachuGabe Aug 9, 2025
c4a6d42
Revert d0fd19b103e82dc8e1da704236fd91fec784ba06
PikachuGabe Aug 9, 2025
198b590
Merge branch 'main' into main
PikachuGabe Aug 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ 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));
}
}
}
}
dmgMultiplier = 1.0F - (HazmatArmorItem.getWornAmount(living) / 4F);
dmgMultiplier = 1.0F - (HazmatArmorItem.getAcidAmount(living) / 4F);
}
if (armor) {
ACAdvancementTriggerRegistry.ENTER_ACID_WITH_ARMOR.triggerForEntity(entity);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -52,16 +53,33 @@ 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)) {
i++;
}
if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACItemRegistry.HAZMAT_CHESTPLATE.get())) {
if (entity.getItemBySlot(EquipmentSlot.CHEST).is(ACTagRegistry.HAZMAT_PROT)) {
i++;
}
if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACItemRegistry.HAZMAT_LEGGINGS.get())) {
if (entity.getItemBySlot(EquipmentSlot.LEGS).is(ACTagRegistry.HAZMAT_PROT)) {
i++;
}
if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACItemRegistry.HAZMAT_BOOTS.get())) {
if (entity.getItemBySlot(EquipmentSlot.FEET).is(ACTagRegistry.HAZMAT_PROT)) {
i++;
}
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public class ACTagRegistry {
public static final TagKey<Structure> GINGERBREAD_MEN_WANDER_THROUGH = registerStructureTag("gingerbread_men_wander_through");
public static final TagKey<DamageType> DEEP_ONE_IGNORES = registerDamageTypeTag("deep_one_ignores");
public static final TagKey<Fluid> DOES_NOT_FLOW_INTO_WATERLOGGABLE_BLOCKS = registerFluidTag("does_not_flow_into_waterloggable_blocks");
public static final TagKey<Item> HAZMAT_PROT = registerItemTag("hazmat_prot");
public static final TagKey<Item> ACID_PROT = registerItemTag("acid_prot");

private static TagKey<EntityType<?>> registerEntityTag(String name) {
return TagKey.create(Registries.ENTITY_TYPE, new ResourceLocation(AlexsCaves.MODID, name));
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/data/alexscaves/tags/items/acid_prot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"alexscaves:hazmat_mask",
"alexscaves:hazmat_chestplate",
"alexscaves:hazmat_leggings",
"alexscaves:hazmat_boots"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"alexscaves:hazmat_mask",
"alexscaves:hazmat_chestplate",
"alexscaves:hazmat_leggings",
"alexscaves:hazmat_boots"
]
}