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:
@@ -18,8 +18,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
/**
|
||||
* Phase 6: Concrete untying task for freeing a tied entity.
|
||||
* Phase 14.2.6: Unified to work with both Players and NPCs.
|
||||
*
|
||||
* Based on original UntyingPlayerTask from 1.12.2
|
||||
*
|
||||
@@ -92,9 +90,7 @@ public class UntyingPlayerTask extends UntyingTask {
|
||||
*/
|
||||
@Override
|
||||
public synchronized void update() {
|
||||
// ========================================
|
||||
// SECURITY: Validate helper is still close to target
|
||||
// ========================================
|
||||
if (helper != null && targetEntity != null) {
|
||||
double distance = helper.distanceTo(targetEntity);
|
||||
if (distance > 4.0) {
|
||||
@@ -184,7 +180,11 @@ public class UntyingPlayerTask extends UntyingTask {
|
||||
untieTarget();
|
||||
|
||||
// Handle Damsel-specific rewards
|
||||
if (targetEntity instanceof EntityDamsel damsel && NpcTypeHelper.isDamselOnly(targetEntity) && helper != null) {
|
||||
if (
|
||||
targetEntity instanceof EntityDamsel damsel &&
|
||||
NpcTypeHelper.isDamselOnly(targetEntity) &&
|
||||
helper != null
|
||||
) {
|
||||
// Reward the savior (gives emeralds and marks player as savior)
|
||||
damsel.rewardSavior(helper);
|
||||
}
|
||||
@@ -255,8 +255,12 @@ public class UntyingPlayerTask extends UntyingTask {
|
||||
private void dropBondageItems() {
|
||||
// For player targets: use V2EquipmentHelper to get all equipped items
|
||||
if (targetEntity instanceof Player player) {
|
||||
Map<BodyRegionV2, ItemStack> equipped = V2EquipmentHelper.getAllEquipped(player);
|
||||
for (Map.Entry<BodyRegionV2, ItemStack> entry : equipped.entrySet()) {
|
||||
Map<BodyRegionV2, ItemStack> equipped =
|
||||
V2EquipmentHelper.getAllEquipped(player);
|
||||
for (Map.Entry<
|
||||
BodyRegionV2,
|
||||
ItemStack
|
||||
> entry : equipped.entrySet()) {
|
||||
ItemStack stack = entry.getValue();
|
||||
if (!stack.isEmpty()) {
|
||||
// Drop item at player's position
|
||||
@@ -375,7 +379,6 @@ public class UntyingPlayerTask extends UntyingTask {
|
||||
if (targetEntity instanceof Player player) {
|
||||
V2EquipmentHelper.clearAll(player);
|
||||
|
||||
// Phase 17: Free from captivity/leash if applicable (player-specific)
|
||||
PlayerBindState playerState = PlayerBindState.getInstance(player);
|
||||
if (playerState != null && playerState.isCaptive()) {
|
||||
playerState.free();
|
||||
|
||||
Reference in New Issue
Block a user