feat(D-01/C): consumer migration — 85 files migrated to V2 helpers
Phase 1 (state): PlayerBindState, PlayerCaptorManager, PlayerEquipment, PlayerDataRetrieval, PlayerLifecycle, PlayerShockCollar, StruggleAccessory Phase 2 (client): AnimationTickHandler, NpcAnimationTickHandler, 5 render handlers, DamselModel, 3 client mixins, SelfBondageInputHandler, SlaveManagementScreen, ActionPanel, SlaveEntryWidget, ModKeybindings Phase 3 (entities): 28 entity/AI files migrated to CollarHelper, BindModeHelper, PoseTypeHelper, createStack() Phase 4 (network): PacketSlaveAction, PacketMasterEquip, PacketAssignCellToCollar, PacketNpcCommand, PacketFurnitureForcemount Phase 5 (events): RestraintTaskTickHandler, PetPlayRestrictionHandler, PlayerEnslavementHandler, ChatEventHandler, LaborAttackPunishmentHandler Phase 6 (commands): BondageSubCommand, CollarCommand, NPCCommand, KidnapSetCommand Phase 7 (compat): MCAKidnappedAdapter, MCA mixins Phase 8 (misc): GagTalkManager, PetRequestManager, HangingCagePiece, BondageItemBlockEntity, TrappedChestBlockEntity, DispenserBehaviors, BondageItemLoaderUtility, RestraintApplicator, StruggleSessionManager, MovementStyleResolver, CampLifecycleManager Some files retain dual V1/V2 checks (instanceof V1 || V2Helper) for coexistence — V1-only branches removed in Branch D.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.tiedup.remake.v2.bondage.movement;
|
||||
|
||||
import com.tiedup.remake.items.base.ItemBind;
|
||||
import com.tiedup.remake.items.base.PoseType;
|
||||
import com.tiedup.remake.v2.bondage.BindModeHelper;
|
||||
import com.tiedup.remake.v2.bondage.PoseTypeHelper;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.v2.bondage.datadriven.DataDrivenItemDefinition;
|
||||
import com.tiedup.remake.v2.bondage.datadriven.DataDrivenItemRegistry;
|
||||
@@ -19,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* default speed/jump values. Modifiers from lower-severity items are ignored.</p>
|
||||
*
|
||||
* <h3>V1 Compatibility (H6 fix)</h3>
|
||||
* <p>V1 items ({@link ItemBind}) stored in V2 capability
|
||||
* <p>V1 items (ItemBind) stored in V2 capability
|
||||
* do not have data-driven definitions. This resolver provides a fallback that
|
||||
* maps V1 bind mode + pose type to a {@link MovementStyle} with speed values matching
|
||||
* the original V1 behavior, preventing double stacking between the legacy
|
||||
@@ -122,7 +123,7 @@ public final class MovementStyleResolver {
|
||||
// ==================== V1 Fallback ====================
|
||||
|
||||
/**
|
||||
* Attempt to derive a movement style from a V1 {@link ItemBind} item.
|
||||
* Attempt to derive a movement style from a V1 bind item.
|
||||
*
|
||||
* <p>Only items with legs bound produce a movement style. The mapping preserves
|
||||
* the original V1 speed values:</p>
|
||||
@@ -137,15 +138,15 @@ public final class MovementStyleResolver {
|
||||
*/
|
||||
@Nullable
|
||||
private static V1Fallback resolveV1Fallback(ItemStack stack) {
|
||||
if (!(stack.getItem() instanceof ItemBind bindItem)) {
|
||||
if (!BindModeHelper.isBindItem(stack)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!ItemBind.hasLegsBound(stack)) {
|
||||
if (!BindModeHelper.hasLegsBound(stack)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PoseType poseType = bindItem.getPoseType();
|
||||
PoseType poseType = PoseTypeHelper.getPoseType(stack);
|
||||
|
||||
return switch (poseType) {
|
||||
case WRAP, LATEX_SACK -> new V1Fallback(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.tiedup.remake.v2.furniture.network;
|
||||
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.items.base.ItemCollar;
|
||||
import com.tiedup.remake.network.PacketRateLimiter;
|
||||
import com.tiedup.remake.v2.bondage.CollarHelper;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.util.KidnappedHelper;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
@@ -28,7 +28,7 @@ import net.minecraftforge.network.NetworkEvent;
|
||||
* Client-to-server packet: master forces a captive onto a furniture seat.
|
||||
*
|
||||
* <p>The sender must own the captive's collar (verified via
|
||||
* {@link ItemCollar#isOwner(ItemStack, net.minecraft.world.entity.player.Player)}),
|
||||
* {@link CollarHelper#isOwner(ItemStack, net.minecraft.world.entity.player.Player)}),
|
||||
* the captive must be alive and within 5 blocks of both sender and furniture,
|
||||
* and the furniture must have an available seat.</p>
|
||||
*
|
||||
@@ -132,10 +132,7 @@ public class PacketFurnitureForcemount {
|
||||
}
|
||||
|
||||
ItemStack collarStack = captiveState.getEquipment(BodyRegionV2.NECK);
|
||||
if (
|
||||
collarStack.isEmpty() ||
|
||||
!(collarStack.getItem() instanceof ItemCollar collar)
|
||||
) {
|
||||
if (!CollarHelper.isCollar(collarStack)) {
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[PacketFurnitureForcemount] Invalid collar item on captive"
|
||||
);
|
||||
@@ -143,7 +140,7 @@ public class PacketFurnitureForcemount {
|
||||
}
|
||||
|
||||
// Collar must be owned by sender (or sender has admin permission)
|
||||
if (!collar.isOwner(collarStack, sender) && !sender.hasPermissions(2)) {
|
||||
if (!CollarHelper.isOwner(collarStack, sender) && !sender.hasPermissions(2)) {
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[PacketFurnitureForcemount] {} is not the collar owner of {}",
|
||||
sender.getName().getString(),
|
||||
|
||||
Reference in New Issue
Block a user