Remove internal phase comments and format code

Strip all Phase references, TODO/FUTURE roadmap notes, and internal
planning comments from the codebase. Run Prettier for consistent
formatting across all Java files.
This commit is contained in:
NotEvil
2026-04-12 01:24:49 +02:00
parent 73d70e212d
commit a71093ba9c
482 changed files with 8500 additions and 5155 deletions

View File

@@ -5,14 +5,14 @@ import com.tiedup.remake.entities.damsel.components.*;
import com.tiedup.remake.entities.skins.Gender;
import com.tiedup.remake.items.base.ILockable;
import com.tiedup.remake.items.base.ItemCollar;
import com.tiedup.remake.state.ICaptor;
import com.tiedup.remake.state.IRestrainable;
import com.tiedup.remake.state.IRestrainableEntity;
import com.tiedup.remake.state.ICaptor;
import com.tiedup.remake.util.tasks.ItemTask;
import com.tiedup.remake.util.teleport.Position;
import com.tiedup.remake.util.teleport.TeleportHelper;
import com.tiedup.remake.v2.bondage.IV2BondageEquipment;
import com.tiedup.remake.v2.BodyRegionV2;
import com.tiedup.remake.v2.bondage.IV2BondageEquipment;
import com.tiedup.remake.v2.bondage.IV2EquipmentHolder;
import dev.kosmx.playerAnim.api.layered.AnimationStack;
import dev.kosmx.playerAnim.api.layered.IAnimation;
@@ -35,7 +35,6 @@ import net.minecraft.world.level.Level;
/**
* AbstractTiedUpNpc - Base class for all TiedUp! humanoid NPCs.
*
* Phase 3 of anti-spaghetti audit: Extracts shared NPC functionality from EntityDamsel
* so that EntityKidnapper can extend this directly (instead of incorrectly extending EntityDamsel).
*
* <p><b>Shared functionality:</b></p>
@@ -73,9 +72,7 @@ public abstract class AbstractTiedUpNpc
IV2EquipmentHolder
{
// ========================================
// DATA SYNC (Client-Server) - Shared across all NPC types
// ========================================
/**
* NPC's custom name.
@@ -168,9 +165,7 @@ public abstract class AbstractTiedUpNpc
EntityDataSerializers.ITEM_STACK
);
// ========================================
// COMPONENTS (shared across all NPC types)
// ========================================
/**
* Manages inventory, equipment, and feeding.
@@ -198,11 +193,12 @@ public abstract class AbstractTiedUpNpc
*/
private DamselAnimationController animationController;
// ========================================
// CONSTRUCTOR
// ========================================
public AbstractTiedUpNpc(EntityType<? extends AbstractTiedUpNpc> type, Level level) {
public AbstractTiedUpNpc(
EntityType<? extends AbstractTiedUpNpc> type,
Level level
) {
super(type, level);
this.setCanPickUpLoot(false);
@@ -263,9 +259,7 @@ public abstract class AbstractTiedUpNpc
return new com.tiedup.remake.entities.damsel.hosts.AnimationHost(this);
}
// ========================================
// ABSTRACT METHODS - Subclasses must implement
// ========================================
/**
* Get the skin texture for this entity.
@@ -288,9 +282,7 @@ public abstract class AbstractTiedUpNpc
@Override
public abstract com.tiedup.remake.dialogue.SpeakerType getSpeakerType();
// ========================================
// ENTITY INITIALIZATION
// ========================================
@Override
protected void defineSynchedData() {
@@ -313,16 +305,18 @@ public abstract class AbstractTiedUpNpc
super.onSyncedDataUpdated(key);
// Epic 4B: Deserialize V2 equipment on client when synced data changes
if (DATA_V2_EQUIPMENT.equals(key)) {
if (this.v2Equipment != null && this.level() != null && this.level().isClientSide) {
if (
this.v2Equipment != null &&
this.level() != null &&
this.level().isClientSide
) {
CompoundTag tag = this.entityData.get(DATA_V2_EQUIPMENT);
this.v2Equipment.deserializeNBT(tag);
}
}
}
// ========================================
// DESPAWN PROTECTION
// ========================================
/**
* Prevent NPCs from despawning.
@@ -347,9 +341,7 @@ public abstract class AbstractTiedUpNpc
return true; // Always save to disk
}
// ========================================
// TICK - PERIODIC UPDATES
// ========================================
@Override
public void tick() {
@@ -385,9 +377,7 @@ public abstract class AbstractTiedUpNpc
// Default: no-op
}
// ========================================
// BEHAVIORAL FLAGS (overridable by subclasses)
// ========================================
/**
* Check if this entity can call for help when captured.
@@ -409,9 +399,7 @@ public abstract class AbstractTiedUpNpc
return true;
}
// ========================================
// POSE STATE
// ========================================
/**
* Check if NPC is currently sitting.
@@ -496,9 +484,7 @@ public abstract class AbstractTiedUpNpc
this.entityData.set(DATA_STRUGGLING, struggling);
}
// ========================================
// NAME SYSTEM
// ========================================
/**
* Get NPC's custom name.
@@ -534,9 +520,7 @@ public abstract class AbstractTiedUpNpc
setNpcName(name);
}
// ========================================
// GENDER / SLIM ARMS
// ========================================
/**
* Check if this NPC uses slim arms model.
@@ -567,9 +551,7 @@ public abstract class AbstractTiedUpNpc
return Gender.fromName(this.entityData.get(DATA_GENDER));
}
// ========================================
// EQUIPMENT SLOTS (Delegated to DamselInventoryManager)
// ========================================
@Override
public ItemStack getItemBySlot(EquipmentSlot slot) {
@@ -601,9 +583,7 @@ public abstract class AbstractTiedUpNpc
this.inventoryManager.setMainHandItem(stack);
}
// ========================================
// IRestrainable - BONDAGE STATE QUERIES (Delegated to DamselBondageManager)
// ========================================
@Override
public boolean isTiedUp() {
@@ -652,9 +632,7 @@ public abstract class AbstractTiedUpNpc
return bondageManager.isBoundAndGagged();
}
// ========================================
// V2 Region-Based Equipment Access (Delegated to DamselBondageManager)
// ========================================
@Override
public ItemStack getEquipment(BodyRegionV2 region) {
@@ -666,9 +644,7 @@ public abstract class AbstractTiedUpNpc
bondageManager.equip(region, stack);
}
// ========================================
// IRestrainable - EQUIPMENT UNEQUIP (Delegated to DamselBondageManager)
// ========================================
@Override
public ItemStack unequip(BodyRegionV2 region) {
@@ -680,9 +656,7 @@ public abstract class AbstractTiedUpNpc
return bondageManager.forceUnequip(region);
}
// ========================================
// IRestrainable - ENSLAVEMENT
// ========================================
@Override
public boolean isCaptive() {
@@ -743,9 +717,7 @@ public abstract class AbstractTiedUpNpc
bondageManager.free(transportState);
}
// ========================================
// IRestrainable - UTILITY (Delegated to DamselBondageManager)
// ========================================
@Override
public UUID getKidnappedUniqueId() {
@@ -767,9 +739,7 @@ public abstract class AbstractTiedUpNpc
bondageManager.kidnappedDropItem(stack);
}
// ========================================
// IRestrainable - STATE QUERIES (Advanced) (Delegated to DamselBondageManager)
// ========================================
@Override
public boolean canBeTiedUp() {
@@ -853,18 +823,18 @@ public abstract class AbstractTiedUpNpc
return false;
}
// ========================================
// IRestrainable - REPLACE (Delegated to DamselBondageManager)
// ========================================
@Override
public ItemStack replaceEquipment(BodyRegionV2 region, ItemStack newStack, boolean force) {
public ItemStack replaceEquipment(
BodyRegionV2 region,
ItemStack newStack,
boolean force
) {
return bondageManager.replaceEquipment(region, newStack, force);
}
// ========================================
// IRestrainable - BULK OPERATIONS (Delegated to DamselBondageManager)
// ========================================
@Override
public void applyBondage(
@@ -875,7 +845,14 @@ public abstract class AbstractTiedUpNpc
ItemStack collar,
ItemStack clothes
) {
bondageManager.applyBondage(bind, gag, blindfold, earplugs, collar, clothes);
bondageManager.applyBondage(
bind,
gag,
blindfold,
earplugs,
collar,
clothes
);
}
@Override
@@ -903,8 +880,15 @@ public abstract class AbstractTiedUpNpc
boolean dropCollar,
boolean dropClothes
) {
bondageManager.dropBondageItems(drop, dropBind, dropGag, dropBlindfold,
dropEarplugs, dropCollar, dropClothes);
bondageManager.dropBondageItems(
drop,
dropBind,
dropGag,
dropBlindfold,
dropEarplugs,
dropCollar,
dropClothes
);
}
@Override
@@ -917,9 +901,7 @@ public abstract class AbstractTiedUpNpc
return bondageManager.getBondageItemsWhichCanBeRemovedCount();
}
// ========================================
// IRestrainable - PERMISSIONS (Delegated to DamselBondageManager)
// ========================================
@Override
public boolean canTakeOffClothes(Player player) {
@@ -936,9 +918,7 @@ public abstract class AbstractTiedUpNpc
return bondageManager.canChangeClothes();
}
// ========================================
// IRestrainable - SPECIAL INTERACTIONS (Delegated to DamselBondageManager)
// ========================================
@Override
public void tighten(Player tightener) {
@@ -965,18 +945,14 @@ public abstract class AbstractTiedUpNpc
bondageManager.takeBondageItemBy(taker, slotIndex);
}
// ========================================
// IRestrainable - CAPTIVITY TRANSFER (Delegated to DamselBondageManager)
// ========================================
@Override
public void transferCaptivityTo(ICaptor newCaptor) {
bondageManager.transferCaptivityTo(newCaptor);
}
// ========================================
// IRestrainable - METADATA
// ========================================
@Override
public String getNameFromCollar() {
@@ -998,9 +974,7 @@ public abstract class AbstractTiedUpNpc
return null;
}
// ========================================
// IRestrainable - TELEPORT / DEATH
// ========================================
@Override
public void teleportToPosition(Position position) {
@@ -1091,9 +1065,7 @@ public abstract class AbstractTiedUpNpc
}
}
// ========================================
// IV2EquipmentHolder IMPLEMENTATION (Epic 4B)
// ========================================
@Override
public IV2BondageEquipment getV2Equipment() {
@@ -1113,9 +1085,7 @@ public abstract class AbstractTiedUpNpc
syncV2Equipment();
}
// ========================================
// SHOCK COLLAR CHECK
// ========================================
/**
* Check if this NPC has a shock collar equipped.
@@ -1131,9 +1101,7 @@ public abstract class AbstractTiedUpNpc
);
}
// ========================================
// BONDAGE SERVICE (delegated to BondageManager)
// ========================================
/**
* Check if bondage service is enabled for this NPC.
@@ -1149,9 +1117,7 @@ public abstract class AbstractTiedUpNpc
return bondageManager.getBondageServiceMessage();
}
// ========================================
// COMPONENT ACCESSORS
// ========================================
/**
* Get inventory manager component.
@@ -1174,9 +1140,7 @@ public abstract class AbstractTiedUpNpc
return animationController;
}
// ========================================
// LEASH ATTACHMENT POINT
// ========================================
/**
* Override leash offset to attach at neck level instead of eye level.
@@ -1193,9 +1157,7 @@ public abstract class AbstractTiedUpNpc
);
}
// ========================================
// IANIMATEDPLAYER INTERFACE (PlayerAnimator)
// ========================================
/**
* Get the animation stack for this entity.
@@ -1249,9 +1211,7 @@ public abstract class AbstractTiedUpNpc
return animationController.playerAnimator_setAnimation(id, animation);
}
// ========================================
// IDIALOGUESPEAKER PARTIAL IMPLEMENTATION
// ========================================
/**
* Get the name displayed in dialogue chat messages.
@@ -1277,9 +1237,7 @@ public abstract class AbstractTiedUpNpc
return isGagged();
}
// ========================================
// NBT PERSISTENCE (shared portion)
// ========================================
/**
* Save shared NPC data to NBT.