package com.tiedup.remake.entities; import com.tiedup.remake.v2.BodyRegionV2; import com.tiedup.remake.v2.bondage.CollarHelper; import java.util.List; import java.util.UUID; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.Nullable; /** * Helper class to access collar configuration for EntityKidnapper. * *
Provides null-safe accessors for collar settings like: *
This is a transient helper - not persisted to NBT. */ public class KidnapperCollarConfig { private final EntityKidnapper kidnapper; public KidnapperCollarConfig(EntityKidnapper kidnapper) { this.kidnapper = kidnapper; } // COLLAR STACK ACCESS /** * Get the collar ItemStack. * @return The collar stack (may be empty) */ public ItemStack getCollarStack() { return kidnapper.getEquipment(BodyRegionV2.NECK); } /** * Check if the kidnapper has a valid collar. */ private boolean hasValidCollar() { return kidnapper.hasCollar() && CollarHelper.isCollar(getCollarStack()); } // KIDNAPPING MODE /** * Check if kidnapping mode is enabled via collar. */ public boolean isKidnappingModeEnabled() { if (!hasValidCollar()) return false; return CollarHelper.isKidnappingModeEnabled(getCollarStack()); } /** * Check if kidnapping mode is fully ready (enabled + prison set). */ public boolean isKidnappingModeReady() { if (!hasValidCollar()) return false; return CollarHelper.isKidnappingModeReady(getCollarStack()); } // POSITION GETTERS /** * Get cell ID from collar. */ @Nullable public java.util.UUID getCellId() { if (!hasValidCollar()) return null; return CollarHelper.getCellId(getCollarStack()); } /** * Check if collar has a cell assigned. */ public boolean hasCellAssigned() { if (!hasValidCollar()) return false; return CollarHelper.hasCellAssigned(getCollarStack()); } // BEHAVIOR FLAGS /** * Check if should warn masters after capturing slave. */ public boolean shouldWarnMasters() { if (!hasValidCollar()) return false; return CollarHelper.shouldWarnMasters(getCollarStack()); } /** * Check if should tie slave to pole in prison. */ public boolean shouldTieToPole() { if (!hasValidCollar()) return false; return CollarHelper.shouldTieToPole(getCollarStack()); } // BLACKLIST/WHITELIST /** * Check if player is valid target for kidnapping mode. * Uses collar blacklist/whitelist. * *
Logic: *