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,7 +1,6 @@
|
||||
package com.tiedup.remake.entities;
|
||||
|
||||
import static com.tiedup.remake.util.GameConstants.*;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
|
||||
import com.tiedup.remake.core.ModConfig;
|
||||
import com.tiedup.remake.core.SettingsAccessor;
|
||||
@@ -18,6 +17,7 @@ import com.tiedup.remake.personality.PersonalityType;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.state.ICaptor;
|
||||
import com.tiedup.remake.util.MessageDispatcher;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -61,9 +61,7 @@ import net.minecraft.world.level.Level;
|
||||
*/
|
||||
public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
|
||||
// ========================================
|
||||
// MERCHANT STATE
|
||||
// ========================================
|
||||
|
||||
public enum MerchantState {
|
||||
MERCHANT(0),
|
||||
@@ -84,9 +82,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// DATA SYNC
|
||||
// ========================================
|
||||
|
||||
private static final EntityDataAccessor<Integer> DATA_MERCHANT_STATE =
|
||||
SynchedEntityData.defineId(
|
||||
@@ -94,9 +90,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
EntityDataSerializers.INT
|
||||
);
|
||||
|
||||
// ========================================
|
||||
// STATE (Server-side only)
|
||||
// ========================================
|
||||
|
||||
private MerchantState currentState = MerchantState.MERCHANT;
|
||||
private List<MerchantTrade> trades = new ArrayList<>();
|
||||
@@ -116,9 +110,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
private static final ConcurrentHashMap<UUID, UUID> playerToMerchant =
|
||||
new ConcurrentHashMap<>();
|
||||
|
||||
// ========================================
|
||||
// CONSTRUCTOR
|
||||
// ========================================
|
||||
|
||||
public EntityKidnapperMerchant(
|
||||
EntityType<? extends EntityKidnapperMerchant> type,
|
||||
@@ -127,9 +119,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
super(type, level);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ATTRIBUTES (Same as Elite)
|
||||
// ========================================
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
return Mob.createMobAttributes()
|
||||
@@ -140,9 +130,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
.add(Attributes.ATTACK_DAMAGE, 8.0D); // Same as Elite
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// DATA SYNC
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
@@ -153,9 +141,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// INITIALIZATION
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public void onAddedToWorld() {
|
||||
@@ -201,9 +187,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// AI GOALS (Conditional)
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
@@ -305,9 +289,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
this.goalSelector.addGoal(14, new OpenDoorGoal(this, false));
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// STATE TRANSITIONS
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean hurt(DamageSource source, float amount) {
|
||||
@@ -332,8 +314,16 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
*/
|
||||
@Override
|
||||
public void equip(BodyRegionV2 region, ItemStack stack) {
|
||||
if (region == BodyRegionV2.ARMS || region == BodyRegionV2.MOUTH || region == BodyRegionV2.EYES) {
|
||||
if (!level().isClientSide && currentState == MerchantState.MERCHANT && !stack.isEmpty()) {
|
||||
if (
|
||||
region == BodyRegionV2.ARMS ||
|
||||
region == BodyRegionV2.MOUTH ||
|
||||
region == BodyRegionV2.EYES
|
||||
) {
|
||||
if (
|
||||
!level().isClientSide &&
|
||||
currentState == MerchantState.MERCHANT &&
|
||||
!stack.isEmpty()
|
||||
) {
|
||||
LivingEntity attacker = findNearbyAttacker();
|
||||
if (attacker != null) {
|
||||
transitionToHostile(attacker);
|
||||
@@ -471,9 +461,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// VARIANT SYSTEM - Override virtual methods
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public KidnapperVariant lookupVariantById(String variantId) {
|
||||
@@ -483,7 +471,8 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
@Override
|
||||
public KidnapperVariant computeVariantForEntity(UUID entityUUID) {
|
||||
Gender preferredGender = SettingsAccessor.getPreferredSpawnGender(
|
||||
this.level() != null ? this.level().getGameRules() : null);
|
||||
this.level() != null ? this.level().getGameRules() : null
|
||||
);
|
||||
return MerchantKidnapperSkinManager.CORE.getVariantForEntity(
|
||||
entityUUID,
|
||||
preferredGender
|
||||
@@ -512,9 +501,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
return "MerchantVariantName";
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// DISPLAY
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Override getDisplayName to use customName when in merchant mode.
|
||||
@@ -530,9 +517,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
return super.getDisplayName();
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// SALE OVERRIDE (Track sold attacker)
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public boolean completeSale(ICaptor buyer) {
|
||||
@@ -543,19 +528,13 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
return super.completeSale(buyer);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// TRADE GENERATION
|
||||
// ========================================
|
||||
|
||||
private void generateRandomTrades() {
|
||||
// ========================================
|
||||
// GUARANTEED UTILITIES (always available)
|
||||
// ========================================
|
||||
addGuaranteedUtilities();
|
||||
|
||||
// ========================================
|
||||
// RANDOM TRADES
|
||||
// ========================================
|
||||
int min = ModConfig.SERVER.merchantMinTrades.get();
|
||||
int max = ModConfig.SERVER.merchantMaxTrades.get();
|
||||
int count = min + this.random.nextInt(Math.max(1, max - min + 1));
|
||||
@@ -799,9 +778,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NBT PERSISTENCE
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag tag) {
|
||||
@@ -859,9 +836,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// PUBLIC ACCESSORS
|
||||
// ========================================
|
||||
|
||||
public boolean isHostile() {
|
||||
return currentState == MerchantState.HOSTILE;
|
||||
@@ -924,9 +899,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
return playerToMerchant.get(playerUUID);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// UTILITY
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public void clearHeldItems() {
|
||||
@@ -944,9 +917,7 @@ public class EntityKidnapperMerchant extends EntityKidnapperElite {
|
||||
MessageDispatcher.talkToNearby(this, message, radius);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// DIALOGUE SPEAKER (Merchant-specific)
|
||||
// ========================================
|
||||
|
||||
@Override
|
||||
public SpeakerType getSpeakerType() {
|
||||
|
||||
Reference in New Issue
Block a user