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

@@ -1,14 +1,14 @@
package com.tiedup.remake.events.captivity;
import com.tiedup.remake.core.SettingsAccessor;
import com.tiedup.remake.core.TiedUpMod;
import com.tiedup.remake.v2.BodyRegionV2;
import com.tiedup.remake.entities.LeashProxyEntity;
import com.tiedup.remake.items.base.ItemCollar;
import com.tiedup.remake.state.IPlayerLeashAccess;
import com.tiedup.remake.state.IBondageState;
import com.tiedup.remake.state.IPlayerLeashAccess;
import com.tiedup.remake.state.PlayerBindState;
import com.tiedup.remake.util.KidnappedHelper;
import com.tiedup.remake.core.SettingsAccessor;
import com.tiedup.remake.v2.BodyRegionV2;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
@@ -110,7 +110,11 @@ public class PlayerEnslavementHandler {
}
// Check if enslavement is enabled
if (!SettingsAccessor.isEnslavementEnabled(master.level().getGameRules())) {
if (
!SettingsAccessor.isEnslavementEnabled(
master.level().getGameRules()
)
) {
return;
}
@@ -132,16 +136,16 @@ public class PlayerEnslavementHandler {
ItemStack heldItem = master.getItemInHand(event.getHand());
// ========================================
// Scenario 1: Enslavement with Lead
// ========================================
if (heldItem.is(Items.LEAD)) {
// Check if target is enslavable (using IBondageState)
if (!slaveKidnappedState.isEnslavable()) {
// Exception: collar owner can capture even if not tied
boolean canCapture = false;
if (slaveKidnappedState.hasCollar()) {
ItemStack collar = slaveKidnappedState.getEquipment(BodyRegionV2.NECK);
ItemStack collar = slaveKidnappedState.getEquipment(
BodyRegionV2.NECK
);
if (collar.getItem() instanceof ItemCollar collarItem) {
if (
collarItem
@@ -161,7 +165,6 @@ public class PlayerEnslavementHandler {
}
}
// Phase 17: Check if not already captured (Player-specific check)
if (slaveState.isCaptive()) {
TiedUpMod.LOGGER.debug(
"[PlayerEnslavementHandler] {} is already captured",
@@ -191,14 +194,10 @@ public class PlayerEnslavementHandler {
);
}
}
// ========================================
// Scenario 2: Freeing with Empty Hand
// ========================================
else if (heldItem.isEmpty()) {
// Phase 17: isSlave → isCaptive
if (!slaveState.isCaptive()) return;
// Phase 17: getMaster → getCaptor, getSlaveHolderManager → getCaptorManager
if (slaveState.getCaptor() != masterState.getCaptorManager()) {
TiedUpMod.LOGGER.debug(
"[PlayerEnslavementHandler] {} tried to free {} but is not the captor",
@@ -221,7 +220,6 @@ public class PlayerEnslavementHandler {
/**
* Periodic check for enslaved players.
*
* Phase 14.1.5: Remains PlayerBindState-specific (enslavement system is Player-only)
*/
@SubscribeEvent
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
@@ -233,11 +231,9 @@ public class PlayerEnslavementHandler {
PlayerBindState state = PlayerBindState.getInstance(player);
if (state == null) return;
// Phase 17: isSlave → isCaptive, checkStillSlave → checkStillCaptive
if (state.isCaptive()) {
state.checkStillCaptive();
}
// Phase 17: getSlaveHolderManager → getCaptorManager, cleanupInvalidSlaves → cleanupInvalidCaptives
state.getCaptorManager().cleanupInvalidCaptives();
}
}