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,9 +1,9 @@
package com.tiedup.remake.util;
import org.jetbrains.annotations.Nullable;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import org.jetbrains.annotations.Nullable;
/**
* Calculates the effects of feeding food items to NPCs.

View File

@@ -5,8 +5,6 @@ import com.tiedup.remake.core.ModConfig;
/**
* GagMaterial DNA - Defines the "sound" and behavior of different gag materials.
*
* Phase 15: Added PANEL, LATEX, RING, BITE, SPONGE, BAGUETTE
* Phase 16: Enhanced with phonetic properties for realistic speech transformation
*/
public enum GagMaterial {
// Original materials
@@ -63,7 +61,6 @@ public enum GagMaterial {
0.0f
),
// Phase 15: New materials
PANEL(
new String[] { "m", "n" },
new String[] { "mm", "nn" },
@@ -148,7 +145,6 @@ public enum GagMaterial {
private final float defaultComprehension;
private final double defaultTalkRange;
// Phase 16: Phonetic properties
private final String dominantConsonant;
private final String dominantVowel;
private final float plosiveBleed; // b,d,g,k,p,t - require lip/tongue

View File

@@ -1,7 +1,6 @@
package com.tiedup.remake.util;
/**
* Phase 4 Refactoring: Centralized game constants.
*
* Contains all magic numbers extracted from across the codebase
* for better maintainability and easier tuning.

View File

@@ -3,11 +3,11 @@ package com.tiedup.remake.util;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.jetbrains.annotations.Nullable;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.Tag;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
/**
* Utility class for common NBT operations on ItemStacks.
@@ -27,9 +27,7 @@ public final class ItemNBTHelper {
// Utility class - no instantiation
}
// ========================================
// BOOLEAN OPERATIONS
// ========================================
/**
* Get a boolean value from an ItemStack's NBT.
@@ -75,9 +73,7 @@ public final class ItemNBTHelper {
stack.getOrCreateTag().putBoolean(key, value);
}
// ========================================
// INTEGER OPERATIONS
// ========================================
/**
* Get an integer value from an ItemStack's NBT.
@@ -119,9 +115,7 @@ public final class ItemNBTHelper {
stack.getOrCreateTag().putInt(key, value);
}
// ========================================
// STRING OPERATIONS
// ========================================
/**
* Get a string value from an ItemStack's NBT.
@@ -177,9 +171,7 @@ public final class ItemNBTHelper {
}
}
// ========================================
// UUID OPERATIONS
// ========================================
/**
* Get a UUID value from an ItemStack's NBT.
@@ -231,9 +223,7 @@ public final class ItemNBTHelper {
return tag != null && tag.hasUUID(key);
}
// ========================================
// UUID LIST OPERATIONS
// ========================================
/**
* Get a list of UUIDs from an ItemStack's NBT.
@@ -351,9 +341,7 @@ public final class ItemNBTHelper {
return getUUIDList(stack, key).contains(uuid);
}
// ========================================
// GENERIC OPERATIONS
// ========================================
/**
* Check if an ItemStack's NBT contains a key.

View File

@@ -4,7 +4,6 @@ import com.tiedup.remake.core.TiedUpMod;
import com.tiedup.remake.state.IBondageState;
import com.tiedup.remake.state.PlayerBindState;
import java.util.List;
import org.jetbrains.annotations.Nullable;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.server.level.ServerLevel;
@@ -15,11 +14,11 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import org.jetbrains.annotations.Nullable;
/**
* Kidnap Explosion - Applies bondage to entities in an area.
*
* Phase 16: Blocks
*
* Used by EntityKidnapBomb when it explodes.
* Applies stored bondage items to all kidnappable entities in radius.

View File

@@ -1,15 +1,14 @@
package com.tiedup.remake.util;
import com.tiedup.remake.compat.mca.MCACompat;
import com.tiedup.remake.v2.BodyRegionV2;
import com.tiedup.remake.state.IRestrainable;
import com.tiedup.remake.state.PlayerBindState;
import com.tiedup.remake.v2.BodyRegionV2;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.Nullable;
/**
* Phase 14.1: Helper utility for working with IRestrainable entities.
*
* Provides convenient methods for obtaining IRestrainable instances from various entity types.
*
@@ -20,8 +19,8 @@ import org.jetbrains.annotations.Nullable;
* <h2>Supported Entity Types</h2>
* <ul>
* <li><b>Player</b>: Uses {@link PlayerBindState} singleton</li>
* <li><b>EntityDamsel</b> (Phase 14.2): Implements IRestrainable directly</li>
* <li><b>EntityKidnapper</b> (Phase 14.2): Implements IRestrainable directly</li>
* <li><b>EntityDamsel</b>: Implements IRestrainable directly</li>
* <li><b>EntityKidnapper</b>: Implements IRestrainable directly</li>
* <li><b>Other entities</b>: Returns null (not kidnappable)</li>
* </ul>
*
@@ -166,7 +165,6 @@ public class KidnappedHelper {
* @return true if the entity is enslaved, false otherwise
*/
/**
* Phase 17: Renamed from isSlave to isCaptive
*/
public static boolean isCaptive(LivingEntity entity) {
IRestrainable state = getKidnappedState(entity);

View File

@@ -1,10 +1,10 @@
package com.tiedup.remake.util;
import com.tiedup.remake.dialogue.GagTalkManager;
import com.tiedup.remake.v2.BodyRegionV2;
import com.tiedup.remake.entities.EntityDamsel;
import com.tiedup.remake.state.IBondageState;
import com.tiedup.remake.state.PlayerBindState;
import com.tiedup.remake.v2.BodyRegionV2;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.server.MinecraftServer;
@@ -35,9 +35,7 @@ public final class MessageDispatcher {
// Utility class - no instantiation
}
// ========================================
// EARPLUG-AWARE METHODS
// ========================================
/**
* Send a message to a player (respects earplugs).
@@ -149,9 +147,7 @@ public final class MessageDispatcher {
return true;
}
// ========================================
// BYPASS METHODS (ignore earplugs)
// ========================================
/**
* Send a critical system message that IGNORES earplugs.
@@ -182,9 +178,7 @@ public final class MessageDispatcher {
target.displayClientMessage(message, true);
}
// ========================================
// INTERNAL HELPERS
// ========================================
/**
* Check if a player has earplugs equipped.
@@ -200,9 +194,7 @@ public final class MessageDispatcher {
return state != null && state.hasEarplugs();
}
// ========================================
// NPC DIALOGUE METHODS
// ========================================
/**
* Send a dialogue message from an entity to a player.
@@ -230,7 +222,11 @@ public final class MessageDispatcher {
// Apply gag talk if entity is a gagged NPC
String finalMessage = message;
if (entity instanceof com.tiedup.remake.entities.AbstractTiedUpNpc npc && npc.isGagged()) {
if (
entity instanceof
com.tiedup.remake.entities.AbstractTiedUpNpc npc &&
npc.isGagged()
) {
ItemStack gag = npc.getEquipment(BodyRegionV2.MOUTH);
IBondageState state = KidnappedHelper.getKidnappedState(npc);
if (state != null && !gag.isEmpty()) {

View File

@@ -4,7 +4,6 @@ import com.tiedup.remake.core.TiedUpMod;
import net.minecraft.world.level.GameRules;
/**
* Phase 6: Custom GameRules for TiedUp mod.
*
* Manages configurable values for gameplay mechanics.
* GameRules can be changed via /gamerule command in-game.
@@ -13,9 +12,7 @@ import net.minecraft.world.level.GameRules;
*/
public class ModGameRules {
// =====================================================
// RESTRAINT MECHANICS
// =====================================================
/** Time (in seconds) required to tie up a player. Default: 5 */
public static GameRules.Key<GameRules.IntegerValue> TYING_PLAYER_TIME;
@@ -26,9 +23,7 @@ public class ModGameRules {
/** Resistance added by a padlock when locked on an item. Default: 250 */
public static GameRules.Key<GameRules.IntegerValue> PADLOCK_RESISTANCE;
// =====================================================
// STRUGGLE SYSTEM
// =====================================================
/** Enable/disable struggle system. Default: true */
public static GameRules.Key<GameRules.BooleanValue> STRUGGLE;
@@ -41,34 +36,33 @@ public class ModGameRules {
/** Cooldown between struggle attempts (ticks, 20 = 1s). Default: 80 (4s) */
public static GameRules.Key<GameRules.IntegerValue> STRUGGLE_TIMER;
/** Ticks per 1 resistance point in continuous struggle. Default: 20 (1/s) */
public static GameRules.Key<GameRules.IntegerValue> STRUGGLE_CONTINUOUS_RATE;
public static GameRules.Key<
GameRules.IntegerValue
> STRUGGLE_CONTINUOUS_RATE;
/** Probability of random shock during collar struggle (0-100). Default: 20% */
public static GameRules.Key<GameRules.IntegerValue> STRUGGLE_COLLAR_RANDOM_SHOCK;
public static GameRules.Key<
GameRules.IntegerValue
> STRUGGLE_COLLAR_RANDOM_SHOCK;
// BUG-003: RESISTANCE_ROPE, RESISTANCE_GAG, RESISTANCE_BLINDFOLD, RESISTANCE_COLLAR
// removed. Bind resistance is now read from ModConfig via SettingsAccessor.
// =====================================================
// NPC STRUGGLE
// =====================================================
/** Enable/disable NPC struggle to escape restraints. Default: true */
public static GameRules.Key<GameRules.BooleanValue> NPC_STRUGGLE_ENABLED;
/** Base interval (ticks) between NPC struggle attempts. Default: 6000 (5 min) */
public static GameRules.Key<GameRules.IntegerValue> NPC_STRUGGLE_INTERVAL;
// =====================================================
// COLLAR & SHOCKER
// =====================================================
/** Enable/disable enslavement system. Default: true */
public static GameRules.Key<GameRules.BooleanValue> ENSLAVEMENT_ENABLED;
/** Base radius for shocker controller. Default: 50 blocks */
public static GameRules.Key<GameRules.IntegerValue> SHOCKER_CONTROLLER_BASE_RADIUS;
public static GameRules.Key<
GameRules.IntegerValue
> SHOCKER_CONTROLLER_BASE_RADIUS;
// =====================================================
// NPC SPAWNING
// =====================================================
/** Enable/disable damsel entity spawning. Default: true */
public static GameRules.Key<GameRules.BooleanValue> DAMSELS_SPAWN;
@@ -79,19 +73,23 @@ public class ModGameRules {
/** Kidnapper spawn rate (0-100). Default: 100 */
public static GameRules.Key<GameRules.IntegerValue> KIDNAPPER_SPAWN_RATE;
/** Kidnapper Archer spawn rate (0-100). Default: 100 */
public static GameRules.Key<GameRules.IntegerValue> KIDNAPPER_ARCHER_SPAWN_RATE;
public static GameRules.Key<
GameRules.IntegerValue
> KIDNAPPER_ARCHER_SPAWN_RATE;
/** Kidnapper Elite spawn rate (0-100). Default: 100 */
public static GameRules.Key<GameRules.IntegerValue> KIDNAPPER_ELITE_SPAWN_RATE;
public static GameRules.Key<
GameRules.IntegerValue
> KIDNAPPER_ELITE_SPAWN_RATE;
/** Kidnapper Merchant spawn rate (0-100). Default: 100 */
public static GameRules.Key<GameRules.IntegerValue> KIDNAPPER_MERCHANT_SPAWN_RATE;
public static GameRules.Key<
GameRules.IntegerValue
> KIDNAPPER_MERCHANT_SPAWN_RATE;
/** Master spawn rate (0-100). Default: 100 */
public static GameRules.Key<GameRules.IntegerValue> MASTER_SPAWN_RATE;
/** Spawn gender mode: 0=BOTH, 1=FEMALE_ONLY, 2=MALE_ONLY. Default: 0 */
public static GameRules.Key<GameRules.IntegerValue> SPAWN_GENDER_MODE;
// =====================================================
// BOUNTY SYSTEM
// =====================================================
/** Maximum bounties per player. Default: 5 */
public static GameRules.Key<GameRules.IntegerValue> MAX_BOUNTIES;
@@ -100,9 +98,7 @@ public class ModGameRules {
/** Radius for bounty delivery detection. Default: 5 blocks */
public static GameRules.Key<GameRules.IntegerValue> BOUNTY_DELIVERY_RADIUS;
// =====================================================
// MISCELLANEOUS
// =====================================================
/** Kidnap bomb explosion radius. Default: 5 blocks */
public static GameRules.Key<GameRules.IntegerValue> KIDNAP_BOMB_RADIUS;
@@ -114,7 +110,6 @@ public class ModGameRules {
public static void register() {
TiedUpMod.LOGGER.info("Registering TiedUp GameRules...");
// Phase 6: Tying/Untying times
// NOTE: Using hardcoded defaults because ModConfig isn't loaded yet during mod construction
GAG_TALK_PROXIMITY = GameRules.register(
"gagTalkProximity",
@@ -133,7 +128,6 @@ public class ModGameRules {
GameRules.IntegerValue.create(10)
);
// Phase 7: Struggle/Resistance system
STRUGGLE = GameRules.register(
"struggle",
GameRules.Category.MISC,
@@ -167,7 +161,6 @@ public class ModGameRules {
// BUG-003: Removed resistanceRope/Gag/Blindfold/Collar GameRule registrations.
// Bind resistance is now managed by ModConfig via SettingsAccessor.
// Phase 13: Collar/Shocker features
STRUGGLE_COLLAR_RANDOM_SHOCK = GameRules.register(
"struggleCollarRandomShock",
GameRules.Category.MISC,
@@ -180,14 +173,12 @@ public class ModGameRules {
GameRules.IntegerValue.create(50)
);
// Phase 8: Enslavement
ENSLAVEMENT_ENABLED = GameRules.register(
"enslavementEnabled",
GameRules.Category.MISC,
GameRules.BooleanValue.create(true)
);
// Phase 14.2: Damsel spawning
DAMSELS_SPAWN = GameRules.register(
"damselsSpawn",
GameRules.Category.SPAWNING,
@@ -239,7 +230,6 @@ public class ModGameRules {
GameRules.IntegerValue.create(100)
);
// Phase 16: Kidnap bomb radius
KIDNAP_BOMB_RADIUS = GameRules.register(
"kidnapBombRadius",
GameRules.Category.MISC,
@@ -252,7 +242,6 @@ public class ModGameRules {
GameRules.IntegerValue.create(0)
);
// Phase 17: Bounty system
MAX_BOUNTIES = GameRules.register(
"maxBounties",
GameRules.Category.MISC,

View File

@@ -13,7 +13,6 @@ import net.minecraft.util.RandomSource;
/**
* Random name generator for NPCs (Damsels, Kidnappers).
*
* Phase 14.3.5: Name system
*
* Loads names from assets/tiedup/names/female_names.txt
* Contains 5001 female first names from the original mod.

View File

@@ -1,11 +1,11 @@
package com.tiedup.remake.util;
import com.tiedup.remake.core.TiedUpMod;
import com.tiedup.remake.v2.BodyRegionV2;
import com.tiedup.remake.items.base.IHasResistance;
import com.tiedup.remake.items.base.ItemBind;
import com.tiedup.remake.items.base.ItemCollar;
import com.tiedup.remake.state.IBondageState;
import com.tiedup.remake.v2.BodyRegionV2;
import java.util.UUID;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
@@ -17,7 +17,6 @@ import org.jetbrains.annotations.Nullable;
/**
* Utility class for applying restraints to entities.
*
* Phase 3: Refactoring - Centralizes restraint application logic
*
* This class provides methods for applying various restraints (binds, gags,
* blindfolds, etc.) to targets with consistent validation. Used by:

View File

@@ -3,7 +3,6 @@ package com.tiedup.remake.util;
import com.tiedup.remake.core.TiedUpMod;
import com.tiedup.remake.state.IPlayerLeashAccess;
import java.util.UUID;
import org.jetbrains.annotations.Nullable;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.effect.MobEffectInstance;
@@ -20,12 +19,11 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.FenceBlock;
import net.minecraft.world.level.block.WallBlock;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
/**
* Phase 5: Utility class for applying/removing restraint effects
*
* Manages attribute modifiers for movement speed reduction and other effects.
* Phase 14.1: Refactored to support LivingEntity (Player + NPCs)
*/
public class RestraintEffectUtils {
@@ -250,9 +248,7 @@ public class RestraintEffectUtils {
}
}
// ========================================
// POLE BINDING UTILITIES
// ========================================
/**
* Find the closest fence or wall block within a radius.
@@ -375,9 +371,7 @@ public class RestraintEffectUtils {
return false;
}
// ========================================
// CHLOROFORM UTILITIES
// ========================================
/**
* Apply chloroform effects to an entity.

View File

@@ -12,7 +12,6 @@ import net.minecraft.world.level.Level;
* Provides convenient methods for playing mod-specific sounds.
* Works for both Players and NPCs (EntityDamsel, etc.)
*
* Phase 14.2.5: Connected to actual ModSounds registry
*/
public class TiedUpSounds {

View File

@@ -1,9 +1,9 @@
package com.tiedup.remake.util;
import java.util.Optional;
import org.jetbrains.annotations.Nullable;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.Nullable;
/**
* Player type validation helpers.

View File

@@ -10,7 +10,6 @@ import net.minecraftforge.registries.ForgeRegistries;
/**
* Represents an item task (for jobs and sales).
*
* Phase 14.3.5: Task system for jobs and sales
*
* An ItemTask defines:
* - What item is needed (by registry name)
@@ -68,9 +67,7 @@ public class ItemTask {
this(stack.getItem(), stack.getCount());
}
// ========================================
// GETTERS
// ========================================
public String getItemId() {
return itemId;
@@ -122,9 +119,7 @@ public class ItemTask {
return new ItemStack(item).getHoverName().getString();
}
// ========================================
// VALIDATION
// ========================================
/**
* Check if an ItemStack matches this task (same item type).
@@ -165,9 +160,7 @@ public class ItemTask {
return true;
}
// ========================================
// NBT SERIALIZATION
// ========================================
/**
* Save this task to NBT.
@@ -199,9 +192,7 @@ public class ItemTask {
return new ItemTask(itemId, amount);
}
// ========================================
// DISPLAY
// ========================================
/**
* Get a display string for this task.

View File

@@ -8,7 +8,6 @@ import java.util.Random;
/**
* Loads and manages job tasks for slave work system.
*
* Phase 14.3.5: Job system
*
* A job is an ItemTask that a slave must complete
* (fetch X items) within a time limit or face punishment.

View File

@@ -8,7 +8,6 @@ import java.util.Random;
/**
* Loads and manages sale prices for slave trading.
*
* Phase 14.3.5: Sale system
*
* Provides default sale prices and can be extended
* to load from config files in the future.

View File

@@ -132,9 +132,7 @@ public class Position {
);
}
// ========================================
// NBT SERIALIZATION
// ========================================
/**
* Save this position to NBT.
@@ -204,9 +202,7 @@ public class Position {
return new Position(x, y, z, yaw, pitch, dimension);
}
// ========================================
// GETTERS
// ========================================
public double getX() {
return x;
@@ -301,9 +297,7 @@ public class Position {
return Math.sqrt(dx * dx + dz * dz);
}
// ========================================
// OBJECT OVERRIDES
// ========================================
@Override
public String toString() {

View File

@@ -2,7 +2,6 @@ package com.tiedup.remake.util.teleport;
import com.tiedup.remake.core.TiedUpMod;
import java.util.function.Function;
import org.jetbrains.annotations.Nullable;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
@@ -13,6 +12,7 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.portal.PortalInfo;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.common.util.ITeleporter;
import org.jetbrains.annotations.Nullable;
/**
* Utility class for teleporting entities across dimensions.
@@ -320,9 +320,7 @@ public class TeleportHelper {
return position;
}
// ========================================
// CUSTOM TELEPORTER FOR FORGE
// ========================================
/**
* Custom teleporter that preserves exact position and rotation.

View File

@@ -3,7 +3,6 @@ package com.tiedup.remake.util.time;
import net.minecraft.world.level.Level;
/**
* Phase 6: Game tick-based timer for progressive tasks.
*
* Unlike the original mod which used wall-clock time (Date objects),
* this uses Minecraft game ticks for: