feat(D-01/D): V1 cleanup — delete 28 files, ~5400 lines removed
D1: ThreadLocal alert suppression moved from ItemCollar to CollarHelper.
onCollarRemoved() logic (kidnapper alert) moved to CollarHelper.
D2+D3: Deleted 17 V1 item classes + 4 V1-only interfaces:
ItemBind, ItemGag, ItemBlindfold, ItemCollar, ItemEarplugs, ItemMittens,
ItemColor, ItemClassicCollar, ItemShockCollar, ItemShockCollarAuto,
ItemGpsCollar, ItemChokeCollar, ItemHood, ItemMedicalGag,
IBondageItem, IHasGaggingEffect, IHasBlindingEffect, IAdjustable
D4: KidnapperTheme/KidnapperItemSelector/DispenserBehaviors migrated
from variant enums to string-based DataDrivenItemRegistry IDs.
D5: Deleted 11 variant enums + Generic* factories + ItemBallGag3D:
BindVariant, GagVariant, BlindfoldVariant, EarplugsVariant, MittensVariant,
GenericBind, GenericGag, GenericBlindfold, GenericEarplugs, GenericMittens
D6: ModItems cleaned — all V1 bondage registrations removed.
D7: ModCreativeTabs rewritten — iterates DataDrivenItemRegistry.
D8+D9: All V2 helpers cleaned (V1 fallbacks removed), orphan imports removed.
Zero V1 bondage code references remain (only Javadoc comments).
All bondage items are now data-driven via 47 JSON definitions.
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
package com.tiedup.remake.util;
|
||||
|
||||
import com.tiedup.remake.blocks.entity.IBondageItemHolder;
|
||||
import com.tiedup.remake.items.base.ItemBind;
|
||||
import com.tiedup.remake.items.base.ItemBlindfold;
|
||||
import com.tiedup.remake.items.base.ItemCollar;
|
||||
import com.tiedup.remake.items.base.ItemEarplugs;
|
||||
import com.tiedup.remake.items.base.ItemGag;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.v2.bondage.BindModeHelper;
|
||||
import com.tiedup.remake.v2.bondage.CollarHelper;
|
||||
@@ -53,31 +48,30 @@ public final class BondageItemLoaderUtility {
|
||||
ItemStack stack,
|
||||
Player player
|
||||
) {
|
||||
if ((stack.getItem() instanceof ItemBind || BindModeHelper.isBindItem(stack)) && holder.getBind().isEmpty()) {
|
||||
if (BindModeHelper.isBindItem(stack) && holder.getBind().isEmpty()) {
|
||||
holder.setBind(stack.copyWithCount(1));
|
||||
if (!player.isCreative()) stack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if ((stack.getItem() instanceof ItemGag
|
||||
|| DataDrivenBondageItem.getComponent(stack, ComponentType.GAGGING, GaggingComponent.class) != null)
|
||||
if (DataDrivenBondageItem.getComponent(stack, ComponentType.GAGGING, GaggingComponent.class) != null
|
||||
&& holder.getGag().isEmpty()) {
|
||||
holder.setGag(stack.copyWithCount(1));
|
||||
if (!player.isCreative()) stack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if ((stack.getItem() instanceof ItemBlindfold || isDataDrivenForRegion(stack, BodyRegionV2.EYES))
|
||||
if (isDataDrivenForRegion(stack, BodyRegionV2.EYES)
|
||||
&& holder.getBlindfold().isEmpty()) {
|
||||
holder.setBlindfold(stack.copyWithCount(1));
|
||||
if (!player.isCreative()) stack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if ((stack.getItem() instanceof ItemEarplugs || isDataDrivenForRegion(stack, BodyRegionV2.EARS))
|
||||
if (isDataDrivenForRegion(stack, BodyRegionV2.EARS)
|
||||
&& holder.getEarplugs().isEmpty()) {
|
||||
holder.setEarplugs(stack.copyWithCount(1));
|
||||
if (!player.isCreative()) stack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if ((stack.getItem() instanceof ItemCollar || CollarHelper.isCollar(stack))
|
||||
if (CollarHelper.isCollar(stack)
|
||||
&& holder.getCollar().isEmpty()) {
|
||||
holder.setCollar(stack.copyWithCount(1));
|
||||
if (!player.isCreative()) stack.shrink(1);
|
||||
@@ -96,14 +90,6 @@ public final class BondageItemLoaderUtility {
|
||||
*/
|
||||
public static boolean isLoadableBondageItem(ItemStack stack) {
|
||||
if (stack.isEmpty()) return false;
|
||||
// V1 item types
|
||||
if (stack.getItem() instanceof ItemBind
|
||||
|| stack.getItem() instanceof ItemGag
|
||||
|| stack.getItem() instanceof ItemBlindfold
|
||||
|| stack.getItem() instanceof ItemEarplugs
|
||||
|| stack.getItem() instanceof ItemCollar) {
|
||||
return true;
|
||||
}
|
||||
// V2 data-driven items: bind, gag, blindfold, earplugs, collar
|
||||
if (BindModeHelper.isBindItem(stack)) return true;
|
||||
if (DataDrivenBondageItem.getComponent(stack, ComponentType.GAGGING, GaggingComponent.class) != null) return true;
|
||||
|
||||
Reference in New Issue
Block a user