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:
@@ -5,22 +5,20 @@ import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.ai.goal.GoalSelector;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperAIManager callbacks.
|
||||
* Provides access to entity properties and components needed for AI goal registration.
|
||||
*/
|
||||
public interface IAIHost {
|
||||
// ========================================
|
||||
// NAVIGATION & BASIC
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the entity's navigation system.
|
||||
@@ -37,9 +35,7 @@ public interface IAIHost {
|
||||
*/
|
||||
Level getLevel();
|
||||
|
||||
// ========================================
|
||||
// STATE MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current behavioral state.
|
||||
@@ -51,9 +47,7 @@ public interface IAIHost {
|
||||
*/
|
||||
void setCurrentState(KidnapperState state);
|
||||
|
||||
// ========================================
|
||||
// TARGET MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current hunt target.
|
||||
@@ -87,9 +81,7 @@ public interface IAIHost {
|
||||
@Nullable
|
||||
LivingEntity getClosestSuitableTarget(int radius);
|
||||
|
||||
// ========================================
|
||||
// CAPTIVE MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current captive.
|
||||
@@ -102,9 +94,7 @@ public interface IAIHost {
|
||||
*/
|
||||
boolean hasCaptives();
|
||||
|
||||
// ========================================
|
||||
// AGGRESSION SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the last entity that attacked this kidnapper.
|
||||
@@ -118,9 +108,7 @@ public interface IAIHost {
|
||||
@Nullable
|
||||
LivingEntity getEscapedTarget();
|
||||
|
||||
// ========================================
|
||||
// ALERT SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the alert target (escapee being searched for).
|
||||
@@ -133,9 +121,7 @@ public interface IAIHost {
|
||||
*/
|
||||
void setAlertTarget(@Nullable LivingEntity target);
|
||||
|
||||
// ========================================
|
||||
// CAMP SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the associated structure UUID for this kidnapper.
|
||||
@@ -148,9 +134,7 @@ public interface IAIHost {
|
||||
*/
|
||||
boolean isHunter();
|
||||
|
||||
// ========================================
|
||||
// CELL SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get all nearby cells that have prisoners in them.
|
||||
@@ -162,9 +146,7 @@ public interface IAIHost {
|
||||
*/
|
||||
List<BlockPos> getNearbyPatrolMarkers(int radius);
|
||||
|
||||
// ========================================
|
||||
// SALE & JOB SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if currently selling captive.
|
||||
@@ -176,9 +158,7 @@ public interface IAIHost {
|
||||
*/
|
||||
boolean isWaitingForJobToBeCompleted();
|
||||
|
||||
// ========================================
|
||||
// COLLAR CONFIG
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if kidnapping mode is fully ready (enabled + prison set).
|
||||
@@ -191,9 +171,7 @@ public interface IAIHost {
|
||||
@Nullable
|
||||
UUID getCellIdFromCollar();
|
||||
|
||||
// ========================================
|
||||
// CAPTURE EQUIPMENT
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Equip themed bind and gag items before capture.
|
||||
@@ -210,9 +188,7 @@ public interface IAIHost {
|
||||
*/
|
||||
ItemStack getGagItem();
|
||||
|
||||
// ========================================
|
||||
// STATE FLAGS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if in "get out" state (flee behavior).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperAggressionSystem callbacks.
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.entities.skins.Gender;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperAppearance callbacks.
|
||||
|
||||
@@ -2,12 +2,12 @@ package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperCaptiveManager callbacks.
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperCellManager callbacks.
|
||||
|
||||
@@ -10,18 +10,14 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
* Provides access to entity data and components for NBT persistence.
|
||||
*/
|
||||
public interface IDataSerializerHost {
|
||||
// ========================================
|
||||
// ENTITY ACCESS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the entity instance.
|
||||
*/
|
||||
EntityKidnapper getEntity();
|
||||
|
||||
// ========================================
|
||||
// ENTITY DATA ACCESS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get entity data value.
|
||||
@@ -33,9 +29,7 @@ public interface IDataSerializerHost {
|
||||
*/
|
||||
<T> void setEntityData(EntityDataAccessor<T> accessor, T value);
|
||||
|
||||
// ========================================
|
||||
// STATE FLAGS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if in "get out" state.
|
||||
@@ -47,9 +41,7 @@ public interface IDataSerializerHost {
|
||||
*/
|
||||
void setGetOutState(boolean state);
|
||||
|
||||
// ========================================
|
||||
// COMPONENT ACCESS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get appearance manager.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.state.IRestrainable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperSaleManager callbacks.
|
||||
|
||||
@@ -3,12 +3,12 @@ package com.tiedup.remake.entities.kidnapper.components;
|
||||
import com.tiedup.remake.entities.KidnapperCollarConfig;
|
||||
import com.tiedup.remake.entities.KidnapperJobManager;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.entity.ai.sensing.Sensing;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host interface for KidnapperTargetSelector callbacks.
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.world.entity.player.Player;
|
||||
|
||||
/**
|
||||
* KidnapperAIManager - Manages AI goal registration.
|
||||
* Phase 3.2: AI management component (~79 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Registering all 20 AI goals with priorities
|
||||
@@ -18,9 +17,7 @@ import net.minecraft.world.entity.player.Player;
|
||||
*/
|
||||
public class KidnapperAIManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Entity reference (needed for goal constructors) */
|
||||
private final EntityKidnapper entity;
|
||||
@@ -28,18 +25,14 @@ public class KidnapperAIManager {
|
||||
/** Host callbacks */
|
||||
private final IAIHost host;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperAIManager(EntityKidnapper entity, IAIHost host) {
|
||||
this.entity = entity;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// AI GOAL REGISTRATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Register all AI goals for the kidnapper.
|
||||
@@ -106,7 +99,7 @@ public class KidnapperAIManager {
|
||||
host.getGoalSelector().addGoal(7, new KidnapperGuardGoal(this.entity));
|
||||
|
||||
// Priority 7: Thief behavior for wild kidnappers (steal items and flee)
|
||||
// BUG FIX (Phase 2): DISABLED - Integrated into DecideNextActionGoal
|
||||
// BUG FIX: DISABLED - Integrated into DecideNextActionGoal
|
||||
// Problem: ThiefGoal (P7) never executed because DecideNextActionGoal (P6)
|
||||
// finished first and changed state (sell/job), blocking ThiefGoal activation.
|
||||
// Solution: Integrated theft as a 3rd option (30% chance) in DecideNextActionGoal.
|
||||
|
||||
@@ -6,12 +6,11 @@ import com.tiedup.remake.state.IBondageState;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperAggressionSystem - Manages aggression tracking and immunity.
|
||||
* Phase 1.3: Aggression management component (151 lines).
|
||||
*
|
||||
* Handles three aggression subsystems:
|
||||
* 1. **Escaped Target Memory** - Remember escapees for pursuit (30 seconds)
|
||||
@@ -22,9 +21,7 @@ import net.minecraft.world.entity.LivingEntity;
|
||||
*/
|
||||
public class KidnapperAggressionSystem {
|
||||
|
||||
// ========================================
|
||||
// CONSTANTS
|
||||
// ========================================
|
||||
|
||||
/** How long to remember an escaped target (30 seconds = 600 ticks) */
|
||||
private static final long ESCAPED_TARGET_MEMORY = 600;
|
||||
@@ -35,9 +32,7 @@ public class KidnapperAggressionSystem {
|
||||
/** How long to remember last attacker for fight-back (5 seconds = 100 ticks) */
|
||||
private static final int FIGHT_BACK_MEMORY = 100;
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final IAggressionHost host;
|
||||
@@ -65,17 +60,13 @@ public class KidnapperAggressionSystem {
|
||||
*/
|
||||
private final Map<UUID, Long> robbedImmunity = new HashMap<>();
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperAggressionSystem(IAggressionHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ESCAPED TARGET SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Called when a captive escapes from this kidnapper.
|
||||
@@ -150,9 +141,7 @@ public class KidnapperAggressionSystem {
|
||||
this.escapedTargetTime = 0;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// FIGHT BACK SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the last entity that attacked this kidnapper.
|
||||
@@ -185,9 +174,7 @@ public class KidnapperAggressionSystem {
|
||||
this.lastAttackTime = (int) getCurrentTick();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ROBBERY IMMUNITY SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Grant robbery immunity to a player for 2 minutes.
|
||||
@@ -245,9 +232,7 @@ public class KidnapperAggressionSystem {
|
||||
this.robbedImmunity.clear();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// HELPER METHODS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get current game tick from world.
|
||||
@@ -259,9 +244,7 @@ public class KidnapperAggressionSystem {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save aggression data to NBT.
|
||||
|
||||
@@ -4,13 +4,12 @@ import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.entities.EntityKidnapper;
|
||||
import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperAlertManager - Manages alert system between kidnappers.
|
||||
* Phase 2.1: Alert management component (~75 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Broadcasting alerts about escaped captives to nearby kidnappers
|
||||
@@ -22,9 +21,7 @@ import net.minecraft.world.entity.LivingEntity;
|
||||
*/
|
||||
public class KidnapperAlertManager {
|
||||
|
||||
// ========================================
|
||||
// CONSTANTS
|
||||
// ========================================
|
||||
|
||||
/** Cooldown duration before receiving another alert (5 seconds = 100 ticks) */
|
||||
private static final int ALERT_COOLDOWN_DURATION = 100;
|
||||
@@ -33,9 +30,7 @@ public class KidnapperAlertManager {
|
||||
private static final double BROADCAST_RADIUS_HORIZONTAL = 50.0;
|
||||
private static final double BROADCAST_RADIUS_VERTICAL = 20.0;
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final IAlertHost host;
|
||||
@@ -50,18 +45,14 @@ public class KidnapperAlertManager {
|
||||
/** Cooldown before receiving another alert broadcast (in ticks) */
|
||||
private int alertCooldown = 0;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperAlertManager(EntityKidnapper entity, IAlertHost host) {
|
||||
this.entity = entity;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ALERT TARGET TRACKING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current alert target.
|
||||
@@ -82,9 +73,7 @@ public class KidnapperAlertManager {
|
||||
this.alertTarget = target;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ALERT BROADCASTING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Broadcast an alert about an escaped captive to nearby kidnappers.
|
||||
@@ -127,9 +116,7 @@ public class KidnapperAlertManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ALERT RECEIVING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Receive an alert broadcast from another kidnapper.
|
||||
@@ -170,9 +157,7 @@ public class KidnapperAlertManager {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// TICK PROCESSING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Called each tick to update alert system state.
|
||||
@@ -185,9 +170,7 @@ public class KidnapperAlertManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save alert data to NBT.
|
||||
|
||||
@@ -9,15 +9,14 @@ import com.tiedup.remake.entities.skins.Gender;
|
||||
import com.tiedup.remake.entities.skins.KidnapperSkinManager;
|
||||
import com.tiedup.remake.items.base.ItemColor;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperAppearance - Manages visual appearance and item selection.
|
||||
* Phase 1.2: Appearance management component (~220 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Kidnapper skin variants (texture selection)
|
||||
@@ -30,9 +29,7 @@ import net.minecraft.world.item.ItemStack;
|
||||
*/
|
||||
public class KidnapperAppearance {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Parent entity for accessing static data accessors */
|
||||
private final EntityKidnapper entity;
|
||||
@@ -61,9 +58,7 @@ public class KidnapperAppearance {
|
||||
@Nullable
|
||||
private KidnapperItemSelector.SelectionResult itemSelection;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperAppearance(
|
||||
EntityKidnapper entity,
|
||||
@@ -79,9 +74,7 @@ public class KidnapperAppearance {
|
||||
this.dataThemeColor = dataThemeColor;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// VARIANT SYSTEM
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Set kidnapper variant and name.
|
||||
@@ -201,9 +194,7 @@ public class KidnapperAppearance {
|
||||
this.kidnapperVariant = null;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// INITIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Initialize variant and theme when entity is first added to world.
|
||||
@@ -262,9 +253,7 @@ public class KidnapperAppearance {
|
||||
return entity.selectItemsForKidnapper();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// THEME & ITEM SELECTION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get current theme (lazy load from synced data if needed).
|
||||
@@ -308,9 +297,7 @@ public class KidnapperAppearance {
|
||||
return this.itemSelection;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save appearance data to NBT.
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperCampManager - Manages camp/structure association.
|
||||
* Phase 1.4: Camp management component (67 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Structure UUID tracking (which camp this kidnapper belongs to)
|
||||
@@ -16,9 +15,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public class KidnapperCampManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final ICampHost host;
|
||||
@@ -35,17 +32,13 @@ public class KidnapperCampManager {
|
||||
*/
|
||||
private boolean isHunter = false;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperCampManager(ICampHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STRUCTURE ASSOCIATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the associated structure UUID for this kidnapper.
|
||||
@@ -77,9 +70,7 @@ public class KidnapperCampManager {
|
||||
this.associatedStructure = structureId;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// HUNTER ROLE
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if this kidnapper is a "hunter" that patrols far from camp.
|
||||
@@ -99,9 +90,7 @@ public class KidnapperCampManager {
|
||||
this.isHunter = hunter;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save camp data to NBT.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.cells.CellDataV2;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.core.ModConfig;
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.dialogue.EntityDialogueManager;
|
||||
@@ -11,13 +10,13 @@ import com.tiedup.remake.items.base.ItemCollar;
|
||||
import com.tiedup.remake.prison.PrisonerManager;
|
||||
import com.tiedup.remake.prison.PrisonerRecord;
|
||||
import com.tiedup.remake.prison.PrisonerState;
|
||||
import com.tiedup.remake.state.IRestrainable;
|
||||
import com.tiedup.remake.state.ICaptor;
|
||||
import com.tiedup.remake.state.IRestrainable;
|
||||
import com.tiedup.remake.util.KidnappedHelper;
|
||||
import com.tiedup.remake.util.RestraintApplicator;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@@ -26,10 +25,10 @@ import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperCaptiveManager - Manages captive lifecycle and ICaptor implementation.
|
||||
* Phase 3.1: Captive management component (~400 lines) - CRITICAL.
|
||||
*
|
||||
* Handles:
|
||||
* - ICaptor interface implementation (10 methods)
|
||||
@@ -46,9 +45,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
*/
|
||||
public class KidnapperCaptiveManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final ICaptiveHost host;
|
||||
@@ -80,9 +77,7 @@ public class KidnapperCaptiveManager {
|
||||
@Nullable
|
||||
private LivingEntity strugglePunishmentTarget;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperCaptiveManager(
|
||||
EntityKidnapper entity,
|
||||
@@ -94,9 +89,7 @@ public class KidnapperCaptiveManager {
|
||||
this.dataHasCaptive = dataHasCaptive;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// I_KIDNAPPER IMPLEMENTATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Add a captive to this kidnapper.
|
||||
@@ -315,9 +308,7 @@ public class KidnapperCaptiveManager {
|
||||
return this.entity;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CAPTIVE ACCESS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current captive.
|
||||
@@ -352,9 +343,7 @@ public class KidnapperCaptiveManager {
|
||||
this.allowCaptiveTransferFlag = false;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// UUID RESTORATION (CRITICAL)
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Restore captive reference from UUID after chunk/server reload.
|
||||
@@ -492,9 +481,7 @@ public class KidnapperCaptiveManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// LIFECYCLE HOOKS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Called when kidnapper gets bound/tied up.
|
||||
@@ -593,9 +580,7 @@ public class KidnapperCaptiveManager {
|
||||
removeCaptive(this.currentCaptive, transportState);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// SOLO MODE FALLBACK
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Keep captive (solo mode fallback when no buyers available).
|
||||
@@ -722,9 +707,7 @@ public class KidnapperCaptiveManager {
|
||||
return host.blockPosition();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// PUNISHMENT SYSTEM
|
||||
// ========================================
|
||||
|
||||
/** Maximum distance to HEAR struggle (through bars, no line of sight needed) */
|
||||
private static final double STRUGGLE_HEARING_RANGE = 6.0;
|
||||
@@ -916,9 +899,7 @@ public class KidnapperCaptiveManager {
|
||||
this.strugglePunishmentTarget = null;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// LEASH PHYSICS (VISUAL)
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the position where the rope/leash is held.
|
||||
@@ -952,9 +933,7 @@ public class KidnapperCaptiveManager {
|
||||
return new Vec3(x + offsetX, y + heightOffset, z + offsetZ);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save captive manager data to NBT.
|
||||
|
||||
@@ -9,14 +9,13 @@ import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperCellManager - Manages cell-related queries and interactions.
|
||||
* Phase 2.3: Cell management component (~125 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Finding cells containing specific prisoners
|
||||
@@ -29,24 +28,18 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
*/
|
||||
public class KidnapperCellManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final ICellHost host;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperCellManager(ICellHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CELL QUERIES
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Find the cell containing a specific prisoner.
|
||||
@@ -84,9 +77,7 @@ public class KidnapperCellManager {
|
||||
return result;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CELL BOUNDARY DETECTION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if a position is inside a cell's boundaries.
|
||||
@@ -134,9 +125,7 @@ public class KidnapperCellManager {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// PATROL MARKERS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get all patrol markers from nearby cells.
|
||||
@@ -182,9 +171,7 @@ public class KidnapperCellManager {
|
||||
return result;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CELL BREACH RESPONSE
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Called when a cell wall is breached (broken).
|
||||
@@ -245,9 +232,7 @@ public class KidnapperCellManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save cell manager data to NBT.
|
||||
|
||||
@@ -5,7 +5,6 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
|
||||
/**
|
||||
* KidnapperDataSerializer - Manages NBT serialization and deserialization.
|
||||
* Phase 4.1: Data serialization component (~65 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Orchestrating component save/load (appearance, aggression, captive, state, camp, job)
|
||||
@@ -16,9 +15,7 @@ import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
*/
|
||||
public class KidnapperDataSerializer {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final IDataSerializerHost host;
|
||||
@@ -26,9 +23,7 @@ public class KidnapperDataSerializer {
|
||||
/** Entity data accessor for kidnapping mode */
|
||||
private final EntityDataAccessor<Boolean> dataKidnappingMode;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperDataSerializer(
|
||||
IDataSerializerHost host,
|
||||
@@ -38,9 +33,7 @@ public class KidnapperDataSerializer {
|
||||
this.dataKidnappingMode = dataKidnappingMode;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save all data to NBT.
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.world.entity.player.Player;
|
||||
|
||||
/**
|
||||
* KidnapperSaleManager - Manages NPC sale transactions.
|
||||
* Phase 2.4: Sale management component (~115 lines).
|
||||
*
|
||||
* Handles:
|
||||
* - Initiating sales with price calculation (player/shiny multipliers)
|
||||
@@ -27,24 +26,18 @@ import net.minecraft.world.entity.player.Player;
|
||||
*/
|
||||
public class KidnapperSaleManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final ISaleHost host;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperSaleManager(ISaleHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// SALE STATUS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if currently selling a captive.
|
||||
@@ -55,9 +48,7 @@ public class KidnapperSaleManager {
|
||||
return host.hasCaptives() && host.getCaptive().isForSell();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// START SALE
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Start selling the current captive with auto-calculated price.
|
||||
@@ -139,9 +130,7 @@ public class KidnapperSaleManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CANCEL SALE
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Cancel the current sale.
|
||||
@@ -153,9 +142,7 @@ public class KidnapperSaleManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// COMPLETE SALE
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Complete a sale by transferring the captive to the buyer.
|
||||
@@ -204,9 +191,7 @@ public class KidnapperSaleManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save sale manager data to NBT.
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
|
||||
/**
|
||||
* KidnapperStateManager - Manages the behavioral state of a kidnapper.
|
||||
* Phase 1.1: Simple state management component (26 lines).
|
||||
*
|
||||
* Handles the current KidnapperState enum (IDLE, HUNT, CAPTURE, etc.)
|
||||
* with debug logging for state transitions.
|
||||
@@ -14,9 +13,7 @@ import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
*/
|
||||
public class KidnapperStateManager {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks for logging */
|
||||
private final IStateHost host;
|
||||
@@ -24,17 +21,13 @@ public class KidnapperStateManager {
|
||||
/** Current behavioral state */
|
||||
private KidnapperState currentState = KidnapperState.IDLE;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperStateManager(IStateHost host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STATE MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current behavioral state.
|
||||
@@ -62,9 +55,7 @@ public class KidnapperStateManager {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the NBT key for this component.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tiedup.remake.entities.kidnapper.components;
|
||||
|
||||
import com.tiedup.remake.cells.CampOwnership;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.compat.mca.MCACompat;
|
||||
import com.tiedup.remake.entities.EntityDamsel;
|
||||
import com.tiedup.remake.entities.EntityKidnapper;
|
||||
@@ -13,18 +12,18 @@ import com.tiedup.remake.prison.PrisonerManager;
|
||||
import com.tiedup.remake.prison.PrisonerRecord;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.util.KidnappedHelper;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* KidnapperTargetSelector - Manages target selection and validation logic.
|
||||
* Phase 2.2: Target selection component (~286 lines) - CRITICAL.
|
||||
*
|
||||
* Handles:
|
||||
* - isSuitableTarget() - Complex targeting logic with 8 categories of checks
|
||||
@@ -39,9 +38,7 @@ import net.minecraft.world.phys.AABB;
|
||||
*/
|
||||
public class KidnapperTargetSelector {
|
||||
|
||||
// ========================================
|
||||
// FIELDS
|
||||
// ========================================
|
||||
|
||||
/** Host callbacks */
|
||||
private final ITargetHost host;
|
||||
@@ -53,18 +50,14 @@ public class KidnapperTargetSelector {
|
||||
@Nullable
|
||||
private LivingEntity currentTarget;
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public KidnapperTargetSelector(EntityKidnapper entity, ITargetHost host) {
|
||||
this.entity = entity;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// TARGET TRACKING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Get the current target being pursued.
|
||||
@@ -85,9 +78,7 @@ public class KidnapperTargetSelector {
|
||||
this.currentTarget = target;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// TARGET SUITABILITY (CRITICAL METHOD)
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if an entity is a suitable target for capture.
|
||||
@@ -273,9 +264,7 @@ public class KidnapperTargetSelector {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CHASE VALIDATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if target is still valid during active chase.
|
||||
@@ -351,9 +340,7 @@ public class KidnapperTargetSelector {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// COMPETITION DETECTION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if another kidnapper is already effectively pursuing this target.
|
||||
@@ -418,9 +405,7 @@ public class KidnapperTargetSelector {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// PROXIMITY TARGETING
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Find the closest suitable target within a given radius.
|
||||
@@ -473,9 +458,7 @@ public class KidnapperTargetSelector {
|
||||
return null;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// DISTANCE HELPERS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if close to current target (within 2 blocks).
|
||||
@@ -498,9 +481,7 @@ public class KidnapperTargetSelector {
|
||||
return host.distanceTo(this.currentTarget) > radius;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// HELPER METHODS
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Check if a player has a protection token in their inventory.
|
||||
@@ -519,9 +500,7 @@ public class KidnapperTargetSelector {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT SERIALIZATION
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Save target selector data to NBT.
|
||||
|
||||
@@ -27,9 +27,7 @@ public class AIHost implements IAIHost {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NAVIGATION & BASIC
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public PathNavigation getNavigation() {
|
||||
@@ -46,9 +44,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.level();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STATE MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public KidnapperState getCurrentState() {
|
||||
@@ -60,9 +56,7 @@ public class AIHost implements IAIHost {
|
||||
entity.setCurrentState(state);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// TARGET MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -96,9 +90,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.getClosestSuitableTarget(radius);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CAPTIVE MANAGEMENT
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -112,9 +104,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.hasCaptives();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// AGGRESSION SYSTEM
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -128,9 +118,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.getEscapedTarget();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ALERT SYSTEM
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -143,9 +131,7 @@ public class AIHost implements IAIHost {
|
||||
entity.setAlertTarget(target);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CAMP SYSTEM
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -158,9 +144,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.isHunter();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CELL SYSTEM
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public List<CellDataV2> getNearbyCellsWithPrisoners() {
|
||||
@@ -172,9 +156,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.getNearbyPatrolMarkers(radius);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// SALE & JOB SYSTEM
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean isSellingCaptive() {
|
||||
@@ -186,9 +168,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.isWaitingForJobToBeCompleted();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// COLLAR CONFIG
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean isKidnappingModeReady() {
|
||||
@@ -201,9 +181,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.getCellIdFromCollar();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// CAPTURE EQUIPMENT
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public void setUpHeldItems() {
|
||||
@@ -220,9 +198,7 @@ public class AIHost implements IAIHost {
|
||||
return entity.getGagItem();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STATE FLAGS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean isGetOutState() {
|
||||
|
||||
@@ -3,12 +3,11 @@ package com.tiedup.remake.entities.kidnapper.hosts;
|
||||
import com.tiedup.remake.dialogue.EntityDialogueManager;
|
||||
import com.tiedup.remake.entities.EntityKidnapper;
|
||||
import com.tiedup.remake.entities.kidnapper.components.IAggressionHost;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for AggressionSystem callbacks.
|
||||
* Phase 1.3: Provides access to entity properties for aggression tracking.
|
||||
*/
|
||||
public class AggressionHost implements IAggressionHost {
|
||||
|
||||
|
||||
@@ -4,14 +4,13 @@ import com.tiedup.remake.entities.EntityKidnapper;
|
||||
import com.tiedup.remake.entities.kidnapper.components.IAppearanceHost;
|
||||
import com.tiedup.remake.entities.skins.Gender;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for AppearanceManager callbacks.
|
||||
* Phase 1.2: Provides access to entity properties needed for appearance management.
|
||||
*/
|
||||
public class AppearanceHost implements IAppearanceHost {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.world.level.Level;
|
||||
/**
|
||||
* Host implementation for BondageManager callbacks specific to EntityKidnapper.
|
||||
*
|
||||
* Phase 3 (AbstractTiedUpNpc migration): Created so EntityKidnapper can provide
|
||||
* its own IBondageHost instead of inheriting EntityDamsel's BondageHost.
|
||||
*
|
||||
* Key differences from the Damsel BondageHost:
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.util.RandomSource;
|
||||
|
||||
/**
|
||||
* Host implementation for CampManager callbacks.
|
||||
* Phase 1.4: Provides random source and name for camp assignment.
|
||||
*/
|
||||
public class CampHost implements ICampHost {
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ import com.tiedup.remake.entities.kidnapper.components.ICaptiveHost;
|
||||
import com.tiedup.remake.entities.kidnapper.components.KidnapperAggressionSystem;
|
||||
import com.tiedup.remake.entities.kidnapper.components.KidnapperAlertManager;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for KidnapperCaptiveManager callbacks.
|
||||
|
||||
@@ -4,10 +4,10 @@ import com.tiedup.remake.entities.EntityKidnapper;
|
||||
import com.tiedup.remake.entities.ai.kidnapper.KidnapperState;
|
||||
import com.tiedup.remake.entities.kidnapper.components.ICellHost;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for KidnapperCellManager callbacks.
|
||||
|
||||
@@ -17,18 +17,14 @@ public class DataSerializerHost implements IDataSerializerHost {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ENTITY ACCESS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public EntityKidnapper getEntity() {
|
||||
return entity;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ENTITY DATA ACCESS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public <T> T getEntityData(EntityDataAccessor<T> accessor) {
|
||||
@@ -40,9 +36,7 @@ public class DataSerializerHost implements IDataSerializerHost {
|
||||
entity.getEntityData().set(accessor, value);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STATE FLAGS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean isGetOutState() {
|
||||
@@ -54,9 +48,7 @@ public class DataSerializerHost implements IDataSerializerHost {
|
||||
entity.setGetOutState(state);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// COMPONENT ACCESS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public KidnapperAppearance getAppearance() {
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.tiedup.remake.entities.kidnapper.hosts;
|
||||
import com.tiedup.remake.entities.EntityKidnapper;
|
||||
import com.tiedup.remake.entities.kidnapper.components.ISaleHost;
|
||||
import com.tiedup.remake.state.IRestrainable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for KidnapperSaleManager callbacks.
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.tiedup.remake.entities.kidnapper.components.IStateHost;
|
||||
|
||||
/**
|
||||
* Host implementation for StateManager callbacks.
|
||||
* Phase 1.1: Simple host providing name access for logging.
|
||||
*/
|
||||
public class StateHost implements IStateHost {
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ import com.tiedup.remake.entities.KidnapperJobManager;
|
||||
import com.tiedup.remake.entities.kidnapper.components.ITargetHost;
|
||||
import com.tiedup.remake.entities.kidnapper.components.KidnapperAggressionSystem;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.entity.ai.sensing.Sensing;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Host implementation for KidnapperTargetSelector callbacks.
|
||||
|
||||
Reference in New Issue
Block a user