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:
@@ -1,11 +1,11 @@
|
||||
package com.tiedup.remake.tasks;
|
||||
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.network.ModNetwork;
|
||||
import com.tiedup.remake.network.action.PacketTying;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.state.PlayerBindState;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
@@ -13,8 +13,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
/**
|
||||
* Phase 6: Concrete tying task for tying up any IBondageState entity.
|
||||
* Phase 14.2.6: Unified to work with both Players and NPCs.
|
||||
*
|
||||
* Based on original TyingPlayerTask from 1.12.2
|
||||
*
|
||||
@@ -115,9 +113,7 @@ public class TyingPlayerTask extends TyingTask {
|
||||
boolean isSelfTying =
|
||||
kidnapper != null && kidnapper.equals(targetEntity);
|
||||
|
||||
// ========================================
|
||||
// SECURITY: Validate kidnapper is still close to target (skip for self-tying)
|
||||
// ========================================
|
||||
if (!isSelfTying && kidnapper != null && targetEntity != null) {
|
||||
double distance = kidnapper.distanceTo(targetEntity);
|
||||
if (distance > 4.0) {
|
||||
@@ -290,11 +286,16 @@ public class TyingPlayerTask extends TyingTask {
|
||||
if (isSelfTying) {
|
||||
if (kidnapper instanceof ServerPlayer serverPlayer) {
|
||||
PacketTying completionPacket = new PacketTying(
|
||||
-1, this.getMaxSeconds(), true, "yourself"
|
||||
-1,
|
||||
this.getMaxSeconds(),
|
||||
true,
|
||||
"yourself"
|
||||
);
|
||||
ModNetwork.sendToPlayer(completionPacket, serverPlayer);
|
||||
|
||||
PlayerBindState playerState = PlayerBindState.getInstance(serverPlayer);
|
||||
PlayerBindState playerState = PlayerBindState.getInstance(
|
||||
serverPlayer
|
||||
);
|
||||
if (playerState != null) {
|
||||
playerState.setRestrainedState(null);
|
||||
}
|
||||
@@ -302,11 +303,16 @@ public class TyingPlayerTask extends TyingTask {
|
||||
} else {
|
||||
if (targetEntity instanceof ServerPlayer serverTarget) {
|
||||
PacketTying completionPacket = new PacketTying(
|
||||
-1, this.getMaxSeconds(), false, kidnapperName
|
||||
-1,
|
||||
this.getMaxSeconds(),
|
||||
false,
|
||||
kidnapperName
|
||||
);
|
||||
ModNetwork.sendToPlayer(completionPacket, serverTarget);
|
||||
|
||||
PlayerBindState playerState = PlayerBindState.getInstance(serverTarget);
|
||||
PlayerBindState playerState = PlayerBindState.getInstance(
|
||||
serverTarget
|
||||
);
|
||||
if (playerState != null) {
|
||||
playerState.setRestrainedState(null);
|
||||
}
|
||||
@@ -314,7 +320,10 @@ public class TyingPlayerTask extends TyingTask {
|
||||
|
||||
if (kidnapper instanceof ServerPlayer serverKidnapper) {
|
||||
PacketTying completionPacket = new PacketTying(
|
||||
-1, this.getMaxSeconds(), true, targetName
|
||||
-1,
|
||||
this.getMaxSeconds(),
|
||||
true,
|
||||
targetName
|
||||
);
|
||||
ModNetwork.sendToPlayer(completionPacket, serverKidnapper);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user