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:
@@ -5,10 +5,10 @@ import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.tiedup.remake.bounty.Bounty;
|
||||
import com.tiedup.remake.bounty.BountyManager;
|
||||
import com.tiedup.remake.core.SettingsAccessor;
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.util.KidnappedHelper;
|
||||
import com.tiedup.remake.core.SettingsAccessor;
|
||||
import java.util.Optional;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
@@ -21,7 +21,6 @@ import net.minecraft.world.item.ItemStack;
|
||||
/**
|
||||
* Command: /bounty <player>
|
||||
*
|
||||
* Phase 17: Bounty System
|
||||
*
|
||||
* Creates a bounty on a target player using the held item as reward.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tiedup.remake.commands;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
@@ -12,6 +11,7 @@ import com.tiedup.remake.items.base.ItemCollar;
|
||||
import com.tiedup.remake.state.PlayerBindState;
|
||||
import com.tiedup.remake.util.teleport.Position;
|
||||
import com.tiedup.remake.util.teleport.TeleportHelper;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Collar management commands for Phase 18.
|
||||
* Collar management commands.
|
||||
*
|
||||
* Commands:
|
||||
* /collar claim <player> - Claim ownership of a player's collar
|
||||
|
||||
@@ -83,7 +83,9 @@ public final class CommandHelper {
|
||||
com.tiedup.remake.v2.bondage.capability.V2EquipmentHelper.sync(player);
|
||||
|
||||
// Sync bind state
|
||||
PacketSyncBindState statePacket = PacketSyncBindState.fromPlayer(player);
|
||||
PacketSyncBindState statePacket = PacketSyncBindState.fromPlayer(
|
||||
player
|
||||
);
|
||||
if (statePacket != null) {
|
||||
ModNetwork.sendToPlayer(statePacket, player);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Key management commands for Phase 18.
|
||||
* Key management commands.
|
||||
*
|
||||
* Commands:
|
||||
* /key claim - Claim the key you're holding
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Utility commands for Phase 18.
|
||||
* Utility commands.
|
||||
*
|
||||
* Commands:
|
||||
* /kidnapset - Get a starter kit of mod items
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.tiedup.remake.commands;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
@@ -13,6 +12,7 @@ import com.tiedup.remake.items.base.BlindfoldVariant;
|
||||
import com.tiedup.remake.items.base.EarplugsVariant;
|
||||
import com.tiedup.remake.items.base.GagVariant;
|
||||
import com.tiedup.remake.state.IBondageState;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
/**
|
||||
* NPC management commands for Phase 18.
|
||||
* NPC management commands.
|
||||
*
|
||||
* Commands:
|
||||
* /npc spawn kidnapper [player] - Spawn a kidnapper at location
|
||||
@@ -432,8 +432,7 @@ public class NPCCommand {
|
||||
var entities = level.getEntitiesOfClass(
|
||||
net.minecraft.world.entity.LivingEntity.class,
|
||||
player.getBoundingBox().inflate(radius),
|
||||
e ->
|
||||
e instanceof com.tiedup.remake.entities.AbstractTiedUpNpc
|
||||
e -> e instanceof com.tiedup.remake.entities.AbstractTiedUpNpc
|
||||
);
|
||||
|
||||
for (var entity : entities) {
|
||||
@@ -457,9 +456,7 @@ public class NPCCommand {
|
||||
return String.format("(%.1f, %.1f, %.1f)", x, y, z);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// NPC Bondage Commands (from DamselTestCommand)
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* Find the nearest mod NPC (Damsel or Kidnapper) within 10 blocks.
|
||||
@@ -508,7 +505,10 @@ public class NPCCommand {
|
||||
return 0;
|
||||
}
|
||||
|
||||
npc.equip(BodyRegionV2.ARMS, new ItemStack(ModItems.getBind(BindVariant.ROPES)));
|
||||
npc.equip(
|
||||
BodyRegionV2.ARMS,
|
||||
new ItemStack(ModItems.getBind(BindVariant.ROPES))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
@@ -536,7 +536,10 @@ public class NPCCommand {
|
||||
return 0;
|
||||
}
|
||||
|
||||
npc.equip(BodyRegionV2.MOUTH, new ItemStack(ModItems.getGag(GagVariant.CLOTH_GAG)));
|
||||
npc.equip(
|
||||
BodyRegionV2.MOUTH,
|
||||
new ItemStack(ModItems.getGag(GagVariant.CLOTH_GAG))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
@@ -566,7 +569,8 @@ public class NPCCommand {
|
||||
return 0;
|
||||
}
|
||||
|
||||
npc.equip(BodyRegionV2.EYES,
|
||||
npc.equip(
|
||||
BodyRegionV2.EYES,
|
||||
new ItemStack(ModItems.getBlindfold(BlindfoldVariant.CLASSIC))
|
||||
);
|
||||
context
|
||||
@@ -599,7 +603,10 @@ public class NPCCommand {
|
||||
return 0;
|
||||
}
|
||||
|
||||
npc.equip(BodyRegionV2.NECK, new ItemStack(ModItems.CLASSIC_COLLAR.get()));
|
||||
npc.equip(
|
||||
BodyRegionV2.NECK,
|
||||
new ItemStack(ModItems.CLASSIC_COLLAR.get())
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
@@ -644,7 +651,10 @@ public class NPCCommand {
|
||||
}
|
||||
|
||||
// Apply full bondage using AbstractTiedUpNpc method
|
||||
if (npc instanceof com.tiedup.remake.entities.AbstractTiedUpNpc npcEntity) {
|
||||
if (
|
||||
npc instanceof
|
||||
com.tiedup.remake.entities.AbstractTiedUpNpc npcEntity
|
||||
) {
|
||||
npcEntity.applyBondage(
|
||||
new ItemStack(ModItems.getBind(BindVariant.ROPES)),
|
||||
new ItemStack(ModItems.getGag(GagVariant.CLOTH_GAG)),
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
/**
|
||||
* Social and RP commands for Phase 18.
|
||||
* Social and RP commands.
|
||||
*
|
||||
* Commands:
|
||||
* /blockplayer <player> - Block a player from interacting with you
|
||||
@@ -147,9 +147,7 @@ public class SocialCommand {
|
||||
return Commands.literal("talkinfo").executes(SocialCommand::talkInfo);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Block System
|
||||
// ========================================
|
||||
|
||||
private static int blockPlayer(CommandContext<CommandSourceStack> context)
|
||||
throws CommandSyntaxException {
|
||||
@@ -284,9 +282,7 @@ public class SocialCommand {
|
||||
return SocialData.get(level).isBlocked(blocker, blocked);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// RP Commands
|
||||
// ========================================
|
||||
|
||||
private static int noRP(CommandContext<CommandSourceStack> context)
|
||||
throws CommandSyntaxException {
|
||||
@@ -443,9 +439,7 @@ public class SocialCommand {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Talk Area
|
||||
// ========================================
|
||||
|
||||
private static int setTalkArea(
|
||||
CommandContext<CommandSourceStack> context,
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.tiedup.remake.commands.CommandHelper;
|
||||
import com.tiedup.remake.core.SystemMessageManager;
|
||||
import com.tiedup.remake.items.ModItems;
|
||||
import com.tiedup.remake.items.base.AdjustmentHelper;
|
||||
import com.tiedup.remake.items.base.BlindfoldVariant;
|
||||
import com.tiedup.remake.items.base.BindVariant;
|
||||
import com.tiedup.remake.items.base.BlindfoldVariant;
|
||||
import com.tiedup.remake.items.base.EarplugsVariant;
|
||||
import com.tiedup.remake.items.base.GagVariant;
|
||||
import com.tiedup.remake.items.base.ItemCollar;
|
||||
@@ -32,14 +32,18 @@ import net.minecraft.world.item.ItemStack;
|
||||
@SuppressWarnings("null")
|
||||
public class BondageSubCommand {
|
||||
|
||||
public static void register(LiteralArgumentBuilder<CommandSourceStack> root) {
|
||||
public static void register(
|
||||
LiteralArgumentBuilder<CommandSourceStack> root
|
||||
) {
|
||||
// /tiedup tie <player>
|
||||
root.then(
|
||||
Commands.literal("tie")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::tie)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::tie)
|
||||
)
|
||||
);
|
||||
// /tiedup untie <player>
|
||||
@@ -47,8 +51,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("untie")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::untie)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::untie)
|
||||
)
|
||||
);
|
||||
// /tiedup gag <player>
|
||||
@@ -56,8 +62,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("gag")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::gag)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::gag)
|
||||
)
|
||||
);
|
||||
// /tiedup ungag <player>
|
||||
@@ -65,8 +73,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("ungag")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::ungag)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::ungag)
|
||||
)
|
||||
);
|
||||
// /tiedup blindfold <player>
|
||||
@@ -74,8 +84,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("blindfold")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::blindfold)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::blindfold)
|
||||
)
|
||||
);
|
||||
// /tiedup unblind <player>
|
||||
@@ -83,8 +95,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("unblind")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::unblind)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::unblind)
|
||||
)
|
||||
);
|
||||
// /tiedup collar <player>
|
||||
@@ -92,8 +106,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("collar")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::collar)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::collar)
|
||||
)
|
||||
);
|
||||
// /tiedup takecollar <player>
|
||||
@@ -101,8 +117,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("takecollar")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::takecollar)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::takecollar)
|
||||
)
|
||||
);
|
||||
// /tiedup takeearplugs <player>
|
||||
@@ -110,8 +128,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("takeearplugs")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::takeearplugs)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::takeearplugs)
|
||||
)
|
||||
);
|
||||
// /tiedup putearplugs <player>
|
||||
@@ -119,8 +139,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("putearplugs")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::putearplugs)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::putearplugs)
|
||||
)
|
||||
);
|
||||
// /tiedup takeclothes <player>
|
||||
@@ -128,8 +150,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("takeclothes")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::takeclothes)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::takeclothes)
|
||||
)
|
||||
);
|
||||
// /tiedup putclothes <player>
|
||||
@@ -137,8 +161,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("putclothes")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::putclothes)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::putclothes)
|
||||
)
|
||||
);
|
||||
// /tiedup fullyrestrain <player>
|
||||
@@ -146,8 +172,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("fullyrestrain")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::fullyrestrain)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::fullyrestrain)
|
||||
)
|
||||
);
|
||||
// /tiedup enslave <player>
|
||||
@@ -155,8 +183,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("enslave")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::enslave)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::enslave)
|
||||
)
|
||||
);
|
||||
// /tiedup free <player>
|
||||
@@ -164,8 +194,10 @@ public class BondageSubCommand {
|
||||
Commands.literal("free")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(BondageSubCommand::free)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(BondageSubCommand::free)
|
||||
)
|
||||
);
|
||||
// /tiedup adjust <player> <type:gag|blindfold|all> <value>
|
||||
@@ -173,29 +205,26 @@ public class BondageSubCommand {
|
||||
Commands.literal("adjust")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.then(
|
||||
Commands.argument("type", StringArgumentType.word())
|
||||
.suggests((ctx, builder) -> {
|
||||
builder.suggest("gag");
|
||||
builder.suggest("blindfold");
|
||||
builder.suggest("all");
|
||||
return builder.buildFuture();
|
||||
})
|
||||
.then(
|
||||
Commands.argument(
|
||||
"value",
|
||||
FloatArgumentType.floatArg(-4.0f, 4.0f)
|
||||
).executes(BondageSubCommand::adjust)
|
||||
)
|
||||
)
|
||||
Commands.argument("player", EntityArgument.player()).then(
|
||||
Commands.argument("type", StringArgumentType.word())
|
||||
.suggests((ctx, builder) -> {
|
||||
builder.suggest("gag");
|
||||
builder.suggest("blindfold");
|
||||
builder.suggest("all");
|
||||
return builder.buildFuture();
|
||||
})
|
||||
.then(
|
||||
Commands.argument(
|
||||
"value",
|
||||
FloatArgumentType.floatArg(-4.0f, 4.0f)
|
||||
).executes(BondageSubCommand::adjust)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Command Implementations
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* /tiedup tie <player>
|
||||
@@ -582,7 +611,9 @@ public class BondageSubCommand {
|
||||
boolean adjustedBlindfold = false;
|
||||
|
||||
if (type.equals("gag") || type.equals("all")) {
|
||||
ItemStack gag = state.getEquipment(com.tiedup.remake.v2.BodyRegionV2.MOUTH);
|
||||
ItemStack gag = state.getEquipment(
|
||||
com.tiedup.remake.v2.BodyRegionV2.MOUTH
|
||||
);
|
||||
if (!gag.isEmpty()) {
|
||||
AdjustmentHelper.setAdjustment(gag, value);
|
||||
adjustedGag = true;
|
||||
@@ -590,7 +621,9 @@ public class BondageSubCommand {
|
||||
}
|
||||
|
||||
if (type.equals("blindfold") || type.equals("all")) {
|
||||
ItemStack blindfold = state.getEquipment(com.tiedup.remake.v2.BodyRegionV2.EYES);
|
||||
ItemStack blindfold = state.getEquipment(
|
||||
com.tiedup.remake.v2.BodyRegionV2.EYES
|
||||
);
|
||||
if (!blindfold.isEmpty()) {
|
||||
AdjustmentHelper.setAdjustment(blindfold, value);
|
||||
adjustedBlindfold = true;
|
||||
|
||||
@@ -21,7 +21,9 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
@SuppressWarnings("null")
|
||||
public class DebtSubCommand {
|
||||
|
||||
public static void register(LiteralArgumentBuilder<CommandSourceStack> root) {
|
||||
public static void register(
|
||||
LiteralArgumentBuilder<CommandSourceStack> root
|
||||
) {
|
||||
// /tiedup debt <player> [set|add|remove <amount>]
|
||||
root.then(
|
||||
Commands.literal("debt")
|
||||
@@ -61,9 +63,7 @@ public class DebtSubCommand {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Command Implementations
|
||||
// ========================================
|
||||
|
||||
private static int debtShow(CommandContext<CommandSourceStack> context)
|
||||
throws CommandSyntaxException {
|
||||
|
||||
@@ -20,21 +20,23 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
@SuppressWarnings("null")
|
||||
public class InventorySubCommand {
|
||||
|
||||
public static void register(LiteralArgumentBuilder<CommandSourceStack> root) {
|
||||
public static void register(
|
||||
LiteralArgumentBuilder<CommandSourceStack> root
|
||||
) {
|
||||
// /tiedup returnstuff <player>
|
||||
root.then(
|
||||
Commands.literal("returnstuff")
|
||||
.requires(CommandHelper.REQUIRES_OP)
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(InventorySubCommand::returnstuff)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(InventorySubCommand::returnstuff)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Command Implementations
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* /tiedup returnstuff <player>
|
||||
|
||||
@@ -23,7 +23,9 @@ import net.minecraft.world.entity.MobSpawnType;
|
||||
@SuppressWarnings("null")
|
||||
public class MasterTestSubCommand {
|
||||
|
||||
public static void register(LiteralArgumentBuilder<CommandSourceStack> root) {
|
||||
public static void register(
|
||||
LiteralArgumentBuilder<CommandSourceStack> root
|
||||
) {
|
||||
// /tiedup mastertest
|
||||
root.then(
|
||||
Commands.literal("mastertest")
|
||||
@@ -53,9 +55,7 @@ public class MasterTestSubCommand {
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Command Implementations
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* /tiedup mastertest
|
||||
@@ -95,7 +95,10 @@ public class MasterTestSubCommand {
|
||||
master.setPetPlayer(player);
|
||||
master.putPetCollar(player);
|
||||
|
||||
CommandHelper.syncPlayerState(player, PlayerBindState.getInstance(player));
|
||||
CommandHelper.syncPlayerState(
|
||||
player,
|
||||
PlayerBindState.getInstance(player)
|
||||
);
|
||||
|
||||
String masterName = master.getNpcName();
|
||||
if (masterName == null || masterName.isEmpty()) masterName = "Master";
|
||||
@@ -138,7 +141,10 @@ public class MasterTestSubCommand {
|
||||
if (!master.hasPet()) {
|
||||
master.setPetPlayer(player);
|
||||
master.putPetCollar(player);
|
||||
CommandHelper.syncPlayerState(player, PlayerBindState.getInstance(player));
|
||||
CommandHelper.syncPlayerState(
|
||||
player,
|
||||
PlayerBindState.getInstance(player)
|
||||
);
|
||||
}
|
||||
|
||||
master.setMasterState(MasterState.HUMAN_CHAIR);
|
||||
@@ -195,7 +201,10 @@ public class MasterTestSubCommand {
|
||||
if (!master.hasPet()) {
|
||||
master.setPetPlayer(player);
|
||||
master.putPetCollar(player);
|
||||
CommandHelper.syncPlayerState(player, PlayerBindState.getInstance(player));
|
||||
CommandHelper.syncPlayerState(
|
||||
player,
|
||||
PlayerBindState.getInstance(player)
|
||||
);
|
||||
}
|
||||
|
||||
master.setMasterState(targetState);
|
||||
|
||||
@@ -20,7 +20,9 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
@SuppressWarnings("null")
|
||||
public class TestAnimSubCommand {
|
||||
|
||||
public static void register(LiteralArgumentBuilder<CommandSourceStack> root) {
|
||||
public static void register(
|
||||
LiteralArgumentBuilder<CommandSourceStack> root
|
||||
) {
|
||||
// /tiedup testanim <animId> [player]
|
||||
// /tiedup testanim stop [player]
|
||||
root.then(
|
||||
@@ -30,34 +32,36 @@ public class TestAnimSubCommand {
|
||||
Commands.literal("stop")
|
||||
.executes(ctx -> testAnimStop(ctx, null))
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(ctx ->
|
||||
testAnimStop(
|
||||
ctx,
|
||||
EntityArgument.getPlayer(ctx, "player")
|
||||
)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(ctx ->
|
||||
testAnimStop(
|
||||
ctx,
|
||||
EntityArgument.getPlayer(ctx, "player")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(
|
||||
Commands.argument("animId", StringArgumentType.string())
|
||||
.executes(ctx -> testAnim(ctx, null))
|
||||
.then(
|
||||
Commands.argument("player", EntityArgument.player())
|
||||
.executes(ctx ->
|
||||
testAnim(
|
||||
ctx,
|
||||
EntityArgument.getPlayer(ctx, "player")
|
||||
)
|
||||
Commands.argument(
|
||||
"player",
|
||||
EntityArgument.player()
|
||||
).executes(ctx ->
|
||||
testAnim(
|
||||
ctx,
|
||||
EntityArgument.getPlayer(ctx, "player")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// Command Implementations
|
||||
// ========================================
|
||||
|
||||
/**
|
||||
* /tiedup testanim <animId> [player]
|
||||
|
||||
Reference in New Issue
Block a user