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:
@@ -32,8 +32,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Subclasses implement: getOccupiedRegions(), getModelLocation(), getPosePriority(),
|
||||
* getResistanceId(), notifyStruggle().
|
||||
*/
|
||||
public abstract class AbstractV2BondageItem extends Item
|
||||
implements IV2BondageItem, ILockable, IHasResistance {
|
||||
public abstract class AbstractV2BondageItem
|
||||
extends Item
|
||||
implements IV2BondageItem, ILockable, IHasResistance
|
||||
{
|
||||
|
||||
protected AbstractV2BondageItem(Properties properties) {
|
||||
super(properties);
|
||||
@@ -45,7 +47,11 @@ public abstract class AbstractV2BondageItem extends Item
|
||||
// Right-click in air does nothing for self-equip — consistent with V1 behavior.
|
||||
|
||||
@Override
|
||||
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
|
||||
public InteractionResultHolder<ItemStack> use(
|
||||
Level level,
|
||||
Player player,
|
||||
InteractionHand hand
|
||||
) {
|
||||
return InteractionResultHolder.pass(player.getItemInHand(hand));
|
||||
}
|
||||
|
||||
@@ -53,7 +59,10 @@ public abstract class AbstractV2BondageItem extends Item
|
||||
|
||||
@Override
|
||||
public InteractionResult interactLivingEntity(
|
||||
ItemStack stack, Player player, LivingEntity target, InteractionHand hand
|
||||
ItemStack stack,
|
||||
Player player,
|
||||
LivingEntity target,
|
||||
InteractionHand hand
|
||||
) {
|
||||
// Client returns SUCCESS for arm swing animation. Server may reject —
|
||||
// minor visual desync is accepted Forge pattern (same as vanilla food/bow).
|
||||
@@ -94,7 +103,10 @@ public abstract class AbstractV2BondageItem extends Item
|
||||
|
||||
@Override
|
||||
public void appendHoverText(
|
||||
ItemStack stack, @Nullable Level level, List<Component> tooltip, TooltipFlag flag
|
||||
ItemStack stack,
|
||||
@Nullable Level level,
|
||||
List<Component> tooltip,
|
||||
TooltipFlag flag
|
||||
) {
|
||||
super.appendHoverText(stack, level, tooltip, flag);
|
||||
// Lock status from ILockable
|
||||
@@ -102,19 +114,29 @@ public abstract class AbstractV2BondageItem extends Item
|
||||
// Escape difficulty
|
||||
int difficulty = getEscapeDifficulty(stack);
|
||||
if (difficulty > 0) {
|
||||
tooltip.add(Component.translatable("item.tiedup.tooltip.escape_difficulty", difficulty)
|
||||
.withStyle(ChatFormatting.GRAY));
|
||||
tooltip.add(
|
||||
Component.translatable(
|
||||
"item.tiedup.tooltip.escape_difficulty",
|
||||
difficulty
|
||||
).withStyle(ChatFormatting.GRAY)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ===== IV2BondageItem DEFAULTS =====
|
||||
|
||||
@Override
|
||||
public int getEscapeDifficulty() { return 0; }
|
||||
public int getEscapeDifficulty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsColor() { return false; }
|
||||
public boolean supportsColor() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSlimModel() { return false; }
|
||||
public boolean supportsSlimModel() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ public class V2Handcuffs extends AbstractV2BondageItem {
|
||||
Collections.unmodifiableSet(EnumSet.of(BodyRegionV2.ARMS));
|
||||
|
||||
private static final ResourceLocation MODEL = new ResourceLocation(
|
||||
TiedUpMod.MOD_ID, "models/gltf/v2/handcuffs/cuffs_prototype.glb"
|
||||
TiedUpMod.MOD_ID,
|
||||
"models/gltf/v2/handcuffs/cuffs_prototype.glb"
|
||||
);
|
||||
|
||||
public V2Handcuffs() {
|
||||
@@ -28,27 +29,43 @@ public class V2Handcuffs extends AbstractV2BondageItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<BodyRegionV2> getOccupiedRegions() { return REGIONS; }
|
||||
public Set<BodyRegionV2> getOccupiedRegions() {
|
||||
return REGIONS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getModelLocation() { return MODEL; }
|
||||
public ResourceLocation getModelLocation() {
|
||||
return MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPosePriority() { return 30; }
|
||||
public int getPosePriority() {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEscapeDifficulty() { return 100; }
|
||||
public int getEscapeDifficulty() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResistanceId() { return "handcuffs"; }
|
||||
public String getResistanceId() {
|
||||
return "handcuffs";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyStruggle(LivingEntity entity) {
|
||||
entity.level().playSound(
|
||||
null, entity.getX(), entity.getY(), entity.getZ(),
|
||||
net.minecraft.sounds.SoundEvents.CHAIN_STEP,
|
||||
net.minecraft.sounds.SoundSource.PLAYERS,
|
||||
0.4f, 1.0f
|
||||
);
|
||||
entity
|
||||
.level()
|
||||
.playSound(
|
||||
null,
|
||||
entity.getX(),
|
||||
entity.getY(),
|
||||
entity.getZ(),
|
||||
net.minecraft.sounds.SoundEvents.CHAIN_STEP,
|
||||
net.minecraft.sounds.SoundSource.PLAYERS,
|
||||
0.4f,
|
||||
1.0f
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user