Play full counts if the player also has a regular counter

This commit is contained in:
George Paton 2024-04-07 17:23:59 +10:00
parent 180234e245
commit 0b8332d525
3 changed files with 4 additions and 14 deletions

View File

@ -12,6 +12,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.items.ModItems;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.I18nUtil;
@ -576,6 +577,9 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
if(!hasFSBArmor(entity) || !this.geigerSound)
return;
if(entity.inventory.hasItem(ModItems.geiger_counter) || entity.inventory.hasItem(ModItems.dosimeter))
return;
if(world.getTotalWorldTime() % 5 == 0) {
// Armor piece dosimeters indicate radiation dosage inside the armor, so reduce the counts by the effective protection

View File

@ -5,7 +5,6 @@ import java.util.List;
import java.util.Random;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.util.ContaminationUtil;
import net.minecraft.entity.Entity;
@ -25,12 +24,6 @@ public class ItemDosimeter extends Item {
if(!(entity instanceof EntityLivingBase) || world.isRemote)
return;
if(entity instanceof EntityPlayer) {
if(ArmorFSB.hasFSBArmor((EntityPlayer)entity) && ((ArmorFSB)((EntityPlayer)entity).inventory.armorInventory[2].getItem()).geigerSound)
return;
}
float x = HbmLivingProps.getRadBuf((EntityLivingBase)entity);
if(world.getTotalWorldTime() % 5 == 0) {

View File

@ -6,7 +6,6 @@ import java.util.Random;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.util.ContaminationUtil;
import net.minecraft.entity.Entity;
@ -27,12 +26,6 @@ public class ItemGeigerCounter extends Item {
if(!(entity instanceof EntityLivingBase) || world.isRemote)
return;
if(entity instanceof EntityPlayer) {
if(ArmorFSB.hasFSBArmor((EntityPlayer)entity) && ((ArmorFSB)((EntityPlayer)entity).inventory.armorInventory[2].getItem()).geigerSound)
return;
}
float x = HbmLivingProps.getRadBuf((EntityLivingBase)entity);
if(world.getTotalWorldTime() % 5 == 0) {