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,9 +1,9 @@
|
||||
package com.tiedup.remake.state.components;
|
||||
|
||||
import com.tiedup.remake.v2.bondage.IV2BondageItem;
|
||||
import com.tiedup.remake.state.hosts.IPlayerBindStateHost;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.v2.bondage.IV2BondageEquipment;
|
||||
import com.tiedup.remake.v2.bondage.IV2BondageItem;
|
||||
import com.tiedup.remake.v2.bondage.capability.V2EquipmentHelper;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -63,7 +63,10 @@ public class PlayerClothesPermission {
|
||||
* @return true if clothes can be changed
|
||||
*/
|
||||
public boolean canChangeClothes() {
|
||||
ItemStack clothes = V2EquipmentHelper.getInRegion(host.getPlayer(), BodyRegionV2.TORSO);
|
||||
ItemStack clothes = V2EquipmentHelper.getInRegion(
|
||||
host.getPlayer(),
|
||||
BodyRegionV2.TORSO
|
||||
);
|
||||
if (clothes.isEmpty()) return true;
|
||||
|
||||
// Check if clothes are locked
|
||||
@@ -95,20 +98,28 @@ public class PlayerClothesPermission {
|
||||
*/
|
||||
public ItemStack replaceClothes(ItemStack newClothes, boolean force) {
|
||||
Player player = host.getPlayer();
|
||||
if (player == null || player.level().isClientSide) return ItemStack.EMPTY;
|
||||
if (
|
||||
player == null || player.level().isClientSide
|
||||
) return ItemStack.EMPTY;
|
||||
|
||||
IV2BondageEquipment equip = V2EquipmentHelper.getEquipment(player);
|
||||
if (equip == null) return ItemStack.EMPTY;
|
||||
|
||||
// Take off old clothes
|
||||
ItemStack old = V2EquipmentHelper.unequipFromRegion(player, BodyRegionV2.TORSO);
|
||||
ItemStack old = V2EquipmentHelper.unequipFromRegion(
|
||||
player,
|
||||
BodyRegionV2.TORSO
|
||||
);
|
||||
|
||||
// Equip new clothes if we successfully removed old ones
|
||||
if (!old.isEmpty()) {
|
||||
equip.setInRegion(BodyRegionV2.TORSO, newClothes.copy());
|
||||
|
||||
// Fire lifecycle hook for new item
|
||||
if (!newClothes.isEmpty() && newClothes.getItem() instanceof IV2BondageItem newItem) {
|
||||
if (
|
||||
!newClothes.isEmpty() &&
|
||||
newClothes.getItem() instanceof IV2BondageItem newItem
|
||||
) {
|
||||
newItem.onEquipped(newClothes, player);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user