vary room theme weights — sculk rare, inferno/ice uncommon
This commit is contained in:
@@ -134,7 +134,7 @@ public class ProgressOverlay {
|
||||
*/
|
||||
private static ProgressInfo getActiveProgress(PlayerBindState state) {
|
||||
// Check client tying task
|
||||
PlayerStateTask tyingTask = state.getClientTyingTask();
|
||||
PlayerStateTask tyingTask = state.tasks().getClientTyingTask();
|
||||
if (tyingTask != null && !tyingTask.isOutdated()) {
|
||||
float progress = tyingTask.getProgress();
|
||||
Component text = getTyingText(tyingTask);
|
||||
@@ -142,7 +142,7 @@ public class ProgressOverlay {
|
||||
}
|
||||
|
||||
// Check client untying task
|
||||
PlayerStateTask untyingTask = state.getClientUntyingTask();
|
||||
PlayerStateTask untyingTask = state.tasks().getClientUntyingTask();
|
||||
if (untyingTask != null && !untyingTask.isOutdated()) {
|
||||
float progress = untyingTask.getProgress();
|
||||
Component text = getUntyingText(untyingTask);
|
||||
@@ -150,7 +150,7 @@ public class ProgressOverlay {
|
||||
}
|
||||
|
||||
// Check client feeding task
|
||||
PlayerStateTask feedingTask = state.getClientFeedingTask();
|
||||
PlayerStateTask feedingTask = state.tasks().getClientFeedingTask();
|
||||
if (feedingTask != null && !feedingTask.isOutdated()) {
|
||||
float progress = feedingTask.getProgress();
|
||||
Component text = getFeedingText(feedingTask);
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.joml.Matrix4f;
|
||||
*/
|
||||
public class NpcFishingBobberRenderer extends EntityRenderer<NpcFishingBobber> {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
private static final ResourceLocation TEXTURE = ResourceLocation.parse(
|
||||
"textures/entity/fishing_hook.png"
|
||||
);
|
||||
private static final RenderType RENDER_TYPE = RenderType.entityCutout(
|
||||
|
||||
@@ -96,15 +96,15 @@ public class KidnapSetCommand {
|
||||
|
||||
// Collars (data-driven)
|
||||
ItemStack classicCollars = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "classic_collar"));
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar"));
|
||||
classicCollars.setCount(4);
|
||||
given += giveItem(player, classicCollars);
|
||||
ItemStack shockCollars = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "shock_collar"));
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "shock_collar"));
|
||||
shockCollars.setCount(2);
|
||||
given += giveItem(player, shockCollars);
|
||||
ItemStack gpsCollars = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "gps_collar"));
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "gps_collar"));
|
||||
gpsCollars.setCount(2);
|
||||
given += giveItem(player, gpsCollars);
|
||||
|
||||
@@ -160,7 +160,7 @@ public class KidnapSetCommand {
|
||||
private static int giveDataDrivenItems(ServerPlayer player, String itemName, int count) {
|
||||
int given = 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
ItemStack stack = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", itemName));
|
||||
ItemStack stack = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", itemName));
|
||||
if (!stack.isEmpty()) {
|
||||
giveItem(player, stack);
|
||||
given++;
|
||||
|
||||
@@ -499,7 +499,7 @@ public class NPCCommand {
|
||||
|
||||
npc.equip(
|
||||
BodyRegionV2.ARMS,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
@@ -530,7 +530,7 @@ public class NPCCommand {
|
||||
|
||||
npc.equip(
|
||||
BodyRegionV2.MOUTH,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "cloth_gag"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
@@ -563,7 +563,7 @@ public class NPCCommand {
|
||||
|
||||
npc.equip(
|
||||
BodyRegionV2.EYES,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_blindfold"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold"))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
@@ -596,7 +596,7 @@ public class NPCCommand {
|
||||
|
||||
npc.equip(
|
||||
BodyRegionV2.NECK,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_collar"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar"))
|
||||
);
|
||||
context
|
||||
.getSource()
|
||||
@@ -647,11 +647,11 @@ public class NPCCommand {
|
||||
com.tiedup.remake.entities.AbstractTiedUpNpc npcEntity
|
||||
) {
|
||||
npcEntity.applyBondage(
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes")),
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "cloth_gag")),
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_blindfold")),
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_earplugs")),
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_collar")),
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes")),
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag")),
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold")),
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_earplugs")),
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar")),
|
||||
ItemStack.EMPTY // No clothes
|
||||
);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class AccessoryCommands {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_earplugs"));
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_earplugs"));
|
||||
state.putEarplugsOn(earplugs);
|
||||
CommandHelper.syncPlayerState(targetPlayer, state);
|
||||
|
||||
@@ -298,25 +298,25 @@ public class AccessoryCommands {
|
||||
int applied = 0;
|
||||
|
||||
if (!state.isTiedUp()) {
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"));
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"));
|
||||
state.putBindOn(ropes);
|
||||
applied++;
|
||||
}
|
||||
|
||||
if (!state.isGagged()) {
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "cloth_gag"));
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"));
|
||||
state.putGagOn(gag);
|
||||
applied++;
|
||||
}
|
||||
|
||||
if (!state.isBlindfolded()) {
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_blindfold"));
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold"));
|
||||
state.putBlindfoldOn(blindfold);
|
||||
applied++;
|
||||
}
|
||||
|
||||
if (!state.hasCollar()) {
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(new net.minecraft.resources.ResourceLocation("tiedup", "classic_collar"));
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar"));
|
||||
if (
|
||||
context.getSource().getEntity() instanceof ServerPlayer executor
|
||||
) {
|
||||
@@ -327,7 +327,7 @@ public class AccessoryCommands {
|
||||
}
|
||||
|
||||
if (!state.hasEarplugs()) {
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_earplugs"));
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_earplugs"));
|
||||
state.putEarplugsOn(earplugs);
|
||||
applied++;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class BindCommands {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"));
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"));
|
||||
state.putBindOn(ropes);
|
||||
|
||||
CommandHelper.syncPlayerState(targetPlayer, state);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class BlindfoldCommands {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_blindfold"));
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold"));
|
||||
state.putBlindfoldOn(blindfold);
|
||||
|
||||
CommandHelper.syncPlayerState(targetPlayer, state);
|
||||
|
||||
@@ -93,7 +93,7 @@ public class CollarCommands {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(new net.minecraft.resources.ResourceLocation("tiedup", "classic_collar"));
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar"));
|
||||
|
||||
if (context.getSource().getEntity() instanceof ServerPlayer executor) {
|
||||
CollarHelper.addOwner(collar, executor);
|
||||
@@ -182,19 +182,19 @@ public class CollarCommands {
|
||||
|
||||
// First fully restrain
|
||||
if (!state.isTiedUp()) {
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"));
|
||||
ItemStack ropes = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"));
|
||||
state.putBindOn(ropes);
|
||||
}
|
||||
if (!state.isGagged()) {
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "cloth_gag"));
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"));
|
||||
state.putGagOn(gag);
|
||||
}
|
||||
if (!state.isBlindfolded()) {
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_blindfold"));
|
||||
ItemStack blindfold = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold"));
|
||||
state.putBlindfoldOn(blindfold);
|
||||
}
|
||||
if (!state.hasCollar()) {
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(new net.minecraft.resources.ResourceLocation("tiedup", "classic_collar"));
|
||||
ItemStack collar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "classic_collar"));
|
||||
if (
|
||||
context.getSource().getEntity() instanceof ServerPlayer executor
|
||||
) {
|
||||
@@ -203,7 +203,7 @@ public class CollarCommands {
|
||||
state.putCollarOn(collar);
|
||||
}
|
||||
if (!state.hasEarplugs()) {
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "classic_earplugs"));
|
||||
ItemStack earplugs = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "classic_earplugs"));
|
||||
state.putEarplugsOn(earplugs);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GagCommands {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "cloth_gag"));
|
||||
ItemStack gag = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"));
|
||||
state.putGagOn(gag);
|
||||
|
||||
CommandHelper.syncPlayerState(targetPlayer, state);
|
||||
|
||||
@@ -171,7 +171,7 @@ public class PetRequestManager {
|
||||
|
||||
// Put dogbind on player (if not already tied)
|
||||
if (!state.isTiedUp()) {
|
||||
ItemStack dogbind = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "dogbinder"));
|
||||
ItemStack dogbind = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "dogbinder"));
|
||||
state.equip(BodyRegionV2.ARMS, dogbind);
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[PetRequestManager] Equipped dogbind on {} for walk",
|
||||
@@ -226,7 +226,7 @@ public class PetRequestManager {
|
||||
}
|
||||
|
||||
// Master equips armbinder on pet (classic pet play restraint)
|
||||
ItemStack bind = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "armbinder"));
|
||||
ItemStack bind = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "armbinder"));
|
||||
state.equip(BodyRegionV2.ARMS, bind);
|
||||
|
||||
DialogueBridge.talkTo(master, pet, "petplay.tie_accept");
|
||||
|
||||
@@ -143,11 +143,11 @@ public class BondageServiceHandler {
|
||||
// Apply bondage
|
||||
state.equip(
|
||||
BodyRegionV2.ARMS,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"))
|
||||
);
|
||||
state.equip(
|
||||
BodyRegionV2.MOUTH,
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ball_gag"))
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ball_gag"))
|
||||
);
|
||||
|
||||
// Teleport to cell
|
||||
|
||||
@@ -95,7 +95,7 @@ public class EntityRopeArrow extends AbstractArrow {
|
||||
if (roll <= bindChance) {
|
||||
// Success! Bind the target
|
||||
ItemStack ropeItem = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "ropes")
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "ropes")
|
||||
);
|
||||
targetState.equip(BodyRegionV2.ARMS, ropeItem);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class KidnapperCaptureEquipment {
|
||||
) {
|
||||
return mainHand;
|
||||
}
|
||||
return DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "ropes"));
|
||||
return DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ public class KidnapperCaptureEquipment {
|
||||
public ItemStack getCollarItem() {
|
||||
// Kidnappers always have a shock collar to mark their captives
|
||||
return com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "shock_collar"));
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "shock_collar"));
|
||||
}
|
||||
|
||||
// HELD ITEM MANAGEMENT
|
||||
|
||||
@@ -184,7 +184,7 @@ public class KidnapperItemSelector {
|
||||
*/
|
||||
public static ItemStack createItemById(String id, @Nullable ItemColor color) {
|
||||
ItemStack stack = DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", id)
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", id)
|
||||
);
|
||||
if (color != null) {
|
||||
applyColor(stack, color);
|
||||
@@ -197,7 +197,7 @@ public class KidnapperItemSelector {
|
||||
*/
|
||||
public static ItemStack createMittens() {
|
||||
return DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "leather_mittens")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "leather_mittens")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public class KidnapperItemSelector {
|
||||
*/
|
||||
public static ItemStack createEarplugs() {
|
||||
return DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "classic_earplugs")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "classic_earplugs")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public class KidnapperJobManager {
|
||||
|
||||
// Put a shock collar on the worker AFTER untie/free
|
||||
ItemStack shockCollar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "shock_collar_auto"));
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "shock_collar_auto"));
|
||||
// Add kidnapper as owner so the collar is linked
|
||||
CollarHelper.addOwner(
|
||||
shockCollar,
|
||||
|
||||
@@ -547,7 +547,7 @@ public class KidnapperWalkPrisonerGoal extends Goal {
|
||||
);
|
||||
|
||||
// 3. Change bind to DOGBINDER
|
||||
ItemStack dogBinder = DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "dogbinder"));
|
||||
ItemStack dogBinder = DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "dogbinder"));
|
||||
this.walkedPrisoner.equip(BodyRegionV2.ARMS, dogBinder);
|
||||
|
||||
TiedUpMod.LOGGER.debug(
|
||||
@@ -736,7 +736,7 @@ public class KidnapperWalkPrisonerGoal extends Goal {
|
||||
if (currentBind.isEmpty() || !prisoner.isTiedUp()) {
|
||||
// They freed themselves - put dogbinder back on
|
||||
ItemStack dogBinder = new ItemStack(
|
||||
DataDrivenBondageItem.createStack(new ResourceLocation("tiedup", "dogbinder")).getItem()
|
||||
DataDrivenBondageItem.createStack(ResourceLocation.fromNamespaceAndPath("tiedup", "dogbinder")).getItem()
|
||||
);
|
||||
prisoner.equip(BodyRegionV2.ARMS, dogBinder);
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ public class MaidReturnGoal extends Goal {
|
||||
cap.equip(
|
||||
BodyRegionV2.ARMS,
|
||||
com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "ropes")
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "ropes")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ public class MasterHumanChairGoal extends Goal {
|
||||
// Apply invisible dogbind for the pose animation
|
||||
if (!bindState.isTiedUp()) {
|
||||
ItemStack dogbind = DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "dogbinder")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "dogbinder")
|
||||
);
|
||||
CompoundTag tag = dogbind.getOrCreateTag();
|
||||
tag.putBoolean(NBT_HUMAN_CHAIR_BIND, true);
|
||||
|
||||
@@ -455,13 +455,13 @@ public class MasterPunishGoal extends Goal {
|
||||
private ItemStack createAccessory(BodyRegionV2 region) {
|
||||
return switch (region) {
|
||||
case EYES -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "classic_blindfold")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold")
|
||||
);
|
||||
case MOUTH -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "ball_gag")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "ball_gag")
|
||||
);
|
||||
case HANDS -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "leather_mittens")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "leather_mittens")
|
||||
);
|
||||
default -> ItemStack.EMPTY;
|
||||
};
|
||||
@@ -472,7 +472,7 @@ public class MasterPunishGoal extends Goal {
|
||||
*/
|
||||
private void applyTighten(ServerPlayer pet) {
|
||||
ItemStack armbinder = DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "armbinder")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "armbinder")
|
||||
);
|
||||
|
||||
// Mark as temporary
|
||||
|
||||
@@ -247,13 +247,13 @@ public class MasterRandomEventGoal extends Goal {
|
||||
private ItemStack createRandomAccessory(BodyRegionV2 region) {
|
||||
return switch (region) {
|
||||
case EYES -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "classic_blindfold")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold")
|
||||
);
|
||||
case MOUTH -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "ball_gag")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "ball_gag")
|
||||
);
|
||||
case HANDS -> DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "leather_mittens")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "leather_mittens")
|
||||
);
|
||||
default -> ItemStack.EMPTY;
|
||||
};
|
||||
@@ -304,7 +304,7 @@ public class MasterRandomEventGoal extends Goal {
|
||||
PlayerBindState bindState = PlayerBindState.getInstance(pet);
|
||||
if (bindState != null && !bindState.isTiedUp()) {
|
||||
ItemStack dogbind = DataDrivenBondageItem.createStack(
|
||||
new ResourceLocation("tiedup", "dogbinder")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "dogbinder")
|
||||
);
|
||||
bindState.equip(BodyRegionV2.ARMS, dogbind);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class MasterPetManager {
|
||||
|
||||
// Create a choke collar for pet play
|
||||
ItemStack chokeCollar = com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem.createStack(
|
||||
new net.minecraft.resources.ResourceLocation("tiedup", "choke_collar")
|
||||
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("tiedup", "choke_collar")
|
||||
);
|
||||
|
||||
// Configure for pet play BEFORE equipping
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RestraintTaskTickHandler {
|
||||
if (mgr.getContinuousStruggleSession(player.getUUID()) == null) {
|
||||
// Legacy behavior: stop after 80 ticks (no active continuous session)
|
||||
if (
|
||||
playerState.shouldStopStruggling(
|
||||
playerState.getStruggle().shouldStopStruggling(
|
||||
player.level().getGameTime()
|
||||
)
|
||||
) {
|
||||
@@ -91,7 +91,7 @@ public class RestraintTaskTickHandler {
|
||||
// sendProgressPackets() updates the UI for both players
|
||||
if (playerState != null) {
|
||||
com.tiedup.remake.tasks.UntyingTask currentUntyingTask =
|
||||
playerState.getCurrentUntyingTask();
|
||||
playerState.tasks().getCurrentUntyingTask();
|
||||
if (currentUntyingTask != null && !currentUntyingTask.isStopped()) {
|
||||
// AUTO-UPDATE: Check if player is still targeting the same entity
|
||||
// This allows "hold click" behavior without needing repeated interactLivingEntity calls
|
||||
@@ -128,7 +128,7 @@ public class RestraintTaskTickHandler {
|
||||
|
||||
// Check if task stopped (completed or cancelled due to no progress)
|
||||
if (currentUntyingTask.isStopped()) {
|
||||
playerState.setCurrentUntyingTask(null);
|
||||
playerState.tasks().setCurrentUntyingTask(null);
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[RESTRAINT] {} untying task ended (tick update)",
|
||||
player.getName().getString()
|
||||
@@ -138,7 +138,7 @@ public class RestraintTaskTickHandler {
|
||||
|
||||
// Process tying task tick (same progress-based system)
|
||||
com.tiedup.remake.tasks.TyingTask currentTyingTask =
|
||||
playerState.getCurrentTyingTask();
|
||||
playerState.tasks().getCurrentTyingTask();
|
||||
if (currentTyingTask != null && !currentTyingTask.isStopped()) {
|
||||
// AUTO-UPDATE: Check if player is still targeting the same entity
|
||||
// This allows "hold click" behavior without needing repeated interactLivingEntity calls
|
||||
@@ -181,7 +181,7 @@ public class RestraintTaskTickHandler {
|
||||
|
||||
// Check if task stopped (completed or cancelled due to no progress)
|
||||
if (currentTyingTask.isStopped()) {
|
||||
playerState.setCurrentTyingTask(null);
|
||||
playerState.tasks().setCurrentTyingTask(null);
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[RESTRAINT] {} tying task ended (tick update)",
|
||||
player.getName().getString()
|
||||
@@ -190,7 +190,7 @@ public class RestraintTaskTickHandler {
|
||||
}
|
||||
|
||||
// Process force feeding task tick
|
||||
TimedInteractTask feedingTask = playerState.getCurrentFeedingTask();
|
||||
TimedInteractTask feedingTask = playerState.tasks().getCurrentFeedingTask();
|
||||
if (feedingTask != null && !feedingTask.isStopped()) {
|
||||
LivingEntity target = feedingTask.getTargetEntity();
|
||||
if (target != null && target.isAlive()) {
|
||||
@@ -214,7 +214,7 @@ public class RestraintTaskTickHandler {
|
||||
feedingTask.sendProgressPackets();
|
||||
|
||||
if (feedingTask.isStopped()) {
|
||||
playerState.setCurrentFeedingTask(null);
|
||||
playerState.tasks().setCurrentFeedingTask(null);
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[RESTRAINT] {} feeding task ended (tick update)",
|
||||
player.getName().getString()
|
||||
@@ -405,7 +405,7 @@ public class RestraintTaskTickHandler {
|
||||
}
|
||||
|
||||
// Block untying while force feeding
|
||||
TimedInteractTask activeFeedTask = helperState.getCurrentFeedingTask();
|
||||
TimedInteractTask activeFeedTask = helperState.tasks().getCurrentFeedingTask();
|
||||
if (activeFeedTask != null && !activeFeedTask.isStopped()) {
|
||||
return;
|
||||
}
|
||||
@@ -435,7 +435,7 @@ public class RestraintTaskTickHandler {
|
||||
}
|
||||
|
||||
// Get current untying task (if any)
|
||||
UntyingTask currentTask = helperState.getCurrentUntyingTask();
|
||||
UntyingTask currentTask = helperState.tasks().getCurrentUntyingTask();
|
||||
|
||||
// Check if we should start a new task or continue existing one
|
||||
if (
|
||||
@@ -453,7 +453,7 @@ public class RestraintTaskTickHandler {
|
||||
);
|
||||
|
||||
// Start new task
|
||||
helperState.setCurrentUntyingTask(newTask);
|
||||
helperState.tasks().setCurrentUntyingTask(newTask);
|
||||
newTask.setUpTargetState(); // Initialize target's restraint state
|
||||
newTask.start();
|
||||
currentTask = newTask;
|
||||
@@ -581,13 +581,13 @@ public class RestraintTaskTickHandler {
|
||||
}
|
||||
|
||||
// Block feeding while untying
|
||||
UntyingTask activeUntieTask = feederBindState.getCurrentUntyingTask();
|
||||
UntyingTask activeUntieTask = feederBindState.tasks().getCurrentUntyingTask();
|
||||
if (activeUntieTask != null && !activeUntieTask.isStopped()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get current feeding task (if any)
|
||||
TimedInteractTask currentTask = feederBindState.getCurrentFeedingTask();
|
||||
TimedInteractTask currentTask = feederBindState.tasks().getCurrentFeedingTask();
|
||||
|
||||
if (
|
||||
currentTask == null ||
|
||||
@@ -605,7 +605,7 @@ public class RestraintTaskTickHandler {
|
||||
feeder.getInventory().selected
|
||||
);
|
||||
|
||||
feederBindState.setCurrentFeedingTask(newTask);
|
||||
feederBindState.tasks().setCurrentFeedingTask(newTask);
|
||||
newTask.setUpTargetState();
|
||||
newTask.start();
|
||||
currentTask = newTask;
|
||||
|
||||
@@ -319,7 +319,7 @@ public class GenericKnife extends Item implements IKnife {
|
||||
|
||||
// Check if escaped
|
||||
if (newRes <= 0) {
|
||||
state.getStruggleBinds().successActionExternal(state);
|
||||
state.getStruggle().getStruggleBinds().successActionExternal(state);
|
||||
player.stopUsingItem();
|
||||
TiedUpMod.LOGGER.info(
|
||||
"[GenericKnife] {} escaped by cutting bind!",
|
||||
|
||||
@@ -289,7 +289,7 @@ public class NetworkEventHandler {
|
||||
// Resolve the dimension
|
||||
ResourceKey<Level> dimKey = ResourceKey.create(
|
||||
net.minecraft.core.registries.Registries.DIMENSION,
|
||||
new ResourceLocation(dimStr)
|
||||
ResourceLocation.parse(dimStr)
|
||||
);
|
||||
|
||||
var server = player.getServer();
|
||||
|
||||
@@ -37,11 +37,11 @@ public class PacketForceFeeding extends AbstractProgressPacketWithRole {
|
||||
|
||||
@Override
|
||||
protected Function<PlayerBindState, PlayerStateTask> getTaskGetter() {
|
||||
return PlayerBindState::getClientFeedingTask;
|
||||
return state -> state.tasks().getClientFeedingTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BiConsumer<PlayerBindState, PlayerStateTask> getTaskSetter() {
|
||||
return PlayerBindState::setClientFeedingTask;
|
||||
return (state, task) -> state.tasks().setClientFeedingTask(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,6 @@ public class PacketStruggle {
|
||||
}
|
||||
|
||||
// Call struggle
|
||||
state.struggle();
|
||||
state.getStruggle().struggle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@ public class PacketTying extends AbstractProgressPacketWithRole {
|
||||
|
||||
@Override
|
||||
protected Function<PlayerBindState, PlayerStateTask> getTaskGetter() {
|
||||
return PlayerBindState::getClientTyingTask;
|
||||
return state -> state.tasks().getClientTyingTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BiConsumer<PlayerBindState, PlayerStateTask> getTaskSetter() {
|
||||
return PlayerBindState::setClientTyingTask;
|
||||
return (state, task) -> state.tasks().setClientTyingTask(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@ public class PacketUntying extends AbstractProgressPacketWithRole {
|
||||
|
||||
@Override
|
||||
protected Function<PlayerBindState, PlayerStateTask> getTaskGetter() {
|
||||
return PlayerBindState::getClientUntyingTask;
|
||||
return state -> state.tasks().getClientUntyingTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BiConsumer<PlayerBindState, PlayerStateTask> getTaskSetter() {
|
||||
return PlayerBindState::setClientUntyingTask;
|
||||
return (state, task) -> state.tasks().setClientUntyingTask(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,25 +149,25 @@ public class PacketSelfBondage {
|
||||
stack.copy(), stack, state, player, tyingSeconds, player.level(), player
|
||||
);
|
||||
|
||||
TyingTask currentTask = playerState.getCurrentTyingTask();
|
||||
TyingTask currentTask = playerState.tasks().getCurrentTyingTask();
|
||||
if (currentTask == null
|
||||
|| !currentTask.isSameTarget(player)
|
||||
|| currentTask.isOutdated()
|
||||
|| !ItemStack.matches(currentTask.getBind(), stack)) {
|
||||
playerState.setCurrentTyingTask(newTask);
|
||||
playerState.tasks().setCurrentTyingTask(newTask);
|
||||
newTask.start();
|
||||
} else {
|
||||
currentTask.update();
|
||||
}
|
||||
|
||||
if (playerState.getCurrentTyingTask() == newTask) {
|
||||
if (playerState.tasks().getCurrentTyingTask() == newTask) {
|
||||
newTask.update();
|
||||
}
|
||||
|
||||
// Clear completed task to prevent blocking future tying interactions
|
||||
TyingTask activeTask = playerState.getCurrentTyingTask();
|
||||
TyingTask activeTask = playerState.tasks().getCurrentTyingTask();
|
||||
if (activeTask != null && activeTask.isStopped()) {
|
||||
playerState.setCurrentTyingTask(null);
|
||||
playerState.tasks().setCurrentTyingTask(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.tiedup.remake.state;
|
||||
|
||||
import com.tiedup.remake.core.ModSounds;
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.entities.LeashProxyEntity;
|
||||
import com.tiedup.remake.items.base.ILockable;
|
||||
import com.tiedup.remake.v2.bondage.CollarHelper;
|
||||
import com.tiedup.remake.network.sync.SyncManager;
|
||||
import com.tiedup.remake.state.components.PlayerCaptivity;
|
||||
import com.tiedup.remake.state.components.PlayerClothesPermission;
|
||||
@@ -19,16 +17,10 @@ import com.tiedup.remake.state.components.PlayerStateQuery;
|
||||
import com.tiedup.remake.state.components.PlayerStruggle;
|
||||
import com.tiedup.remake.state.components.PlayerTaskManagement;
|
||||
import com.tiedup.remake.state.hosts.IPlayerBindStateHost;
|
||||
import com.tiedup.remake.state.struggle.StruggleBinds;
|
||||
import com.tiedup.remake.tasks.PlayerStateTask;
|
||||
import com.tiedup.remake.tasks.TimedInteractTask;
|
||||
import com.tiedup.remake.tasks.TyingTask;
|
||||
import com.tiedup.remake.tasks.UntyingTask;
|
||||
import com.tiedup.remake.util.RestraintEffectUtils;
|
||||
import com.tiedup.remake.util.teleport.Position;
|
||||
import com.tiedup.remake.v2.BodyRegionV2;
|
||||
import com.tiedup.remake.v2.bondage.capability.V2EquipmentHelper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -156,6 +148,16 @@ public class PlayerBindState implements IRestrainable, IPlayerBindStateHost {
|
||||
return movement;
|
||||
}
|
||||
|
||||
/** Access task management component (tying, untying, feeding tasks). */
|
||||
public PlayerTaskManagement tasks() {
|
||||
return taskManagement;
|
||||
}
|
||||
|
||||
/** Access struggle component (struggle, tighten, cooldowns). */
|
||||
public PlayerStruggle getStruggle() {
|
||||
return struggle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets all movement style state to defaults.
|
||||
* Called on death, logout, and dimension change to ensure clean re-activation.
|
||||
@@ -385,112 +387,15 @@ public class PlayerBindState implements IRestrainable, IPlayerBindStateHost {
|
||||
// Note: getCaptor(), getCaptorManager(), setStruggling(), setStrugglingClient(),
|
||||
// isStruggling(), getStruggleStartTick() are implemented elsewhere in the class
|
||||
|
||||
// ========== Tying/Untying Task Methods ==========
|
||||
// Delegated to PlayerTaskManagement component
|
||||
|
||||
public TyingTask getCurrentTyingTask() {
|
||||
return taskManagement.getCurrentTyingTask();
|
||||
}
|
||||
|
||||
public void setCurrentTyingTask(TyingTask task) {
|
||||
taskManagement.setCurrentTyingTask(task);
|
||||
}
|
||||
|
||||
public UntyingTask getCurrentUntyingTask() {
|
||||
return taskManagement.getCurrentUntyingTask();
|
||||
}
|
||||
|
||||
public void setCurrentUntyingTask(UntyingTask task) {
|
||||
taskManagement.setCurrentUntyingTask(task);
|
||||
}
|
||||
|
||||
public PlayerStateTask getClientTyingTask() {
|
||||
return taskManagement.getClientTyingTask();
|
||||
}
|
||||
|
||||
public void setClientTyingTask(PlayerStateTask task) {
|
||||
taskManagement.setClientTyingTask(task);
|
||||
}
|
||||
|
||||
public PlayerStateTask getClientUntyingTask() {
|
||||
return taskManagement.getClientUntyingTask();
|
||||
}
|
||||
|
||||
public void setClientUntyingTask(PlayerStateTask task) {
|
||||
taskManagement.setClientUntyingTask(task);
|
||||
}
|
||||
|
||||
public TimedInteractTask getCurrentFeedingTask() {
|
||||
return taskManagement.getCurrentFeedingTask();
|
||||
}
|
||||
|
||||
public void setCurrentFeedingTask(TimedInteractTask task) {
|
||||
taskManagement.setCurrentFeedingTask(task);
|
||||
}
|
||||
|
||||
public PlayerStateTask getClientFeedingTask() {
|
||||
return taskManagement.getClientFeedingTask();
|
||||
}
|
||||
|
||||
public void setClientFeedingTask(PlayerStateTask task) {
|
||||
taskManagement.setClientFeedingTask(task);
|
||||
}
|
||||
|
||||
public PlayerStateTask getRestrainedState() {
|
||||
return taskManagement.getRestrainedState();
|
||||
}
|
||||
|
||||
public void setRestrainedState(PlayerStateTask state) {
|
||||
taskManagement.setRestrainedState(state);
|
||||
}
|
||||
|
||||
// ========== Struggle & Resistance Methods ==========
|
||||
// Delegated to PlayerStruggle component
|
||||
|
||||
/**
|
||||
* Entry point for the Struggle logic (Key R).
|
||||
* Distributes effort between Binds and Collar.
|
||||
*/
|
||||
public void struggle() {
|
||||
struggle.struggle();
|
||||
}
|
||||
// Non-delegation methods only — delegation removed, use getStruggle() accessor.
|
||||
// tighten(Player) is interface-mandated by ICoercible — cannot be removed.
|
||||
|
||||
/** Restores resistance to base values when a master tightens the ties. */
|
||||
public void tighten(Player tightener) {
|
||||
struggle.tighten(tightener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the StruggleBinds instance for external access (mini-game system).
|
||||
*/
|
||||
public StruggleBinds getStruggleBinds() {
|
||||
return struggle.getStruggleBinds();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a cooldown on struggle attempts (used after mini-game exhaustion).
|
||||
* @param seconds Cooldown duration in seconds
|
||||
*/
|
||||
public void setStruggleCooldown(int seconds) {
|
||||
struggle.setStruggleCooldown(seconds);
|
||||
}
|
||||
|
||||
/**
|
||||
* v2.5: Check if struggle cooldown is active.
|
||||
* @return true if cooldown is active (cannot struggle yet)
|
||||
*/
|
||||
public boolean isStruggleCooldownActive() {
|
||||
return struggle.isStruggleCooldownActive();
|
||||
}
|
||||
|
||||
/**
|
||||
* v2.5: Get remaining struggle cooldown in seconds.
|
||||
* @return Remaining seconds, or 0 if no cooldown
|
||||
*/
|
||||
public int getStruggleCooldownRemaining() {
|
||||
return struggle.getStruggleCooldownRemaining();
|
||||
}
|
||||
|
||||
// ========== v2.5: Knife Cut Target Methods ==========
|
||||
// Delegated to PlayerSpecialActions component
|
||||
|
||||
@@ -560,16 +465,6 @@ public class PlayerBindState implements IRestrainable, IPlayerBindStateHost {
|
||||
this.struggleState = new StruggleSnapshot(struggling, current.startTick());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if struggle animation should stop (duration expired).
|
||||
* Delegated to PlayerStruggle component.
|
||||
* @param currentTick Current game time tick
|
||||
* @return True if animation has been playing for >= 80 ticks
|
||||
*/
|
||||
public boolean shouldStopStruggling(long currentTick) {
|
||||
return struggle.shouldStopStruggling(currentTick);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delegated to PlayerEquipment component
|
||||
*/
|
||||
|
||||
@@ -297,7 +297,7 @@ public class TyingPlayerTask extends TyingTask {
|
||||
serverPlayer
|
||||
);
|
||||
if (playerState != null) {
|
||||
playerState.setRestrainedState(null);
|
||||
playerState.tasks().setRestrainedState(null);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -314,7 +314,7 @@ public class TyingPlayerTask extends TyingTask {
|
||||
serverTarget
|
||||
);
|
||||
if (playerState != null) {
|
||||
playerState.setRestrainedState(null);
|
||||
playerState.tasks().setRestrainedState(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ public class UntyingPlayerTask extends UntyingTask {
|
||||
serverTarget
|
||||
);
|
||||
if (playerState != null) {
|
||||
playerState.setRestrainedState(null);
|
||||
playerState.tasks().setRestrainedState(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,14 +97,14 @@ public final class TyingInteractionHelper {
|
||||
player
|
||||
);
|
||||
|
||||
TyingTask currentTask = playerState.getCurrentTyingTask();
|
||||
TyingTask currentTask = playerState.tasks().getCurrentTyingTask();
|
||||
if (currentTask == null
|
||||
|| !(currentTask instanceof V2TyingPlayerTask)
|
||||
|| !currentTask.isSameTarget(target)
|
||||
|| currentTask.isOutdated()
|
||||
|| !ItemStack.matches(currentTask.getBind(), stack)) {
|
||||
// Start new task (also handles case where existing task is V1 TyingPlayerTask)
|
||||
playerState.setCurrentTyingTask(newTask);
|
||||
playerState.tasks().setCurrentTyingTask(newTask);
|
||||
newTask.start();
|
||||
} else {
|
||||
newTask = (V2TyingPlayerTask) currentTask;
|
||||
@@ -114,7 +114,7 @@ public final class TyingInteractionHelper {
|
||||
|
||||
if (newTask.isStopped()) {
|
||||
// Item already consumed by V2TyingPlayerTask.onComplete() — don't shrink again
|
||||
playerState.setCurrentTyingTask(null);
|
||||
playerState.tasks().setCurrentTyingTask(null);
|
||||
TiedUpMod.LOGGER.info("[TyingInteraction] {} tied {}", player.getName().getString(), target.getName().getString());
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ public class V2BondageEquipment implements IV2BondageEquipment {
|
||||
savedPolePosition = BlockPos.of(tag.getLong("pole_position"));
|
||||
savedPoleDimension = ResourceKey.create(
|
||||
Registries.DIMENSION,
|
||||
new ResourceLocation(tag.getString("pole_dimension"))
|
||||
ResourceLocation.parse(tag.getString("pole_dimension"))
|
||||
);
|
||||
} catch (net.minecraft.ResourceLocationException e) {
|
||||
com.tiedup.remake.core.TiedUpMod.LOGGER.warn(
|
||||
|
||||
@@ -329,7 +329,7 @@ public final class DataDrivenItemParser {
|
||||
if (idPath.endsWith(".json")) {
|
||||
idPath = idPath.substring(0, idPath.length() - 5);
|
||||
}
|
||||
ResourceLocation id = new ResourceLocation(
|
||||
ResourceLocation id = ResourceLocation.fromNamespaceAndPath(
|
||||
fileId.getNamespace(),
|
||||
idPath
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ public class V2Handcuffs extends AbstractV2BondageItem {
|
||||
private static final Set<BodyRegionV2> REGIONS =
|
||||
Collections.unmodifiableSet(EnumSet.of(BodyRegionV2.ARMS));
|
||||
|
||||
private static final ResourceLocation MODEL = new ResourceLocation(
|
||||
private static final ResourceLocation MODEL = ResourceLocation.fromNamespaceAndPath(
|
||||
TiedUpMod.MOD_ID,
|
||||
"models/gltf/v2/handcuffs/cuffs_prototype.glb"
|
||||
);
|
||||
|
||||
@@ -184,7 +184,7 @@ public class DataDrivenIconOverrides extends ItemOverrides {
|
||||
if (path.startsWith("item/")) {
|
||||
String itemPath = path.substring("item/".length());
|
||||
ModelResourceLocation mrl = new ModelResourceLocation(
|
||||
new ResourceLocation(iconRL.getNamespace(), itemPath),
|
||||
ResourceLocation.fromNamespaceAndPath(iconRL.getNamespace(), itemPath),
|
||||
"inventory"
|
||||
);
|
||||
model = mc.getModelManager().getModel(mrl);
|
||||
|
||||
@@ -126,7 +126,7 @@ public class V2ClientSetup {
|
||||
DataDrivenIconOverrides.Mode mode
|
||||
) {
|
||||
ModelResourceLocation itemModelLoc = new ModelResourceLocation(
|
||||
new ResourceLocation(TiedUpMod.MOD_ID, itemName),
|
||||
ResourceLocation.fromNamespaceAndPath(TiedUpMod.MOD_ID, itemName),
|
||||
"inventory"
|
||||
);
|
||||
|
||||
|
||||
@@ -521,16 +521,16 @@ public class HangingCagePiece extends StructurePiece {
|
||||
|
||||
// Fallback item IDs for worldgen when DataDrivenItemRegistry is empty (race with reload)
|
||||
private static final ResourceLocation[] FALLBACK_BINDS = {
|
||||
new ResourceLocation("tiedup", "ropes"),
|
||||
new ResourceLocation("tiedup", "chain"),
|
||||
new ResourceLocation("tiedup", "armbinder")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"),
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "chain"),
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "armbinder")
|
||||
};
|
||||
private static final ResourceLocation[] FALLBACK_GAGS = {
|
||||
new ResourceLocation("tiedup", "cloth_gag"),
|
||||
new ResourceLocation("tiedup", "ball_gag")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"),
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "ball_gag")
|
||||
};
|
||||
private static final ResourceLocation[] FALLBACK_BLINDFOLDS = {
|
||||
new ResourceLocation("tiedup", "classic_blindfold")
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold")
|
||||
};
|
||||
|
||||
private static ItemStack randomItemForRegion(RandomSource random, BodyRegionV2 region, ResourceLocation[] fallbacks) {
|
||||
|
||||
@@ -125,7 +125,7 @@ public final class RoomThemeRegistry {
|
||||
Map.of("default", List.of(new BlockPalette.WeightedEntry(stone, 1.0f)))
|
||||
);
|
||||
return new RoomThemeDefinition(
|
||||
new ResourceLocation("tiedup", "fallback"),
|
||||
ResourceLocation.fromNamespaceAndPath("tiedup", "fallback"),
|
||||
1,
|
||||
single, // wall
|
||||
single, // floor
|
||||
|
||||
@@ -65,7 +65,7 @@ public class RoomThemeReloadListener
|
||||
if (cleanPath.endsWith(".json")) {
|
||||
cleanPath = cleanPath.substring(0, cleanPath.length() - 5);
|
||||
}
|
||||
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
|
||||
ResourceLocation cleanId = ResourceLocation.fromNamespaceAndPath(fileId.getNamespace(), cleanPath);
|
||||
|
||||
try (InputStream input = resource.open()) {
|
||||
RoomThemeDefinition def = RoomThemeParser.parse(input, cleanId);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"weight": 10,
|
||||
"weight": 7,
|
||||
"wall_palette": {
|
||||
"default": [
|
||||
{ "block": "minecraft:ice", "weight": 0.10 },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"weight": 10,
|
||||
"weight": 7,
|
||||
"wall_palette": {
|
||||
"default": [
|
||||
{ "block": "minecraft:cracked_nether_bricks", "weight": 0.20 },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"weight": 10,
|
||||
"weight": 4,
|
||||
"wall_palette": {
|
||||
"default": [
|
||||
{ "block": "minecraft:cracked_deepslate_bricks", "weight": 0.10 },
|
||||
|
||||
Reference in New Issue
Block a user