add first patch
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
console.info("[SOCIETY] addCommandAttributesOnRespawn.js loaded");
|
||||
|
||||
CommonAddedEvents.playerRespawn((e) => global.addAttributesFromStages(e.player, e.server));
|
||||
@@ -0,0 +1,34 @@
|
||||
console.info("[SOCIETY] addBonemeal.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(["meadow:eriophorum_tall", "meadow:small_fir"], (e) => {
|
||||
const { player, item, server, block } = e;
|
||||
if (
|
||||
player.getHeldItem("main_hand") == "minecraft:bone_meal" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
block.canSeeSky;
|
||||
player.getHeldItem("main_hand").count--;
|
||||
let crop = block.level.createEntity("minecraft:item");
|
||||
crop.x = block.x + Math.floor(Math.random() * 1.5) + 0.5;
|
||||
crop.y = block.y + 0.5;
|
||||
crop.z = block.z + Math.floor(Math.random() * 1.5) + 0.5;
|
||||
crop.item = Item.of(block.id);
|
||||
crop.spawn();
|
||||
block.level.spawnParticles(
|
||||
"minecraft:happy_villager",
|
||||
true,
|
||||
block.x + 0.5,
|
||||
block.y + 0.1,
|
||||
block.z + 0.5,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
10,
|
||||
0.1
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.bone_meal.use block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,62 @@
|
||||
console.info("[SOCIETY] addExtractinatingRecipes.js loaded");
|
||||
|
||||
const validExtractinatorItems = [
|
||||
"society:relic_trove",
|
||||
"society:artifact_trove",
|
||||
"society:geode",
|
||||
"society:frozen_geode",
|
||||
"society:magma_geode",
|
||||
"society:omni_geode",
|
||||
];
|
||||
const processGeodeLootTable = (lootTable, block, server, doubled) => {
|
||||
let drops;
|
||||
let drop;
|
||||
("");
|
||||
lootTable.forEach((entry) => {
|
||||
if (Math.random() < entry.drop_chance) {
|
||||
drops = Ingredient.of(entry.drop).itemIds;
|
||||
drop = drops[Math.floor(Math.random() * drops.length)];
|
||||
block.popItemFromFace(Item.of(`1x ${drop}`), "up");
|
||||
if (doubled) {
|
||||
block.popItemFromFace(Item.of(`1x ${drop}`), "up");
|
||||
}
|
||||
}
|
||||
});
|
||||
server.runCommandSilent(
|
||||
`playsound twigs:block.schist_bricks.break block @a ${block.x} ${block.y} ${block.z} 0.3`
|
||||
);
|
||||
};
|
||||
|
||||
BlockEvents.rightClicked("extractinator:extractinator", (e) => {
|
||||
const { block, player, hand, item, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
const heldItem = item.getId();
|
||||
if (!validExtractinatorItems.includes(heldItem)) return;
|
||||
global.extractinatorRecipes.forEach((recipe) => {
|
||||
if (heldItem == recipe.input) {
|
||||
if (player.isCrouching()) {
|
||||
for (let i = 0; i < item.count; i++) {
|
||||
server.scheduleInTicks(i * 4, () => {
|
||||
processGeodeLootTable(
|
||||
recipe.output,
|
||||
block,
|
||||
server,
|
||||
player.stages.has("the_red_and_the_black")
|
||||
);
|
||||
});
|
||||
}
|
||||
global.addItemCooldown(player, item.id, item.count);
|
||||
if (!player.isCreative()) item.count = 0;
|
||||
} else {
|
||||
processGeodeLootTable(
|
||||
recipe.output,
|
||||
block,
|
||||
server,
|
||||
player.stages.has("the_red_and_the_black")
|
||||
);
|
||||
if (!player.isCreative()) item.count--;
|
||||
global.addItemCooldown(player, item.id, 4);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
console.info("[SOCIETY] bankerBroken.js loaded");
|
||||
|
||||
BlockEvents.broken("numismatics:blaze_banker", (e) => {
|
||||
e.player.tell(Text.translatable("society.blaze_banker.break").red());
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("numismatics:blaze_banker", (e) => {
|
||||
const { item, block, level, player } = e;
|
||||
|
||||
if (item.hasTag("minecraft:pickaxes")) {
|
||||
if (
|
||||
block.getEntityData().TrustListInv
|
||||
&& block.getEntityData().TrustListInv.Items.length > 0
|
||||
) {
|
||||
player.tell(
|
||||
Text.translatable("society.blaze_banker.break.not_empty").red()
|
||||
);
|
||||
} else level.destroyBlock(block.pos, true);
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("create_central_kitchen:blaze_stove", (e) => {
|
||||
if (e.item.id === "create_central_kitchen:cooking_guide") e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
console.info("[SOCIETY] berryBushBroken.js loaded");
|
||||
|
||||
BlockEvents.leftClicked("society:berry_bush", (e) => {
|
||||
global.updateBerryBush(e.level, e.block);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
console.info("[SOCIETY] blueprintsBlock.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("furniture:blueprints", (e) => {
|
||||
const { player, server, block } = e;
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.book.page_turn block @a ${block.x} ${block.y} ${block.z}`
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`dialog ${player.username} show ${player.username} blueprints_choice_dialog_prompt`
|
||||
);
|
||||
e.cancel()
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
console.info("[SOCIETY] brainDamageBroken.js loaded");
|
||||
|
||||
BlockEvents.broken(
|
||||
["oreganized:lead_ore", "oreganized:deepslate_lead_ore", "oreganized:raw_lead_block"],
|
||||
(e) => {
|
||||
const { level, server, block, player } = e;
|
||||
if (player.stages.has("intro_to_algorithms"))
|
||||
server.scheduleInTicks(2, () => {
|
||||
const entities = level
|
||||
.getEntitiesWithin(AABB.ofBlock(block).inflate(2))
|
||||
.filter((f) => f.type == "minecraft:area_effect_cloud");
|
||||
entities.forEach((entity) => {
|
||||
entity.setRemoved("unloaded_to_chunk");
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
console.info("[SOCIETY] cancelTrophy.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("trofers:large_pillar", (e) => {
|
||||
if (e.player.isFake()) e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
// BlockEvents.rightClicked((e) => {
|
||||
// const { item, block, hand, server, player, level } = e;
|
||||
// if (player.getHeldItem("main_hand") == "whimsy_deco:paw_carpet" && hand != "OFF_HAND") {
|
||||
// let carpet = level.createEntity("whimsy_deco:paw_carpet_entity");
|
||||
// carpet.setPos(block.getX(), block.getY() + 1, block.getZ());
|
||||
|
||||
// let newNbt = carpet.getNbt();
|
||||
// newNbt.Rotation = [
|
||||
// NBT.f(global.rotationFromFacing(player.getHorizontalFacing())),
|
||||
// NBT.f(0),
|
||||
// ];
|
||||
// newNbt.CanUpdate = 0;
|
||||
// newNbt.NoGravity = 0;
|
||||
// carpet.setNbt(newNbt);
|
||||
// carpet.spawn();
|
||||
// server.runCommandSilent(
|
||||
// `playsound minecraft:block.wool.place block @a ${block.x} ${block.y} ${block.z}`
|
||||
// );
|
||||
// if (!player.isCreative()) item.shrink(1);
|
||||
// }
|
||||
// });
|
||||
@@ -0,0 +1,225 @@
|
||||
console.info("[SOCIETY] checkArtisanMachines.js loaded");
|
||||
|
||||
const idMap = new Map([
|
||||
["vinery:savanna_grape_seeds_red", "Red Savanna Grape Seeds"],
|
||||
["vinery:savanna_grape_seeds_white", "White Savanna Grape Seeds"],
|
||||
["vinery:taiga_grape_seeds_red", "Red Taiga Grape Seeds"],
|
||||
["vinery:taiga_grape_seeds_white", "White Taiga Grape Seeds"],
|
||||
["vinery:jungle_grape_seeds_red", "Red Jungle Grape Seeds"],
|
||||
["vinery:jungle_grape_seeds_white", "White Jungle Grape Seeds"],
|
||||
["minecraft:quartz", "Nether Quartz"],
|
||||
["society:canvas", "Artisan Canvas"],
|
||||
["vintagedelight:pepper_jam_mason_jar", "Pepper Preserves Jar"],
|
||||
["vintagedelight:gearo_berry_mason_jar", "Gearo Berries Preserves Jar"],
|
||||
["vintagedelight:sweet_berry_mason_jar", "Sweet Berries Preserves Jar"],
|
||||
["vintagedelight:glow_berry_mason_jar", "Glow Berries Preserves Jar"],
|
||||
["society:aged_glowing_wine", "Aged Sun-kissed Wine"],
|
||||
["society:aged_bottle_mojang_noir", "Aged Bottle of 'Mojang Noir'"],
|
||||
["society:aged_villagers_fright", "Aged Bottle of 'Villagers Fright'"],
|
||||
["society:aged_creepers_crush", "Aged Bottle of 'Creepers Crush'"],
|
||||
["society:aged_netherite_nectar", "Aged Iridium Nectar"],
|
||||
["society:aged_lilitu_wine", "Aged Miss Lilitus Wine"],
|
||||
["society:aged_whiskey_jamesons_malt", "Aged Jameson Malt Whisky"],
|
||||
["society:aged_whiskey_ak", "Aged AK Reserve"],
|
||||
["society:aged_whiskey_highland_hearth", "Aged Highland Hearth Signature"],
|
||||
["society:aged_whiskey_carrasconlabel", "Aged Carrasconlabel Heritage"],
|
||||
["society:aged_whiskey_cristelwalker", "Aged CristelWalker Original"],
|
||||
["society:aged_whiskey_lilitusinglemalt", "Aged Lilitu Single Malt"],
|
||||
["society:aged_whiskey_jojannik", "Aged JoJannik Select"],
|
||||
["society:aged_whiskey_maggoallan", "Double-Aged MaggoAllan"],
|
||||
["society:aged_whiskey_smokey_reverie", "Double-Aged Smokey Reverie"],
|
||||
["society:aged_buffalo_cheese_block", "Aged Buffalo Cheese Wheel"],
|
||||
["society:aged_amethyst_cheese_block", "Aged Amethyst Cheese Wheel"],
|
||||
["society:aged_grain_cheese_block", "Aged Grain Cheese Wheel"],
|
||||
["society:aged_sheep_cheese_block", "Aged Sheep Cheese Wheel"],
|
||||
["society:aged_warped_cheese_block", "Aged Warped Cheese Wheel"],
|
||||
["society:aged_goat_cheese_block", "Aged Goat Cheese Wheel"],
|
||||
["society:aged_cheese_block", "Aged Cheese Wheel"],
|
||||
["society:aged_beer_nettle", "Aged Nettle Beer"],
|
||||
["society:aged_beer_barley", "Aged Barley Beer"],
|
||||
["society:aged_beer_hops", "Aged Hops Beer"],
|
||||
["society:aged_beer_london", "Aged London Beer"],
|
||||
["society:aged_beer_attunecore", "Aged Attunecore Beer"],
|
||||
["society:aged_beer_haley", "Aged Haley Beer"],
|
||||
["society:aged_beer_oat", "Aged Oat Beer"],
|
||||
["society:aged_beer_wheat", "Aged Wheat Beer"],
|
||||
["society:double_aged_glowing_wine", "Double-Aged Sun-kissed Wine"],
|
||||
["society:double_aged_bottle_mojang_noir", "Double-Aged Bottle of 'Mojang Noir'"],
|
||||
["society:double_aged_villagers_fright", "Double-Aged Bottle of 'Villagers Fright'"],
|
||||
["society:double_aged_creepers_crush", "Double-Aged Bottle of 'Creepers Crush'"],
|
||||
["society:double_aged_netherite_nectar", "Double-Aged Iridium Nectar"],
|
||||
["society:double_aged_good_catawba", "Double-Aged Good Catawba"],
|
||||
["society:double_aged_lilitu_wine", "Double-Aged Miss Lilitus Wine"],
|
||||
["society:double_aged_whiskey_jamesons_malt", "Double-Aged Jameson Malt Whisky"],
|
||||
["society:double_aged_whiskey_ak", "Double-Aged AK Reserve"],
|
||||
["society:double_aged_whiskey_highland_hearth", "Double-Aged Highland Hearth Signature"],
|
||||
["society:double_aged_whiskey_carrasconlabel", "Double-Aged Carrasconlabel Heritage"],
|
||||
["society:double_aged_whiskey_cristelwalker", "Double-Aged CristelWalker Original"],
|
||||
["society:double_aged_whiskey_lilitusinglemalt", "Double-Aged Lilitu Single Malt"],
|
||||
["society:double_aged_whiskey_jojannik", "Double-Aged JoJannik Select"],
|
||||
["society:double_aged_whiskey_maggoallan", "Triple-Aged MaggoAllan"],
|
||||
["society:double_aged_whiskey_smokey_reverie", "Triple-Aged Smokey Reverie"],
|
||||
["society:double_aged_buffalo_cheese_block", "Double-Aged Buffalo Cheese Wheel"],
|
||||
["society:double_aged_amethyst_cheese_block", "Double-Aged Amethyst Cheese Wheel"],
|
||||
["society:double_aged_grain_cheese_block", "Double-Aged Grain Cheese Wheel"],
|
||||
["society:double_aged_sheep_cheese_block", "Double-Aged Sheep Cheese Wheel"],
|
||||
["society:double_aged_warped_cheese_block", "Double-Aged Warped Cheese Wheel"],
|
||||
["society:double_aged_goat_cheese_block", "Double-Aged Goat Cheese Wheel"],
|
||||
["society:double_aged_cheese_block", "Double-Aged Cheese Wheel"],
|
||||
["society:double_aged_beer_nettle", "Double-Aged Nettle Beer"],
|
||||
["society:double_aged_beer_barley", "Double-Aged Barley Beer"],
|
||||
["society:double_aged_beer_hops", "Double-Aged Hops Beer"],
|
||||
["society:double_aged_beer_london", "Double-Aged London Beer"],
|
||||
["society:double_aged_beer_haley", "Double-Aged Haley Beer"],
|
||||
["society:double_aged_beer_oat", "Double-Aged Oat Beer"],
|
||||
["society:double_aged_beer_wheat", "Double-Aged Wheat Beer"],
|
||||
]);
|
||||
|
||||
const sendProgressMessage = (clickEvent, recipes, nbt, stageCount, machineId, maxInput) => {
|
||||
const { player, block, item, server } = clickEvent;
|
||||
const blockStage = nbt.data.stage;
|
||||
const status = maxInput !== -1
|
||||
? Text.translatable("society.working_block_entity.more_input")
|
||||
: Text.translatable("society.working_block_entity.making");
|
||||
let primaryOutput;
|
||||
let recipe = nbt.data.recipe;
|
||||
let id;
|
||||
let duration;
|
||||
const isChargingRod = machineId.equals("society:charging_rod");
|
||||
if (!recipe && !isChargingRod) return;
|
||||
if (isChargingRod) {
|
||||
id = "society:battery";
|
||||
duration = stageCount;
|
||||
} else {
|
||||
id = String(Item.of(recipes.get(recipe).output[0]).id);
|
||||
primaryOutput = idMap.get(id);
|
||||
duration = recipes.get(recipe).time || stageCount;
|
||||
if (recipe === item) return;
|
||||
}
|
||||
if (
|
||||
machineId == "society:aging_cask" &&
|
||||
block.properties.get("upgraded").toLowerCase() === "true"
|
||||
) {
|
||||
duration = duration / 2;
|
||||
}
|
||||
const pipCount = maxInput !== -1 ? maxInput : Math.round(duration);
|
||||
if (!primaryOutput)
|
||||
primaryOutput = id.path.replace(/^_*(.)|_+(.)/g, (s, c, d) =>
|
||||
c ? c.toUpperCase() : " " + d.toUpperCase()
|
||||
);
|
||||
let outputString = "";
|
||||
for (let index = 0; index < pipCount; index++) {
|
||||
if (index < blockStage) outputString += "⬛";
|
||||
else outputString += "⬜";
|
||||
}
|
||||
let translatedPrimaryOutput = global.getTranslatedItemName(id, primaryOutput).noColor();
|
||||
|
||||
const upgrade = block.properties.get("upgraded").toLowerCase() == "true" ? `🡅` : "";
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
artisanMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: `${status.toJson()}`,
|
||||
color: "#AAAAAA",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
artisanMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: `${status.toJson()}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
artisanItemMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -78,
|
||||
text: `${translatedPrimaryOutput.toJson()}`,
|
||||
color: "#FFAA00",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
artisanItemMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -77,
|
||||
text: `${translatedPrimaryOutput.toJson()}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
artisanProgress: {
|
||||
type: "text",
|
||||
x: 1.5,
|
||||
y: -66,
|
||||
text: `§a${upgrade}§6 ${outputString} §a${upgrade}§r`,
|
||||
color: "#FFAA00",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
artisanProgressShadow: {
|
||||
type: "text",
|
||||
x: 1.5,
|
||||
z: -1,
|
||||
y: -66,
|
||||
text: `§a${upgrade}§0 ${"⬛".repeat(pipCount)} §a${upgrade}§r`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
};
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"society:bait_maker",
|
||||
"society:aging_cask",
|
||||
"society:ancient_cask",
|
||||
"society:charging_rod",
|
||||
"society:crystalarium",
|
||||
"society:wine_keg",
|
||||
"society:deluxe_worm_farm",
|
||||
"society:dehydrator",
|
||||
"society:espresso_machine",
|
||||
"society:fish_smoker",
|
||||
"society:loom",
|
||||
"society:mayonnaise_machine",
|
||||
"society:preserves_jar",
|
||||
"society:seed_maker",
|
||||
"society:tapper",
|
||||
"society:recycling_machine",
|
||||
"society:cheese_press",
|
||||
"society:oil_maker",
|
||||
"society:mushroom_log",
|
||||
],
|
||||
(e) => {
|
||||
const { block, hand, item } = e;
|
||||
if (hand == "OFF_HAND" || item !== "minecraft:air") return;
|
||||
const machine = global.artisanMachineDefinitions.filter((obj) => {
|
||||
return obj.id === block.id;
|
||||
})[0];
|
||||
if (block.properties.get("mature").toLowerCase() === "false") {
|
||||
let nbt = block.getEntityData();
|
||||
if (nbt.data.type == 0) return;
|
||||
sendProgressMessage(
|
||||
e,
|
||||
machine.recipes,
|
||||
nbt,
|
||||
machine.stageCount,
|
||||
machine.id,
|
||||
block.properties.get("working").toLowerCase() === "false" ? machine.maxInput : -1
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,83 @@
|
||||
console.info("[SOCIETY] checkAttributes.js loaded");
|
||||
|
||||
const shippingBinThrottle = ((temp) => (entity, tick, identifier) => {
|
||||
const { age, uuid } = entity;
|
||||
const key = `${uuid}${identifier}`;
|
||||
const now = temp[key];
|
||||
if (!now || age - now >= tick) {
|
||||
temp[key] = age;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})({});
|
||||
|
||||
BlockEvents.leftClicked(
|
||||
["shippingbin:shipping_bin", "shippingbin:basic_shipping_bin", "shippingbin:smart_shipping_bin"],
|
||||
(e) => {
|
||||
const { player, block, level } = e;
|
||||
let binPlayer;
|
||||
let playerAttributes;
|
||||
if (shippingBinThrottle(player, 30, "shipping-bin-throttle")) return;
|
||||
level.getServer().players.forEach((p) => {
|
||||
if (p.getUuid().toString() === block.getEntityData().data.owner) {
|
||||
playerAttributes = p.nbt.Attributes;
|
||||
binPlayer = p;
|
||||
}
|
||||
});
|
||||
if (playerAttributes) {
|
||||
let crop = playerAttributes.filter((obj) => {
|
||||
return obj.Name === "shippingbin:crop_sell_multiplier";
|
||||
});
|
||||
let gem = playerAttributes.filter((obj) => {
|
||||
return obj.Name === "shippingbin:gem_sell_multiplier";
|
||||
});
|
||||
let artisan = playerAttributes.filter((obj) => {
|
||||
return obj.Name === "shippingbin:wood_sell_multiplier";
|
||||
});
|
||||
let adventurer = playerAttributes.filter((obj) => {
|
||||
return obj.Name === "shippingbin:meat_sell_multiplier";
|
||||
});
|
||||
if (binPlayer) {
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"society.shipping_bin.owner",
|
||||
Text.of(`${binPlayer.username}`).gold()
|
||||
)
|
||||
);
|
||||
player.tell(Text.translatable("society.shipping_bin.sell_multipliers").gray());
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"society.shipping_bin.multiplier",
|
||||
Text.translatable("tooltip.society.farmer_product"),
|
||||
Text.green(`${crop[0] ? crop[0].Base : 1}`)
|
||||
)
|
||||
);
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"society.shipping_bin.multiplier",
|
||||
Text.translatable("tooltip.society.artisan_product"),
|
||||
Text.green(`${artisan[0] ? artisan[0].Base : 1}`)
|
||||
)
|
||||
);
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"society.shipping_bin.multiplier",
|
||||
Text.translatable("tooltip.society.geologist_product"),
|
||||
Text.green(`${gem[0] ? gem[0].Base : 1}`)
|
||||
)
|
||||
);
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"society.shipping_bin.multiplier",
|
||||
Text.translatable("tooltip.society.adventurer_product"),
|
||||
Text.green(`${adventurer[0] ? adventurer[0].Base : 1}`)
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
player.tell(
|
||||
Text.translatable("society.shipping_bin.offline").gray()
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,62 @@
|
||||
console.info("[SOCIETY] checkArtisanMachines.js loaded");
|
||||
|
||||
const maxManaMap = new Map([
|
||||
['society:mana_clock', 260000],
|
||||
['society:mana_sprinkler', 10000],
|
||||
['society:sparkstone_recycler', 250000],
|
||||
['society:mana_fruit_crop', 10000],
|
||||
['society:mana_milker', 4000]
|
||||
]);
|
||||
|
||||
const sendManaMessage = (clickEvent, nbt, machineId) => {
|
||||
const { player, block, server } = clickEvent;
|
||||
|
||||
const maxMana = maxManaMap.get(`${machineId}`);
|
||||
if (!maxMana) return;
|
||||
|
||||
const currentMana = nbt?.ForgeData?.mana || 0;
|
||||
const pipCount = 10;
|
||||
const filledPips = Math.min(pipCount, Math.floor((currentMana / maxMana) * pipCount));
|
||||
|
||||
let outputString = "";
|
||||
for (let index = 0; index < pipCount; index++) {
|
||||
if (index < filledPips) outputString += "⬛";
|
||||
else outputString += "⬜";
|
||||
}
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
botaniaMana: {
|
||||
type: "text",
|
||||
x: 1.5,
|
||||
y: -66,
|
||||
text: `${outputString}`,
|
||||
color: "#55FFFF",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
botaniaManaShadow: {
|
||||
type: "text",
|
||||
x: 1.5,
|
||||
z: -1,
|
||||
y: -66,
|
||||
text: `${"⬛".repeat(pipCount)}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
};
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
['society:mana_clock', 'society:mana_sprinkler', 'society:sparkstone_recycler', 'society:mana_fruit_crop', 'society:mana_milker'],
|
||||
(e) => {
|
||||
const { block, hand, item } = e;
|
||||
if (hand !== "MAIN_HAND" || item.id !== "botania:twig_wand") return;
|
||||
const nbt = block.getEntityData();
|
||||
sendManaMessage(e, nbt, block.id);
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,215 @@
|
||||
console.info("[SOCIETY] checkFishPond.js loaded");
|
||||
|
||||
const getRequestedItems = (type, population) => {
|
||||
let requestedItems = {};
|
||||
global.fishPondDefinitions.get(type).quests.forEach((quest) => {
|
||||
if (quest.population == population) {
|
||||
requestedItems = quest.requestedItems;
|
||||
}
|
||||
});
|
||||
return requestedItems;
|
||||
};
|
||||
|
||||
const sendFishPondMessage = (clickEvent, type, population, maxPopulation) => {
|
||||
const { player, block, server } = clickEvent;
|
||||
let fishName = type.path.replace(/^_*(.)|_+(.)/g, (s, c, d) =>
|
||||
c ? c.toUpperCase() : " " + d.toUpperCase()
|
||||
);
|
||||
if (fishName.includes("Raw ")) {
|
||||
if (fishName === "Raw Snowflake") fishName = "Frosty Fin";
|
||||
else fishName = fishName.substring(4, fishName.length);
|
||||
}
|
||||
let fishIcons = "";
|
||||
let translatedFishName = global.getTranslatedItemName(type, fishName);
|
||||
|
||||
for (let index = 0; index < maxPopulation; index++) {
|
||||
if (index < population) fishIcons += "§3⏳§r";
|
||||
else fishIcons += "§7⏳§r";
|
||||
}
|
||||
const upgrade =
|
||||
block.properties.get("upgraded").toLowerCase() == "true" ? `🡅` : "";
|
||||
const pondHeaderText = Text.empty()
|
||||
.gray()
|
||||
.append(Text.of(`==[ `))
|
||||
.append(Text.green(upgrade))
|
||||
.append(" ")
|
||||
.append(Text.translatable("block.society.fish_pond").darkAqua())
|
||||
.append(" ")
|
||||
.append(Text.green(upgrade))
|
||||
.append(Text.of(` ]==`));
|
||||
const pondHeaderTextShadow = Text.empty()
|
||||
.append(Text.of(`==[ `))
|
||||
.append(Text.of(upgrade))
|
||||
.append(" ")
|
||||
.append(Text.translatable("block.society.fish_pond"))
|
||||
.append(" ")
|
||||
.append(Text.of(upgrade))
|
||||
.append(Text.of(` ]==`));
|
||||
const fishNameText = Text.of(`${population}/${maxPopulation} `).append(translatedFishName);
|
||||
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
pondHeader: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -110,
|
||||
text: `${pondHeaderText.toJson()}`,
|
||||
color: "#AAAAAA",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
pondHeaderShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -109,
|
||||
text: `${pondHeaderTextShadow.toJson()}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
fishIcon: {
|
||||
type: "item",
|
||||
x: 8,
|
||||
y: -84,
|
||||
item: type,
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
fishName: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -78,
|
||||
text: `${fishNameText.toJson()}`,
|
||||
color: "#00AAAA",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
fishNameShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -77,
|
||||
text: `${fishNameText.toJson()}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
population: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -66,
|
||||
text: fishIcons,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
populationShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -65,
|
||||
text: `⏳`.repeat(maxPopulation),
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
};
|
||||
|
||||
BlockEvents.rightClicked("society:fish_pond", (e) => {
|
||||
const { item, hand, block, server, player } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!player.isCrouching()) {
|
||||
let { type, population, max_population, quest_id } =
|
||||
block.getEntityData().data;
|
||||
e.server.scheduleInTicks(1, () => {
|
||||
const properties = block.getProperties();
|
||||
const mature = properties.get("mature").toLowerCase();
|
||||
const valid = properties.get("valid").toLowerCase();
|
||||
const quest = properties.get("quest").toLowerCase();
|
||||
|
||||
if (mature == "false") {
|
||||
if (!type.equals("")) {
|
||||
sendFishPondMessage(e, type, population, max_population);
|
||||
} else if (!(item && item.hasTag("minecraft:fishes"))) {
|
||||
player.tell(
|
||||
Text.translatable("block.society.fish_pond.pond_is_empty").gray()
|
||||
);
|
||||
}
|
||||
if (!type.equals("") && item && item.hasTag("minecraft:fishes")) {
|
||||
if (type !== item.id)
|
||||
player.tell(
|
||||
Text.translatable("block.society.fish_pond.cross_type_fish").red()
|
||||
);
|
||||
}
|
||||
}
|
||||
if (mature === "false" && quest === "true") {
|
||||
let questContent = getRequestedItems(type, max_population)
|
||||
let questItem
|
||||
let checkedCount;
|
||||
if (item.id.equals('unusualfishmod:ripper_tooth')) {
|
||||
if (questContent) {
|
||||
if (questContent.length == 1) {
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"block.society.fish_pond.no_alt",
|
||||
).red()
|
||||
);
|
||||
|
||||
} else {
|
||||
let newQuest = questContent.length - 1 === Number(quest_id) ? 0 : Number(quest_id) + 1;
|
||||
questContent = questContent[newQuest];
|
||||
questItem = Item.of(questContent.item).displayName;
|
||||
checkedCount = player.stages.has("pond_house_five")
|
||||
? Math.round(questContent.count / 2)
|
||||
: questContent.count;
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"block.society.fish_pond.fish_quest_changed",
|
||||
Text.darkAqua(`${checkedCount}`)
|
||||
).green()
|
||||
);
|
||||
player.tell(questItem);
|
||||
let nbt = block.getEntityData();
|
||||
nbt.merge({
|
||||
data: {
|
||||
quest_id: Number(newQuest),
|
||||
},
|
||||
});
|
||||
global.setBlockEntityData(block, nbt)
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.player.splash block @a ${block.x} ${block.y} ${block.z}`
|
||||
);
|
||||
if (!player.isCreative()) item.shrink(1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
questContent = questContent[quest_id];
|
||||
if (questContent && questContent.item !== item.id) {
|
||||
questItem = Item.of(questContent.item).displayName;
|
||||
checkedCount = player.stages.has("pond_house_five")
|
||||
? Math.round(questContent.count / 2)
|
||||
: questContent.count;
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"block.society.fish_pond.fish_quest",
|
||||
Text.darkAqua(`${checkedCount}`)
|
||||
).green()
|
||||
);
|
||||
player.tell(questItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (valid === "false") {
|
||||
player.tell(
|
||||
Text.translatable("block.society.fish_pond.not_valid").red()
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
console.info("[SOCIETY] checkTapper.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(["society:tapper", "society:auto_tapper"], (e) => {
|
||||
const { level, block, player, server, hand } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
let errorText;
|
||||
const attachedBlock = global.getTapperLog(level, block);
|
||||
if (global.hasMultipleTappers(level, block)) {
|
||||
errorText = Text.translatable(
|
||||
"block.society.tapper.too_many_tapper"
|
||||
).toJson();
|
||||
}
|
||||
if (!attachedBlock.hasTag("society:tappable_blocks")) {
|
||||
errorText = Text.translatable(
|
||||
"block.society.tapper.invalid_block"
|
||||
).toJson();
|
||||
}
|
||||
if (errorText) {
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
tapperMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: `${errorText}`,
|
||||
color: "#FF5555",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
tapperMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: `${errorText}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
console.info("[SOCIETY] compactingDrawerExploit.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"functionalstorage:compacting_drawer",
|
||||
"functionalstorage:simple_compacting_drawer",
|
||||
"functionalstorage:compacting_framed_drawer",
|
||||
"functionalstorage:framed_simple_compacting_drawer",
|
||||
],
|
||||
(e) => {
|
||||
const { item, player } = e;
|
||||
if (item.nbt && item.nbt.quality_food) {
|
||||
player.tell(Text.translatable("society.compacting_drawer.quality_item").red());
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,104 @@
|
||||
console.info("[SOCIETY] customBlockEntityBroken.js loaded");
|
||||
|
||||
const handleBrokenMachine = (block) => {
|
||||
const machine = global.artisanMachineDefinitions.filter((obj) => {
|
||||
return obj.id === block.id;
|
||||
})[0];
|
||||
if (!machine) return;
|
||||
let working = block.properties.get("working").toLowerCase() == "true";
|
||||
if (machine.upgrade && block.properties.get("upgraded").toLowerCase() == "true") {
|
||||
block.popItem(machine.upgrade);
|
||||
}
|
||||
const nbt = block.getEntityData();
|
||||
const currentRecipe = machine.recipes.get(nbt.data.recipe);
|
||||
if (block.properties.get("mature").toLowerCase() == "true") {
|
||||
currentRecipe.output.forEach((element) => {
|
||||
block.popItem(element);
|
||||
});
|
||||
if (
|
||||
block.id == "society:ancient_cask" &&
|
||||
block.properties.get("upgraded").toLowerCase() == "true"
|
||||
) block.popItem(Item.of(`3x ${Item.of(`${currentRecipe.output[0]}`).id}`));
|
||||
} else if (!["society:charging_rod", "society:tapper", "society:mushroom_log"].includes(block.id)) {
|
||||
let stage = Number(nbt.data.stage);
|
||||
if (
|
||||
currentRecipe &&
|
||||
block.id == "society:ancient_cask" &&
|
||||
block.properties.get("upgraded").toLowerCase() == "true"
|
||||
) {
|
||||
if (working) block.popItem(Item.of(`4x ${nbt.data.recipe}`));
|
||||
else block.popItem(Item.of(`${stage}x ${nbt.data.recipe}`));
|
||||
} else if (
|
||||
block.id == "society:deluxe_worm_farm" &&
|
||||
block.properties.get("upgraded").toLowerCase() == "true"
|
||||
) {
|
||||
// Do nothing because of infinity worm upgrade
|
||||
} else if (
|
||||
currentRecipe &&
|
||||
block.id == "society:preserves_jar" &&
|
||||
block.properties.get("upgraded").toLowerCase() == "true"
|
||||
) {
|
||||
if (working) block.popItem(Item.of(`3x ${nbt.data.recipe}`));
|
||||
else block.popItem(Item.of(`${stage}x ${nbt.data.recipe}`));
|
||||
} else if (currentRecipe) {
|
||||
if (nbt.data.originalInputs && nbt.data.originalInputs.length > 0) {
|
||||
nbt.data.originalInputs.forEach((item) => {
|
||||
block.popItem(Item.of(`${item.Count}x ${item.id}`));
|
||||
});
|
||||
} else {
|
||||
if (working) block.popItem(Item.of(`${machine.maxInput}x ${nbt.data.recipe}`));
|
||||
else block.popItem(Item.of(`${stage}x ${nbt.data.recipe}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BlockEvents.broken(global.artisanMachineIds, (e) => {
|
||||
handleBrokenMachine(e.block);
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:fish_pond", (e) => {
|
||||
const { block } = e;
|
||||
const nbt = block.getEntityData();
|
||||
if (nbt.data.type !== "") {
|
||||
block.popItem(
|
||||
Item.of(
|
||||
"society:fish_pond",
|
||||
`{type:"${nbt.data.type}",population:${Number(nbt.data.population)},max_population:${Number(
|
||||
nbt.data.max_population
|
||||
)},quest:${block.properties.get("quest")},quest_id:${Number(nbt.data.quest_id)}}`
|
||||
)
|
||||
);
|
||||
} else {
|
||||
block.popItem(Item.of("society:fish_pond"));
|
||||
}
|
||||
if (block.properties.get("upgraded").toLowerCase() == "true") {
|
||||
block.popItem(Item.of("society:sea_biscut"));
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:prize_machine", (e) => {
|
||||
const nbt = e.block.getEntityData();
|
||||
e.block.popItem(Item.of("society:prize_machine", `{prize:${nbt.data.prize}}`));
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:coin_leaderboard", (e) => {
|
||||
global.clearOldTextDisplay(e.block, e.level, "leaderboard");
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:shipping_bin_monitor", (e) => {
|
||||
global.clearOldTextDisplay(e.block, e.level, "shipping_bin_monitor");
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:fish_pond_basket", (e) => {
|
||||
const { block } = e;
|
||||
if (block.properties.get("upgraded").toLowerCase() == "true") {
|
||||
block.popItem(Item.of("minecraft:bucket"));
|
||||
}
|
||||
});
|
||||
BlockEvents.broken("society:auto_grabber", (e) => {
|
||||
const { block } = e;
|
||||
if (block.properties.get("upgraded").toLowerCase() == "true") {
|
||||
block.popItem(Item.of("society:magic_shears"));
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,13 @@
|
||||
console.info("[SOCIETY] disableDispenser.js loaded");
|
||||
|
||||
const DispenserBlock = Java.loadClass(
|
||||
"net.minecraft.world.level.block.DispenserBlock"
|
||||
);
|
||||
DispenserBlock.registerBehavior(Item.of("minecraft:bone_meal").item, () => {});
|
||||
DispenserBlock.registerBehavior(Item.of("minecraft:carrot").item, () => {});
|
||||
DispenserBlock.registerBehavior(Item.of("minecraft:potato").item, () => {});
|
||||
DispenserBlock.registerBehavior(Item.of("farm_and_charm:onion").item, () => {});
|
||||
DispenserBlock.registerBehavior(
|
||||
Item.of("veggiesdelight:sweet_potato").item,
|
||||
() => {}
|
||||
);
|
||||
@@ -0,0 +1,21 @@
|
||||
console.info("[SOCIETY] disableHoeRichSoil.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"farmersdelight:rich_soil",
|
||||
"vintagedelight:lush_grass_block",
|
||||
],
|
||||
(e) => {
|
||||
const hoes = [
|
||||
"minecraft:wooden_hoe",
|
||||
"minecraft:stone_hoe",
|
||||
"minecraft:iron_hoe",
|
||||
"minecraft:golden_hoe",
|
||||
"minecraft:diamond_hoe",
|
||||
"minecraft:netherite_hoe",
|
||||
"aquaculture:neptunium_hoe",
|
||||
'farm_and_charm:pitchfork'
|
||||
];
|
||||
if (hoes.includes(e.item.getId())) e.cancel()
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
console.info("[SOCIETY] disableQuarkMysticalFlowers.js loaded");
|
||||
|
||||
BlockEvents.rightClicked((e) => {
|
||||
if (e.block.hasTag("botania:mystical_flowers")) {
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
BlockEvents.rightClicked((e) => {
|
||||
if (
|
||||
e.block.hasTag("dewdrop:waterable") &&
|
||||
e.level.getBlock(e.block.getPos().above()).hasTag("botania:mystical_flowers")
|
||||
) {
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,5 @@
|
||||
console.info("[SOCIETY] disableSaltSnowball.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("vintagedelight:salt", (e) => {
|
||||
if (e.player.isCrouching() || e.item.hasTag("forge:tools/shovels")) e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
console.info("[SOCIETY] disableSpawner.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("minecraft:spawner", (e) => {
|
||||
if (e.player.isCreative()) return;
|
||||
if (e.item.id.includes("spawn_egg")) e.cancel();
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked((e) => {
|
||||
if (e.player.isCreative()) return;
|
||||
if (
|
||||
e.level.dimension === "society:skull_cavern" &&
|
||||
e.block.hasTag("minecraft:rails") &&
|
||||
e.item.getId() == "create:minecart_contraption"
|
||||
) {
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,197 @@
|
||||
console.info("[SOCIETY] enrichedBonemeal.js loaded");
|
||||
|
||||
const hasGreenhouseGlass = (level, cropPos) => {
|
||||
let scannedBlock;
|
||||
for (let i = 0; i < 16; i++) {
|
||||
scannedBlock = level.getBlock(cropPos.offset(0, i + 1, 0));
|
||||
if (scannedBlock.hasTag("sereneseasons:greenhouse_glass")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const rnd = (min, max) => {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
};
|
||||
|
||||
const cropDrop = [
|
||||
"herbalbrews:lavender",
|
||||
"herbalbrews:hibiscus",
|
||||
"farm_and_charm:wild_ribwort",
|
||||
"farm_and_charm:wild_nettle",
|
||||
];
|
||||
BlockEvents.rightClicked(cropDrop, (e) => {
|
||||
const { player, item, block, server } = e;
|
||||
if (
|
||||
player.getHeldItem("main_hand") == "society:enriched_bone_meal" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
player.getHeldItem("main_hand").count--;
|
||||
let crop = block.level.createEntity("minecraft:item");
|
||||
crop.x = block.x + rnd(0, 0.5);
|
||||
crop.y = block.y + 0.5;
|
||||
crop.z = block.z + rnd(0, 0.5);
|
||||
crop.item = Item.of(block.id);
|
||||
crop.spawn();
|
||||
block.level.spawnParticles(
|
||||
"minecraft:happy_villager",
|
||||
true,
|
||||
block.x + 0.5,
|
||||
block.y + 0.1,
|
||||
block.z + 0.5,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
10,
|
||||
0.1
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.bone_meal.use block @a ${e.player.x} ${e.player.y} ${e.player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
});
|
||||
|
||||
const cropGrowth = ["minecraft:cave_vines", "minecraft:cave_vines_plant"];
|
||||
BlockEvents.rightClicked(cropGrowth, (e) => {
|
||||
const { player, item, block, hand, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (
|
||||
player.getHeldItem("main_hand") == "society:enriched_bone_meal" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
player.getHeldItem("main_hand").count--;
|
||||
server.scheduleInTicks(1, () => {
|
||||
block.set(block.id, { berries: "true" });
|
||||
});
|
||||
block.level.spawnParticles(
|
||||
"minecraft:happy_villager",
|
||||
true,
|
||||
block.x + 0.5,
|
||||
block.y + 0.1,
|
||||
block.z + 0.5,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
10,
|
||||
0.1
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.bone_meal.use block @a ${e.player.x} ${e.player.y} ${e.player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("vinery:apple_leaves", (e) => {
|
||||
const { block, player, item } = e;
|
||||
const season = global.getSeasonFromLevel(player.level);
|
||||
let modifiedProperties = block.properties;
|
||||
if (
|
||||
block.properties.get("can_grow_apples").toString() == "true" &&
|
||||
block.properties.get("has_apples").toString() == "true" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
if (
|
||||
season == "autumn" ||
|
||||
hasGreenhouseGlass(player.level, block.getPos())
|
||||
) {
|
||||
modifiedProperties.can_grow_apples = false;
|
||||
modifiedProperties.has_apples = false;
|
||||
modifiedProperties.age = "0";
|
||||
e.server.scheduleInTicks(5, () => {
|
||||
block.set(block.id, modifiedProperties);
|
||||
});
|
||||
} else {
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"item.society.enriched_bone_meal.tree_fruit_season",
|
||||
Text.translatable("desc.sereneseasons.autumn").gold()
|
||||
)
|
||||
);
|
||||
e.cancel();
|
||||
}
|
||||
} else if (
|
||||
player.getHeldItem("main_hand") == "society:enriched_bone_meal" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
player.getHeldItem("main_hand").count--;
|
||||
modifiedProperties.can_grow_apples = true;
|
||||
modifiedProperties.has_apples = true;
|
||||
modifiedProperties.age = "3";
|
||||
block.set(block.id, modifiedProperties);
|
||||
block.level.spawnParticles(
|
||||
"minecraft:happy_villager",
|
||||
true,
|
||||
block.x + 0.5,
|
||||
block.y + 0.1,
|
||||
block.z + 0.5,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
10,
|
||||
0.1
|
||||
);
|
||||
e.server.runCommandSilent(
|
||||
`playsound minecraft:item.bone_meal.use block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("vinery:dark_cherry_leaves", (e) => {
|
||||
const { block, player, item } = e;
|
||||
let modifiedProperties = block.properties;
|
||||
const season = global.getSeasonFromLevel(player.level);
|
||||
if (
|
||||
block.properties.get("can_grow_cherries").toString() == "true" &&
|
||||
block.properties.get("has_cherries").toString() == "true" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
if (
|
||||
season == "spring" ||
|
||||
hasGreenhouseGlass(player.level, block.getPos())
|
||||
) {
|
||||
modifiedProperties.can_grow_cherries = false;
|
||||
modifiedProperties.has_cherries = false;
|
||||
modifiedProperties.age = "0";
|
||||
e.server.scheduleInTicks(5, () => {
|
||||
block.set(block.id, modifiedProperties);
|
||||
});
|
||||
} else {
|
||||
e.player.tell(
|
||||
Text.translatable(
|
||||
"item.society.enriched_bone_meal.tree_fruit_season",
|
||||
Text.translatable("desc.sereneseasons.spring").green()
|
||||
)
|
||||
);
|
||||
e.cancel();
|
||||
}
|
||||
} else if (
|
||||
player.getHeldItem("main_hand") == "society:enriched_bone_meal" &&
|
||||
!player.cooldowns.isOnCooldown(item)
|
||||
) {
|
||||
player.getHeldItem("main_hand").count--;
|
||||
modifiedProperties.can_grow_cherries = true;
|
||||
modifiedProperties.has_cherries = true;
|
||||
modifiedProperties.age = "3";
|
||||
block.set(block.id, modifiedProperties);
|
||||
block.level.spawnParticles(
|
||||
"minecraft:happy_villager",
|
||||
true,
|
||||
block.x + 0.5,
|
||||
block.y + 0.1,
|
||||
block.z + 0.5,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
10,
|
||||
0.1
|
||||
);
|
||||
e.server.runCommandSilent(
|
||||
`playsound minecraft:item.bone_meal.use block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,48 @@
|
||||
console.info("[SOCIETY] checkArtisanMachines.js loaded");
|
||||
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"society:bait_maker",
|
||||
"society:aging_cask",
|
||||
"society:ancient_cask",
|
||||
"society:charging_rod",
|
||||
"society:crystalarium",
|
||||
"society:wine_keg",
|
||||
"society:deluxe_worm_farm",
|
||||
"society:dehydrator",
|
||||
"society:espresso_machine",
|
||||
"society:fish_smoker",
|
||||
"society:loom",
|
||||
"society:mayonnaise_machine",
|
||||
"society:preserves_jar",
|
||||
"society:seed_maker",
|
||||
"society:tapper",
|
||||
"society:recycling_machine",
|
||||
"society:cheese_press",
|
||||
"society:oil_maker",
|
||||
"society:mushroom_log",
|
||||
],
|
||||
(e) => {
|
||||
const { player, block, hand, item, server, level } = e;
|
||||
if (hand == "OFF_HAND" || item !== "society:fairy_dust") return;
|
||||
if (block.properties.get("working").toLowerCase() === "true" && block.properties.get("mature").toLowerCase() === "false") {
|
||||
const { x, y, z } = block;
|
||||
global.handleProgress(level, block);
|
||||
server.runCommandSilent(`playsound legendarycreatures:wisp_idle block @a ${x} ${y} ${z} 0.2 1`);
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
x,
|
||||
y + 0.5,
|
||||
z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
5,
|
||||
2
|
||||
);
|
||||
if (!player.isCreative()) item.shrink(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,34 @@
|
||||
console.info("[SOCIETY] neptuniumHoe.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"dew_drop_farmland_growth:weak_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:strong_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:hyper_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:bountiful_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:low_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:high_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:pristine_quality_fertilized_farmland",
|
||||
],
|
||||
(e) => {
|
||||
const { item, player, server, block } = e;
|
||||
if (item.id === "farm_and_charm:pitchfork") {
|
||||
const blockId = String(block.getId());
|
||||
if (0.5 < Math.random()) {
|
||||
block.popItemFromFace(
|
||||
blockId.substring(0, blockId.length - 10) + "r",
|
||||
"up"
|
||||
);
|
||||
}
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.armor.equip_leather block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.hoe.till block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
player.swing();
|
||||
block.set("minecraft:dirt");
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
BlockEvents.rightClicked("society:fish_pond_manager", (e) => {
|
||||
const { item, hand, player, level, block } = e;
|
||||
if (hand !== "MAIN_HAND" || item !== "create:clipboard") return;
|
||||
global.addItemCooldown(player, item, 10);
|
||||
player.swing();
|
||||
const pages = global.getQuestItems(block, level);
|
||||
item.nbt = {
|
||||
Type: 1,
|
||||
PreviouslyOpenedPage: 0,
|
||||
Pages: pages,
|
||||
};
|
||||
e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
console.info("[SOCIETY] frozenGeode.js loaded");
|
||||
|
||||
BlockEvents.broken(["society:geode_node", "society:omni_geode_node"], (e) => {
|
||||
const { level, player, block } = e;
|
||||
const season = global.getSeasonFromLevel(level);
|
||||
if (season !== "winter") return;
|
||||
|
||||
const roll = Math.random();
|
||||
|
||||
if (roll <= 0.1) {
|
||||
let geode = level.createEntity("minecraft:item");
|
||||
geode.x = block.x;
|
||||
geode.y = block.y;
|
||||
geode.z = block.z;
|
||||
geode.item = Item.of("society:frozen_geode");
|
||||
geode.spawn();
|
||||
|
||||
e.server.runCommandSilent(
|
||||
`playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
console.info("[SOCIETY] fruitInstaBreak.js loaded");
|
||||
|
||||
BlockEvents.leftClicked([
|
||||
"pamhc2trees:pamcinnamon",
|
||||
"pamhc2trees:pamdragonfruit",
|
||||
"pamhc2trees:pamstarfruit",
|
||||
"pamhc2trees:pamlychee",
|
||||
"pamhc2trees:pampassionfruit",
|
||||
"pamhc2trees:pammango",
|
||||
"pamhc2trees:pambanana",
|
||||
"pamhc2trees:pampawpaw",
|
||||
"pamhc2trees:pamhazelnut",
|
||||
"pamhc2trees:pamorange",
|
||||
"pamhc2trees:pamplum",
|
||||
"pamhc2trees:pampeach",
|
||||
"pamhc2trees:pamlemon",
|
||||
"pamhc2trees:pamcherry",
|
||||
"pamhc2trees:pamapple",
|
||||
], (e) => {
|
||||
const { player, block, level, server } = e;
|
||||
if (player.isFake()) return;
|
||||
if (player.getHeldItem("main_hand").hasTag("forge:shears")) {
|
||||
let fruitItem = Item.of(block.id);
|
||||
server.runCommandSilent(`playsound minecraft:entity.sheep.shear block @a ${block.x} ${block.y} ${block.z}`);
|
||||
block.popItem(fruitItem);
|
||||
level.destroyBlock(block.pos, true, player);
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,21 @@
|
||||
console.info("[SOCIETY] grapevinePot.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("vinery:grapevine_pot", (e) => {
|
||||
const { block } = e;
|
||||
const properties = block.getProperties();
|
||||
if (properties.get("storage") == "5") {
|
||||
if (properties.get("type").toString().includes("red")) {
|
||||
block.set(block.id, {
|
||||
stage: "3",
|
||||
storage: "6",
|
||||
type: "red",
|
||||
});
|
||||
} else if (properties.get("type").toString().includes("white")) {
|
||||
block.set(block.id, {
|
||||
stage: "3",
|
||||
storage: "6",
|
||||
type: "white",
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,201 @@
|
||||
console.info("[SOCIETY] harvestHandling.js loaded");
|
||||
// Yeah this filename has a typo. Fixing it would be more annoying than leaving it.
|
||||
|
||||
const deniedCrops = [
|
||||
"farmersdelight:tomatoes",
|
||||
"farmersdelight:budding_tomatoes",
|
||||
"minecraft:melon_stem",
|
||||
"minecraft:pitcher_crop",
|
||||
"minecraft:torchflower_crop",
|
||||
"minecraft:pumpkin_stem",
|
||||
"minecraft:cocoa",
|
||||
"supplementaries:flax",
|
||||
"society:mana_fruit_crop"
|
||||
];
|
||||
const allowedBonemealCrops = [
|
||||
"minecraft:crimson_fungus",
|
||||
"minecraft:warped_fungus",
|
||||
];
|
||||
const reseedableCrops = [
|
||||
"minecraft:potato",
|
||||
"minecraft:carrot",
|
||||
"farm_and_charm:onion",
|
||||
"veggiesdelight:sweet_potato",
|
||||
"vintagedelight:peanut",
|
||||
"veggiesdelight:garlic_clove"
|
||||
];
|
||||
BlockEvents.rightClicked((e) => {
|
||||
const { block, player, server, hand, item, level } = e;
|
||||
if (reseedableCrops.includes(e.item.getId())) {
|
||||
if (block.hasTag("dewdrop:waterable")) {
|
||||
e.player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
if (!allowedBonemealCrops.includes(block.id)) {
|
||||
if (player.isHoldingInAnyHand("farm_and_charm:fertilizer")) e.cancel();
|
||||
if (
|
||||
player.isHoldingInAnyHand("minecraft:bone_meal") ||
|
||||
player.isHoldingInAnyHand("meadow:watering_can")
|
||||
) {
|
||||
if (
|
||||
block.hasTag("minecraft:crops") ||
|
||||
block.hasTag("minecraft:saplings") ||
|
||||
block.hasTag("vinery:lattice") ||
|
||||
block.hasTag("farmersdelight:wild_crops") ||
|
||||
block.hasTag("farm_and_charm:wild_crops") ||
|
||||
block.hasTag("sereneseasons:summer_crops") ||
|
||||
block.hasTag("sereneseasons:autumn_crops") ||
|
||||
block.hasTag("sereneseasons:spring_crops") ||
|
||||
block.hasTag("sereneseasons:winter_crops") ||
|
||||
[
|
||||
"veggiesdelight:wild_bellpeppers",
|
||||
"veggiesdelight:wild_sweet_potatoes",
|
||||
"veggiesdelight:wild_garlic",
|
||||
"veggiesdelight:wild_cauliflowers",
|
||||
"atmospheric:dragon_roots",
|
||||
"atmospheric:aloe_vera",
|
||||
"atmospheric:aloe_kernels",
|
||||
"atmospheric:yucca_branch",
|
||||
"minecraft:kelp",
|
||||
"farmersdelight:tomatoes",
|
||||
"farm_and_charm:wild_nettle",
|
||||
"farm_and_charm:wild_ribwort",
|
||||
"minecraft:cocoa",
|
||||
"minecraft:cave_vines",
|
||||
"minecraft:cave_vines_plant",
|
||||
"minecraft:bamboo",
|
||||
"nethervinery:crimson_grape_bush",
|
||||
"nethervinery:warped_grape_bush",
|
||||
"vinery:savanna_grape_bush_white",
|
||||
"vinery:jungle_grape_bush_red",
|
||||
"vinery:savanna_grape_bush_red",
|
||||
"vinery:white_grape_bush",
|
||||
"vinery:red_grape_bush",
|
||||
"vinery:taiga_grape_bush_red",
|
||||
"vinery:taiga_grape_bush_white",
|
||||
"vinery:jungle_grape_bush_white",
|
||||
"vinery:grapevine_stem",
|
||||
"nethervinery:obsidian_stem",
|
||||
"farmersdelight:budding_tomatoes",
|
||||
"farmersdelight:rice",
|
||||
"farmersdelight:rice_panicles",
|
||||
"herbalbrews:lavender",
|
||||
"herbalbrews:hibiscus",
|
||||
"minecraft:torchflower",
|
||||
"atmospheric:passion_vine",
|
||||
"verdantvibes:bracket_mushroom",
|
||||
"vinery:apple_leaves",
|
||||
"vinery:dark_cherry_leaves",
|
||||
"cluttered:blue_roundhead",
|
||||
"cluttered:fly_agaric",
|
||||
"quark:glow_shroom",
|
||||
"farmersdelight:brown_mushroom_colony",
|
||||
"species:alphacene_mushroom",
|
||||
"farmersdelight:red_mushroom_colony"
|
||||
].includes(block.id)
|
||||
) {
|
||||
player.tell(Text.translatable("society.bone_meal.weak"));
|
||||
e.player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hand == "MAIN_HAND") {
|
||||
let initialBlock = level.getBlockState(block.pos);
|
||||
let checkBlocked;
|
||||
let blockState;
|
||||
if (
|
||||
block.hasTag("minecraft:crops") &&
|
||||
!deniedCrops.includes(block.id) &&
|
||||
initialBlock.block.isMaxAge(initialBlock)
|
||||
) {
|
||||
let xpCount = 0;
|
||||
let radius = 0;
|
||||
if (item.hasTag("minecraft:hoes")) radius = 1;
|
||||
if (
|
||||
[
|
||||
"minecraft:netherite_hoe",
|
||||
"minecraft:diamond_hoe",
|
||||
"botania:elementium_hoe",
|
||||
].includes(item.id)
|
||||
)
|
||||
radius = 2;
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(block.x - radius, block.y, block.z - radius),
|
||||
[block.x + radius, block.y, block.z + radius],
|
||||
)) {
|
||||
checkBlocked = level.getBlock(pos);
|
||||
blockState = level.getBlockState(pos);
|
||||
if (
|
||||
checkBlocked.hasTag("minecraft:crops") &&
|
||||
!deniedCrops.includes(checkBlocked.id)
|
||||
) {
|
||||
if (blockState.block.isMaxAge(blockState)) {
|
||||
if (player.isFake()) {
|
||||
e.cancel();
|
||||
} else {
|
||||
xpCount += blockState.block.getMaxAge();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
server.scheduleInTicks(2, () => {
|
||||
initialBlock = level.getBlockState(block.pos);
|
||||
if (!initialBlock.block.isMaxAge(initialBlock) && xpCount > 0) {
|
||||
const xp = block.createEntity("experience_orb");
|
||||
xp.mergeNbt({ Value: xpCount });
|
||||
xp.spawn();
|
||||
global.giveExperience(server, player, "farming", xpCount * 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// Vinery grapevine leaf mechanic
|
||||
BlockEvents.rightClicked("vinery:grapevine_stem", (e) => {
|
||||
const { block } = e;
|
||||
let properties = block.getProperties();
|
||||
properties.leaves_pending = false;
|
||||
properties.leaves_done = true;
|
||||
block.set(block.id, properties);
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked((e) => {
|
||||
if (["society:mana_fruit_crop"].includes(e.item.getId())) {
|
||||
if (!e.block.hasTag("dewdrop:waterable")) {
|
||||
e.player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("society:mana_fruit_crop", (e) => {
|
||||
const { level, server, block, player } = e;
|
||||
let blockProperties = level.getBlock(block.pos).getProperties();
|
||||
let age = Number(blockProperties.get("age"));
|
||||
|
||||
if (age == 7) {
|
||||
blockProperties.age = "0";
|
||||
block.set(block.id, blockProperties);
|
||||
let quality = global.getCropQuality(block);
|
||||
let count = 1;
|
||||
if (player.stages.has("paradise_crop")) count += 1;
|
||||
if (player.stages.has("crop_collector")) count *= 2;
|
||||
if (quality) {
|
||||
block.popItemFromFace(
|
||||
Item.of(
|
||||
`${count}x society:mana_fruit`,
|
||||
`{quality_food:{effects:[],quality:${quality}}}`,
|
||||
),
|
||||
"up",
|
||||
);
|
||||
} else {
|
||||
block.popItemFromFace(Item.of(`${count}x society:mana_fruit`), "up");
|
||||
}
|
||||
player.swing();
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:block.grass.break block @a ${block.x} ${block.y} ${block.z} 0.5`,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
console.info("[SOCIETY] hoeAoe.js loaded");
|
||||
|
||||
const hoeTiers = new Map([
|
||||
["minecraft:stone_hoe", 0.2],
|
||||
["minecraft:iron_hoe", 0.5],
|
||||
["minecraft:golden_hoe", 1],
|
||||
["minecraft:diamond_hoe", 2],
|
||||
["oreganized:electrum_hoe", 3],
|
||||
["minecraft:netherite_hoe", 3],
|
||||
["aquaculture:neptunium_hoe", 3],
|
||||
["botania:elementium_hoe", 3],
|
||||
["botania:manasteel_hoe", 2],
|
||||
]);
|
||||
|
||||
const hoeFarmland = new Map([
|
||||
["aquaculture:neptunium_hoe", "dew_drop_farmland_growth:hydrating_farmland"],
|
||||
["botania:elementium_hoe", "dew_drop_farmland_growth:hydrating_farmland"],
|
||||
]);
|
||||
|
||||
const tryTill = (level, player, pos, farmland) => {
|
||||
if (!level.getBlock(pos).hasTag("minecraft:dirt")) return false;
|
||||
const above = level.getBlock(pos.above()).id;
|
||||
if (
|
||||
above !== "minecraft:air" &&
|
||||
above !== "minecraft:water" &&
|
||||
above !== "minecraft:flowing_water"
|
||||
)
|
||||
return false;
|
||||
|
||||
level.getBlock(pos).set(farmland || "minecraft:farmland");
|
||||
player.swing();
|
||||
player.server.runCommandSilent(
|
||||
`playsound minecraft:item.hoe.till block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
return true;
|
||||
};
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"minecraft:dirt",
|
||||
"minecraft:rooted_dirt",
|
||||
"minecraft:coarse_dirt",
|
||||
"minecraft:dirt_path",
|
||||
"minecraft:grass_block",
|
||||
],
|
||||
(e) => {
|
||||
const { item, block, player, level } = e;
|
||||
const id = `${item.id}`;
|
||||
const hoe = hoeTiers.get(id);
|
||||
if (!hoe) return;
|
||||
|
||||
const farmland = hoeFarmland.get(id);
|
||||
if (!player.crouching) {
|
||||
tryTill(level, player, block.pos, farmland);
|
||||
e.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (hoe < 1) {
|
||||
const distance = hoe > 0.2 ? 3 : 2;
|
||||
let pos = block.pos;
|
||||
for (let i = 0; i < distance; i++) {
|
||||
tryTill(level, player, pos, farmland);
|
||||
pos = global.getFacing(player.facing, pos);
|
||||
}
|
||||
} else {
|
||||
const { x, y, z } = block;
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(x - hoe, y, z - hoe),
|
||||
[x + hoe, y, z + hoe]
|
||||
)) {
|
||||
tryTill(level, player, pos, farmland);
|
||||
}
|
||||
}
|
||||
global.addItemCooldown(player, item, 40);
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,51 @@
|
||||
console.info("[SOCIETY] letsDoBroken.js loaded");
|
||||
|
||||
BlockEvents.broken("furniture:iron_fish_tank", (e) => {
|
||||
if (e.block.properties.get("part").toLowerCase() == "head") {
|
||||
e.block.popItem(Item.of("furniture:iron_fish_tank"));
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken("furniture:copper_fish_tank", (e) => {
|
||||
if (e.block.properties.get("part").toLowerCase() == "head") {
|
||||
e.block.popItem(Item.of("furniture:copper_fish_tank"));
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken("brewery:barrel_main", (e) => {
|
||||
if (e.block.properties.get("half").toLowerCase() == "upper") {
|
||||
e.block.popItem(Item.of("brewery:barrel_main"));
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken("brewery:barrel_right", (e) => {
|
||||
if (e.block.properties.get("half").toLowerCase() == "lower") {
|
||||
e.block.popItem(Item.of("brewery:barrel_main"));
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken(["brewery:barrel_main_head", "brewery:barrel_head_right"], (e) => {
|
||||
e.block.popItem(Item.of("brewery:barrel_main"));
|
||||
});
|
||||
|
||||
BlockEvents.broken(
|
||||
[
|
||||
"fantasyfurniture:nordic/painting_small",
|
||||
"fantasyfurniture:dunmer/painting_small",
|
||||
"fantasyfurniture:nordic/painting_wide",
|
||||
"fantasyfurniture:dunmer/painting_wide",
|
||||
"fantasyfurniture:venthyr/painting_small",
|
||||
"fantasyfurniture:venthyr/painting_wide",
|
||||
"fantasyfurniture:bone/skeleton/painting_small",
|
||||
"fantasyfurniture:bone/skeleton/painting_wide",
|
||||
"fantasyfurniture:bone/wither/painting_small",
|
||||
"fantasyfurniture:royal/painting_wide",
|
||||
"fantasyfurniture:royal/painting_small",
|
||||
"fantasyfurniture:bone/wither/painting_wide",
|
||||
"fantasyfurniture:necrolord/painting_small",
|
||||
"fantasyfurniture:necrolord/painting_wide",
|
||||
],
|
||||
(e) => {
|
||||
e.block.popItem(Item.of(e.block.id));
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,81 @@
|
||||
console.info("[SOCIETY] magnifyingGlass.js loaded");
|
||||
|
||||
const DELAY = 10;
|
||||
const REPETITIONS = 10;
|
||||
|
||||
const magnifyingGlassBlocks = [
|
||||
{ id: "society:auto_grabber", radius: 5, includeY: true },
|
||||
{ id: "society:artisan_hopper", radius: 3, includeY: true },
|
||||
{ id: "society:mini_artisan_hopper", radius: 1, includeY: true },
|
||||
{ id: "society:auto_petter", radius: 2, includeY: true },
|
||||
{ id: "society:fish_pond_basket", radius: 1, includeY: true },
|
||||
{ id: "society:feeding_trough", radius: 6, includeY: true },
|
||||
{ id: "splendid_slimes:slime_feeder", radius: 6, includeY: true },
|
||||
{ id: "dew_drop_farmland_growth:iron_sprinkler", radius: 1 },
|
||||
{ id: "dew_drop_farmland_growth:gold_sprinkler", radius: 2 },
|
||||
{ id: "society:mana_sprinkler", radius: 2 },
|
||||
{ id: "dew_drop_farmland_growth:diamond_sprinkler", radius: 3 },
|
||||
{ id: "dew_drop_farmland_growth:netherite_sprinkler", radius: 4 },
|
||||
{ id: "society:mana_milker", radius: 10, includeY: true },
|
||||
{ id: "society:golden_clock", radius: 2, includeY: true },
|
||||
{ id: "society:mana_clock", radius: 1, includeY: true },
|
||||
{ id: "society:snow_melter", radius: 10 },
|
||||
{ id: "farmingforblockheads:chicken_nest", radius: 8, includeY: true },
|
||||
{ id: "society:growth_obelisk", radius: 3, includeY: false },
|
||||
{ id: "society:ribbit_hut", radius: 7, includeY: false },
|
||||
{ id: "society:mushroom_log", radius: 8, includeY: true },
|
||||
{ id: "society:fish_pond_manager", radius: 10, includeY: true },
|
||||
{ id: "society:drum_cornucopia", radius: 10, includeY: true },
|
||||
];
|
||||
const magnifyingGlassBlockIds = magnifyingGlassBlocks.map((x) => x.id);
|
||||
|
||||
BlockEvents.rightClicked(magnifyingGlassBlockIds, (e) => {
|
||||
const { item, hand, player, server, level, block } = e;
|
||||
let resolvedBlock = block;
|
||||
if (hand == "MAIN_HAND" && item == "society:magnifying_glass") {
|
||||
global.addItemCooldown(player, item, (DELAY * REPETITIONS) / 2);
|
||||
player.swing();
|
||||
server.runCommandSilent(
|
||||
`playsound tanukidecor:block.lantern_clock.chime block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
magnifyingGlassBlocks.forEach((hitBlock) => {
|
||||
if (hitBlock.id == block.id) {
|
||||
if (block.id === "society:ribbit_hut") {
|
||||
resolvedBlock = global.getOpposite(block.getProperties().get("facing"), block.getPos());
|
||||
}
|
||||
for (let index = 0; index < REPETITIONS; index++) {
|
||||
server.scheduleInTicks(DELAY * index, () => {
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(
|
||||
resolvedBlock.x - hitBlock.radius,
|
||||
resolvedBlock.y - hitBlock.radius,
|
||||
resolvedBlock.z - hitBlock.radius
|
||||
),
|
||||
[
|
||||
resolvedBlock.x + hitBlock.radius,
|
||||
resolvedBlock.y + hitBlock.radius,
|
||||
resolvedBlock.z + hitBlock.radius,
|
||||
]
|
||||
)) {
|
||||
if (pos.y === resolvedBlock.y || hitBlock.includeY) {
|
||||
level.spawnParticles(
|
||||
"supplementaries:stasis",
|
||||
true,
|
||||
pos.x + 0.5,
|
||||
pos.y + 0.5,
|
||||
pos.z + 0.5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.0001
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
console.info("[SOCIETY] multiBlockHandlers.js loaded");
|
||||
|
||||
BlockEvents.placed("society:growth_obelisk", (e) => {
|
||||
const { block, level } = e;
|
||||
const above = level.getBlock(block.pos.above());
|
||||
if (above == "minecraft:air") above.set("society:growth_obelisk_upper", block.getProperties());
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:growth_obelisk", (e) => {
|
||||
const { block, level } = e;
|
||||
level.destroyBlock(block.pos.above(), true);
|
||||
});
|
||||
BlockEvents.broken("society:growth_obelisk_upper", (e) => {
|
||||
const { block, level } = e;
|
||||
level.destroyBlock(block.pos.below(), true);
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
console.info("[SOCIETY] neptuniumHoe.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"minecraft:dirt",
|
||||
"minecraft:rooted_dirt",
|
||||
"minecraft:coarse_dirt",
|
||||
"minecraft:dirt_path",
|
||||
"minecraft:grass_block",
|
||||
],
|
||||
(e) => {
|
||||
const { item, block } = e;
|
||||
if (
|
||||
item.id === "aquaculture:neptunium_hoe" ||
|
||||
item.id === "botania:elementium_hoe"
|
||||
) {
|
||||
block.set("dew_drop_farmland_growth:hydrating_farmland");
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
console.info("[SOCIETY] openShippingBin.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
["shippingbin:basic_shipping_bin", "shippingbin:smart_shipping_bin"],
|
||||
(e) => {
|
||||
const { player, server } = e;
|
||||
server.runCommandSilent(
|
||||
`playsound shippingbin:block.shippingbin.open block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,54 @@
|
||||
console.info("[SOCIETY] pamsTreeLoot.js loaded");
|
||||
const weirdFruits = new Map([
|
||||
["pamhc2trees:pamcherry", "vinery:cherry"],
|
||||
["pamhc2trees:pamorange", "atmospheric:orange"],
|
||||
["pamhc2trees:pampassionfruit", "atmospheric:passion_fruit"],
|
||||
]);
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"pamhc2trees:pamapple",
|
||||
"pamhc2trees:pamcherry",
|
||||
"pamhc2trees:pamorange",
|
||||
"pamhc2trees:pampeach",
|
||||
"pamhc2trees:pamplum",
|
||||
"pamhc2trees:pamhazelnut",
|
||||
"pamhc2trees:pampawpaw",
|
||||
"pamhc2trees:pambanana",
|
||||
"pamhc2trees:pamcinnamon",
|
||||
"pamhc2trees:pamdragonfruit",
|
||||
"pamhc2trees:pammango",
|
||||
"pamhc2trees:pamstarfruit",
|
||||
"pamhc2trees:pamlychee",
|
||||
"pamhc2trees:pamlemon",
|
||||
"pamhc2trees:pampassionfruit",
|
||||
],
|
||||
(e) => {
|
||||
const { block, player, server } = e;
|
||||
const fruitName = `${block.id.toString().split(":")[1]}`;
|
||||
if (
|
||||
player.isHoldingInAnyHand("minecraft:bone_meal") ||
|
||||
player.isHoldingInAnyHand("farm_and_charm:fertilizer") ||
|
||||
player.isHoldingInAnyHand("meadow:watering_can")
|
||||
)
|
||||
return;
|
||||
if (Number(block.properties.get("age")) >= 7) {
|
||||
if (player.stages.has("tree_whisperer")) {
|
||||
const weirdFruit = weirdFruits.get(String(block.id));
|
||||
if (weirdFruit) {
|
||||
block.popItem(`2x ${weirdFruit}`);
|
||||
} else {
|
||||
block.popItem(`2x pamhc2trees:${fruitName.substring(3, fruitName.length)}item`);
|
||||
}
|
||||
}
|
||||
if (block.id == "pamhc2trees:pambanana" && player.stages.has("banana_karenina")) {
|
||||
block.popItem(
|
||||
`${player.stages.has("tree_whisperer") ? 5 : 3}x pamhc2trees:${fruitName.substring(
|
||||
3,
|
||||
fruitName.length
|
||||
)}item`
|
||||
);
|
||||
}
|
||||
global.giveExperience(server, player, "farming", 40);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,32 @@
|
||||
console.info("[SOCIETY] pickupDrink.js loaded");
|
||||
|
||||
BlockEvents.leftClicked(
|
||||
[
|
||||
"society:starcardi",
|
||||
"society:star_coquito",
|
||||
"society:good_catawba",
|
||||
"society:nutty_basil",
|
||||
"society:forks_of_blue",
|
||||
"society:ancient_cider",
|
||||
"society:ancient_vespertine",
|
||||
"society:dewy_star",
|
||||
"society:beer_london",
|
||||
"society:beer_attunecore",
|
||||
"society:espresso",
|
||||
"society:steamed_milk",
|
||||
"society:mocha",
|
||||
"society:latte",
|
||||
"society:dirty_chai",
|
||||
"society:bowl_of_soul",
|
||||
"society:truffle_tea",
|
||||
],
|
||||
(e) => {
|
||||
const { player, block, server } = e;
|
||||
|
||||
player.give(block.id);
|
||||
block.set("minecraft:air")
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:item.bottle.fill block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,64 @@
|
||||
console.info("[SOCIETY] placeNbtMachine.js loaded");
|
||||
|
||||
BlockEvents.placed("society:prize_machine", (e) => {
|
||||
let item = e.player.getHeldItem("main_hand");
|
||||
let prizeNbt;
|
||||
if (item.id !== "society:prize_machine") item = e.player.getHeldItem("off_hand");
|
||||
if (item.id !== "society:prize_machine") return;
|
||||
prizeNbt = item.getNbt();
|
||||
if (!prizeNbt.isEmpty()) {
|
||||
let nbt = e.block.getEntityData();
|
||||
nbt.merge({
|
||||
data: {
|
||||
prize: Number(prizeNbt.get("prize")),
|
||||
},
|
||||
});
|
||||
global.setBlockEntityData(e.block, nbt)
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.placed("society:fish_pond", (e) => {
|
||||
const { block, player } = e;
|
||||
let item = player.getHeldItem("main_hand");
|
||||
let pondNbt;
|
||||
if (item.id !== "society:fish_pond") item = player.getHeldItem("off_hand");
|
||||
if (item.id !== "society:fish_pond") return;
|
||||
pondNbt = item.getNbt();
|
||||
if (pondNbt && !pondNbt.isEmpty()) {
|
||||
block.set(block.id, {
|
||||
facing: block.getProperties().get("facing"),
|
||||
valid: true,
|
||||
mature: false,
|
||||
upgraded: false,
|
||||
quest: Boolean(pondNbt.getBoolean("quest")),
|
||||
});
|
||||
let nbt = block.getEntityData();
|
||||
nbt.merge({
|
||||
data: {
|
||||
type: pondNbt.get("type"),
|
||||
quest_id: Number(pondNbt.get("quest_id")),
|
||||
population: Number(pondNbt.get("population")),
|
||||
max_population: Number(pondNbt.get("max_population")),
|
||||
},
|
||||
});
|
||||
global.setBlockEntityData(block, nbt)
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.placed(
|
||||
[
|
||||
"shippingbin:smart_shipping_bin",
|
||||
"shippingbin:basic_shipping_bin",
|
||||
"society:artisan_hopper",
|
||||
"society:mini_artisan_hopper",
|
||||
"society:fish_pond_basket",
|
||||
"society:auto_grabber",
|
||||
"society:fish_pond_manager",
|
||||
],
|
||||
(e) => {
|
||||
const playerUUID = e.player.getUuid().toString();
|
||||
let nbt = e.block.entityData;
|
||||
nbt.merge({ data: { owner: playerUUID } });
|
||||
global.setBlockEntityData(e.block, nbt)
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,28 @@
|
||||
console.info("[SOCIETY] neptuniumHoe.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"minecraft:farmland",
|
||||
"dew_drop_farmland_growth:weak_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:strong_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:hyper_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:bountiful_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:low_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:high_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:pristine_quality_fertilized_farmland",
|
||||
],
|
||||
(e) => {
|
||||
const { item, player, level, server, block } = e;
|
||||
const aboveBlock = level.getBlock(block.getPos().above());
|
||||
if (aboveBlock.id === "minecraft:air") {
|
||||
if (item.id === "veggiesdelight:garlic_seed") {
|
||||
aboveBlock.set("veggiesdelight:garlic_crop");
|
||||
if (!player.isCreative()) item.shrink(1);
|
||||
player.swing();
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:block.crop.break block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,184 @@
|
||||
console.info("[SOCIETY] plushieMechanics.js loaded");
|
||||
|
||||
BlockEvents.placed(global.plushies, (e) => {
|
||||
let item = e.player.getHeldItem("main_hand");
|
||||
let plushieNbt;
|
||||
if (item.id !== e.block.id) item = e.player.getHeldItem("off_hand");
|
||||
if (item.id !== e.block.id) return;
|
||||
plushieNbt = item.getNbt();
|
||||
if (plushieNbt) {
|
||||
let nbt = e.block.getEntityData();
|
||||
nbt.merge({
|
||||
data: {
|
||||
type: plushieNbt.get("type"),
|
||||
quest_id: plushieNbt.get("quest_id"),
|
||||
affection: plushieNbt.get("affection"),
|
||||
quality: plushieNbt.get("quality_food").get("quality"),
|
||||
},
|
||||
});
|
||||
let animal = plushieNbt.get("animal");
|
||||
if (animal) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: animal,
|
||||
},
|
||||
});
|
||||
}
|
||||
global.setBlockEntityData(e.block, nbt)
|
||||
}
|
||||
});
|
||||
|
||||
const breakPlushie = (block, wandReset) => {
|
||||
let nbt = block.getEntityData();
|
||||
const { type, quest_id, affection, quality, animal } = nbt.data;
|
||||
let baseItem = Item.of(
|
||||
block.id,
|
||||
`{quality_food:{quality:${quality}},type:${type},quest_id:${quest_id},affection:${affection}}`
|
||||
);
|
||||
if (wandReset) {
|
||||
block.popItem(baseItem);
|
||||
} else {
|
||||
block.popItem(
|
||||
animal && !animal.isEmpty()
|
||||
? Item.of(
|
||||
block.id,
|
||||
global.getPlushieItemNbt(
|
||||
baseItem.getNbt(),
|
||||
animal.type,
|
||||
animal.name,
|
||||
animal,
|
||||
animal
|
||||
)
|
||||
)
|
||||
: baseItem
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BlockEvents.broken(global.plushies, (e) => {
|
||||
breakPlushie(e.block)
|
||||
});
|
||||
|
||||
BlockEvents.broken("whimsy_deco:sunlit_singing_frog", (e) => {
|
||||
const { block, server } = e;
|
||||
const { x, y, z } = block;
|
||||
let nbt = block.getEntityData();
|
||||
const { type, quest_id, affection, quality, animal } = nbt.data;
|
||||
let baseItem = Item.of(
|
||||
"whimsy_deco:adv_singing_frog_plushie",
|
||||
`{quality_food:{quality:${quality}},type:${type},quest_id:${quest_id},affection:${affection}}`
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`execute positioned ${x} ${y} ${z} run stopsound @e[type=player,distance=..4] block`
|
||||
);
|
||||
block.popItem(
|
||||
animal
|
||||
? Item.of(
|
||||
block.id,
|
||||
global.getPlushieItemNbt(
|
||||
baseItem.getNbt(),
|
||||
animal.type,
|
||||
animal.customName,
|
||||
animal,
|
||||
animal
|
||||
)
|
||||
)
|
||||
: baseItem
|
||||
);
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("whimsy_deco:gatcha_machine", (e) => {
|
||||
const { item, player, block, hand, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (hand == "MAIN_HAND") {
|
||||
if (item.id.equals("numismatics:sun")) {
|
||||
item.count -= 1;
|
||||
block.popItemFromFace(
|
||||
"society:plushie_capsule",
|
||||
block.properties.get("facing")
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound tanukidecor:block.cash_register.ring block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.addItemCooldown(player, item.id, 1);
|
||||
} else {
|
||||
player.tell(
|
||||
Text.translatable(
|
||||
"tooltip.society.gatcha_machine",
|
||||
Text.translatable("item.numismatics.sun").gold()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked(global.plushies, (e) => {
|
||||
const { item, player, block, hand, level, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (hand == "MAIN_HAND" && item.id.equals("society:plushie_wand")) {
|
||||
let nbt = block.getEntityData();
|
||||
const { animal } = nbt.data;
|
||||
if (animal && animal.type) {
|
||||
let newAnimal = player.level.createEntity(`${animal.type}`);
|
||||
newAnimal.setX(block.getX());
|
||||
newAnimal.setY(block.getY() + 1);
|
||||
newAnimal.setZ(block.getZ());
|
||||
if (animal.name) newAnimal.customName = animal.name
|
||||
if (animal.Variant) {
|
||||
let variantNBT = newAnimal.getNbt();
|
||||
variantNBT.Variant = animal.Variant;
|
||||
newAnimal.setNbt(variantNBT);
|
||||
}
|
||||
newAnimal.spawn();
|
||||
global.setPlushieExtractedPD(newAnimal, animal)
|
||||
breakPlushie(block, true)
|
||||
block.set("minecraft:air")
|
||||
server.runCommandSilent(
|
||||
`playsound botania:babylon_spawn block @a ${block.x} ${block.y} ${block.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
block.x,
|
||||
block.y + 0.5,
|
||||
block.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
20,
|
||||
2
|
||||
);
|
||||
} else {
|
||||
player.tell(
|
||||
Text.translatable("item.society.plushie_wand.no_animal").red()
|
||||
);
|
||||
}
|
||||
global.addItemCooldown(player, item.id, 5);
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.leftClicked(global.plushies, (e) => {
|
||||
const { player, block, level, server } = e;
|
||||
if (player.getHeldItem("main_hand").id.equals("society:plushie_wand") && !player.cooldowns.isOnCooldown("society:plushie_wand")) {
|
||||
breakPlushie(block)
|
||||
block.set("minecraft:air")
|
||||
server.runCommandSilent(
|
||||
`playsound botania:babylon_attack block @a ${block.x} ${block.y} ${block.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
block.x,
|
||||
block.y + 0.5,
|
||||
block.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
20,
|
||||
2
|
||||
);
|
||||
global.addItemCooldown(player, "society:plushie_wand", 5);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
console.info("[SOCIETY] preventChestVoid.js loaded");
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"minecraft:chest",
|
||||
"quark:ancient_chest",
|
||||
"quark:azalea_chest",
|
||||
"quark:blossom_chest",
|
||||
"quark:oak_chest",
|
||||
"quark:spruce_chest",
|
||||
"quark:birch_chest",
|
||||
"quark:jungle_chest",
|
||||
"quark:acacia_chest",
|
||||
"quark:dark_oak_chest",
|
||||
"quark:crimson_chest",
|
||||
"quark:warped_chest",
|
||||
"quark:mangrove_chest",
|
||||
"quark:bamboo_chest",
|
||||
"quark:cherry_chest",
|
||||
"quark:nether_brick_chest",
|
||||
"quark:purpur_chest",
|
||||
"quark:prismarine_chest",
|
||||
"quark:jungle_trapped_chest",
|
||||
],
|
||||
(e) => {
|
||||
const { block, player, hand, item, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (block.properties.get("type").toString() === "single") return;
|
||||
if (
|
||||
"sophisticatedstorage:basic_tier_upgrade" === item.id &&
|
||||
block.getEntityData().Items.length > 0
|
||||
) {
|
||||
player.tell(Text.translatable("society.chest_upgrade.void_warn").red());
|
||||
e.cancel();
|
||||
}
|
||||
}
|
||||
);
|
||||
BlockEvents.rightClicked("farm_and_charm:mincer", (e) => {
|
||||
const { block, player, hand, item, server } = e;
|
||||
if (player.isCrouching()) return;
|
||||
if (item.id !== "minecraft:air" && block.inventory.getStackInSlot(0) == item.id) {
|
||||
player.tell(Text.translatable("society.mincer.warn").red());
|
||||
player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,100 @@
|
||||
console.info("[SOCIETY] placeNbtMachine.js loaded");
|
||||
|
||||
const getSideCalc = (facing, initialPos, comparePos) => {
|
||||
switch (facing) {
|
||||
case "north":
|
||||
return initialPos.x - comparePos.x + 1;
|
||||
case "south":
|
||||
return comparePos.x - initialPos.x + 1;
|
||||
case "east":
|
||||
return initialPos.z - comparePos.z + 1;
|
||||
case "west":
|
||||
return comparePos.z - initialPos.z + 1;
|
||||
}
|
||||
};
|
||||
const getDepthCalc = (facing, initialPos, comparePos) => {
|
||||
switch (facing) {
|
||||
case "north":
|
||||
return comparePos.z - initialPos.z + 1;
|
||||
case "south":
|
||||
return initialPos.z - comparePos.z + 1;
|
||||
case "east":
|
||||
return initialPos.x - comparePos.x + 1;
|
||||
case "west":
|
||||
return comparePos.x - initialPos.x + 1;
|
||||
}
|
||||
};
|
||||
const scanArea = (level, block) => {
|
||||
let scannedBlock;
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(block.x - 1, block.y, block.z - 1),
|
||||
[block.x + 1, block.y + 2, block.z + 1]
|
||||
)) {
|
||||
if (!level.isLoaded(pos)) continue;
|
||||
scannedBlock = level.getBlock(pos);
|
||||
if (
|
||||
scannedBlock.id !== "minecraft:air" &&
|
||||
scannedBlock.id !== "society:ribbit_hut"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
const setRibbitHutBlocks = (level, block, player, server) => {
|
||||
let facing = block.getProperties().get("facing");
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(block.x - 1, block.y, block.z - 1),
|
||||
[block.x + 1, block.y + 2, block.z + 1]
|
||||
)) {
|
||||
level.getBlock(pos).set("society:ribbit_hut_block", {
|
||||
layer: (pos.y - block.y).toString(),
|
||||
side: getSideCalc(facing, block, pos).toString(),
|
||||
depth: getDepthCalc(facing, block, pos).toString(),
|
||||
facing: facing,
|
||||
});
|
||||
}
|
||||
const hutBlock = global.getFacing(facing, block.getPos());
|
||||
level.getBlock(hutBlock).set("society:ribbit_hut", { facing: facing });
|
||||
server.scheduleInTicks(0, () => {
|
||||
server.scheduleInTicks(10, () => {
|
||||
let nbt = level.getBlock(hutBlock).getEntityData();
|
||||
nbt.merge({ data: { owner: player.getUuid().toString() } });
|
||||
level.getBlock(hutBlock).setEntityData(nbt);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
BlockEvents.placed("society:ribbit_hut", (e) => {
|
||||
const { player, level, block, server } = e;
|
||||
let space = scanArea(level, block);
|
||||
|
||||
if (!space) {
|
||||
player.tell(
|
||||
Text.translatable("block.society.ribbit_hut.not_enough_room").red()
|
||||
);
|
||||
player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
} else {
|
||||
setRibbitHutBlocks(level, block, player, server);
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.leftClicked(["society:ribbit_hut_block"], (e) => {
|
||||
e.player.tell(Text.translatable("block.society.ribbit_hut.break").red());
|
||||
});
|
||||
|
||||
BlockEvents.broken(["society:ribbit_hut"], (e) => {
|
||||
const { level, player, block } = e;
|
||||
let centerBlock = global.getOpposite(
|
||||
block.getProperties().get("facing"),
|
||||
block.getPos()
|
||||
);
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(centerBlock.x - 1, centerBlock.y, centerBlock.z - 1),
|
||||
[centerBlock.x + 1, centerBlock.y + 2, centerBlock.z + 1]
|
||||
)) {
|
||||
level.getBlock(pos).set("minecraft:air");
|
||||
}
|
||||
player.give("society:ribbit_hut");
|
||||
});
|
||||
@@ -0,0 +1,144 @@
|
||||
console.info("[SOCIETY] seedMessage.js loaded");
|
||||
|
||||
const seedMessageThrottle = ((temp) => (entity, tick, identifier) => {
|
||||
const { age, uuid } = entity;
|
||||
const key = `${uuid}${identifier}`;
|
||||
const now = temp[key];
|
||||
if (!now || age - now >= tick) {
|
||||
temp[key] = age;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})({});
|
||||
|
||||
BlockEvents.rightClicked(
|
||||
[
|
||||
"minecraft:farmland",
|
||||
"dew_drop_farmland_growth:weak_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:strong_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:hyper_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:hydrating_farmland",
|
||||
"dew_drop_farmland_growth:bountiful_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:low_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:high_quality_fertilized_farmland",
|
||||
"dew_drop_farmland_growth:pristine_quality_fertilized_farmland",
|
||||
],
|
||||
(e) => {
|
||||
const { player, level, block, server } = e;
|
||||
if (!player.getHeldItem("main_hand").hasTag("forge:seeds")) return;
|
||||
let errorText;
|
||||
const biomeTags = level
|
||||
.getBiome(block.pos)
|
||||
.tags()
|
||||
.map((tagkey) => tagkey.location())
|
||||
.toList();
|
||||
if (
|
||||
biomeTags.toString().includes("sereneseasons:tropical_biomes") &&
|
||||
!player.getHeldItem("main_hand").hasTag("sereneseasons:summer_crops")
|
||||
) {
|
||||
errorText = Text.translatable("society.planting_crop.eternal_summer").toJson();
|
||||
}
|
||||
if (
|
||||
Number(level.getBiome(block.pos).get().getTemperature(block.pos)) < 0.15 &&
|
||||
!player.getHeldItem("main_hand").hasTag("sereneseasons:winter_crops")
|
||||
) {
|
||||
errorText = Text.translatable("society.planting_crop.eternal_winter").toJson();
|
||||
}
|
||||
if (biomeTags.toString().includes("sereneseasons:infertile_biomes")) {
|
||||
errorText = Text.translatable("society.planting_crop.infertile_biome").toJson();
|
||||
}
|
||||
if (!seedMessageThrottle(player, 1200, "seed_message_throttle") && errorText) {
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
seedBiomeMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: `${errorText}`,
|
||||
color: "#FF5555",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
seedBiomeMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: `${errorText}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
// BlockEvents.placed(
|
||||
// ([
|
||||
// "minecraft:cactus",
|
||||
// "moreminecarts:glass_cactus",
|
||||
// "minecraft:sugar_cane",
|
||||
// "nethervinery:crimson_grape_bush",
|
||||
// "nethervinery:warped_grape_bush",
|
||||
// "vinery:jungle_grape_bush_red",
|
||||
// "vinery:jungle_grape_bush_white",
|
||||
// "vinery:taiga_grape_bush_white",
|
||||
// "vinery:taiga_grape_bush_red",
|
||||
// "vinery:savanna_grape_bush_white",
|
||||
// "vinery:savanna_grape_bush_red",
|
||||
// "vinery:white_grape_bush",
|
||||
// "vinery:red_grape_bush",
|
||||
// "windswept:wild_berry_bush",
|
||||
// "minecraft:sweet_berry_bush",
|
||||
// ],
|
||||
// (e) => {
|
||||
// const { player, block, server } = e;
|
||||
// let errorText;
|
||||
// if (
|
||||
// ["minecraft:cactus", "moreminecarts:glass_cactus", "minecraft:sugar_cane"].includes(block.id)
|
||||
// ) {
|
||||
// errorText = "This must be planted on Tilled Sand to grow";
|
||||
// }
|
||||
// if (block.id.includes("jungle")) {
|
||||
// errorText = "This Seed must be planted on a Vinery Lattice to grow";
|
||||
// } else if (block.id.includes("grape")) {
|
||||
// errorText = "This must be planted on a Grapevine Stem to grow";
|
||||
// }
|
||||
// if (block.id.includes("berry")) {
|
||||
// errorText = "This berry must be planted on farmland to grow";
|
||||
// }
|
||||
|
||||
// if (errorText) {
|
||||
// global.renderUiText(
|
||||
// player,
|
||||
// server,
|
||||
// {
|
||||
// seedBiomeMessage: {
|
||||
// type: "text",
|
||||
// x: 0,
|
||||
// y: -90,
|
||||
// text: errorText,
|
||||
// color: "#FF5555",
|
||||
// alignX: "center",
|
||||
// alignY: "bottom",
|
||||
// },
|
||||
// seedBiomeMessageShadow: {
|
||||
// type: "text",
|
||||
// x: 1,
|
||||
// z: -1,
|
||||
// y: -89,
|
||||
// text: errorText,
|
||||
// color: "#000000",
|
||||
// alignX: "center",
|
||||
// alignY: "bottom",
|
||||
// },
|
||||
// },
|
||||
// global.mainUiElementIds
|
||||
// );
|
||||
// }
|
||||
// })
|
||||
// );
|
||||
@@ -0,0 +1,40 @@
|
||||
console.info("[SOCIETY] shippingBinNamed.js loaded");
|
||||
|
||||
const shippingBins = [
|
||||
"shippingbin:basic_shipping_bin",
|
||||
"shippingbin:smart_shipping_bin",
|
||||
];
|
||||
|
||||
const getCustomNameJson = (item) => {
|
||||
if (!item || !item.nbt?.display?.Name) return null;
|
||||
return String(item.nbt.display.Name);
|
||||
};
|
||||
|
||||
const getStoredCustomName = (nbt) => {
|
||||
if (!nbt || !nbt.data) return null;
|
||||
return nbt.data.customName || nbt.data.custom_name || null;
|
||||
};
|
||||
|
||||
|
||||
BlockEvents.placed(shippingBins, (e) => {
|
||||
const { player, block } = e;
|
||||
if (!player) return;
|
||||
let item = player.getHeldItem("main_hand");
|
||||
if (item.id !== block.id) item = player.getHeldItem("off_hand");
|
||||
if (item.id !== block.id) return;
|
||||
const customName = getCustomNameJson(item);
|
||||
if (!customName) return;
|
||||
let nbt = block.getEntityData();
|
||||
nbt.merge({ data: { customName: customName } });
|
||||
global.setBlockEntityData(block, nbt);
|
||||
});
|
||||
|
||||
BlockEvents.broken(shippingBins, (e) => {
|
||||
const { block } = e;
|
||||
const nbt = block.getEntityData();
|
||||
const customName = getStoredCustomName(nbt);
|
||||
const drop = customName
|
||||
? Item.of(block.id, `{display:{Name:${NBT.stringTag(String(customName))}}}`)
|
||||
: Item.of(block.id);
|
||||
block.popItem(drop);
|
||||
});
|
||||
@@ -0,0 +1,246 @@
|
||||
console.info("[SOCIETY] skullCavernBroken.js loaded");
|
||||
|
||||
const crashableHammers = [
|
||||
"botania:terra_pick",
|
||||
"justhammers:diamond_impact_hammer",
|
||||
"justhammers:gold_impact_hammer",
|
||||
"justhammers:iron_impact_hammer",
|
||||
"justhammers:stone_impact_hammer",
|
||||
"justhammers:netherite_hammer",
|
||||
"justhammers:diamond_hammer",
|
||||
"justhammers:gold_hammer",
|
||||
"justhammers:iron_hammer",
|
||||
"justhammers:stone_hammer",
|
||||
"justhammers:netherite_impact_hammer",
|
||||
];
|
||||
|
||||
const biomeAirTypeMap = new Map([
|
||||
["society:cavern_top", 0],
|
||||
["society:skull_caves", 0],
|
||||
["society:lush_caverns", 0],
|
||||
["society:frozen_caves", 1],
|
||||
["society:frozen_maelstrom", 1],
|
||||
["society:desert_caves", 2],
|
||||
["society:desert_fault", 2],
|
||||
["society:blackstone_caves", 3],
|
||||
["society:umbra_barrens", 4],
|
||||
]);
|
||||
|
||||
const scheduleFunction = (level, pos, server, rockType) => {
|
||||
if (global.susFunctionLogging)
|
||||
console.log("[SOCIETY-SUSFN] skullCavernBroken.js - Regen Air");
|
||||
server.schedule(5, () => {
|
||||
let toggleBit = level.persistentData.chunkParityMap[level.getChunkAt(pos).pos.toString()].toggleBit;
|
||||
if (!level.isLoaded(pos)) return;
|
||||
if (
|
||||
level.getBlock(pos) &&
|
||||
["minecraft:air", "minecraft:void_air", "minecraft:cave_air"].includes(
|
||||
level.getBlock(pos).id
|
||||
)
|
||||
) {
|
||||
level.getBlock(pos).set("society:cavern_air", {
|
||||
type: String(rockType),
|
||||
chunkbit: toggleBit.toString(),
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
BlockEvents.broken(
|
||||
[
|
||||
"society:stone_boulder",
|
||||
"society:ice_boulder",
|
||||
"society:sandstone_boulder",
|
||||
"society:blackstone_boulder",
|
||||
"society:end_stone_boulder",
|
||||
"minecraft:deepslate_copper_ore",
|
||||
"oreganized:lead_ore",
|
||||
"create:zinc_ore",
|
||||
"create:deepslate_zinc_ore",
|
||||
"society:geode_node",
|
||||
"society:magma_geode_node",
|
||||
"society:omni_geode_node",
|
||||
"society:earth_crystal",
|
||||
"society:fire_quartz",
|
||||
"minecraft:deepslate_emerald_ore",
|
||||
"minecraft:emerald_ore",
|
||||
"minecraft:deepslate_lapis_ore",
|
||||
"minecraft:lapis_ore",
|
||||
"minecraft:deepslate_diamond_ore",
|
||||
"minecraft:diamond_ore",
|
||||
"society:deepslate_sparkstone_ore",
|
||||
"society:sparkstone_ore",
|
||||
"society:deepslate_iridium_ore",
|
||||
"society:iridium_ore",
|
||||
"minecraft:copper_ore",
|
||||
"minecraft:deepslate_iron_ore",
|
||||
"minecraft:iron_ore",
|
||||
"minecraft:coal_ore",
|
||||
"minecraft:deepslate_coal_ore",
|
||||
"minecraft:deepslate_redstone_ore",
|
||||
"minecraft:redstone_ore",
|
||||
"oreganized:deepslate_silver_ore",
|
||||
"oreganized:silver_ore",
|
||||
"minecraft:deepslate_gold_ore",
|
||||
"minecraft:gold_ore",
|
||||
"oreganized:deepslate_lead_ore",
|
||||
"society:grimwood_supply_crate",
|
||||
"society:oak_supply_crate",
|
||||
"society:spruce_supply_crate",
|
||||
"society:palm_supply_crate",
|
||||
],
|
||||
(e) => {
|
||||
const { level, block, player, server } = e;
|
||||
const pos = block.getPos();
|
||||
if (level.dimension === "society:skull_cavern") {
|
||||
if (global.disableHammersSkullCavern && crashableHammers.includes(player.getHeldItem("main_hand").id)) {
|
||||
server.runCommandSilent(
|
||||
`dialog ${player.username} show ${player.username} ${player.getHeldItem("main_hand").id.equals("botania:terra_pick") ? "goddess_unique_skull_cavern_shatterer" : "goddess_unique_skull_cavern_hammer"}`
|
||||
);
|
||||
e.cancel();
|
||||
}
|
||||
let rockType = biomeAirTypeMap.get(`${block.biomeId.toString()}`);
|
||||
scheduleFunction(level, pos.immutable(), server, rockType);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const scheduleUnplaceableRegenFunction = (level, pos, server, id) => {
|
||||
server.scheduleInTicks(100, () => {
|
||||
if (!level.isLoaded(pos)) return;
|
||||
if (level.getBlock(pos) == "minecraft:air") {
|
||||
level.getBlock(pos).set(id);
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
pos.x,
|
||||
pos.y + 0.5,
|
||||
pos.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
5,
|
||||
2
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
// Skull Cavern unplacable tag
|
||||
BlockEvents.broken(
|
||||
[
|
||||
"atmospheric:arid_sand",
|
||||
"atmospheric:red_arid_sand",
|
||||
"minecraft:sand",
|
||||
"minecraft:basalt",
|
||||
"minecraft:end_stone",
|
||||
"minecraft:magma_block",
|
||||
"oreganized:glance",
|
||||
"oreganized:glance_bricks",
|
||||
"oreganized:polished_glance",
|
||||
"minecraft:moss_block",
|
||||
"minecraft:pale_moss_block",
|
||||
"oreganized:spotted_glance",
|
||||
"minecraft:snow_block",
|
||||
"minecraft:blue_ice",
|
||||
"minecraft:packed_ice",
|
||||
],
|
||||
(e) => {
|
||||
const { level, block, server } = e;
|
||||
const unplacablePos = block.getPos();
|
||||
if (level.dimension === "society:skull_cavern") {
|
||||
scheduleUnplaceableRegenFunction(
|
||||
level,
|
||||
unplacablePos.immutable(),
|
||||
server,
|
||||
block.getId()
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
LevelEvents.beforeExplosion((e) => {
|
||||
const { x, y, z, size, level, server } = e;
|
||||
if (level.dimension === "society:skull_cavern") {
|
||||
if (global.susFunctionLogging)
|
||||
console.log("[SOCIETY-SUSFN] skullCavernBroken.js - explosion");
|
||||
let range = Math.round(Math.floor((size * 1.3) / 0.225) * 0.5);
|
||||
let blocks = [];
|
||||
|
||||
for (let xi = Math.floor(x - range); xi <= Math.ceil(x + range); xi++) {
|
||||
for (let zi = Math.floor(z - range); zi <= Math.ceil(z + range); zi++) {
|
||||
for (let yi = Math.floor(y - range); yi <= Math.ceil(y + range); yi++) {
|
||||
let dist = Math.hypot(x - xi, y - yi, z - zi);
|
||||
if (dist <= range) {
|
||||
let block = level.getBlock(xi, yi, zi);
|
||||
if (block.hasTag("society:skull_cavern_bomb_denied")) {
|
||||
blocks.push({ xi: xi, yi: yi, zi: zi, dist: dist, id: block.id });
|
||||
} else if (block.hasTag("society:skull_cavern_regens")) {
|
||||
let rockType = biomeAirTypeMap.get(`${block.biomeId.toString()}`);
|
||||
scheduleFunction(level, block.pos.immutable(), server, rockType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
blocks.sort((a, b) => a.dist - b.dist);
|
||||
|
||||
for (let i = 0; i < blocks.length; i++) {
|
||||
let { xi, yi, zi, id } = blocks[i];
|
||||
server.scheduleInTicks(i, () => {
|
||||
level.getBlock(xi, yi, zi).set(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.broken("society:skull_cavern_teleporter", (e) => {
|
||||
const { level } = e;
|
||||
if (level.dimension === "society:skull_cavern") e.cancel();
|
||||
});
|
||||
|
||||
BlockEvents.broken(
|
||||
[
|
||||
"society:stone_boulder",
|
||||
"society:ice_boulder",
|
||||
"society:sandstone_boulder",
|
||||
"society:blackstone_boulder",
|
||||
"society:end_stone_boulder",
|
||||
],
|
||||
(e) => {
|
||||
const { level, player, server, block } = e;
|
||||
if (player.stages.has("moon_rope_reveal") && Math.random() < 0.15) {
|
||||
const { x, y, z } = block;
|
||||
let scanBlock;
|
||||
let abovePos;
|
||||
let radius = 8;
|
||||
for (let pos of BlockPos.betweenClosed(
|
||||
new BlockPos(x - radius, y - radius, z - radius),
|
||||
[x + radius, y + radius, z + radius]
|
||||
)) {
|
||||
if (!level.isLoaded(pos)) continue;
|
||||
scanBlock = level.getBlock(pos);
|
||||
abovePos = scanBlock.getPos().above();
|
||||
if (
|
||||
scanBlock.id == "farmersdelight:rope" &&
|
||||
level.getBlock(abovePos).id != "farmersdelight:rope"
|
||||
) {
|
||||
level.spawnParticles(
|
||||
"species:spectre_pop",
|
||||
true,
|
||||
abovePos.x,
|
||||
abovePos.y + 0.5,
|
||||
abovePos.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound create:peculiar_bell_use block @a ${abovePos.x} ${abovePos.y} ${abovePos.z}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,64 @@
|
||||
console.info("[SOCIETY] skullCavernPlace.js loaded");
|
||||
|
||||
BlockEvents.placed((e) => {
|
||||
const { player, block, level, server } = e;
|
||||
if (level.dimension === "society:skull_cavern") {
|
||||
if (
|
||||
block.hasTag("society:skull_cavern_unplacable") &&
|
||||
!player.isCreative()
|
||||
) {
|
||||
let message = Text.translatable(
|
||||
"society.skull_cavern.prevent_block_place"
|
||||
).toJson();
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
skullCavernPlaceBlockMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: `${message}`,
|
||||
color: "#FF5555",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
skullCavernPlaceBlockMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: `${message}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
e.player.inventoryMenu.broadcastFullState();
|
||||
e.cancel();
|
||||
} else if (global.skullCavernHardmode) {
|
||||
server.scheduleInTicks(0, () => {
|
||||
server.scheduleInTicks(
|
||||
block.id === "minecraft:torch" ? 1200 : 200,
|
||||
() => {
|
||||
level.destroyBlock(block.pos, true);
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
block.x,
|
||||
block.y + 0.5,
|
||||
block.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
5,
|
||||
2
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,74 @@
|
||||
console.info("[SOCIETY] skullTeleporter.js loaded");
|
||||
|
||||
BlockEvents.leftClicked("society:skull_cavern_teleporter", (e) => {
|
||||
if (e.level.dimension === "society:skull_cavern") e.cancel();
|
||||
});
|
||||
BlockEvents.rightClicked("society:skull_cavern_teleporter", (e) => {
|
||||
const { block, player, level, item, hand, server } = e;
|
||||
const { x, z } = block;
|
||||
let errorText;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (item === 'society:magic_rope') e.cancel();
|
||||
if (!player.stages.has("entered_skull_cavern")) player.stages.add("entered_skull_cavern");
|
||||
if (level.dimension === "society:skull_cavern") {
|
||||
player.persistentData.skullCavernEnterDay = -1;
|
||||
global.teleportHome(player, server, level);
|
||||
} else if (level.dimension !== "society:skull_cavern") {
|
||||
if (level.dayTime() % 24000 > 18000) {
|
||||
errorText = Text.translatable("society.skull_cavern.too_late").toJson();
|
||||
} else {
|
||||
if (!player.stages.has("skull_cavern_intro")) {
|
||||
player.stages.add("skull_cavern_intro");
|
||||
player.tell(Text.translatable("society.skull_cavern.intro").gold());
|
||||
player.tell(Text.translatable("society.new_villager.message").green());
|
||||
player.give(Item.of("gag:escape_rope"));
|
||||
let noteTitle = global.translatableWithFallback("society.skull_cavern.intro.note.title", "A Warning").getString();
|
||||
let noteAuthor = global.translatableWithFallback("society.skull_cavern.intro.note.author", "someone...").getString();
|
||||
let noteText = Text.translatable("society.skull_cavern.intro.note").toJson();
|
||||
player.give(
|
||||
global.getNotePaperItem(noteAuthor, noteText, noteTitle)
|
||||
);
|
||||
}
|
||||
player.teleportTo("society:skull_cavern", x, 512, z, 0, 0);
|
||||
player.persistentData.skullCavernEnterDay = global.getDay(level);
|
||||
let playerLevel = player.getLevel()
|
||||
if (playerLevel.dimension === "society:skull_cavern") {
|
||||
playerLevel.getBlock(x, 511, z).set("society:skull_cavern_teleporter");
|
||||
} else {
|
||||
server.scheduleInTicks(10, () => {
|
||||
player.getLevel().getBlock(x, 511, z).set("society:skull_cavern_teleporter");
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
errorText = Text.translatable("society.skull_cavern.invalid_dimension").toJson();
|
||||
}
|
||||
if (errorText) {
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
skullTeleportMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: `${errorText}`,
|
||||
color: "#FF5555",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
skullTeleportMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: `${errorText}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
console.info("[SOCIETY] slimeContainProtect.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("splendid_slimes:slime_incubator", (e) => {
|
||||
const { block, player, hand, item, server } = e;
|
||||
if (player.isFake() || player.isCrouching()) return;
|
||||
if (hand == "OFF_HAND") return;
|
||||
const heldItem = item.getId();
|
||||
const facing = block.getProperties().facing;
|
||||
if (block.properties.get("working") === "true") return;
|
||||
|
||||
if (Math.random() < 0.15 && heldItem == "splendid_slimes:slime_heart") {
|
||||
if (!player.stages.has("slime_contain_protect")) {
|
||||
block.popItemFromFace("society:slime_contain_protect", facing);
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
} else {
|
||||
block.popItemFromFace("splendid_slimes:slime_ticket", facing);
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,95 @@
|
||||
console.info("[SOCIETY] slotMachine.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("tanukidecor:slot_machine", (e) => {
|
||||
const { block, player, hand, item, server } = e;
|
||||
if (player.isFake() || player.isCrouching()) return;
|
||||
if (hand == "OFF_HAND") return;
|
||||
const coins = [
|
||||
"numismatics:spur",
|
||||
"numismatics:bevel",
|
||||
"numismatics:sprocket",
|
||||
"numismatics:cog",
|
||||
"numismatics:crown",
|
||||
"numismatics:sun",
|
||||
"numismatics:ancient_coin",
|
||||
"numismatics:neptunium_coin",
|
||||
"numismatics:prismatic_coin",
|
||||
];
|
||||
const prismaticCoins = [
|
||||
"numismatics:sun",
|
||||
"numismatics:neptunium_coin",
|
||||
"numismatics:ancient_coin",
|
||||
"numismatics:prismatic_coin",
|
||||
];
|
||||
const heldItem = item.getId();
|
||||
const facing = block.getProperties().facing;
|
||||
const half = block.getProperties().half;
|
||||
const entityHalf = half === "upper" ? block : block.up;
|
||||
|
||||
if (entityHalf.getEntityData().StartTime !== 0.0) {
|
||||
e.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (block.properties.get("working") === "true") return;
|
||||
block.set(block.id, {
|
||||
facing: block.properties.get("facing"),
|
||||
half: block.properties.get("half"),
|
||||
waterlogged: block.properties.get("waterlogged"),
|
||||
working: true,
|
||||
});
|
||||
|
||||
if (coins.includes(heldItem)) {
|
||||
item.count--;
|
||||
|
||||
server.scheduleInTicks(115, () => {
|
||||
const { x, y, z } = entityHalf.getEntityData().SlotRotations;
|
||||
if (x === y && y === z) {
|
||||
const itemAddition = player.stages.has("the_red_and_the_black") ? 1 : 0;
|
||||
block.popItemFromFace(`${3 + itemAddition}x ${heldItem}`, facing);
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
if (
|
||||
prismaticCoins.includes(heldItem) &&
|
||||
player.stages.has("adventuring_mastery") &&
|
||||
!player.stages.has("the_red_and_the_black") &&
|
||||
Math.random() < 0.05
|
||||
) {
|
||||
block.popItemFromFace(`1x society:the_red_and_the_black`, facing);
|
||||
server.tell(
|
||||
Text.translatable(
|
||||
"society.slot_machine.win_big",
|
||||
Text.red(`${player.username}`)
|
||||
).black()
|
||||
);
|
||||
}
|
||||
if (
|
||||
prismaticCoins.includes(heldItem) &&
|
||||
Math.random() < (heldItem === "numismatics:sun" ? 0.005 : 0.1)
|
||||
) {
|
||||
block.popItemFromFace(
|
||||
`${1 + itemAddition}x society:prismatic_shard`,
|
||||
facing
|
||||
);
|
||||
server.tell(
|
||||
Text.translatable(
|
||||
"society.slot_machine.win_big",
|
||||
Text.gold(`${player.username}`)
|
||||
).gray()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:fish_escape block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
}
|
||||
block.set(block.id, {
|
||||
facing: block.properties.get("facing"),
|
||||
half: block.properties.get("half"),
|
||||
waterlogged: block.properties.get("waterlogged"),
|
||||
working: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
console.info("[SOCIETY] treechopSkill.js loaded");
|
||||
|
||||
BlockEvents.broken("treechop:chopped_log", (e) => {
|
||||
const { player, block, level } = e;
|
||||
if (Math.random() <= 0.005 && !player.stages.has("wuthering_logs")) {
|
||||
block.popItem("society:wuthering_logs");
|
||||
}
|
||||
if (
|
||||
Math.random() <= 0.15 &&
|
||||
player.stages.has("wuthering_logs") &&
|
||||
block.id === "treechop:chopped_log"
|
||||
) {
|
||||
block.popItem("meadow:fire_log");
|
||||
}
|
||||
|
||||
const season = global.getSeasonFromLevel(level);
|
||||
if (
|
||||
Math.random() <= 0.005 &&
|
||||
season === "autumn" &&
|
||||
!player.stages.has("alias_moss")
|
||||
) {
|
||||
block.popItem("society:alias_moss");
|
||||
}
|
||||
if (
|
||||
Math.random() <= 0.08 &&
|
||||
(player.stages.has("alias_moss") || season === "autumn") &&
|
||||
block.id === "treechop:chopped_log"
|
||||
) {
|
||||
block.popItem("society:mossberry");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
console.info("[SOCIETY] updateBountyBoard.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("bountiful:bountyboard", (e) => {
|
||||
const { level, block } = e;
|
||||
let seasonalBounties = ["summer", "spring", "autumn", "winter"];
|
||||
let blockNbt = block.getEntityData();
|
||||
const decrees = blockNbt.decree_inv.Items;
|
||||
let isSeasonal;
|
||||
let hasChanged;
|
||||
for (let index = 0; index < decrees.length; index++) {
|
||||
seasonalBounties.forEach((season) => {
|
||||
if (!isSeasonal)
|
||||
isSeasonal = decrees[index].tag["bountiful:decree_data"].toString().includes(season);
|
||||
});
|
||||
if (isSeasonal) {
|
||||
blockNbt.decree_inv.Items[index].tag["bountiful:decree_data"] = Object(
|
||||
`{"ids":["${global.getSeasonFromLevel(level)}"]}`
|
||||
);
|
||||
isSeasonal = false;
|
||||
hasChanged = true;
|
||||
}
|
||||
}
|
||||
if (hasChanged) {
|
||||
global.setBlockEntityData(block, blockNbt);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
console.info("[SOCIETY] upgradeSparkstoneMachines.js loaded");
|
||||
|
||||
BlockEvents.rightClicked("society:fish_pond_basket", (e) => {
|
||||
const { player, item, block, hand, level } = e;
|
||||
const upgraded = block.properties.get("upgraded").toLowerCase() == "true";
|
||||
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (hand == "MAIN_HAND" && !upgraded && item == "minecraft:bucket") {
|
||||
if (!player.isCreative()) item.count--;
|
||||
level.spawnParticles(
|
||||
"farmersdelight:star",
|
||||
true,
|
||||
block.x,
|
||||
block.y + 1,
|
||||
block.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
3,
|
||||
0.01
|
||||
);
|
||||
block.set(block.id, {
|
||||
upgraded: true,
|
||||
waterlogged: block.properties.get("waterlogged"),
|
||||
});
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked("society:auto_grabber", (e) => {
|
||||
const { player, item, block, hand, level } = e;
|
||||
const upgraded = block.properties.get("upgraded").toLowerCase() == "true";
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (hand == "MAIN_HAND" && !upgraded && item == "society:magic_shears") {
|
||||
if (!player.isCreative()) item.count--;
|
||||
level.spawnParticles(
|
||||
"farmersdelight:star",
|
||||
true,
|
||||
block.x,
|
||||
block.y + 1,
|
||||
block.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
3,
|
||||
0.01
|
||||
);
|
||||
block.set(block.id, {
|
||||
upgraded: true,
|
||||
facing: block.properties.get("facing"),
|
||||
});
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,214 @@
|
||||
// const runBountyDataGen = false;
|
||||
|
||||
// const createDecree = (name, items, mult, pricyThreshold, amountFunction) => {
|
||||
// let objs = { content: {} };
|
||||
// let tradeEntry;
|
||||
// let pricy;
|
||||
// items.forEach((item) => {
|
||||
// tradeEntry = global.trades.get(item);
|
||||
// if (tradeEntry) {
|
||||
// pricy = tradeEntry.value > pricyThreshold;
|
||||
// objs.content[`${name}_${item.path}`] = {
|
||||
// type: "minecraft:item",
|
||||
// content: item,
|
||||
// rarity: pricy ? "UNCOMMON" : "COMMON",
|
||||
// weightMult: pricy ? 0.5 : 1,
|
||||
// amount: (amountFunction && amountFunction(pricy)) || {
|
||||
// min: pricy ? 1 : 2,
|
||||
// max: pricy ? 4 : 8,
|
||||
// },
|
||||
// unitWorth: tradeEntry.value * mult,
|
||||
// };
|
||||
// } else console.log("ERROR: Couldn't generate bounty entry for " + item);
|
||||
// });
|
||||
// JsonIO.write(`kubejs/data/bountiful/bounty_pools/society/${name}_objs.json`, objs);
|
||||
// JsonIO.write(`kubejs/data/bountiful/bounty_decrees/society/${name}.json`, {
|
||||
// objectives: [`${name}_objs`],
|
||||
// rewards: ["coin_rews"],
|
||||
// });
|
||||
// };
|
||||
|
||||
// const createSeasonalDecree = (season, items) => {
|
||||
// let objs = { content: {} };
|
||||
// let tradeEntry;
|
||||
// let pricy;
|
||||
// let crop;
|
||||
// items.forEach((item) => {
|
||||
// tradeEntry = global.trades.get(item);
|
||||
// if (tradeEntry) {
|
||||
// pricy = tradeEntry.value > 64;
|
||||
// crop = Item.of(item).hasTag("forge:crops");
|
||||
// objs.content[`${season}_${item.path}`] = {
|
||||
// type: "minecraft:item",
|
||||
// content: item,
|
||||
// rarity: pricy ? "UNCOMMON" : "COMMON",
|
||||
// weightMult: pricy ? 0.5 : 1,
|
||||
// amount: crop
|
||||
// ? {
|
||||
// min: pricy ? 4 : 16,
|
||||
// max: pricy ? 8 : 48,
|
||||
// }
|
||||
// : {
|
||||
// min: pricy ? 1 : 2,
|
||||
// max: pricy ? 4 : 8,
|
||||
// },
|
||||
// unitWorth: tradeEntry.value * 3,
|
||||
// };
|
||||
// } else console.log("ERROR: Couldn't generate bounty entry for " + item);
|
||||
// });
|
||||
// JsonIO.write(`kubejs/data/bountiful/bounty_pools/society/${season}_objs.json`, objs);
|
||||
// JsonIO.write(`kubejs/data/bountiful/bounty_decrees/society/${season}.json`, {
|
||||
// objectives: [`${season}_objs`],
|
||||
// rewards: ["coin_rews"],
|
||||
// });
|
||||
// };
|
||||
|
||||
// if (runBountyDataGen) {
|
||||
// createSeasonalDecree("spring", [
|
||||
// "society:salmonberry",
|
||||
// "farm_and_charm:onion",
|
||||
// "unusualfishmod:raw_beaked_herring",
|
||||
// "aquaculture:jellyfish",
|
||||
// "farm_and_charm:strawberry",
|
||||
// "farm_and_charm:lettuce",
|
||||
// "veggiesdelight:garlic",
|
||||
// "unusualfishmod:raw_drooping_gourami",
|
||||
// "veggiesdelight:cauliflower",
|
||||
// "farmersdelight:tomato",
|
||||
// "minecraft:carrot",
|
||||
// "pamhc2trees:lycheeitem",
|
||||
// "vinery:cherry",
|
||||
// "aquaculture:atlantic_herring",
|
||||
// "aquaculture:pink_salmon",
|
||||
// "unusualfishmod:raw_hatchetfish",
|
||||
// "minecraft:cod",
|
||||
// "minecraft:potato",
|
||||
// "minecraft:tropical_fish",
|
||||
// "vintagedelight:cucumber",
|
||||
// ]);
|
||||
// createSeasonalDecree("summer", [
|
||||
// "vintagedelight:ghost_pepper",
|
||||
// "farm_and_charm:corn",
|
||||
// "society:blueberry",
|
||||
// "minecraft:melon_slice",
|
||||
// "minecraft:tropical_fish",
|
||||
// "aquaculture:red_grouper",
|
||||
// "aquaculture:tuna",
|
||||
// "aquaculture:tambaqui",
|
||||
// "society:boysenberry",
|
||||
// "veggiesdelight:bellpepper",
|
||||
// "pamhc2trees:bananaitem",
|
||||
// "pamhc2trees:mangoitem",
|
||||
// "farm_and_charm:oat",
|
||||
// "minecraft:cocoa_beans",
|
||||
// "farmersdelight:tomato",
|
||||
// "pamhc2trees:peachitem",
|
||||
// "minecraft:wheat",
|
||||
// "atmospheric:orange",
|
||||
// "minecraft:salmon",
|
||||
// "aquaculture:synodontis",
|
||||
// "aquaculture:leech",
|
||||
// "unusualfishmod:raw_sneep_snorp",
|
||||
// "aquaculture:jellyfish",
|
||||
// ]);
|
||||
// createSeasonalDecree("autumn", [
|
||||
// "minecraft:carrot",
|
||||
// "minecraft:wheat",
|
||||
// "farm_and_charm:corn",
|
||||
// "minecraft:apple",
|
||||
// "veggiesdelight:sweet_potato",
|
||||
// "pamhc2trees:plumitem",
|
||||
// "farm_and_charm:barley",
|
||||
// "society:eggplant",
|
||||
// "aquaculture:blackfish",
|
||||
// "minecraft:salmon",
|
||||
// "aquaculture:brown_trout",
|
||||
// "aquaculture:gar",
|
||||
// "minecraft:beetroot",
|
||||
// "farmersdelight:cabbage",
|
||||
// "unusualfishmod:raw_forkfish",
|
||||
// "unusualfishmod:raw_sailor_barb",
|
||||
// "society:cranberry",
|
||||
// "aquaculture:muskellunge",
|
||||
// "vintagedelight:peanut",
|
||||
// ]);
|
||||
// createSeasonalDecree("winter", [
|
||||
// "pamhc2trees:dragonfruititem",
|
||||
// "pamhc2trees:cinnamonitem",
|
||||
// "society:frozen_tear",
|
||||
// "aquaculture:blackfish",
|
||||
// "aquaculture:atlantic_cod",
|
||||
// "society:crystalberry",
|
||||
// "farmersdelight:cabbage",
|
||||
// "society:tubabacco_leaf",
|
||||
// "aquaculture:atlantic_herring",
|
||||
// "aquaculture:pink_salmon",
|
||||
// "aquaculture:brown_trout",
|
||||
// "aquaculture:pollock",
|
||||
// "snowyspirit:ginger",
|
||||
// "unusualfishmod:raw_triple_twirl_pleco",
|
||||
// "aquaculture:perch",
|
||||
// "farm_and_charm:barley",
|
||||
// "minecraft:cod",
|
||||
// "unusualfishmod:raw_snowflake",
|
||||
// ]);
|
||||
// createDecree("cooking", Ingredient.of("#society:dish").itemIds, 3, 256);
|
||||
// createDecree("fishing", Ingredient.of("#minecraft:fishes").itemIds, 4, 128);
|
||||
// createDecree(
|
||||
// "geologist",
|
||||
// [
|
||||
// "minecraft:raw_copper",
|
||||
// "minecraft:raw_copper_block",
|
||||
// "minecraft:raw_iron",
|
||||
// "minecraft:raw_iron_block",
|
||||
// "minecraft:raw_gold",
|
||||
// "minecraft:raw_gold_block",
|
||||
// "etcetera:raw_bismuth",
|
||||
// "etcetera:raw_bismuth_block",
|
||||
// "minecraft:redstone",
|
||||
// "minecraft:redstone_block",
|
||||
// "minecraft:quartz",
|
||||
// "minecraft:quartz_block",
|
||||
// "minecraft:lapis_lazuli",
|
||||
// "minecraft:lapis_block",
|
||||
// "society:geode",
|
||||
// "society:frozen_geode",
|
||||
// "society:magma_geode",
|
||||
// "society:topaz",
|
||||
// "society:ruby",
|
||||
// "society:amethyst_chunk",
|
||||
// "society:sparkstone",
|
||||
// "society:sparkstone_block",
|
||||
// "minecraft:netherite_scrap",
|
||||
// "minecraft:diamond",
|
||||
// "minecraft:diamond_block",
|
||||
// "society:omni_geode",
|
||||
// "society:earth_crystal",
|
||||
// "society:fire_quartz",
|
||||
// "society:aquamarine",
|
||||
// "society:jade",
|
||||
// "oreganized:raw_lead",
|
||||
// "oreganized:raw_lead_block",
|
||||
// "oreganized:raw_silver",
|
||||
// "oreganized:raw_silver_block",
|
||||
// "society:prismatic_shard",
|
||||
// ],
|
||||
// 3,
|
||||
// 48,
|
||||
// (pricy) => ({ min: pricy ? 1 : 8, max: pricy ? 4 : 32 })
|
||||
// );
|
||||
// createDecree(
|
||||
// "artisan",
|
||||
// global.artisanGoods
|
||||
// .map((x) => x.item)
|
||||
// .filter((item) => !item.includes("aged"))
|
||||
// .concat(global.wines.map((x) => x.item).filter((item) => !item.includes("aged")))
|
||||
// .concat(global.brews.map((x) => x.item).filter((item) => !item.includes("aged"))),
|
||||
// 3,
|
||||
// 2048,
|
||||
// (pricy) => ({
|
||||
// min: pricy ? 1 : 2,
|
||||
// max: pricy ? 2 : 4,
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
@@ -0,0 +1,113 @@
|
||||
// const runBuildingShopDatagen = true;
|
||||
|
||||
// const farmBuildingTypes = [
|
||||
// { type: "home", price: 6, name: "Farmhouse", catalyst: "tanukidecor:antique_bed" },
|
||||
// { type: "shed", price: 1, name: "Shed", catalyst: "society:preserves_jar" },
|
||||
// { type: "large_shed", price: 3, name: "Large Shed", catalyst: "society:aging_cask" },
|
||||
// { type: "coop", price: 2, name: "Coop", catalyst: "minecraft:egg" },
|
||||
// { type: "barn", price: 4, name: "Barn", catalyst: "society:milk" },
|
||||
// { type: "deluxe_barn", price: 12, name: "Deluxe Barn", catalyst: "society:large_milk" },
|
||||
// { type: "greenhouse", price: 2, name: "Greenhouse", catalyst: "moreminecarts:chiseled_organic_glass" }
|
||||
// ];
|
||||
|
||||
// const villagerfarmBuildingTypes = [
|
||||
// { type: "carpenter", price: 2, name: "Carpenter", catalyst: "sawmill:sawmill" },
|
||||
// { type: "blacksmith", price: 2, name: "Blacksmith", catalyst: "minecraft:anvil" },
|
||||
// { type: "shepherd", price: 2, name: "Shepherd", catalyst: "society:feeding_trough" },
|
||||
// { type: "market", price: 2, name: "Market", catalyst: "minecraft:composter" },
|
||||
// { type: "fisher", price: 2, name: "Fisher", catalyst: "aquaculture:worm_farm" },
|
||||
// { type: "banker", price: 3, name: "Banker", catalyst: "numismatics:bank_terminal" },
|
||||
// { type: "librarian", price: 5, name: "Librarian", catalyst: "minecraft:book" },
|
||||
// { type: "witch", price: 4, name: "Witch", catalyst: 'society:crystal_of_regret_mining' },
|
||||
// { type: "trader", price: 5, name: "Trader", catalyst: "society:ancient_cog" }
|
||||
// ];
|
||||
|
||||
// const buildingSets = ["basic", "alpine", "arid", "bamboo", "bavarian", "cherry", "entrana", "floral", "mason", "prismarine", "rural", "sakura", "siberian", "tudor", "vibrantown"];
|
||||
// const villagerBuildingSets = ["basic", "rural"];
|
||||
|
||||
// let langStrings = {};
|
||||
// let blueprintLangStrings = {};
|
||||
|
||||
// const setGenerationFunction = (sets, buildingTypes, villager) => {
|
||||
// let shopJson = {};
|
||||
// let shopTrades;
|
||||
// let shopIds = [];
|
||||
// let langPrefix;
|
||||
|
||||
// buildingTypes.forEach((buildingType) => {
|
||||
// let { type, price, name, catalyst } = buildingType;
|
||||
|
||||
// langStrings[`shop.society_trading.building_shop.${type}`] = `${global.formatName(type)}${villager ? " Home" : ""}`;
|
||||
// shopTrades = [];
|
||||
|
||||
// sets.forEach((set) => {
|
||||
// langPrefix = `portable_blueprints.worn_blueprint.${set}_${type}`;
|
||||
// blueprintLangStrings[langPrefix] = `${global.formatName(set)} ${name}${villager ? " Home" : ""}`;
|
||||
// blueprintLangStrings[`${langPrefix}.author`] = "Designed by: ";
|
||||
// blueprintLangStrings[`${langPrefix}.dimensions`] = "";
|
||||
|
||||
// shopTrades.push({
|
||||
// offer: {
|
||||
// item: "portable_blueprints:worn_blueprint",
|
||||
// nbt: `{Damage:1,allow_nbt:1,altezza:0,blueprint_name:"${type}_${set}",buildAnyway:0b,display:{Name:\'{\"italic\":false,\"color\":\"#FFFF00\",\"translate\":\"${langPrefix}\"}\',Lore:[\'{\"italic\":false,\"color\":\"#FFFF00\",\"translate\":\"${langPrefix}.author\"}\']},free_build:1,inventari_blocco_selezionati:"",lunghezzaX:0,lunghezzaZ:0,mirrowX:0b,mirrowY:0b,mirrowZ:0b,nome:"${type}_${set}",owner:"worn",owner_name:Ace,remaining_uses:1,rotateValue:0s,skipObstructionBlock:0b,visualizeBuild:1b,wasHolding:1b,worn_set:1b}`,
|
||||
// count: 1
|
||||
// },
|
||||
// request: {
|
||||
// item: type.includes("greenhouse") ? "society:greenhouse_building_supplies" : "society:building_supplies",
|
||||
// count: price
|
||||
// },
|
||||
// image: `society:textures/gui/buildings/${set}/${type}_${set}`,
|
||||
// image_description: `${langPrefix}.dimensions`,
|
||||
// trade_id: `bs_${type}_${set}`
|
||||
// });
|
||||
// });
|
||||
|
||||
// shopIds.push(`bs_${type}`);
|
||||
// shopJson = {
|
||||
// shop_id: `bs_${type}`,
|
||||
// name: `shop.society_trading.building_shop.${type}`,
|
||||
// texture: "dialog:textures/portraits/carpenter",
|
||||
// hidden_from_selector: true,
|
||||
// display_type: "image",
|
||||
// jei_catalyst: {
|
||||
// item: catalyst
|
||||
// },
|
||||
// trades: shopTrades
|
||||
// };
|
||||
|
||||
// JsonIO.write(`kubejs/data/society_trading/shops/bs_${type}.json`, shopJson);
|
||||
// });
|
||||
|
||||
// let prefix = villager ? "town_" : "";
|
||||
// let selector = {
|
||||
// selector_id: `${prefix}building_shop`,
|
||||
// name: `selector.society_trading.${prefix}building_shop`,
|
||||
// shop_ids: shopIds
|
||||
// };
|
||||
// JsonIO.write(`kubejs/data/society_trading/selectors/${prefix}building_shop.json`, selector);
|
||||
// };
|
||||
|
||||
// if (runBuildingShopDatagen) {
|
||||
// setGenerationFunction(buildingSets, farmBuildingTypes, false);
|
||||
// setGenerationFunction(villagerBuildingSets, villagerfarmBuildingTypes, true);
|
||||
|
||||
// JsonIO.write(
|
||||
// `kubejs/assets/society_trading/lang/building_shop_generated.json`,
|
||||
// Object.keys(langStrings)
|
||||
// .sort()
|
||||
// .reduce((acc, key) => {
|
||||
// acc[key] = langStrings[key];
|
||||
// return acc;
|
||||
// }, {})
|
||||
// );
|
||||
|
||||
// JsonIO.write(
|
||||
// `kubejs/assets/portable_blueprints/lang/building_shop_generated.json`,
|
||||
// Object.keys(blueprintLangStrings)
|
||||
// .sort()
|
||||
// .reduce((acc, key) => {
|
||||
// acc[key] = blueprintLangStrings[key];
|
||||
// return acc;
|
||||
// }, {})
|
||||
// );
|
||||
// }
|
||||
@@ -0,0 +1,130 @@
|
||||
|
||||
// const formatItemName = (id) => Item.of(id).displayName.getString().replace('[', '').replace(']', '')
|
||||
// let wikiTable = []
|
||||
// const blacklist = ['herbalbrews:dried_green_tea', 'unusualfishmod:raw_aero_mono_stick', 'herbalbrews:dried_black_tea', 'herbalbrews:dried_oolong_tea', 'brewery:dried_wheat', 'brewery:dried_barley', 'brewery:dried_corn', 'brewery:dried_oat']
|
||||
// const dessertBlacklist = ['veggiesdelight:sweet_potato_pancakes', 'farm_and_charm:oat_pancake', 'autumnity:cooked_turkey_piece', 'candlelight:beef_tartare', 'farmersdelight:shepherds_pie_block', 'farmersdelight:honey_glazed_ham', 'farmersdelight:honey_glazed_ham_block', 'farmersdelight:shepherds_pie', 'crabbersdelight:crab_cakes']
|
||||
// let dishGenerator = (dish, productType, categoryOverride) => {
|
||||
// if (blacklist.includes(dish.item)) return;
|
||||
// let category = "main";
|
||||
// if (!dessertBlacklist.includes(dish.item)) {
|
||||
// [ 'misslilitu_biscuit', 'icecream', "popsicle", "jam", "tart", "sorbet", "muffin", "candy", "candied", "pie", "cake", "Slice of", "cookie", "pudding", "jam", "jelly", "sweet", "tart", "chocolate", "snow", "gateau", "custard", "honey"].forEach((keyword) => {
|
||||
// if (dish.item.path.includes(keyword)) category = "dessert"
|
||||
// });
|
||||
// }
|
||||
// ["bottle", "drink", "cocktail", "eggnog", "coffee", "latte", "shake", "_tea", "water", "juice", "cider", "hot_cocoa"].forEach((keyword) => {
|
||||
// if (dish.item.path.includes(keyword)) category = "drink"
|
||||
// });
|
||||
|
||||
|
||||
// let bottleDrink = ['create:builders_tea', 'crabbersdelight:kelp_shake', 'snowyspirit:eggnog', "herbalbrews:green_tea", "herbalbrews:black_tea", "herbalbrews:hibiscus_tea", "herbalbrews:lavender_tea", "herbalbrews:coffee", "herbalbrews:milk_coffee", "herbalbrews:rooibos_tea", "herbalbrews:oolong_tea", "herbalbrews:yerba_mate_tea", "herbalbrews:cinnamon_coffee", "herbalbrews:hazelnut_coffee", "herbalbrews:chai_tea"];
|
||||
// let bowlFood = ["candlelight:beef_wellington", "candlelight:lasagne", "candlelight:chicken_with_vegetables", "candlelight:chicken_alfredo", "candlelight:salmon_on_white_wine", "candlelight:fillet_steak", "candlelight:tropical_fish_supreme", "candlelight:roasted_lamb_with_lettuce", "candlelight:roastbeef_with_glazed_carrots", "candlelight:khinkali", "candlelight:pork_ribs", "candlelight:tomato_mozzarella_salad", "candlelight:beef_with_mushroom_in_wine_and_potatoes", "candlelight:harvest_plate", "candlelight:fresh_garden_salad", "candlelight:omelet", "candlelight:pasta_with_lettuce", "candlelight:pasta_with_bolognese", "candlelight:beef_tartare", "candlelight:chocolate_mousse", "candlelight:salad", "candlelight:chicken_teriyaki", "candlelight:bolognese", "candlelight:pasta_with_mozzarella", "candlelight:beetroot_salad", "candlelight:mushroom_soup", "candlelight:tomato_soup", "farm_and_charm:simple_tomato_soup", "farm_and_charm:onion_soup", "farm_and_charm:potato_soup", "farm_and_charm:goulash", "farm_and_charm:corn_grits", "farm_and_charm:barley_patties_with_potatoes", "farm_and_charm:beef_patty_with_vegetables", "farm_and_charm:sausage_with_oat_patty", "farm_and_charm:cooked_salmon", "farm_and_charm:chicken_wrapped_in_bacon", "farm_and_charm:lamb_with_corn", "farm_and_charm:bacon_with_eggs", "farm_and_charm:oat_pancake", "farm_and_charm:farmers_breakfast"];
|
||||
// let mugDrinks = ["brewery:beer_wheat", "brewery:beer_barley", "brewery:beer_hops", "brewery:beer_nettle", "brewery:beer_oat", "brewery:beer_haley", "brewery:whiskey_jojannik", "brewery:whiskey_lilitusinglemalt", "brewery:whiskey_cristelwalker", "brewery:whiskey_maggoallan", "brewery:whiskey_carrasconlabel", "brewery:whiskey_ak", "brewery:whiskey_highland_hearth", "brewery:whiskey_smokey_reverie", "brewery:whiskey_jamesons_malt"];
|
||||
// let modid = dish.item.split(':')[0];
|
||||
// let finalizedPrice = Math.round(dish.value * 1.5);
|
||||
// let menuJson = {};
|
||||
// if (false) {
|
||||
// // Cozy Cafe prices
|
||||
// finalizedPrice = Math.max(1, Math.min(64, Math.round(dish.value / 8)))
|
||||
// menuJson.conditions = [
|
||||
// {
|
||||
// "type": "forge:mod_loaded",
|
||||
// "modid": modid
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
// menuJson.item = dish.item;
|
||||
// menuJson.category = categoryOverride || category;
|
||||
// menuJson.price = finalizedPrice;
|
||||
// menuJson.product_type = productType;
|
||||
// menuJson.flavors = [];
|
||||
// menuJson.themes = [];
|
||||
// if (bottleDrink.includes(dish.item)) menuJson.bottle_drink = true;
|
||||
// if (bowlFood.includes(dish.item)) menuJson.bowl_food = true;
|
||||
// if (Item.of(dish.item).hasTag('society:wine')) {
|
||||
// menuJson.bottle_drink = true;
|
||||
// menuJson.bottle = 'vinery:wine_bottle'
|
||||
// } else if (mugDrinks.includes(dish.item)) {
|
||||
// menuJson.bottle_drink = true;
|
||||
// menuJson.bottle = "brewery:beer_mug"
|
||||
// }
|
||||
// try {
|
||||
// JsonIO.write(`kubejs/data/cozycafe/menu/${modid}/${dish.item.split(":")[1]}.json`, menuJson);
|
||||
// } catch (err) {
|
||||
// console.error(`Failed to write JSON for ${modid}: ${err}`);
|
||||
// }
|
||||
// wikiTable.push({ name: formatItemName(dish.item), price: finalizedPrice, category: categoryOverride || category, productType: productType })
|
||||
// }
|
||||
// global.cooking.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:crop_sell_multiplier")
|
||||
// });
|
||||
|
||||
// global.wines.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:wood_sell_multiplier", "drink")
|
||||
// });
|
||||
|
||||
// global.brews.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:wood_sell_multiplier", "drink")
|
||||
// });
|
||||
|
||||
// global.cocktails.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:crop_sell_multiplier")
|
||||
// });
|
||||
|
||||
// global.herbalBrews.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:crop_sell_multiplier", "drink")
|
||||
// });
|
||||
|
||||
// global.smokedFish.forEach((dish) => {
|
||||
// dishGenerator(dish, "shippingbin:crop_sell_multiplier", "main")
|
||||
// });
|
||||
// const categoryOrder = {
|
||||
// 'drink': 1,
|
||||
// 'main': 2,
|
||||
// 'dessert': 3
|
||||
// };
|
||||
|
||||
// const sortedData = wikiTable.slice().sort((a, b) => {
|
||||
// let weightA = categoryOrder[a.category.toLowerCase()] || 99;
|
||||
// let weightB = categoryOrder[b.category.toLowerCase()] || 99;
|
||||
|
||||
// if (weightA !== weightB) {
|
||||
// return weightA - weightB;
|
||||
// }
|
||||
// return Number(a.price) - Number(b.price);
|
||||
// });
|
||||
|
||||
// function arrayToWikimediaTable(data) {
|
||||
// if (!data || data.length === 0) return '';
|
||||
|
||||
// const headers = Object.keys(data[0]);
|
||||
// let table = '{| class="wikitable sortable"\n';
|
||||
|
||||
// headers.forEach(header => {
|
||||
// let formattedHeader = header === 'productType'
|
||||
// ? 'Product Type'
|
||||
// : header.charAt(0).toUpperCase() + header.slice(1);
|
||||
|
||||
// table += `! ${formattedHeader}\n`;
|
||||
// });
|
||||
|
||||
// data.forEach(item => {
|
||||
// table += '|-\n';
|
||||
// headers.forEach(header => {
|
||||
// let value = item[header];
|
||||
|
||||
// if (header === 'price') {
|
||||
// value = global.formatPrice(Number(value));
|
||||
// } else {
|
||||
// value = String(value)
|
||||
// value = value.charAt(0).toUpperCase() + value.slice(1)
|
||||
// }
|
||||
// table += `| ${value}\n`;
|
||||
// });
|
||||
// });
|
||||
|
||||
// table += '|}';
|
||||
// return table;
|
||||
// }
|
||||
|
||||
// console.log(arrayToWikimediaTable(sortedData));
|
||||
@@ -0,0 +1,159 @@
|
||||
// const fantasySortOrder = [
|
||||
// "decorations",
|
||||
// "dunmer",
|
||||
// "necrolord",
|
||||
// "venthyr",
|
||||
// "nordic",
|
||||
// "bone/skeleton",
|
||||
// "bone/wither",
|
||||
// "royal"
|
||||
// ];
|
||||
// const fantasyCompariator = (id) => {
|
||||
// const itemName = id.includes(':') ? id.split(':')[1] : id;
|
||||
// const parts = itemName.split('_');
|
||||
// const lastWord = parts[parts.length - 1].toLowerCase();
|
||||
|
||||
// for (let i = 0; i < fantasySortOrder.length; i++) {
|
||||
// let keyword = fantasySortOrder[i];
|
||||
// if (keyword.includes('/')) {
|
||||
// if (keyword.split('/').some(part => lastWord.includes(part))) return i;
|
||||
// } else if (lastWord.includes(keyword)) {
|
||||
// return i;
|
||||
// }
|
||||
// }
|
||||
// return fantasySortOrder.length;
|
||||
// };
|
||||
|
||||
// const priceKeywordTable = [
|
||||
// { keyword: "froggy_chair", price: 8 },
|
||||
// { keyword: "gorgeous", price: 12 },
|
||||
// { keyword: "slot_machine", price: 64 },
|
||||
// { keyword: "gatcha_machine", price: 64 },
|
||||
// { keyword: "emblem_clock", price: 16 },
|
||||
// { keyword: "station_clock", price: 16 },
|
||||
// { keyword: "neon", price: 5 },
|
||||
// { keyword: "plasma", price: 16 },
|
||||
// { keyword: "lucky", price: 16 },
|
||||
// { keyword: "rocket", price: 24 },
|
||||
// { keyword: "science_pod", price: 48 },
|
||||
// { keyword: "tower", price: 16 },
|
||||
// { keyword: "rattan", price: 6 },
|
||||
// { keyword: "vintage", price: 24 },
|
||||
// { keyword: "antique", price: 6 },
|
||||
// { keyword: "display_case", price: 6 },
|
||||
// { keyword: "chair", price: 1 },
|
||||
// { keyword: "stool", price: 1 },
|
||||
// { keyword: "/wool", price: 1 },
|
||||
// { keyword: "royal/wool", price: 2 },
|
||||
// { keyword: "streamer", price: 1 },
|
||||
// { keyword: "garland", price: 1 },
|
||||
// { keyword: "tarp", price: 2 },
|
||||
// { keyword: "table", price: 3 },
|
||||
// { keyword: "bed", price: 4 },
|
||||
// { keyword: "bookcase", price: 5 },
|
||||
// { keyword: "bookshelf", price: 5 },
|
||||
// { keyword: "wardrobe", price: 6 },
|
||||
// { keyword: "atm", price: 12 },
|
||||
// { keyword: "toaster", price: 14 },
|
||||
// { keyword: "bench", price: 3 },
|
||||
// { keyword: "vase", price: 6 },
|
||||
// { keyword: "jars", price: 6 },
|
||||
// { keyword: "mirror", price: 9 },
|
||||
// { keyword: "picture_frame", price: 1 },
|
||||
// { keyword: "painting", price: 2 },
|
||||
// { keyword: "lamp", price: 2 },
|
||||
// { keyword: "sofa", price: 5 },
|
||||
// { keyword: "clock", price: 10 },
|
||||
// { keyword: "royal", price: 18 },
|
||||
// ];
|
||||
// const createTrade = (id, catalog, defaultPrice) => {
|
||||
// let finalPrice = defaultPrice;
|
||||
|
||||
// for (let i = 0; i < priceKeywordTable.length; i++) {
|
||||
// if (id.includes(priceKeywordTable[i].keyword)) {
|
||||
// finalPrice = priceKeywordTable[i].price;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return {
|
||||
// offer: {
|
||||
// item: id,
|
||||
// count: id.includes("/wool") ? 8 : 1
|
||||
// },
|
||||
// request: {
|
||||
// item: "numismatics:crown",
|
||||
// count: finalPrice
|
||||
// },
|
||||
// numismatics_cost: finalPrice * 512,
|
||||
// trade_id: `${catalog}_purchasing_${id.replace(":", "_")}`
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getSortKeys = (id) => {
|
||||
// const itemName = id.includes(':') ? id.split(':')[1] : id;
|
||||
// const parts = itemName.split('_');
|
||||
// let remainder = parts.slice(0, -1).join('_').toLowerCase();
|
||||
|
||||
// for (const color of ['white', 'orange', 'magenta', 'yellow', 'lime', 'pink', 'gray', 'light_gray', 'cyan', 'purple', 'blue', 'light_blue', 'turquoise', 'brown', 'green', 'red', 'black']) {
|
||||
// if (remainder.startsWith(color + '_')) {
|
||||
// remainder = remainder.replace(color + '_', '');
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// return {
|
||||
// lastWord: parts[parts.length - 1].toLowerCase(),
|
||||
// remainder: remainder,
|
||||
// fullName: itemName.toLowerCase()
|
||||
// };
|
||||
// };
|
||||
|
||||
// const catalogGenerationFunction = (catalog, defaultPrice) => {
|
||||
// let shopJson = {};
|
||||
// let shopTrades = [];
|
||||
|
||||
// if (catalog === "fantasy") {
|
||||
// Ingredient.of("@fantasyfurniture").stacks.forEach((item) => {
|
||||
// shopTrades.push(createTrade(item.id, catalog, defaultPrice));
|
||||
// });
|
||||
// shopTrades.sort((a, b) => fantasyCompariator(a.offer.item) - fantasyCompariator(b.offer.item));
|
||||
// } else {
|
||||
// global.lootFurniture.forEach((item) => {
|
||||
// if ((catalog == "tanuki" && (item.includes("tanukidecor") || item.includes("whimsy_deco"))) ||
|
||||
// (catalog != "tanuki" && !(item.includes("tanukidecor") || item.includes("whimsy_deco")))) {
|
||||
// shopTrades.push(createTrade(item, catalog, defaultPrice));
|
||||
// }
|
||||
// });
|
||||
|
||||
// shopTrades.sort((a, b) => {
|
||||
// const keysA = getSortKeys(a.offer.item);
|
||||
// const keysB = getSortKeys(b.offer.item);
|
||||
// return keysA.lastWord.localeCompare(keysB.lastWord) ||
|
||||
// keysA.remainder.localeCompare(keysB.remainder) ||
|
||||
// keysA.fullName.localeCompare(keysB.fullName);
|
||||
// });
|
||||
// }
|
||||
|
||||
// shopJson = {
|
||||
// shop_id: `${catalog}_catalog`,
|
||||
// name: `shop.society_trading.${catalog}_catalog`,
|
||||
// hidden_from_selector: true,
|
||||
// display_type: "thin",
|
||||
// texture: "",
|
||||
// jei_catalyst: {
|
||||
// item: `society:${catalog}_catalog`
|
||||
// },
|
||||
// block_tag: `society:opens_${catalog}_catalog`,
|
||||
// trades: shopTrades
|
||||
// };
|
||||
|
||||
// JsonIO.write(
|
||||
// `kubejs/data/society_trading/shops/${catalog}_catalog.json`, shopJson
|
||||
// );
|
||||
// }
|
||||
|
||||
// if (true) {
|
||||
// catalogGenerationFunction("tanuki", 4);
|
||||
// catalogGenerationFunction("fantasy", 6);
|
||||
// catalogGenerationFunction("modern", 8);
|
||||
// }
|
||||
@@ -0,0 +1,89 @@
|
||||
// if (true) {
|
||||
// let fans = []
|
||||
// let toilets = []
|
||||
// let basins = []
|
||||
// let grills = []
|
||||
// let kitchen = []
|
||||
// let trampoline = []
|
||||
// let bath = []
|
||||
// let jars = []
|
||||
// let cutting = []
|
||||
// let crates = []
|
||||
// let chairs = []
|
||||
// let table = []
|
||||
// let desk = []
|
||||
// let drawers = []
|
||||
// let cabinets = []
|
||||
// let latticeGate = []
|
||||
// let latticeFence = []
|
||||
// let mailbox = []
|
||||
// let hedge = []
|
||||
// let addToTags = (itemId, everyComp) => {
|
||||
// if (itemId.includes("toilet")) toilets.push(itemId)
|
||||
// if (itemId.includes("basin")) basins.push(itemId)
|
||||
// if (itemId.includes("bath")) bath.push(itemId)
|
||||
// if (itemId.includes("fan")) fans.push(itemId)
|
||||
// if (itemId.includes("grill")) grills.push(itemId)
|
||||
// if (itemId.includes("kitchen")) kitchen.push(itemId)
|
||||
// else if (itemId.includes("drawer")) drawers.push(itemId)
|
||||
// else if (itemId.includes("cabinet") && (!everyComp || everyComp && itemId.includes("rfm"))) cabinets.push(itemId)
|
||||
// if (itemId.includes("trampoline")) trampoline.push(itemId)
|
||||
// if (itemId.includes("jar")) jars.push(itemId)
|
||||
// if (itemId.includes("cutting")) cutting.push(itemId)
|
||||
// if (itemId.includes("crate")) crates.push(itemId)
|
||||
// if (itemId.includes("chair")) chairs.push(itemId)
|
||||
// if (itemId.includes("_table") && (!everyComp || everyComp && itemId.includes("rfm"))) table.push(itemId)
|
||||
// if (itemId.includes("desk")) desk.push(itemId)
|
||||
// if (itemId.includes("gate")) latticeGate.push(itemId)
|
||||
// else if (itemId.includes("lattice")) latticeFence.push(itemId)
|
||||
// if (itemId.includes("hedge")) hedge.push(itemId)
|
||||
// if (itemId.includes("mail_box")) mailbox.push(itemId)
|
||||
// }
|
||||
// Ingredient.of("@refurbished_furniture").getStacks().forEach((item) => addToTags(item.id));
|
||||
// Ingredient.of("@everycomp").getStacks().forEach((item) => addToTags(item.id, true));
|
||||
|
||||
// let root = "kubejs/data/refurbished_furniture/tags/items/"
|
||||
// JsonIO.write(root + `ceiling_fans.json`, { values: fans });
|
||||
// JsonIO.write(root + `toilets.json`, { values: toilets });
|
||||
// JsonIO.write(root + `basins.json`, { values: basins });
|
||||
// JsonIO.write(root + `grills.json`, { values: grills });
|
||||
// JsonIO.write(root + `kitchen_furniture.json`, { values: kitchen });
|
||||
// JsonIO.write(root + `trampolines.json`, { values: trampoline });
|
||||
// JsonIO.write(root + `baths.json`, { values: bath });
|
||||
// JsonIO.write(root + `storage_jars.json`, { values: jars });
|
||||
// JsonIO.write(root + `cutting_boards.json`, { values: cutting });
|
||||
// JsonIO.write(root + `crates.json`, { values: crates });
|
||||
|
||||
// JsonIO.write(root + `drawers.json`, { values: drawers });
|
||||
// JsonIO.write(root + `cabinets.json`, { values: cabinets });
|
||||
// JsonIO.write(root + `chairs.json`, { values: chairs });
|
||||
// JsonIO.write(root + `tables.json`, { values: table });
|
||||
// JsonIO.write(root + `desks.json`, { values: desk });
|
||||
// JsonIO.write(root + `lattice_fence_gates.json`, { values: latticeGate });
|
||||
// JsonIO.write(root + `lattice_fence.json`, { values: latticeFence });
|
||||
// JsonIO.write(root + `multiplayer_mailboxes.json`, { values: mailbox });
|
||||
// JsonIO.write(root + `hedges.json`, { values: hedge });
|
||||
|
||||
|
||||
// // Beautify
|
||||
// let blinds = []
|
||||
// let lattice = []
|
||||
// let addToBeautTags = (itemId) => {
|
||||
// if (itemId.includes("blind")) blinds.push(itemId)
|
||||
// if (itemId.includes("trellis")) lattice.push(itemId)
|
||||
// }
|
||||
// Ingredient.of("@beautify").getStacks().forEach((item) => addToBeautTags(item.id));
|
||||
// Ingredient.of("@everycomp").getStacks().forEach((item) => addToBeautTags(item.id));
|
||||
|
||||
// root = "kubejs/data/beautify/tags/items/"
|
||||
// JsonIO.write(root + `blinds.json`, { values: blinds });
|
||||
// JsonIO.write(root + `flower_lattice.json`, { values: lattice });
|
||||
|
||||
// // Quark
|
||||
// let leafCarp = [];
|
||||
// Ingredient.of("@quark").getStacks().forEach((item) => { if (item.id.includes("leaf_carpet")) leafCarp.push(item.id) });
|
||||
// Ingredient.of("@everycomp").getStacks().forEach((item) => { if (item.id.includes("leaf_carpet")) leafCarp.push(item.id) });
|
||||
|
||||
// root = "kubejs/data/quark/tags/items/"
|
||||
// JsonIO.write(root + `leaf_carpets.json`, { values: leafCarp });
|
||||
// }
|
||||
@@ -0,0 +1,19 @@
|
||||
const runLangDataGen = false;
|
||||
|
||||
if (runLangDataGen) {
|
||||
let objs = {};
|
||||
let societyItems = Ingredient.of("@society").getStacks();
|
||||
societyItems.forEach((item) => {
|
||||
objs[`${item.getDescriptionId()}`] = "";
|
||||
});
|
||||
|
||||
JsonIO.write(
|
||||
`kubejs/assets/society/lang/en_us_template.json`,
|
||||
Object.keys(objs)
|
||||
.sort()
|
||||
.reduce((acc, key) => {
|
||||
acc[key] = objs[key];
|
||||
return acc;
|
||||
}, {})
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
let translationKeys = {};
|
||||
global.datagenDialog = false;
|
||||
|
||||
const generateDialogEntries = (npcId, dialogType, dialogIndex, dialogLines, portraitPath, isChatter, customOptions) => {
|
||||
let entries = [];
|
||||
let resolvedDialogLines = Array.isArray(dialogLines) ? dialogLines : [dialogLines];
|
||||
resolvedDialogLines.forEach((entry, index) => {
|
||||
let lineTranslationKey = `dialog.npc.${npcId}.${dialogType}${dialogIndex == -1 ? "" : `.${dialogIndex}`}.line_${index}`;
|
||||
translationKeys[lineTranslationKey] = entry;
|
||||
let queuedEntry = {
|
||||
id: index == 0 ? "start" : index == resolvedDialogLines.length - 1 ? "end" : index,
|
||||
}
|
||||
if (portraitPath) {
|
||||
queuedEntry.speaker = { translate: `dialog.npc.${npcId}.name`, color: "white" };
|
||||
queuedEntry.text = [{ translate: lineTranslationKey }];
|
||||
queuedEntry.portraits = [
|
||||
{
|
||||
path: `${portraitPath}.png`,
|
||||
position: "INLINE",
|
||||
brightness: 1.0
|
||||
},
|
||||
];
|
||||
} else {
|
||||
queuedEntry.text = [{ translate: lineTranslationKey }];
|
||||
}
|
||||
if (customOptions && resolvedDialogLines.length - 1 == index) {
|
||||
queuedEntry.options = customOptions.map((option, optIndex) => {
|
||||
let optionKey = `dialog.npc.${npcId}.${dialogType}.option_${optIndex}`;
|
||||
translationKeys[optionKey] = option.text;
|
||||
return {
|
||||
text: {
|
||||
translate: optionKey
|
||||
},
|
||||
target: option.target || "end",
|
||||
command: Array.isArray(option.command) ? option.command : [option.command]
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if (isChatter && resolvedDialogLines.length - 1 == index && !customOptions) {
|
||||
if (npcId == "carpenter") {
|
||||
translationKeys["dialog.npc.carpenter.purchase_supplies"] = "Purchase supplies";
|
||||
translationKeys["dialog.npc.carpenter.invite_villagers"] = "Invite Villagers";
|
||||
translationKeys["dialog.npc.carpenter.build_farm"] = "Build Farm buildings";
|
||||
translationKeys["dialog.npc.carpenter.build_village"] = "Build Village buildings";
|
||||
queuedEntry.options = [{
|
||||
text: {
|
||||
translate: "dialog.npc.carpenter.purchase_supplies"
|
||||
},
|
||||
target: "end",
|
||||
command: [
|
||||
"openshop @p carpenter"
|
||||
]
|
||||
},
|
||||
{
|
||||
text: {
|
||||
translate: "dialog.npc.carpenter.invite_villagers"
|
||||
},
|
||||
target: "end",
|
||||
command: [
|
||||
"openshop @p invitations"
|
||||
]
|
||||
},
|
||||
{
|
||||
text: {
|
||||
translate: "dialog.npc.carpenter.build_farm"
|
||||
},
|
||||
target: "end",
|
||||
command: [
|
||||
"openselector @p building_shop"
|
||||
]
|
||||
},
|
||||
{
|
||||
text: {
|
||||
translate: "dialog.npc.carpenter.build_village"
|
||||
},
|
||||
target: "end",
|
||||
command: [
|
||||
"openselector @p building_shop"
|
||||
]
|
||||
}]
|
||||
} else if (npcId !== "wise_oak") {
|
||||
queuedEntry.command = [`openshop @p ${npcId}`]
|
||||
}
|
||||
}
|
||||
entries.push(queuedEntry);
|
||||
});
|
||||
if (isChatter && npcId == "carpenter" || customOptions) {
|
||||
entries.push({
|
||||
id: "end",
|
||||
})
|
||||
}
|
||||
return entries;
|
||||
};
|
||||
|
||||
const runNpcDatagen = (npcId, npcDef) => {
|
||||
let nameTranslationKey = `dialog.npc.${npcId}.name`;
|
||||
let resolvedPortraitPath = npcDef.noPortrait ? null : (npcDef.portraitPath ? npcDef.portraitPath : npcId);
|
||||
translationKeys[nameTranslationKey] = npcDef.name || npcId;
|
||||
translationKeys[
|
||||
`dialog.npc.${npcId}.chatter.description`
|
||||
] = `Chatting with ${npcDef.name || npcId}`;
|
||||
|
||||
// Chatter
|
||||
if (npcDef.chatter) {
|
||||
for (let index = 0; index <= 5; index++) {
|
||||
let friendshipKey = `friendship${index}`;
|
||||
let chatterSet = npcDef.chatter[friendshipKey];
|
||||
if (chatterSet && chatterSet.length > 0) {
|
||||
chatterSet.forEach((chatter, chatterIndex) => {
|
||||
JsonIO.write(
|
||||
`kubejs/data/dialog/dialogs/${npcId}_chatter_${friendshipKey}_${chatterIndex}.json`,
|
||||
{
|
||||
id: `${npcId}_chatter_${friendshipKey}_${chatterIndex}`,
|
||||
title: `[${chatterIndex}] ${npcId} chatter at friendship level: ${friendshipKey}`,
|
||||
description: `dialog.npc.${npcId}.chatter.description`,
|
||||
allowClose: true,
|
||||
entries: generateDialogEntries(
|
||||
npcId,
|
||||
`chatter_${friendshipKey}`,
|
||||
chatterIndex,
|
||||
chatter,
|
||||
resolvedPortraitPath,
|
||||
true
|
||||
),
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// Introduction
|
||||
if (npcDef.intro) {
|
||||
translationKeys[
|
||||
`dialog.npc.${npcId}.intro.description`
|
||||
] = `${npcDef.name}'s Introduction`;
|
||||
JsonIO.write(`kubejs/data/dialog/dialogs/${npcId}_intro.json`, {
|
||||
id: `${npcId}_intro`,
|
||||
title: `${npcId} introduction`,
|
||||
description: `dialog.npc.${npcId}.intro.description`,
|
||||
entries: generateDialogEntries(npcId, `intro`, 0, npcDef.intro, npcId),
|
||||
});
|
||||
}
|
||||
// Gifts
|
||||
if (npcDef.giftResponse) {
|
||||
let giftResponseKeys = ["loved", "liked", "neutral", "disliked", "hated"];
|
||||
giftResponseKeys.forEach((responseType) => {
|
||||
if (npcDef.giftResponse[responseType]) {
|
||||
npcDef.giftResponse[responseType].forEach((response, responseIndex) => {
|
||||
JsonIO.write(
|
||||
`kubejs/data/dialog/dialogs/${npcId}_gift_${responseType}_${responseIndex}.json`,
|
||||
{
|
||||
id: `${npcId}_gift_${responseType}_${responseIndex}`,
|
||||
title: `${npcId} introduction`,
|
||||
description: `dialog.npc.${npcId}.gift.${responseType}`,
|
||||
entries: generateDialogEntries(
|
||||
npcId,
|
||||
`gift_${responseType}`,
|
||||
responseIndex,
|
||||
response,
|
||||
responseType === "neutral" ? npcId : `${responseType}/${npcId}`
|
||||
),
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (npcDef.unique) {
|
||||
npcDef.unique.forEach((dialog) => {
|
||||
JsonIO.write(
|
||||
`kubejs/data/dialog/dialogs/${npcId}_unique_${dialog.name}.json`,
|
||||
{
|
||||
id: `${npcId}_unique_${dialog.name}`,
|
||||
title: `${npcId} introduction`,
|
||||
description: `dialog.npc.${npcId}.unique.${dialog.name}`,
|
||||
entries: generateDialogEntries(
|
||||
npcId,
|
||||
`unique_${dialog.name}`,
|
||||
-1,
|
||||
dialog.text,
|
||||
resolvedPortraitPath,
|
||||
false
|
||||
),
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
if (npcDef.choiceDialogs) {
|
||||
npcDef.choiceDialogs.forEach((dialog) => {
|
||||
JsonIO.write(
|
||||
`kubejs/data/dialog/dialogs/${npcId}_dialog_${dialog.name}.json`,
|
||||
{
|
||||
id: `${npcId}_choice_dialog_${dialog.name}`,
|
||||
title: `${npcId} ${dialog.name}`,
|
||||
description: `dialog.npc.${npcId}.dialog.${dialog.name}`,
|
||||
entries: generateDialogEntries(
|
||||
npcId,
|
||||
`dialog.${dialog.name}`,
|
||||
-1,
|
||||
dialog.text,
|
||||
resolvedPortraitPath,
|
||||
false,
|
||||
dialog.options
|
||||
),
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
JsonIO.write(`kubejs/assets/dialog/lang/en_us.json`, translationKeys);
|
||||
|
||||
if (npcDef.chatter) {
|
||||
let outputConstruct = {}
|
||||
outputConstruct[npcId] = {
|
||||
chatterLengths: [
|
||||
npcDef.chatter.friendship0 ? npcDef.chatter.friendship0.length : 0,
|
||||
npcDef.chatter.friendship1 ? npcDef.chatter.friendship1.length : 0,
|
||||
npcDef.chatter.friendship2 ? npcDef.chatter.friendship2.length : 0,
|
||||
npcDef.chatter.friendship3 ? npcDef.chatter.friendship3.length : 0,
|
||||
npcDef.chatter.friendship4 ? npcDef.chatter.friendship4.length : 0,
|
||||
npcDef.chatter.friendship5 ? npcDef.chatter.friendship5.length : 0,
|
||||
],
|
||||
giftResponseLengths: npcDef.giftResponse ? {
|
||||
loved: npcDef.giftResponse.loved ? npcDef.giftResponse.loved.length : 0,
|
||||
liked: npcDef.giftResponse.liked ? npcDef.giftResponse.liked.length : 0,
|
||||
neutral: npcDef.giftResponse.neutral ? npcDef.giftResponse.neutral.length : 0,
|
||||
disliked: npcDef.giftResponse.disliked ? npcDef.giftResponse.disliked.length : 0,
|
||||
hated: npcDef.giftResponse.hated ? npcDef.giftResponse.hated.length : 0,
|
||||
} : {}
|
||||
}
|
||||
console.log(outputConstruct)
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
// const runRibbitHutDatagen = false;
|
||||
|
||||
// const facing = ["north", "east", "south", "west"];
|
||||
// const layers = ["bottom", "middle", "top"];
|
||||
// const depths = ["front", "center", "back"];
|
||||
// const sides = ["left", "center", "right"];
|
||||
|
||||
// const getFacingY = (face) => {
|
||||
// switch (face) {
|
||||
// case "north":
|
||||
// return 0;
|
||||
// case "south":
|
||||
// return 180;
|
||||
// case "east":
|
||||
// return 90;
|
||||
// case "west":
|
||||
// return 270;
|
||||
// }
|
||||
// };
|
||||
|
||||
// if (runRibbitHutDatagen) {
|
||||
// let blockstateJson = {
|
||||
// variants: {},
|
||||
// };
|
||||
// facing.forEach((face) => {
|
||||
// layers.forEach((layer, layerIndex) => {
|
||||
// sides.forEach((side, sideIndex) => {
|
||||
// depths.forEach((depth, depthIndex) => {
|
||||
// blockstateJson.variants[
|
||||
// `facing=${face},layer=${layerIndex},depth=${depthIndex},side=${sideIndex}`
|
||||
// ] = {
|
||||
// model: `society:block/ribbit_hut/${layer}_${depth}_${side}`,
|
||||
// y: getFacingY(face)
|
||||
// };
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// JsonIO.write(`kubejs/assets/society/blockstates/ribbit_hut_block.json`, blockstateJson);
|
||||
// }
|
||||
@@ -0,0 +1,128 @@
|
||||
|
||||
|
||||
|
||||
// if (true) {
|
||||
// let translationKeys = {};
|
||||
// [
|
||||
// { title: "mining_skill_fortune", content: "If you can't afford the Fortune enchantment early game, invest in the Mining skill tree Fortune nodes." },
|
||||
// { title: "slot_machine", content: "Using a coin on a slot machine will give you 3x the amount if you win!" },
|
||||
// { title: "auto_trader", content: "The Auto Trader can automate trades from shops." },
|
||||
// { title: "fire_quartz_one", content: "Fire Quartz can be found in the Nether and hot Skull Cavern biomes." },
|
||||
// { title: "earth_crystals_one", content: "Earth Crystals can be found in the overworld and certain Skull Cavern biomes." },
|
||||
// { title: "gold_slimes", content: "Gold Slimes will steal from your bank account when upset." },
|
||||
// { title: "nether_vacation", content: "The Nether is a great place for a vacation!" },
|
||||
// { title: "pig_racing", content: "It's pig racing!" },
|
||||
// { title: "pig_racing_season", content: "Some pigs will race better or worse in certain seasons." },
|
||||
// { title: "suggestions", content: "Want to make a suggestion for the pack? Join the Discord!" },
|
||||
// { title: "prize_machine_two", content: "Redeeming a Prize Ticket gives some experience in every category." },
|
||||
// { title: "milk", content: "Large Milk has a large amount of saturation when drank." },
|
||||
// { title: "beemonican", content: "The Beemonican Seal can be plundered from the queen." },
|
||||
// { title: "mystical_ocean", content: "Interested in survival island and magic mods? Try Society: Mystical Ocean!" },
|
||||
// { title: "husbandry_time", content: "Farm animals only get hungry after a full Minecraft day's worth of time has passed without food." },
|
||||
// { title: "fish_season_night", content: "Some fish can only be caught at night." },
|
||||
// { title: "quality_seed_maker", content: "Using high quality crops in a Seed Maker will make seeds with the same quality." },
|
||||
// { title: "mining_skill_leveling_one", content: "Mining Geode Nodes gives a large amount of Mining experience." },
|
||||
// { title: "adventuring_skill_leveling", content: "Looting Chests gives a large amount of Adventuring experience." },
|
||||
// { title: "husbandry_pigs", content: "Pigs will occasionally dig up Truffles if they like you enough." },
|
||||
// { title: "prize_machine_one", content: "Certain fruit trees can only be obtained through the Prize Machine." },
|
||||
// { title: "wise_oak", content: "If you find an oak tree that claims to be wise, take a moment to listen." },
|
||||
// { title: "roe_value", content: "The more valuable a fish is, the more valuable their roe will be." },
|
||||
// { title: "balloons", content: "Make sure to look at the sky every once in a while. There might be a balloon you can pop!" },
|
||||
// { title: "enriched_bonemeal", content: "Enriched Bonemeal can grow Glow Berries and duplicate tea flowers." },
|
||||
// { title: "skill_books", content: "Wandering Traders have a chance to sell special skill books." },
|
||||
// { title: "pet_gifts", content: "Pets will give you special items at 10 hearts of affection." },
|
||||
// { title: "exotic_trader", content: "The Exotic Trader sells upgrades to Artisan Machines." },
|
||||
// { title: "almanac", content: "The Farmer's Almanac has information on all Crops, Farm Animals, and Pets." },
|
||||
// { title: "quality_preserves", content: "Some Artisan Machines preserve the quality from ingredients, some don't." },
|
||||
// { title: "barkeeper", content: "The Barkeeper sells food at a premium for those too lazy to cook. You know who I'm talking about." },
|
||||
// { title: "slot_machine_prismatic", content: "Slot Machines may very rarely drop Prismatic Shards when using higher value coins." },
|
||||
// { title: "golden_egg_one", content: "Golden Eggs can be mined with Silk Touch to make mayo." },
|
||||
// { title: "husbandry_deployer", content: "Farm animals dislike the cold, unfeeling hand of a Deployer." },
|
||||
// { title: "eternal_summer_jungle", content: "Jungle and Savanna biomes are permanently in Summer." },
|
||||
// { title: "husbandry_magic_shears", content: "Magic Shears feel strange and a little unpleasant." },
|
||||
// { title: "hamsters", content: "Do not feed Hamsters." },
|
||||
// { title: "husbandry_hand_feed", content: "Feeding Troughs are convenient ways to feed animals, but they absolutely love being fed by hand." },
|
||||
// { title: "golden_egg_two", content: "Golden Eggs may contain something prismatic..." },
|
||||
// { title: "lunchboxes", content: "Lunchbags & Lunchboxes can be directly eaten out of to avoid inventory food clutter." },
|
||||
// { title: "preserves_jar", content: "Preserves Jars 3x the value of fruits and crops put in them." },
|
||||
// { title: "skull_cavern", content: "The Skull Cavern is the most dangerous area to visit." },
|
||||
// { title: "cooking", content: "Cooking will always increase the value of all ingredients." },
|
||||
// { title: "bank_meter", content: "Want to know how much cash you have in the Bank? Buy a Bank Meter to display it under the season!" },
|
||||
// { title: "crab_traps", content: "Crab Traps work twice as fast in River and Ocean biomes." },
|
||||
// { title: "broken_clock", content: "The Broken Clock upgrade reduces the time Aging Casks take by half!" },
|
||||
// { title: "sellable_search", content: "You can search '#sellable' in JEI/EMI to see all the sellable items." },
|
||||
// { title: "sellable_products", content: "You can search '#farmer_products' in JEI/EMI to see all the sellable Farmer Products items. This works for the other 3 types!" },
|
||||
// { title: "artisan_upgrades", content: "Artisan machines drop their upgrades when broken." },
|
||||
// { title: "fish_season_rainy", content: "Some fish can only be caught while it's raining." },
|
||||
// { title: "capitalism", content: "Capitalism." },
|
||||
// { title: "regret_crystals", content: "Don't like the skills you chose? Purchase a Regret Crystal from a Witch!" },
|
||||
// { title: "rainbow_trout", content: "Rainbow Trout in Fish Ponds have a 1% chance of giving Prismatic Shards." },
|
||||
// { title: "wandering_trader_two", content: "The Wandering Trader sells certain rare furniture drops reliably." },
|
||||
// { title: "snorp_sneep", content: "Snorp Sneep \u0190:" },
|
||||
// { title: "sneep_snorp_one", content: "Sneep Snorp" },
|
||||
// { title: "sniffle_snaffle", content: "Sniffle Snaffle (Snuffle)" },
|
||||
// { title: "sneep_snorp_two", content: "Sneep Snorp :3" },
|
||||
// { title: "fish_season", content: "Some fish can only be caught in specific seasons." },
|
||||
// { title: "fishing_skill_leveling", content: "Fishing experience also comes from crafting fishing equipment and harvesting from Fish Ponds." },
|
||||
// { title: "farming_skill_leveling", content: "Farming experience also comes from eating cooked meals and using Artisan Machines." },
|
||||
// { title: "wandering_trader_one", content: "The Wandering Trader sells books that give experience in skills." },
|
||||
// { title: "tubasmoke_stick", content: "Tubasmoke kills..." },
|
||||
// { title: "lets_go_gambling", content: "Let's go gambling! ...Aw dangit." },
|
||||
// { title: "husbandry_naming", content: "Please name your farm animals." },
|
||||
// { title: "balloon_seeds_two", content: "Tea Blossoms can be found in Green Balloons." },
|
||||
// { title: "copycats", content: "Zinc can be used to create Copycat blocks. They're a builder's best friend." },
|
||||
// { title: "quality_seeds", content: "High quality seeds have a higher chance of growing high quality crops." },
|
||||
// { title: "passable_leaves", content: "Any leaf block is able to be walked through, and can even cushion your fall." },
|
||||
// { title: "husbandry_fine_wool", content: "Only Sheep and Rabbits can produce Fine Wool." },
|
||||
// { title: "effects", content: "Don't know what an effect does? Search for it in JEI!" },
|
||||
// { title: "furniture", content: "Like decorating? Purchase a Furniture Catalog from the Witch!" },
|
||||
// { title: "sol_onion", content: "Maintaining a diet of diverse foods will provide you with constant buffs." },
|
||||
// { title: "fire_quartz_two", content: "Fire Quartz gives off low levels of light." },
|
||||
// { title: "husbandry_babies", content: "Raising a farm animal as a baby will make them like you more." },
|
||||
// { title: "balloon_seeds_one", content: "Cotton Seeds can be found in Green Balloons." },
|
||||
// { title: "boomcat_slimes", content: "Boomcat Slimes gently explode when hungry." },
|
||||
// { title: "earth_crystals_two", content: "Earth Crystals give off tiny amounts of light." },
|
||||
// { title: "husbandry_sheep_milk", content: "Sheep can be milked, but it takes twice as long to produce it as Cows." },
|
||||
// { title: "etched", content: "The Etching Table can make music discs from Bandcamp, Soundcloud, or sound URL links." },
|
||||
// { title: "fish_season_clear", content: "Some fish can only be caught while the weather is clear." },
|
||||
// { title: "husbandry_panda", content: "Pandas will forage fruits from difficult to obtain trees." },
|
||||
// { title: "husbandry_goat_milk", content: "A Goat's milk is much more valuable than a cow's. Unfortunately that means dealing with goats." },
|
||||
// { title: "husbandry_goat_bison", content: "Goats and Bison are filled with hatred and will ram everything in sight." },
|
||||
// { title: "beemonica_bear", content: "Find the Beemonican Seal, find the Bear..." },
|
||||
// { title: "fish_radar", content: "Can't figure out where to find a fish? A Fish Radar can be used to get the currently available fish at your location." },
|
||||
// { title: "string", content: "Looking for String early? Cattails and Flax can help you out." },
|
||||
// { title: "mining_skill_leveling_two", content: "Mining Nether Quartz is a great way to get a large amount of Mining experience." },
|
||||
// { title: "quest_book", content: "If you ever feel lost in progression, check out the quest book!" },
|
||||
// { title: "neptunium", content: "Crab Traps have a low chance of fishing up Neptunium Nuggets." },
|
||||
// { title: "ribbit_hut", content: "Ribbit Huts can harvest crops and Grapevine stems." },
|
||||
// { title: "book_fair", content: "The Book Fair can be called using the phone at the end of every season." },
|
||||
// { title: "skull_cavern_blocks", content: "Blocks you place in the Skull Cavern won't disappear overnight." },
|
||||
// { title: "fish_pond_stack", content: "Fish Ponds can stack vertically." },
|
||||
// { title: "sprinkler_inset", content: "Sprinklers can be placed at the same level as Farmland and still hydrate." },
|
||||
// { title: "supreme_mayo", content: "Do not drink Supreme Mayonnaise." },
|
||||
// { title: "villager_friendship_one", content: "Every time you talk to a villager they like you more." },
|
||||
// { title: "villager_friendship_two", content: "You can shift click on a villager to give them a gift. Just make sure they like it." },
|
||||
// { title: "villager_ace", content: ":ace: Ace likes to keep a stock of granola bars as field snacks." },
|
||||
// { title: "villager_aiden", content: ":aiden: A flower a week is the key to Aiden's heart..." },
|
||||
// { title: "villager_leon", content: ":leon: Leon loves a glass of red wine in the evening." },
|
||||
// { title: "villager_haruna", content: ":haruna: Aquamagical Dust reminds Haruna of home." },
|
||||
// { title: "villager_maria", content: ":maria: Maria views flowers as manipulative gifts." },
|
||||
// { title: "villager_caroline", content: ":caroline: Caroline respects a farmer that can handle goats." },
|
||||
// { title: "villager_evelyne", content: ":evelyne: Evelyne finds the witch hat professionally degreading." },
|
||||
// { title: "villager_veronica", content: ":veronica: Veronica has a small but expensive collection of archival fashion." },
|
||||
// { title: "longwings_size", content: "The larger a butterfly or moth is, the more it sells for." },
|
||||
// { title: "cafe_pricing", content: "Items you sell in a cafe have a +50% base price increase." },
|
||||
// { title: "cafe_shed", content: "Large Sheds can be made into a Cafe with some decor." },
|
||||
// { title: "selling_vs_keeping", content: "Money can't buy everything, but most things give you money..." },
|
||||
// // TODO:Calos
|
||||
// ].forEach((tip) => {
|
||||
// translationKeys[`society_tips.tip.${tip.title}`] = tip.content;
|
||||
// JsonIO.write(`kubejs/assets/society/tips/${tip.title}.json`, {
|
||||
// "tip": {
|
||||
// "translate": `society_tips.tip.${tip.title}`
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
|
||||
// JsonIO.write(`kubejs/assets/society_tips/lang/en_us.json`, translationKeys);
|
||||
// }
|
||||
@@ -0,0 +1,43 @@
|
||||
// const baseboardTypes = ["", "birch", "dark_oak", "jungle", "oak", "spruce"];
|
||||
|
||||
// if (false) {
|
||||
// let woodPath;
|
||||
// let blockstateJson = {
|
||||
// variants: {},
|
||||
// };
|
||||
// ["bee", "hive", "bunny", "cloud", "pink_flower"].forEach((wallpaperType) => {
|
||||
// if (wallpaperType !== "bee") {
|
||||
// baseboardTypes.forEach((woodType, index) => {
|
||||
// woodPath = woodType !== "" ? `${woodType}_` : "";
|
||||
// JsonIO.write(
|
||||
// `kubejs/assets/society/models/block/wallpaper/${wallpaperType}_${woodPath}baseboard.json`,
|
||||
// {
|
||||
// parent: "minecraft:block/cube_bottom_top",
|
||||
// textures: {
|
||||
// bottom:
|
||||
// woodType === ""
|
||||
// ? `society:block/wallpaper/${wallpaperType}/bottom`
|
||||
// : `society:block/baseboard/${woodPath}bottom`,
|
||||
// side: `society:block/wallpaper/${wallpaperType}/${woodPath}side`,
|
||||
// top: `society:block/wallpaper/${wallpaperType}/top`,
|
||||
// },
|
||||
// }
|
||||
// );
|
||||
// blockstateJson.variants[`type=${index}`] = {
|
||||
// model: `society:block/wallpaper/${wallpaperType}_${woodPath}baseboard`,
|
||||
// };
|
||||
// });
|
||||
// JsonIO.write(
|
||||
// `kubejs/assets/society/blockstates/${wallpaperType}_baseboard.json`,
|
||||
// blockstateJson
|
||||
// );
|
||||
// }
|
||||
// JsonIO.write(`kubejs/assets/society/models/block/wallpaper/${wallpaperType}_wallpaper.json`, {
|
||||
// parent: "minecraft:block/cube_column",
|
||||
// textures: {
|
||||
// end: `society:block/wallpaper/${wallpaperType}/top`,
|
||||
// side: `society:block/wallpaper/${wallpaperType}/base`,
|
||||
// },
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
@@ -0,0 +1,304 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("banker", {
|
||||
name: "Caroline",
|
||||
intro: [
|
||||
"My name is Caroline, and I am the one who's been financing this settlement since before you arrived.",
|
||||
"You've been carelessly buying up everyone's stock, and I need to keep a closer watch of things here.",
|
||||
"I have some things for sale that will help you manage your money better.",
|
||||
"Now, please leave me be while I tidy up this dump. I will contact you if I need anything."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
["What do you need from me?"],
|
||||
[
|
||||
"Don't expect me to lend you any money for your farm.",
|
||||
"I'm already doing so much to support this settlement.",
|
||||
],
|
||||
[
|
||||
"Sorry, I don't loan money to farmers.",
|
||||
"One bad season and they come to you crying about their interest rates.",
|
||||
],
|
||||
["I have things I need to be doing right now."],
|
||||
["I don't have time to chat with you."],
|
||||
["Don't you have some work you should be doing?"],
|
||||
["I hope you're not slacking off when so many people here are depending on you."],
|
||||
["Ugh, do you need something from me?"],
|
||||
["What do you want?"],
|
||||
[
|
||||
"Developing towns are such a drag.",
|
||||
"No culture, just labor and filth.",
|
||||
],
|
||||
["My time is worth more than yours, don't waste it."],
|
||||
["You're wasting both of our time right now."],
|
||||
["I'm perfectly capable of keeping busy without your interruptions."],
|
||||
[
|
||||
"It's rude to interrupt someone while they're working.",
|
||||
"Not that I would expect a simple farmer like you to have manners.",
|
||||
],
|
||||
[
|
||||
"What is that smell?",
|
||||
"Don't tell me you came over here without cleaning yourself up...",
|
||||
],
|
||||
],
|
||||
friendship1: [
|
||||
["I suppose there's worse places to live than here."],
|
||||
[
|
||||
"Why do you insist on the chit-chat.",
|
||||
"I hope it's clear that I have things to do.",
|
||||
],
|
||||
["Do I seem like the type of person you can just bug every day?"],
|
||||
["You again, great."],
|
||||
["What."],
|
||||
["Must you keep coming back."],
|
||||
["Hmmm? I'm busy."],
|
||||
["No more small talk."],
|
||||
["You stench of farm."],
|
||||
["There's more pleasant smelling fertilizers out there you know."],
|
||||
["I think I've said enough to you."],
|
||||
["..."],
|
||||
[
|
||||
"The most irritating people are the one who can't tell they're not wanted.",
|
||||
],
|
||||
["Either buy something or walk away."],
|
||||
["Yes?"],
|
||||
["There's no need to chat right now."],
|
||||
["I have far too much to do."],
|
||||
[
|
||||
"I don't want to chat with you.",
|
||||
"Keep it professional, if you are even capable of that.",
|
||||
],
|
||||
["You aren't a very good listener."],
|
||||
[
|
||||
"You're the only person here that doesn't listen to the things I say.",
|
||||
"That's not a compliment.",
|
||||
],
|
||||
],
|
||||
friendship2: [
|
||||
[
|
||||
"There's so many natural resources to exploit around here.",
|
||||
"And yet, all you do is talk.",
|
||||
],
|
||||
[
|
||||
"Try to diversify your income streams.",
|
||||
"I don't want this town relying on a single point of failure.",
|
||||
],
|
||||
["What calls you to keep speaking to me so often."],
|
||||
["I recognized that scent from across the valley."],
|
||||
[
|
||||
"I believe in talking behind peoples' backs.",
|
||||
"That way, they hear what I have to say more than once.",
|
||||
],
|
||||
[
|
||||
"Are you the one who's been buying all that animal feed?",
|
||||
"I've had to order more stock twice this season.",
|
||||
],
|
||||
[
|
||||
"You should be making more money right now than you are.",
|
||||
"Please stop slacking and try harder.",
|
||||
],
|
||||
["A weaker person would have given up talking to me by now."],
|
||||
["Do you need something from me or are you just wasting my time."],
|
||||
["Some of your recent purchases have...", "Disappointed me."],
|
||||
[
|
||||
"I've seen many small settlements just like this one fail time and time again.",
|
||||
"Don't add another to the list.",
|
||||
],
|
||||
[
|
||||
"The local economy seems strong lately.",
|
||||
"I must be doing something right.",
|
||||
],
|
||||
[
|
||||
"Have you ever thought about how shop keepers magically have all the things you need?",
|
||||
"You seem like the type to be oblivious to matters like these.",
|
||||
"Everything here happens because I allow it to. Remember that.",
|
||||
],
|
||||
],
|
||||
friendship3: [
|
||||
["What do you want."],
|
||||
["I'm busy right now."],
|
||||
["Stop slacking off again, I know what you're up to."],
|
||||
[
|
||||
"I'm still not used to the sounds of the wilderness.",
|
||||
"It's unpleasant.",
|
||||
],
|
||||
[
|
||||
"Our relationship is strictly professional.",
|
||||
"I would not recommend testing this boundary.",
|
||||
],
|
||||
[
|
||||
"I once knew a person that constantly tried to defraud the Sunlit Valley Hospital...",
|
||||
"Terrible person all around, never lent them a dollar.",
|
||||
],
|
||||
[
|
||||
"You're keeping me from some important things right now, make it quick.",
|
||||
],
|
||||
["Need I remind you that my time is worth more than yours."],
|
||||
["I hate all these bugs, someone should really do something about them."],
|
||||
],
|
||||
friendship4: [
|
||||
[
|
||||
"I don't appreciate all your attempts to get closer to me.",
|
||||
"Once my work here is done I'll be installing a proxy and moving on to better things.",
|
||||
],
|
||||
[
|
||||
"Do you think talking to me every day and showering me with phoned-in gifts will make me like you?",
|
||||
"At least make the gifts good.",
|
||||
],
|
||||
["I don't have time to chat with you today."],
|
||||
["How are things on the farm?", "Your numbers are up lately."],
|
||||
[
|
||||
"There's that smell again. Do you smell that too?",
|
||||
"You've probably gone nose blind.",
|
||||
],
|
||||
[
|
||||
"Have you made a Smart Shipping Bin yet?",
|
||||
"It should cut down on your manual labor by a small amount.",
|
||||
"You need all the help you can get.",
|
||||
],
|
||||
[
|
||||
"You're putting in so much effort into getting to know me.",
|
||||
"Please direct that energy into more profitable work.",
|
||||
],
|
||||
[
|
||||
"Hmmm...",
|
||||
"What? You should know not to interrupt me like that by now.",
|
||||
],
|
||||
["I can't talk right now."],
|
||||
["I just don't have the time for idle chit-chat today."],
|
||||
["Ah, need something?"],
|
||||
],
|
||||
friendship5: [
|
||||
["I hope things are going well on your farm."],
|
||||
["Do you continually pester everyone like this?"],
|
||||
["What can I help you with today?"],
|
||||
["The town is thriving, keep it up."],
|
||||
[
|
||||
"Ugh, the warehouse has been backed up for two seasons now.",
|
||||
"I can't let this impact production here.",
|
||||
],
|
||||
[
|
||||
"I'm having trouble keeping everything in stock lately.",
|
||||
"Busy season?",
|
||||
],
|
||||
[
|
||||
"You should have more than enough money at this point to enjoy a pig race every now and again.",
|
||||
],
|
||||
[
|
||||
"Just so you know, the town went slightly past budget last season.",
|
||||
"I was able to cover the difference this time.",
|
||||
"Don't get used to it.",
|
||||
],
|
||||
["Still not showering?"],
|
||||
["What's on the agenda today?"],
|
||||
[
|
||||
"Cooked anything interesting lately?",
|
||||
"I'm tired of all these pedestrian meals.",
|
||||
],
|
||||
["I don't have much time to chat, let's talk later"],
|
||||
[
|
||||
"Some people are impressed by your progress here and will tell you as much.",
|
||||
"Don't let it get to your head.",
|
||||
],
|
||||
[
|
||||
"Noticed a few shops were running low on stock lately.",
|
||||
"You must really be expanding production, impressive.",
|
||||
],
|
||||
["I could use a nice bottle of Cristel right now."],
|
||||
["You shouldn't be relaxing, you have things to do."],
|
||||
["You haven't disappointed me yet, but that can always change."],
|
||||
[
|
||||
"The economic stability of this town depends on you.",
|
||||
"Don't let these people down.",
|
||||
],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"I didn't know you were capable of having taste.",
|
||||
"Where did you manage to find something like this?",
|
||||
"Maybe it's not so bad around here.",
|
||||
"My horse would love something like this.",
|
||||
"Who told you I like this? You're a snake.",
|
||||
"Passe une bonne journée.",
|
||||
"Smells like home.",
|
||||
"Flattery will get you everywhere with me!",
|
||||
"Is this from your farm? I hope you're selling more of these.",
|
||||
],
|
||||
liked: [
|
||||
"I already have a few of these, I suppose it saves me a trip to the store.",
|
||||
"This barely changes how I think of you.",
|
||||
"I know someone who would appreciate this.",
|
||||
"Finally someone with some manners around here.",
|
||||
"Interesting.",
|
||||
"Hmmm I can use this I think",
|
||||
"I'll take this.",
|
||||
"It's about time you did something nice for me.",
|
||||
],
|
||||
neutral: [
|
||||
"Why are you giving this to me...",
|
||||
"I don't really need this.",
|
||||
"Do you think I'm poor or something?",
|
||||
"How simple.",
|
||||
"Are you even trying to get me to like you?",
|
||||
"...",
|
||||
"This is almost worth something.",
|
||||
"You waste my time with these trinkets.",
|
||||
],
|
||||
disliked: [
|
||||
"Is this a joke?",
|
||||
"Of course someone like you would get me this",
|
||||
"Ugh...",
|
||||
"Okay...",
|
||||
"Turn around and walk away.",
|
||||
"You can't be serious.",
|
||||
"Horrendous.",
|
||||
"Please leave.",
|
||||
"Tasteless, but I don't know what I was expecting from you.",
|
||||
"This offends me.",
|
||||
"That's just terrible.",
|
||||
"You waste my time with these awful paperweights.",
|
||||
],
|
||||
hated: [
|
||||
"Get out of my face with that.",
|
||||
"Why did I even come to this backwater town.",
|
||||
"Keep this up and you won't have a bank around soon.",
|
||||
"I'm going to throw up.",
|
||||
"I didn't know you think as little of me as I do you.",
|
||||
"Revolting.",
|
||||
"Disgusting.",
|
||||
"Impolite and crass.",
|
||||
"Apologize to your parents for becoming a person that does things like this.",
|
||||
"Get that away from me.",
|
||||
"This is almost garbage.",
|
||||
"Ugh.",
|
||||
"Leave.",
|
||||
"Turn around and walk.",
|
||||
"If this is how you run this place I'm wasting my time here.",
|
||||
"Leave me out of your pathetic jokes.",
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Hello @i, I wanted to talk to you for a bit. I'm pleased to see the progress you're making on your farm.",
|
||||
"Unfortunately it's not where I want it to be by this time. You should know me by know, I'm not going to bail you out.",
|
||||
"Maybe this book will help you improve the efficiency of your machines.",
|
||||
"I had to call in a lot of favors to get my hands on this thing so you better soak in every page.",
|
||||
"I'll be able to tell if you skim it, I've known you long enough at this point to make it apparent."
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "five_gift_read",
|
||||
text: [
|
||||
"Hello @i, I wanted to talk to you for a bit. I'm not pleased with the progress you're making on your farm.",
|
||||
"I know you've read Slouching Towards Artistry, why aren't you using it?",
|
||||
"You should know me by know, I'm not going to bail you out. It doesn't matter how much you butter me up.",
|
||||
"Please make use of these ancient stones to improve your time management. I can't have you wasting time walking everywhere.",
|
||||
"Now leave, and don't disappoint me again."
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("blacksmith", {
|
||||
name: "Aiden",
|
||||
intro: [
|
||||
"Heya @i! Ace told me all about your plans here in the valley.",
|
||||
"My name is Aiden, and I'll be the one keeping your tools fresh for farming!",
|
||||
"If you need any smithing templates or geode busters just stop by my shop.",
|
||||
"Growing a town like this is no easy task, and I'm here to help!"
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"Heya! Need something?",
|
||||
"Finally upgrading those tools again?",
|
||||
"What can I help you with @i?",
|
||||
"Hello there @i, do you need something?",
|
||||
"Got any geodes laying around? I love cracking them open with these busters!",
|
||||
"Busy day today @i?",
|
||||
"If someone tells you they saw a limpet, it's polite to ask them what kind.",
|
||||
"How's your farm going @i?",
|
||||
["Ace told me so much about the valley before I moved here.", "The love they have for nature really shows!"],
|
||||
["Hmm... raw materials are plentiful underground, but the caves are crawling with monsters.", "Be safe down there @i!"],
|
||||
["I was taking a walk the other day and I swear I saw a piece of coal with legs...", "There's some strange magic in these caves I'm sure of it!"],
|
||||
"Hey @i, how's the farm going today?",
|
||||
["Have you had a chance to get down in the caves yet?", "You'll need some materials down there that I don't carry soon."],
|
||||
["If you don't have time to go mining to make sprinklers I have plenty of stock!", "Ahh I didn't mean to do a sales pitch!! Just wanted to make sure you knew!!"],
|
||||
["Earth Crystals have this soft glow to them that makes them stick out in caves!", "They're prettier than diamonds in my eyes!"],
|
||||
"Ace gave me this beautiful flower the other day, it's crazy what you can find in the wild!"
|
||||
],
|
||||
friendship1: [
|
||||
["Upgrading your tools is important, but don't slack on the armor either!", "Cave diving can be pretty dangerous if you're not wearing any."],
|
||||
"Got any geodes laying around? I love watching you crack em open!",
|
||||
"Have you met Maria yet? I've never met someone better with animals.",
|
||||
"Leon is such a character...",
|
||||
"Ahh I can't chat today @i, too much to do!",
|
||||
"What can I do for you today @i?",
|
||||
"Heya @i! What do you need!",
|
||||
["I saw a crazy looking butterfly today!", "They're so delicate and graceful..."],
|
||||
["Maria seems to order a lot of custom supplies from me...", "I wonder if Caroline can hook her up with a different supplier?"],
|
||||
["I'm not sure if I trust Leon...", "Some people can really take advantage of you if you're not careful."],
|
||||
],
|
||||
friendship2: [
|
||||
"Busy day today @i?",
|
||||
["How's it going @i?", "It's a beautiful day today."],
|
||||
"Heya @i! I was hoping you'd come around today!",
|
||||
"Whatcha up to @i? Wanting to upgrade to gold tools yet?",
|
||||
"Too busy to chat @i, Maria just put in a huge order!",
|
||||
"My wrist hurts something fierce! I gotta take it easy today...",
|
||||
["Hmmm nobody seems to be buying pitchforks at Leon's.", "Or maybe a certain someone forgot to put in an order again..."],
|
||||
"How are you doing today? It's a beautiful day out!",
|
||||
["It's crazy how many tools Ace seems to go through every week!", "Everyone here has been working so hard!", "...Except maybe Leon..."],
|
||||
["Ace told me more about the Skull Cavern last night...", "Apparently the desert caves are full of gold and iridium!", "Also "],
|
||||
["I was taking a walk the other day and noticed a Limpet staring at me from a cave!", "What a cute little snail!"],
|
||||
["Caroline refuses to go with any other suppliers for the stuff I make.", "I guess I should take that as a compliment but that's more work for me..."],
|
||||
["Did you hear what Leon was saying about Caroline?", "Actually I shouldn't spread rumors, talk to Leon yourself about it."],
|
||||
],
|
||||
friendship3: [
|
||||
"Hello my friend! What do you need!",
|
||||
"Hello friend! What can I get for you today?",
|
||||
"Hey @i! I was hoping I'd see you soon!",
|
||||
"What can I help you with @i?",
|
||||
"What do you think about Haruna? I can't tell if she's closed off or just quiet...",
|
||||
"I wonder what Caroline is doing with all that gold she ordered recently.",
|
||||
"Heya @i! What do you need!",
|
||||
"Welcome back, I've been missing you!",
|
||||
["When I feel homesick I think of all the wonderful people around me.", "You're included on that list of course!"],
|
||||
"Hmmm Leon still owes me for fixing that shelf... I wonder if I can get something sweet today at the market!",
|
||||
["Ugh, I slept on my neck oddly last night...", "But seeing you has made the day worth it!"],
|
||||
["Leon gave me a free bouquet with my groceries today!", "I feel a bit guilty for mistaking nonchalance for rudness."]
|
||||
],
|
||||
friendship4: [
|
||||
"Well well well, @i's back in my shop!",
|
||||
"Hey friend, what can I get you!",
|
||||
"Lovely day today @i, what do you need?",
|
||||
["You smell like roses! Have you been exploring the flower forests recently?", "I've heard you can find rainbow trees there, but that seems a little ridiculous to me."],
|
||||
"Sometimes when I'm working I'll catch a little but of Haruna's singing! It's so serene out here...",
|
||||
"I'm really glad I came out, life has been so rich for me lately.",
|
||||
"♫ Heya hiya @i! ♫",
|
||||
["I always get a little self-conscious when Caroline's auditing my stock.", "She can be harsh sometimes but it always seems to come from a good place."],
|
||||
["You should get around to finishing the boiler room if you haven't already.", "Nothing wrong with some industrial machinery to make farm life easier!"],
|
||||
["I'm starting to come around to Leon I think.", "Some people are just rough around the edges due to circumstances in their lives.", "Though I'm not quite sure if that's true of Leon..."],
|
||||
["People think that smithing is all about strength, but it's more to it than that.", "Rare metals like neptunium or electrum require more gentle presses.", "Every type of metal has its own personality!"]],
|
||||
friendship5: [
|
||||
"Heya @i! What do you need!",
|
||||
"Welcome back, I've been missing you!",
|
||||
"Heya friend! Looking to buy some metal?",
|
||||
"Welcome welcome! Always have time for a friend.",
|
||||
"♫ It's a new day! A fresh start! A glowing morning! ♫",
|
||||
"Sparkstone is such a curious thing. It's the distilled essence of the moon, a gift of Selene.",
|
||||
["Have you gotten your hands on some silver?", "It's exceedingly rare, but electrum tools can make your mining trips more fruitful!"],
|
||||
"Ace gave me some mossberries from yesterday's chopping run! They're so pleasantly tangy!",
|
||||
"I love the fresh smell of the valley, they remind me of spring magnolias from my home town.",
|
||||
"Leon has started waving to me regularly! Does this mean what I think it does?",
|
||||
["Have you upgraded your tools to iridium yet?", "Ace was telling me it's more plentiful on the lower depths of the Skull Cavern!"],
|
||||
["I would love to get my hands on a prismatic shard...", "The Skull Cavern is far too dangerous for a person like me to traverse!"],
|
||||
["Maria made me this perfect sweater for these harsh winters!", "Too bad it's a little small for me, but at least it's nice to look at!"],
|
||||
["Leon said something nice to me!", "Well maybe it was nice, I'm not quite sure.", "But it at least felt good to hear!"],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
["Wow! Are you sure about this? Are you really?", "I'll cherish this forever @i!"],
|
||||
"You're gonna make me melt with something like this!",
|
||||
["AHH! This is far too nice, I can't accept this!", "But it would be rude not to!", "Thank you @i!"],
|
||||
"I'm going to cry, this is too sweet just to jump a person with!",
|
||||
"How did you know I've been wanting one of these! You're too kind!",
|
||||
"Woah! @i I didn't know you liked me that much... Thank you!",
|
||||
"What have I done to deserve such a sweet friend!! Thank you so much!",
|
||||
["You can't just walk up to someone and give them a gift like this!", "Thank you friend!"]
|
||||
],
|
||||
liked: [
|
||||
"Wow, you're such a good friend @i!",
|
||||
"This makes me feel a different kind of warmth... Thank you @i!",
|
||||
"What!! A gift like this! Thank you!",
|
||||
"That's so sweet of you... Thanks truly!",
|
||||
"Woah! Thank you so much!",
|
||||
"You're a really good friend @i, thank you!",
|
||||
"It's so nice to feel appreciated here!",
|
||||
"You make my heart sing @i~",
|
||||
"You're such a kind person... Thank you @i."
|
||||
],
|
||||
neutral: [
|
||||
"Thanks friend",
|
||||
"Why thank you @i!",
|
||||
"Well thanks!",
|
||||
"Thanks @i!",
|
||||
"Much appreciated friend!",
|
||||
"I think I can use this for something!",
|
||||
"Oh! Thank you for the gift.",
|
||||
"It's nice to be thought about."
|
||||
],
|
||||
disliked: [
|
||||
"I appreciate the thought but I'm not really a fan of this.",
|
||||
"I appreciate the thought but I don't really have a use for this.",
|
||||
["I appreciate the thought but you should really know me better!", "It's an important mark of a friend."],
|
||||
"Oh...",
|
||||
"This isn't really to my taste but that's alright!",
|
||||
"Oh! A gift! This is a gift right?",
|
||||
["I don't think I can melt this down into anything usable if that's what your asking...", "Oh it's a gift! Oh!"],
|
||||
"I can never be too mad at someone for trying to do something nice."
|
||||
],
|
||||
hated: [
|
||||
"Sorry but I can't let you treat me like this.",
|
||||
"Why don't you take a lap and come back with a clear head.",
|
||||
"This isn't how you treat a friend.",
|
||||
"Did I upset you? What's going on here...",
|
||||
["...", "...", "Please leave."],
|
||||
"How unkind.",
|
||||
"I wish I didn't have better expectations of you.",
|
||||
["Talk to me again when you're in a better mood.", "If you continue to take your anger out on the people of this town I won't forgive you."],
|
||||
"Why would you give me such a thing...",
|
||||
["I can never be too mad at someone for trying to do something nice...", "But this feels a little mean-spirited"]
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Oh hey hey hey it's my best friend @i!! I've got something that'll make your day even brighter!",
|
||||
"A special edition of my mining specialty mining hammer, on the house!",
|
||||
"I'm sure you're moving tons of stone while building out this town, so this should really help speed up your work.",
|
||||
"Oh right by the way, I didn't exactly clear this with Caroline, so don't go showing it off to her. You know how much she cares about our budgets...",
|
||||
"...It's our secret!"
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("carpenter", {
|
||||
name: "Ace",
|
||||
intro: [
|
||||
"Hey stranger, my name is Ace. I'm here to help you build the village you're starting in Sunlit Valley.",
|
||||
"If you're looking to invite more villagers, come talk to me and I can help you build homes for them.",
|
||||
"If you'd prefer to do the building yourself, just let me know and I can sell any building supplies you'll need.",
|
||||
"You really have your work cut out for you here, come see me if you need anything!",
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"What can I help you with today @i?",
|
||||
"Need any building supplies @i?",
|
||||
["The blueprints I've made in my building shop come with all the building blocks you'll need pre-supplied!", "No need to run around crafting everything for a building, I gotcha covered!"],
|
||||
"The wild berries scattered around are such a good field snack!",
|
||||
"Don't discount wild plants like nettle, you can use them to make some tasty tea!",
|
||||
"Nature is full of valuable and useful plants if you know what you're looking for.",
|
||||
"I'll always try to make sure I'm around when you need me!",
|
||||
"If you can't find any tree you're looking for in the wild, I have some saplings in my supply shop!",
|
||||
"Be sure to check in occasionally, I may have some more invitations for other villagers stocked.",
|
||||
"Hey @i, have you managed to find your footing yet?",
|
||||
"Have you gotten a good handle on farming yet? Inviting someone to manage the market will let you get some new seeds."
|
||||
],
|
||||
friendship1: [
|
||||
["If you manage to find any earth crystals in the mines, be sure to make some tappers.", "You can get some valuable liquids from tapping different logs."],
|
||||
["I came across a rotted and overgrown farmhouse while exploring the other day...", "I wonder why the farmer abandoned it."],
|
||||
["My building shop has plenty of blueprints for your farm to choose from.", "I just need a few basic supplies to be able to build them."],
|
||||
["What can I help you with today @i?", "What a beautiful day it is today."],
|
||||
"Potatoes are some of the only crops that can grow in the wild! I try to dig around for them when I can.",
|
||||
["It's worth spending some time to upgrade your farm's infrastructure.", "You can use a charting map to link together your paths to travel faster!"],
|
||||
"I never leave my cabin without a potion of recall, being lost in the wild can be dangerous.",
|
||||
"Make sure to prepare a bit before mining, I looked inside of a cave earlier and found some dangerous looking monsters.",
|
||||
"What are you up to today?",
|
||||
"Ahhh hey @i, I can't chat much right now. I'm preparing for a big hike soon!"
|
||||
],
|
||||
friendship2: [
|
||||
"How's your farm going @i?",
|
||||
"Ahhhh I finally feel settled into this new town, I can finally relax a bit.",
|
||||
"Need anything built today?",
|
||||
"Technically you don't have to buy one of my barns, but animals really dislike being out in the rain.",
|
||||
"A good shed will keep all your artisan machines organized",
|
||||
"All this open land to survey, I really end up exhausted by the end of every day.",
|
||||
"Hey @i! What do you need today?",
|
||||
["Have you gotten to know Leon yet? You should really try to get to know everyone!", "And I do mean everyone..."],
|
||||
["Make sure you're talking to everyone that you've invited to this town.", "It can be a little lonely to move all the way from your home to help with a settlement like this one."],
|
||||
["You should ask Maria about getting a pet squirrel! They can forage for nuts and wild berries.", "I suppose they're kinda like me, in a way!"],
|
||||
["Don't get the wrong idea about me, I'm terrible at managing logistics!", "Caroline really did all the heavy lifting when getting this town started."],
|
||||
["I love the calmness of being out in the wild and foraging for food.", "If you stop and listen you can hear the little patters of wild animals."],
|
||||
["It's good to save at least one of every flower you find out in the wild.", "They seem to grow wildly with a little bonemeal, unlike crops and saplings.", "Plus Aiden really loves flowers, especially some of the rare ones I find!"]
|
||||
],
|
||||
friendship3: [
|
||||
"What can I get you @i?",
|
||||
"Hey @i, how's it going?",
|
||||
"Grow any new crops this season @i?",
|
||||
["Caroline is the only other person that knows where Haruna is from.", "I wonder why it's so secretive... But it's probably better to not pry about these things."],
|
||||
"Ahhhh @i, would you like to join me? I'm working on carving some wainscotting.",
|
||||
"Haruna tried teaching me to fish the other day. The only thing I managed to hook was her hairband...",
|
||||
"I always look forward to mossberry season. Nothing like chopping away at a try and seeing a juicy green fruit drop from a branch!",
|
||||
"Trees are pretty hearty and can grow in most seasons. Though spruce in particular seems to really dislike summer I've found.",
|
||||
["You should see if you can make a catching net!", "I've found tons of butterflies and moths just exploring."],
|
||||
],
|
||||
friendship4: [
|
||||
"Hey @i, how's your farm developing?",
|
||||
"How's it going?",
|
||||
"Sorry I can't chat, I'm a bit behind on my resource collection this week.",
|
||||
"Caroline has me working on furniture this week! It's a shame these are all designated as exports to other colonies.",
|
||||
"Haruna's smoked salmon is something else, it's perfect for long days in the wild!",
|
||||
"I still haven't figured out what's up with those birts... I should ask Maria.",
|
||||
"Dehydrated fruits make great travel food. The market has a dehydrator for sale if you're interested.",
|
||||
"Leon gave me some samples of this season's produce! You can really taste the freshness from your farm.",
|
||||
"Seems like Aiden sharpened my axe when I wasn't looking, what a kind soul."
|
||||
],
|
||||
friendship5: [
|
||||
["I really appreciate what Caroline's done for the town.", "Most people aren't aware of it from the outside, but she's done so much for everyone"],
|
||||
["I wonder if there's a way we can get Haruna home...", "At least for a visit. I'd hate to see Haruna gone forever."],
|
||||
"On my last expedition I found some wild penguins! I should get some for Maria.",
|
||||
"How's your farm coming along?",
|
||||
["Make sure you have the right equipment before diving into the Skull Cavern.", "Wouldn't want anything to happen to you."],
|
||||
"Hope your day's going smoothly @i!",
|
||||
"I'm really happy with what we've managed to build here, @i.",
|
||||
"Mushroom logs are a great way to make money from planting trees, you should have some on your farm!",
|
||||
"Mystic willows are so pretty, I wonder if Caroline knows where to find the saplings.",
|
||||
"Grow any new crops this season @i?",
|
||||
"How have you been @i?",
|
||||
["I'm sure dealing with seasons has been a burden on your farm. I can build you a greenhouse or two if you need!", "Just need some of that greenhouse glass first."],
|
||||
"Leon is a sucker for red wine, so glad I kept some wild berries around to make some.",
|
||||
"I don't know how Aiden manages to make all this industrial iron for some of my buildings.",
|
||||
"What can I get you @i?",
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"Who told you I like these? What a fantastic gift @i!",
|
||||
"Thank you so much, this is an incredible gift.",
|
||||
"You're a really good friend you know that @i?",
|
||||
"Thank you, this is very special to me.",
|
||||
"This will really help me out in the field! Thank you so much @i!",
|
||||
"Wow, thank you @i! Grand gestures like these mean so much to me!",
|
||||
],
|
||||
liked: [
|
||||
"Things like these help me out while I'm exploring the field",
|
||||
"That's so kind of you, I was thinking about picking this up soon.",
|
||||
"You read my mind @i, I was running out of these!",
|
||||
"Thank you, I can't wait to get done working today so I can use this.",
|
||||
"That's very nice of you, going out of your way to get me this with that busy schedule you have means a lot.",
|
||||
"I'm a little awkward when receiving gifts but trust me I do like this!",
|
||||
"Thank you @i, large gestures like these mean a lot.",
|
||||
],
|
||||
neutral: [
|
||||
"Thank you @i, small gestures like these mean a lot.",
|
||||
"Why thank you.",
|
||||
"That's very nice of you.",
|
||||
"Thanks!",
|
||||
"Thank you kindly, that's very considerate.",
|
||||
"This kind of thing will help make the long days feel shorter, thank you!",
|
||||
"Thank you for the gift.",
|
||||
"You were thinking of me @i? That's very kind."
|
||||
],
|
||||
disliked: [
|
||||
"Oh...",
|
||||
"I don't really want this...",
|
||||
"Thanks?",
|
||||
"Oh okay... Please don't give me any more of these.",
|
||||
"Gift giving isn't your strong suit I'm guessing?",
|
||||
"I wonder if I can make tree fertilizer out of this...",
|
||||
"Did Leon tell you I like this? That's not a very funny prank...",
|
||||
"I'm glad you're not littering but surely there's a better place with it!",
|
||||
"What do you mean you're giving this to me? Why?",
|
||||
"Why did you think I would like this?"
|
||||
],
|
||||
hated: [
|
||||
"This is extremely disrespectful. Get away from me.",
|
||||
"Get out of my face with that you hateful piece of dirt.",
|
||||
"When you wake up in the morning I hope you reflect on what kind of person you're trying to be",
|
||||
"Treating people horribly won't get you anywhere around here.",
|
||||
["All you do is take take take from everyone around you.", "This is what you give back?"],
|
||||
["I wasn't aware you were that kind of person.", "Maybe coming here was a mistake."],
|
||||
["...", "Get away from me with that."],
|
||||
"It's a cold world out here. Give me more garbage like this and you'll end up alone.",
|
||||
"What did I do to deserve this treatment.",
|
||||
"I don't have to be here you know."
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Hey @i, do you have time to chat? I wanted to show you what I've been working on all this time!",
|
||||
"It's the Blockapedia! A complete set of all the building blocks I could manage to get my hands on.",
|
||||
"Knowing how much you care about this town, I feel confident entrusting my little hobby project to you.",
|
||||
"I couldn't manage to find mystic willow logs though, I had to call in a favor to Caroline to get some blocks made with them...",
|
||||
"I appreciate everything you've done for this town, and I hope you'll find this useful when building it out more!"
|
||||
]
|
||||
}
|
||||
],
|
||||
choiceDialogs: [
|
||||
{
|
||||
name: "need_to_buy",
|
||||
text: ["Need to pick up something from the shop?",],
|
||||
options: [
|
||||
{ text: "Purchase supplies", command: "openshop @p carpenter" },
|
||||
{ text: "Invite Villagers", command: "openshop @p invitations" },
|
||||
{ text: "Build Farm buildings", command: "openselector @p building_shop" },
|
||||
{ text: "Build Village buildings", command: "openselector @p town_building_shop" }
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("fisher", {
|
||||
name: "Haruna",
|
||||
intro: [
|
||||
"Hello, my name is Haruna, I'm looking to carve out a home for myself in your town.",
|
||||
"I can get you started with learning how to fish. It's slow work that requires lots of patience.",
|
||||
"These waters aren't as fresh as the ones in my homeland, but I can make do with them for now..."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"The waters are turbulent today.",
|
||||
"It's a long way from home.",
|
||||
"There is a sadness in loneliness.",
|
||||
"It's quiet today.",
|
||||
"Mundane waves, forlorn oceans.",
|
||||
"Stars fall all the time, such as I on new ground.",
|
||||
"Hmmm? Apologies, I was lost in thought.",
|
||||
"These lands are quiet.",
|
||||
["Ah, I was told I should sell you a fishing rod.", "I also have some bait for sale if you pick up a tackle box as well."],
|
||||
"Fishing is a serene joy that's best enjoyed on your own.",
|
||||
"I'm fishing right now, if you could excuse me."
|
||||
],
|
||||
friendship1: [
|
||||
[
|
||||
"I wonder who is writing all these messages in bottles.",
|
||||
"I hope they don't mind my curiosity."
|
||||
],
|
||||
"Aiden might be the largest person I've ever seen. So tall...",
|
||||
"Ace is an anomaly to me, such is a person I cannot read.",
|
||||
"Where I come from, we use a lot more Neptunium.",
|
||||
["Fireflies by the riverside.", "A glow like the stars of home"],
|
||||
"Hello there @i.",
|
||||
"There's many unique fish in these waters. I'd like to get acquainted with them.",
|
||||
"If you're not great at fishing I recommend trying a cork bobber.",
|
||||
"How can I help you today @i?",
|
||||
],
|
||||
friendship2: [
|
||||
["♫ My life, my love and my lady... ♫", "\*Ahem\*...", "Yes?"],
|
||||
["♫ Take me by the hand, lead me to the land... ♫", "Oh. Excuse me."],
|
||||
"Hello again @i.",
|
||||
"Good day @i.",
|
||||
"I see Morana on the shimmer of the still ocean.",
|
||||
"Rivers have their own beautiful bounties.",
|
||||
"Ace told me about sea pancakes! I'd like to see them...",
|
||||
"Leon is very honest, I like that in a person.",
|
||||
["Where I come from, everyone is well versed in the ways of fish.", "I have never met someone as bad at fishing as Ace..."],
|
||||
"Want to try some different bobbers? I have a wide variety of them."
|
||||
],
|
||||
friendship3: [
|
||||
[
|
||||
"♫ Letting the days go by, let the water hold me down... ♫",
|
||||
"Oh. Hello."
|
||||
],
|
||||
["There's something about the waters in these lands...", "It's as if the sun is rebelling against the magic of the waves", "Interesting."],
|
||||
[
|
||||
"The sunrise is quite beautiful.",
|
||||
"...",
|
||||
"You can't let it distract you from your catch, though."
|
||||
],
|
||||
"Caroline respects what I do, yet doesn't come around here often...",
|
||||
[
|
||||
"It's curious. Fresh fish can come from salt water or fresh water...",
|
||||
"And to keep fish fresh, you can salt them."
|
||||
],
|
||||
"Caught anything new lately?",
|
||||
"Have you checked your fish ponds today?",
|
||||
"Do you think Ace can do anything with all of this driftwood I've found?",
|
||||
"The fish here can be... unusual.",
|
||||
"Bait Makers are convenient, but steady hands catch the best fish.",
|
||||
],
|
||||
friendship4: [
|
||||
[
|
||||
"I kneel with my rod",
|
||||
"The waves crash against the shore",
|
||||
"Mystical Ocean"
|
||||
],
|
||||
"Maria is too sweet to understand the natural cycle of life and death.",
|
||||
["The clearest of skies", "Folks work and play and harvest", "The Sunlit Valley"],
|
||||
[
|
||||
"Fishing really takes you to all sorts of places.", "Beaches, rivers, glaciers, islands... even volcanoes."
|
||||
],
|
||||
[
|
||||
"The markets at sea are quite volatile, you know.",
|
||||
"I used to make most of my money from bounties."
|
||||
],
|
||||
[
|
||||
"These waters vex me.",
|
||||
"Where does all this jelly come from?"
|
||||
],
|
||||
"♫ The clatter and clank, goes from tank to tank! ♫",
|
||||
"Yes, @i?",
|
||||
"Always refreshing to hear from you.",
|
||||
"It's a lovely day for fishing.",
|
||||
],
|
||||
friendship5: [
|
||||
["Do you hear it? Listen!", "...", "Water makes such interesting noises."],
|
||||
["It's been a while since I've been out at sea.", "This place is quite magnetic, I suppose."],
|
||||
["Such a big valley, and so many fish to catch...", "Oh! Good syllables."],
|
||||
"Hello again my friend.",
|
||||
"Woe is the fisher with the empty rod...",
|
||||
"A sonnet of deepfish, the organ of the cavernous waters.",
|
||||
"Sneep snorp... Sneep snorp... What a rhythm the name of a fish has.",
|
||||
"I love days like these.",
|
||||
"♫ Hmm hmm hmm... ♫",
|
||||
"I'm growing quite attached to Maria's love of animals. It's very endearing!",
|
||||
"I always enjoy sharing some wine with Leon on colder nights."
|
||||
]
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"You must have put a lot of thought into this.",
|
||||
"Little joys like these give me a reason to sing, @i.",
|
||||
"You know me all too well, you're a gem of the land.",
|
||||
"Truly this is a wonderful gift. It reminds me of home.",
|
||||
"Thank you @i. I feel very welcome here.",
|
||||
"♫ Thank you my sweetest darling ♫",
|
||||
"Such kindness cannot be repaid by me, but it would be rude to not accept such a gift."
|
||||
],
|
||||
liked: [
|
||||
"This is just like home.",
|
||||
"Thank you @i, you're too kind.",
|
||||
"Almost as sweet as the sound of evening waves.",
|
||||
"I appreciate this more than you'll know.",
|
||||
"You've got a knack for giving gifts @i.",
|
||||
"This is a brisk wind on a warm day, welcome and appreciated."
|
||||
],
|
||||
neutral: [
|
||||
"This is appreciated.",
|
||||
"Thank you @i.",
|
||||
"Thank you for the gift @i.",
|
||||
"Hmmm do you think one of the others would like this as well?",
|
||||
"I could use this as an offering for the stars, thank you.",
|
||||
"I was looking to experiment with new kinds of bobbers, thank you.",
|
||||
"Thank you for the gift @i.",
|
||||
"It's strange, people here give me random things like this. I'm still not used to it.",
|
||||
"I'm not sure what use I have for this but I appreciate the gesture."
|
||||
],
|
||||
disliked: [
|
||||
"I suppose I'd rather hold onto this than let it destroy a habitat.",
|
||||
"Some things are better kept than given.",
|
||||
"I'm not sure if I care for this...",
|
||||
"In my culture, this is considered a \"faux pas\".",
|
||||
"How I wish there were a shell I could be listening to right now.",
|
||||
"I don't think I can even use this as bait...",
|
||||
"Does this pass for a joke here?"
|
||||
],
|
||||
hated: [
|
||||
"Did this wash ashore with the detritus I saw earlier?",
|
||||
"I wonder if it's safe to sail back home.",
|
||||
"This is... nauseating.",
|
||||
"Perhaps I should erect a \"Gone Fishing\" sign in my stead.",
|
||||
"How long did you think about this?",
|
||||
"...",
|
||||
"Just because I like the sea doesn't mean I like sea garbage."
|
||||
]
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Hello @i, I have a small token of appreciation for you.",
|
||||
"I haven't spent all that long in this land, yet you continue to treat me as if you've known me your entire life.",
|
||||
"This pendant is a mystical relic from where I come from. Ancient magi would infuse it with neptunium to summon a giant sea-serpent.",
|
||||
"Ahh, but don't worry about that! These waters are too mundane for it to have any use here.",
|
||||
"Hopefully this brings you a tiny bit closer to understanding my soul."
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
if (global.datagenDialog) {
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("goddess", {
|
||||
name: "Selene",
|
||||
unique: [
|
||||
{
|
||||
name: "skull_cavern_hammer",
|
||||
text: [
|
||||
"That's an interesting little tool you have there. Did Aiden help you make that?",
|
||||
"In any case, I cannot allow you to use that here. Someone before you once wielded that curse in my caverns...",
|
||||
"Their soul fissured from their own body after an hour, vanishing instantly...",
|
||||
"Leave that monstrous thing at home.",
|
||||
"(This has been disabled for performance reasons but can be changed in _config.js)"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "skull_cavern_shatterer",
|
||||
text: [
|
||||
"Oh my, it seems my brother has gotten his hooks into you.",
|
||||
"Only the power of the sun could make a tool so wretched and greedy.",
|
||||
"I cannot allow you to use that here, it's so... Unsightly...",
|
||||
"Leave that slight of the moon at home.",
|
||||
"(This has been disabled for performance reasons but can be changed in _config.js)"
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("librarian", {
|
||||
name: "Veronica",
|
||||
intro: [
|
||||
"Hello @i, my name is Veronica. I've been brought on here to help you get your storage in order.",
|
||||
"Caroline tells me that your homestead is a 'disgusting pile of unorganized rubbish'...",
|
||||
"I feel like that was a slight exaggeration, but hopefully some of my cataloging supplies can help you out.",
|
||||
"I have a masters in library sciences, so I'm well versed in the various storage solutions.",
|
||||
"Please stop by the next time you get the chance."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"Hello @i, what can I get for you today?",
|
||||
"Do you need some organizational supplies or books?",
|
||||
"Make sure to check in during the end of the season, I have some rare books for sale then.",
|
||||
"Welcome, what can I get you?",
|
||||
["How about that weather?", "...Sorry I'm not good with small talk..."]
|
||||
],
|
||||
friendship1: [
|
||||
"Back again? Have you been doing some more farm expansion?",
|
||||
"Are you going to buy something this time or just give me 'that look' when I show you the prices again?",
|
||||
"You should know what I'm here for by now, please have a look.",
|
||||
["Evelyne was bragging to me about these magical drawers that teleport items between them...", "What a rude person. It's not like I can sell *every* type of box out there."],
|
||||
"Is your day going alright? It's been quiet out there.",
|
||||
],
|
||||
friendship2: [
|
||||
"How has Aiden managed to break so many of my storage crates? Are ingots being placed in them hot or something?",
|
||||
["Have you seen a copy of Vōg Italia lying around anywhere?", "I haven't had a chance to look at this season's collection yet..."],
|
||||
"What can I do for you today @i?",
|
||||
"I'm getting food with Caroline soon so make it quick, I don't have much time.",
|
||||
["I have no idea how to talk to that Ace.", "I've never met someone that talks so fast, it's frustrating."]
|
||||
],
|
||||
friendship3: [
|
||||
["Some farmers prefer the more applied school of digital storage, though I find it overly complex.", "Unfortunately, I only have enough room in my shop for the refined approach."],
|
||||
"Don't forget to stop by every time I do the Book Fair! I can only stock so many books so some are seasonal!",
|
||||
"Can you check in with Leon? I need that copy of 'Notebooks from Underneath' back, it's been weeks...",
|
||||
"Ugh, this is the third nature field guide Ace has ruined this month! Annoying!",
|
||||
"How can I help you today?"
|
||||
],
|
||||
friendship4: [
|
||||
"Evelyne has to be the most unorganized person I have ever met. It's embarrassing.",
|
||||
["It breaks my heart that Caroline is so misunderstood...", "Supporting towns like these require so much time, energy and resources to support.", "It's very thankless work, most people flame out of it. But not my Caroline!"],
|
||||
"Caroline doesn't like when people are unprofessional, so keep our little chats when I'm on the clock between you and I.",
|
||||
"Hey @i, what can I get you? You can't possibly need more space, right?",
|
||||
["Get some minisheep! They have the most beautifully shininig coats. Their wool makes some gorgeous sweaters... ♡","Ah! Not that I'm an expert or anything! Ask Maria!"],
|
||||
],
|
||||
friendship5: [
|
||||
"The key to making beautiful nit fabrics to do it by hand, this is something you should understand intuitively being a farmer and all.",
|
||||
["Did you seen Iris von Harpten's latest collection??", "I have no idea how she manages to use those strange materials to create such beautiful shapes... ♡"],
|
||||
"It's @i! I'm so happy to see you right now, Carolines been so busy this week and I need someone to talk to!",
|
||||
["I wonder where Carlos sends all those random items you give him...", "He's always asking for more shipping materials."],
|
||||
"Oh hey @i! What can I get you today?",
|
||||
["Fashion houses should never continue once their founding designers leave.", "Yes I get that there are exceptions, but just look at Gaultiyay! It's become so gauche!"]
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
["I should let you know that I'm supposed to file a report for gifts this sweet... ♡"],
|
||||
["Why would you show me a garment this beautiful, I could never get my hands on something like this...", "...? You're giving it to me?", "Thank you @i, I'll take perfect care of it, I have a spare garment bag and everything ♡"],
|
||||
["How did you get your hands on something like this!?", "French seams like this are difficult to pull off on a garment of this size.", "It must have been made by someone who truly loves the craft ♡"],
|
||||
"The texture of this is incredible, Maria must have taught you how to raise sheep with such kindness ♡",
|
||||
"What a wonderful gift, I can't wait to catalog this for my collection... ♡"
|
||||
],
|
||||
liked: [
|
||||
"Thank you @i, I appreciate the kindness.",
|
||||
"Thanks for the gift, small things like this go a long way.",
|
||||
"Oh! It's not so often I receive gifts, thank you.",
|
||||
["Do you need a special container for this? It seems nice.", "Oh this is for me? Thank you @i."],
|
||||
"Thank you for the gift, I know someone who'd love something like this."
|
||||
],
|
||||
neutral: [
|
||||
"Hmmm? Oh you can put that over in section E6.",
|
||||
"I'll take care of this for you @i, when do you want it back?",
|
||||
"Gift? Why do I need a gift?",
|
||||
["I don't really do deliveries, that seems like Ace's type of thing.", "Oh, it's a gift. Thanks."],
|
||||
"Put that one on the pile back there please."
|
||||
],
|
||||
disliked: [
|
||||
"I don't really want this.",
|
||||
"I'm not a fan of things like this.",
|
||||
"Did you mean to give this to someone else? I don't understand...",
|
||||
"Can you give that to someone else? I don't really like it.",
|
||||
"I don't really have a need for this.",
|
||||
],
|
||||
hated: [
|
||||
"Don't come to me for advice on how to store your disgusting garbage.",
|
||||
"What have I done to deserve your ire?",
|
||||
["I should let you know that I have to file a report for things like this.", "I'll let Caroline deal with you, please leave."],
|
||||
"This is disgusting.",
|
||||
"If Aiden knew you gave people things like this, it would break his heart."
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Hey @i! I've got an idea on how to earn Caroline's respect!",
|
||||
"As you've probably figured out right now, she's insatiable when it comes to your role in this little town.",
|
||||
"It doesn't matter how much your farm makes, it will never be enough! Everyone around here relies on the economic activity of your farm after all.",
|
||||
"That said, being knowledgeable about your financial history will give her at least a little more peace of mind.",
|
||||
"It would be a shame if my two best friends didn't get along, so please read it when you get the chance ♡"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "five_gift_read",
|
||||
text: [
|
||||
"Hey @i! I've got another idea on how to earn Caroline's respect!",
|
||||
"As you've probably figured out right now, she's insatiable when it comes to your role in this little town.",
|
||||
"It doesn't matter how much your farm makes, it will never be enough! Everyone around here relies on the economic activity of your farm after all.",
|
||||
"That said, not having to worry about you passing out in the Skull Cavern should give her a little more peace of mind.",
|
||||
"It would be a shame if my two best friends didn't get along, so please make sure to wear these while you're down there ♡"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "book_fair",
|
||||
text: [
|
||||
"I have a selection of special books available for the book fair this season, please take a look.",
|
||||
]
|
||||
},
|
||||
],
|
||||
choiceDialogs: [
|
||||
{
|
||||
name: "book_fair",
|
||||
text: ["I have a selection of special books available for the book fair this season, please take a look."],
|
||||
options: [
|
||||
{ text: "Purchase supplies", command: "openshop @p librarian" },
|
||||
{ text: "Shop at the Book Fair", command: "openshop @p book_fair" }
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("market", {
|
||||
name: "Leon",
|
||||
intro: [
|
||||
"Hey @i, I'm Leon. I was sent here to manage the local farmer's market.",
|
||||
"I'll be making sure you have seeds and some basic farming supplies.",
|
||||
"In return some of your produce will be sent here for the other villagers.",
|
||||
"Please don't be like all the other farmers that wake up at 6am..."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"Hmmm? Need something?",
|
||||
"What can I help you with?",
|
||||
["Welcome to the Sunlit Market! How can I help you~", "I really hope I can get away with not saying that ever again."],
|
||||
["If you're looking for saplings, ask Ace.", "Those things leave so much dirt around and I can't be bothered to sweep it."],
|
||||
"Hey... I've got the seeds.",
|
||||
["I hope Ace gives me back that copy of Wuthering Logs...", "I want to read it before watching the new film adaptation."],
|
||||
["Wow you look absolutely exhausted!", "Wait I'm not supposed to say stuff like that...", "Welcome to the market, what can I do for you!"],
|
||||
["I was told to make sure you know about fertilizers.", "I feel like someone in your position would know about them already though."],
|
||||
"Oh? You're telling me you need more seeds?",
|
||||
"I can't imagine wanting to be out in the fields all day.",
|
||||
["I'm going to miss going to the cinema every week.", "I can't imagine Ace has the plans drawn up for one at the moment."],
|
||||
"You look exhausted, starting a farm must be taking it out of you.",
|
||||
["I'm not used to this much solitude.", "It'd be nice if it wasn't so boring..."],
|
||||
["Takes me a solid month to get used to sleeping in a new bed.", "It's not going so well..."],
|
||||
"Another quiet day in the valley.",
|
||||
["It's deathly quiet out here in the wilderness.", "Going to take me some time to get used to."],
|
||||
[
|
||||
"You know, the less planting you do the less you have to come here.",
|
||||
"Just slow down a little, the money can always wait."
|
||||
],
|
||||
[
|
||||
"Ace is starting to annoy me with all that hammering.",
|
||||
"All this open area, the sound travels so far."
|
||||
]
|
||||
],
|
||||
friendship1: [
|
||||
"Happy cashiers are all alike, but every unhappy cashier is unhappy in their own way...",
|
||||
"What's up @i?",
|
||||
"What would you like today?",
|
||||
"No need to look around for anything, I've learned where everything is now.",
|
||||
"Is it apple season yet?",
|
||||
["...", "......", "........", "...I was hoping you would walk away by now..."],
|
||||
["Remind me, where does your name come from?", "Every name has a story, even if you're not aware of it."],
|
||||
"When do you get done with working? Do you ever really finish a work day?",
|
||||
"It's so boring around here...",
|
||||
"If you need anything specific, let me know.",
|
||||
["What's the deal with Aiden?", "He's so nice to me... I wonder what he wants from me."],
|
||||
[
|
||||
"It's so slow today...",
|
||||
"Got any stories from your adventures?",
|
||||
],
|
||||
[
|
||||
"People don't really like to cook around here.",
|
||||
"You'd make more money selling pre-made meals than just selling crops."
|
||||
],
|
||||
[
|
||||
"Why are you even doing all this farming?",
|
||||
"It's not like there's anything to buy out here"
|
||||
]
|
||||
],
|
||||
friendship2: [
|
||||
[
|
||||
"Can you tell Caroline I've been very professional with you?",
|
||||
"She doesn't like when I get casual and I really can't be bothered.",
|
||||
],
|
||||
"Can you hurry up and buy something, I'm really tired right now.",
|
||||
"I'm running low on stock this week so go easy on me.",
|
||||
"I don't know why everyone around here is so suspicious of me, I just like my peace and quiet...",
|
||||
"Why does a town this small even need a market. If you ask me, everyone should just barter for food.",
|
||||
["Caroline's weekly report is overdue, I hope she's not too mad about it.", "I don't think I'm gonna be able to convince you to do it for me... Unless?"],
|
||||
"Read any classics lately? Or are you still running around from dusk till dawn every day.",
|
||||
[
|
||||
"Ugh, Caroline's workers are late again today...",
|
||||
"She gets mad when they catch me napping"
|
||||
],
|
||||
["I don't really know much about farming.", "The Farmer's Almanac is such a dry read, I haven't bothered to look at it."],
|
||||
],
|
||||
friendship3: [
|
||||
["I don't care much for the natural beauty of the countryside.", "The growth of this town is much more inspiring to me"],
|
||||
["Why isn't a cutting board just made with wood?", "I need to speak with Ace, that doesn't make any sense."],
|
||||
["Caroline complained to me the other day about my markup...", "Getting books shipped out here isn't cheap, I need that money!"],
|
||||
"Hey there, what do you need",
|
||||
"How can I help you today?",
|
||||
"Ugh, Haruna's been stinking up the market lately with her fish...",
|
||||
"I could go for some caviar right now...",
|
||||
"Is it socially acceptable to eat dinner yet?",
|
||||
"Why do you like gardening so much? Isn't it a little tedious?",
|
||||
"Have you met any Ribbits yet? They fascinate me...",
|
||||
["Kimchi...", "Oh! What's up?"],
|
||||
"The night is so beautiful and harsh out here.",
|
||||
["How did you meet Caroline?", "She's not an easy person to talk to, but she's very well connected."],
|
||||
"If everything is permitted, why does Caroline bother me so?",
|
||||
["Can't wait to get my package. What's taking them so long?", "Maybe I should talk to Caroline... Just to check."],
|
||||
[
|
||||
"Have you spoke to Caroline today?",
|
||||
"Did she say anything about my behavior? I really hope not.",
|
||||
]
|
||||
],
|
||||
friendship4: [
|
||||
"I can keep you stocked with bottles if you ever want to get into wine making.",
|
||||
[
|
||||
"Has Caroline said anything about me to you?",
|
||||
"Just curious, I don't think it matters either way."
|
||||
],
|
||||
"I wonder what Maria's up to today...",
|
||||
"You're back!",
|
||||
"Hey @i! What do you need?",
|
||||
"Finally, someone to talk to. It's been so quiet today.",
|
||||
[
|
||||
"Caroline hasn't been around in a while...",
|
||||
"I hope that means I'm doing alright here.",
|
||||
],
|
||||
"Have you ever been to Emporio? Or did you not get out much back then.",
|
||||
"I miss all my old friends, have they moved on by now?",
|
||||
"How's the farm treating you?",
|
||||
["When it rains I feel this sense of dread, as if it's washing away my protective coating.", "Nature can be cruel."],
|
||||
["I've been missing the comforts of living in a big city.", "Everything is so slow around here! I don't have the patience for it."],
|
||||
["I've been dying to talk to someone lately.", "You'd think people would be coming by here more often..."],
|
||||
[
|
||||
"Has Haruna taken a trip to the Ocean recently?",
|
||||
"I gave her some film for the beach to take photos but I'm guessing she forgot about it."
|
||||
]
|
||||
],
|
||||
friendship5: [
|
||||
["Happy cashiers are all alike, but every unhappy cashier is unhappy in their own way...", "...But I'm always happy to see you @i!"],
|
||||
["I've been reading about the arcane magic of the Skull Cavern.", "Have you had a visit yet?"],
|
||||
["Do you think Caroline ever gets along with anyone?", "I wonder if she has a soft side..."],
|
||||
["I'm kinda over this whole groceries thing.", "Is my only task in this short life to sort products?"],
|
||||
"I could use a cold glass of wine right about now.",
|
||||
["Have you had the time to go out exploring yet?", "I'm sure there's some tasty things out there I haven't tried."],
|
||||
["The best thing about living out here is the freshness of everything", "I never realized blueberries had such strong flavor!"],
|
||||
["I wonder, are Magic Shears ethical?", "I'm sure if they weren't Maria wouldn't sell them..."],
|
||||
["I'd much rather you exploit nature than other people.", "Nature always gets its revenge, while the weak have no advocates."],
|
||||
["Caroline visited me the other day! She seemed happy with our sales this season.", "Please don't let me disappoint her!"],
|
||||
"Caroline has really relaxed lately, have you been sweet talking her?",
|
||||
["Were you ever much of a reader before moving here", "Literature can be inspiring, it's the frontier of the mind after all."],
|
||||
[
|
||||
"Have you started making wine yet?",
|
||||
"I could use some of that about now...",
|
||||
"For the market of course!"
|
||||
],
|
||||
[
|
||||
"Found any interesting wild crops lately?",
|
||||
"I could use something fun to eat.",
|
||||
],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
["Small kindnesses like these really break up the drudgery of daily life.", "I'm very thankful you're part of the melange."],
|
||||
"Beautiful, and touching.",
|
||||
"This is mesmerizing. I'll cherish it forever.",
|
||||
"What a gift. To know me like this is the mark of a true friend.",
|
||||
"Nobody around here would know I like this. Am I really that fascinating to you?",
|
||||
"To love someone means to see them as Selene intended them.",
|
||||
"This is a fine gift from a finer person!",
|
||||
"Aesthetically perfect. A work of art.",
|
||||
["I can't stop looking at it...", "How on earth did you get your hands on this..."],
|
||||
"It is the ultimate respect to receive a masterwork from someone at the height of their craft."
|
||||
],
|
||||
liked: [
|
||||
"It's always pleasant to receive a gift like this.",
|
||||
"Nothing is easier than flattery, not that I mind!",
|
||||
["It's much better to do good in a way that...", "No that's not right. I like this way more."],
|
||||
"You're very appreciated, I hope you know.",
|
||||
"The margins on seeds aren't great, little luxuries like this go a long way!",
|
||||
"Touching, thank you.",
|
||||
"Thank you, I really needed the pick-me-up!",
|
||||
"It's been so slow today, finally something nice happened!"
|
||||
],
|
||||
neutral: [
|
||||
"Alright then!",
|
||||
"Okay!",
|
||||
"A gift! Neat.",
|
||||
"Are you handing these out to everyone?",
|
||||
"It looks high quality but it's not really to my taste.",
|
||||
"In a way, something this ugly has a certain beauty to it! Exciting!",
|
||||
"I do love a gift! Even if its not quite one I want!",
|
||||
"I'm not really sure how to react to this but thank you for the kindness.",
|
||||
"I have plenty of random objects for still life at my shop, but thank you!",
|
||||
"If you keep giving me things you'll eventually find one I actually like!",
|
||||
["You can do better!", "Life is lived in the details, and you need to pay more attention!"],
|
||||
"Well, it is a gift.",
|
||||
"Rough season at the farm?",
|
||||
"You could have put a little more thought into this.",
|
||||
"I don't hate this for some reason.",
|
||||
"Are you even listening to me when I speak to you?",
|
||||
"Someone around here will definitely like this, I'm sure."
|
||||
],
|
||||
disliked: [
|
||||
["Ahhh I didn't know you were actually an ascetic!", "I thought that was just your look..."],
|
||||
"I guess someone who spends so much time digging in the dirt doesn't have time to enjoy the finer things.",
|
||||
"Ahhh I really hope you tried your best.",
|
||||
["Well isn't that nice.", "Oh, it's for me? Alright..."],
|
||||
"I don't really want that. Or need it.",
|
||||
["You can be sincere and still be...", "Nevermind, you wouldn't get it."],
|
||||
"Let's be real I'm just gonna toss this when you walk away.",
|
||||
["Oh! I'm actually really busy right now.", "Some seeds ran away, I really need to catch them?"],
|
||||
"Be real with me are you just pulling random stuff from your pocket to give to me?",
|
||||
"Woah! I don't really want this!",
|
||||
["I don't like things like this.", "Please write that down."],
|
||||
"This is a gift?"
|
||||
],
|
||||
hated: [
|
||||
"What a slob.",
|
||||
"Get out of my face.",
|
||||
"Hateful.",
|
||||
"A beast can never be as cruel as a human being, so artistically, so picturesquely cruel.",
|
||||
"I hope you aren't this inept at farming.",
|
||||
"When you look in the mirror at night, think of all that is wasted on you.",
|
||||
"You are senseless and I don't enjoy you.",
|
||||
"What kind of person do you take me for?",
|
||||
"It takes something more than intelligence to act intelligently.",
|
||||
"I deserve better than to be treated like this.",
|
||||
"This is disgusting.",
|
||||
"Absolutely tasteless.",
|
||||
"You are a child, get away from me."
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Ahhh just the person I wanted to see today! I have a bit of a request for you.",
|
||||
"Caroline's making me read this really dry book on farming, and I really can't be bothered...",
|
||||
"But you're a farmer! A really good one at that, and I'd know more than anyone else here.",
|
||||
"Sooooo.... Can you please read this book for me and give me a quick summary on it?",
|
||||
"In return I'll convince Caroline to let me carry seeds of every season all the time!",
|
||||
"It's a win win but I know you'd do it either way since you seem absolutely infatuated with me.",
|
||||
"...You aren't exactly subtle..."
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "five_gift_read",
|
||||
text: [
|
||||
"Hey @i, you look like the type of person who's read Universal Methods of Farming, am I right?",
|
||||
"Sorry I don't mean to call you a nerd. I mean you definitely are a farming nerd there's no doubt about that.",
|
||||
"But I digress and I'll cut to the chase. Can you give me a quick summary on it?",
|
||||
"Caroline's making me read this really dry book on farming, and I really can't be bothered...",
|
||||
"I'll give you some of these rare sparkpod seeds in advance, it really is a win win!",
|
||||
"Although... I know you'd do it either way since you seem absolutely infatuated with me.",
|
||||
"...You aren't exactly subtle..."
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("gnome", {
|
||||
noPortrait: true,
|
||||
name: "Gnome",
|
||||
unique: [
|
||||
{
|
||||
name: "chatter_0",
|
||||
text: ["⊣リ𝙹ᒲᒷ'↸ ℸ𝙹 ᒲᒷᒷℸ ǁ𝙹⚍."]
|
||||
},
|
||||
{
|
||||
name: "chatter_1",
|
||||
text: ["⍑ᒷꖎꖎ𝙹 ℸ⍑ᒷ∷ᒷ 𝙹ꖎ↸ ᓵ⍑⚍ᒲ, ╎'ᒲ ⊣'リ𝙹ℸ ᔑ ⊣'リᒷꖎ⎓, ╎'ᒲ ⊣'リ𝙹ℸ ᔑ ⊣'リ𝙹ʖꖎ╎リ, ╎'ᒲ ᔑ ⊣’リ𝙹ᒲᒷ! ᔑリ↸ ǁ𝙹⚍'⍊ᒷ ʖᒷᒷリ ⊣リ𝙹ᒲᒷ↸!"]
|
||||
},
|
||||
{
|
||||
name: "chatter_2",
|
||||
text: ["⊣╎⍊ᒷ ᒲᒷ ℸ⍑ᒷ ̇ Silver. ⊣リ𝙹ᒲᒷ ᒲᒷ ̇ Silver ᔑリ↸ ╎ ⊣リ𝙹ᒲᒷ ǁ𝙹⚍ ᔑ ꖌリ╎⊣⍑ℸ' 𝙹' ↸ᔑ ⊣リ𝙹ᒲᒷ!"]
|
||||
},
|
||||
]
|
||||
});
|
||||
runNpcDatagen("blueprints", {
|
||||
noPortrait: true,
|
||||
name: "Blueprints",
|
||||
choiceDialogs: [
|
||||
{
|
||||
name: "prompt",
|
||||
text: ["What buildings would you like to browse?"],
|
||||
options: [
|
||||
{ text: "Farm buildings", command: "openselector @p building_shop" },
|
||||
{ text: "Village buildings", command: "openselector @p town_building_shop" }
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("shepherd", {
|
||||
name: "Maria",
|
||||
intro: [
|
||||
"Hello, my name is Maria. I'll be here to get you started ranching on your farm.",
|
||||
"Raising animals take lots of time, energy and care.",
|
||||
"In the end seeing the look on a happy animal's face is well worth it!",
|
||||
"If you need any supplies just let me know."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
["Hello there, need anything?"],
|
||||
["I'm not used to being out in the wild like this.", "It's exciting to see all the wildlife!"],
|
||||
["How's your farm going?", "Have you gotten started with some animals yet?"],
|
||||
["It's eerie here at night, I'm not used to this must open air."],
|
||||
["Do you need something?"],
|
||||
["Need to pick something up?"],
|
||||
["The valley is full of wild slimes...", "They always catch me off guard and pop out of nowhere."],
|
||||
["Have you seen Ace around?"],
|
||||
["What can I do for you today?"],
|
||||
["Hello @i."],
|
||||
["I could use a warm cup of coffee right now..."],
|
||||
["I'm often skeptical of new farmers I see try to take on ranching.", "Some of them have a rotten soul unfit to care for them."],
|
||||
["I'm not sure about Leon... ", "I've never met someone so distant."],
|
||||
["Always curious about where these new farmers will end up.", "Not everyone's cut out for the hard life of labor."],
|
||||
["Everyone here is so friendly, it kinda weirds me out.", "No not like that! I'm just not used to it!"],
|
||||
],
|
||||
friendship1: [
|
||||
["I saw some wild sheep roaming around the other day.", "They look like they could use a warm barn..."],
|
||||
["No need to stop around so often", "I'm more than capable of handling myself out here."],
|
||||
[
|
||||
"When you choose a name for your animals, it creates a special bond between you and them.",
|
||||
"Make sure you name them something that fits their personality!",
|
||||
],
|
||||
["How are things on your farm?"],
|
||||
["Everything is so calm and simple around here...", "I'm excited to see how things change over time."],
|
||||
["Ace gave me some Salmonberries to munch on today!", "No wonder I see squirrels digging around for them all the time."],
|
||||
["Feel free to stop by if you have any questions about animals."],
|
||||
["Do you want something?"],
|
||||
["How are you today?"],
|
||||
["Hey @i, what can I do for you?"],
|
||||
["Everybody lies, but animals will always tell you the truth.", "Except racoons, those always try and trick you!"],
|
||||
["How is Aiden so cheerful standing in that heat all day?"],
|
||||
["Why did Leon even move out here?", "I've never met someone that hates nature more."],
|
||||
["I miss the stray cats of the city I grew up in...", "Stray sheep are a different kind of nice though!"],
|
||||
],
|
||||
friendship2: [
|
||||
["All these new people in town...", "Moving to a new town sure is rough."],
|
||||
[
|
||||
"I've seen some nasty farmers out there that treat their animals cruelly.",
|
||||
"Giant holding pens stuffed to the brim... Makes me sick...",
|
||||
"I'm glad you're not like that!"
|
||||
],
|
||||
["Running low on animal feed?", "Or are you here to adopt!"],
|
||||
["I've been loving seeing all the wild animals run around freely lately."],
|
||||
["There's something about the air here that's so freeing."],
|
||||
["I hope you're feeding your animals every day.", "You'd be grumpy to if you had to skip a meal!"],
|
||||
["You should see if you can make a Catching Net!", "There's so many wonderful butterflies around the valley."],
|
||||
["I don't have the heart to garden, all my plants always end up over-watered..."],
|
||||
["I love the feeling of weaving on a Canvas Loom.", "There's nothing quite like it."],
|
||||
["Leon was so sour today when I went to get groceries.", "People can be so mean when they're tired."],
|
||||
["People's hearts are often unveiled with their treatment of animals."],
|
||||
["Some people can be so disappointing in life.", "Ahh but nobody here is like that! Probably..."],
|
||||
[
|
||||
"Grains like Wheat and Corn can be made into Animal Feed.",
|
||||
"I'm sure your animals will appreciate fresher food than what I've got!"
|
||||
],
|
||||
],
|
||||
friendship3: [
|
||||
["Need more feed?"],
|
||||
["Have you considered ranching pigs?", "Truffles are great for making donuts!"],
|
||||
["Have you talked to Aiden recently?", "I really need that order of pails..."],
|
||||
["Animals have no concept of the evils we are capable of.", "It's our job to make sure they never find out."],
|
||||
["You can tell a lot about a person by the way they approach a scared animal."],
|
||||
["I was reading about Minisheep today in the farmer's almanac.", "...So fluffy..."],
|
||||
["Caroline is a sucker for goat cheese.", "Don't mention I said that! I want to know more secrets..."],
|
||||
["Leon has sewing supplies stocked at the market.", "Let me know if you need lessons!"],
|
||||
["Caroline has some expensive taste.", "Most people don't have an eye for proper merino wool."],
|
||||
["Your hands are so calloused!", "Let me take a look later, I have a serum made from sheeps milk that will help."],
|
||||
["Do you ever think about what our animals dream about?"],
|
||||
["Someone like you could really use some pets.", "I bet it gets lonely over where you are."],
|
||||
],
|
||||
friendship4: [
|
||||
["Originally I thought Leon disliked me in particular.", "Turns out they're just like that."],
|
||||
["There's nothing as sweet as the love of an animal."],
|
||||
["Hey @i, what are you up to today?"],
|
||||
["How's your ranch going today?"],
|
||||
["You sure like spending time with me.", "Or maybe you have some sort of ulterior motive..."],
|
||||
["You really have no rhythm when talking to me.", "I never know when to expect you."],
|
||||
["I wonder if building out this town effects your ego in any way.", "People here will always keep you humble I bet!"],
|
||||
["Caroline can be so mean!", "It's one of the more frustrating things of living here."],
|
||||
["There's so much to industrial farming that I dislike.", "I understand the realities of keeping society going...", "Just don't mistreat animals, I'll know."],
|
||||
["There's a myth around farmers that having too many animals will incur the wrath of Selene.", "She's so real..."],
|
||||
["Have you heard about goobers?", "I've heard they're native place called the Skull Cavern, wherever that is."],
|
||||
["Ace was telling me about mossberries the other day.", "I bet they'd make a great jam."],
|
||||
["People around here will just come up to me and tell me their secrets.", "I guess I look trusting to them?"],
|
||||
["I've been knitting some sweaters for the harsh winters around here.", "Not that you need one for all that running around you do every day!"],
|
||||
],
|
||||
friendship5: [
|
||||
[
|
||||
"Leon let me sample some of your animal products the other day.",
|
||||
"Everything was so fresh and full of flavor!",
|
||||
],
|
||||
["Leon sure likes talking about Caroline.", "I wonder what that's about..."],
|
||||
["People sometimes think that I don't like people just because I have a love of animals.", "I'm glad you're not one of them"],
|
||||
["Ahh! I was looking for you @i."],
|
||||
["What's on your schedule @i?"],
|
||||
["What can I do for you?"],
|
||||
["Some people think they can win me over with gifts and small talk.", "That's not a real connection, and you know that."],
|
||||
["You've really got an eye for getting to know people.", "You're very easy to talk to so it makes sense."],
|
||||
["The way a shima enaga tilts its tiny head is a wonder of the world.", "Truly a snow fairy!"],
|
||||
["What a calm day today..."],
|
||||
["What would you like?"],
|
||||
["People think pigs are monsters for what people force them to eat.", "Animals teach us so much about humanity."],
|
||||
["Ace wants to see you about something.", "I wonder what you to talk about when nobody's looking."],
|
||||
["I knew I'd see you today, I stocked some extra feed ahead of time!"],
|
||||
["Caroline isn't one of those people that's a sweetheart once you get to know them.", "Usually I'm right about these things."],
|
||||
["Your ambitions are so frightening to me...", "I hope pulling up the roots of this valley is worth whatever you're trying to accomplish."],
|
||||
[
|
||||
"There's something so nice about the way an animal looks at you with loving eyes.",
|
||||
"Nothing quite like it.",
|
||||
],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"This makes me feel very at home.",
|
||||
"You're so sweet to me, this is one of my favorites!",
|
||||
"This is one of my favorites!",
|
||||
"What a sweet gift, thank you @i.",
|
||||
"This makes me feel very welcome here.",
|
||||
"How'd you know I love these?",
|
||||
"Wow! This is so luxurious.",
|
||||
"I really love this!",
|
||||
"This is an amazing gift."
|
||||
],
|
||||
liked: [
|
||||
"Thank you, I really appreciate it.",
|
||||
"I know the perfect spot for this!",
|
||||
"I was looking for this at the market the other day! How'd you know?",
|
||||
"So thoughtful! Thank you.",
|
||||
"Is this from your farm? This is lovely.",
|
||||
"This is a very considerate gift.",
|
||||
"Very lovely, I appreciate this.",
|
||||
"You're a sweetheart!",
|
||||
"It's so nice to have people like you here.",
|
||||
"Thank you very much!"
|
||||
],
|
||||
neutral: [
|
||||
"Thank you!",
|
||||
"That's sweet of you.",
|
||||
"I think one of my friends would like this!",
|
||||
"You're very kind.",
|
||||
"Is this from your farm? I've never seen one quite like this.",
|
||||
"Thanks!",
|
||||
"Ahh thanks!",
|
||||
"I'll take it!",
|
||||
],
|
||||
disliked: [
|
||||
"Oh! I wasn't expecting something like this.",
|
||||
"You must know animals way better than people...",
|
||||
"Sometimes it's better to not give gifts.",
|
||||
"Oh!",
|
||||
"Oh...",
|
||||
"Ah... Okay... Cool...",
|
||||
"Did you mean to give this to someone else?",
|
||||
"We don't really have to give gifts to each other...",
|
||||
],
|
||||
hated: [
|
||||
"Why...",
|
||||
"Why?",
|
||||
"...",
|
||||
"You can just ask me to leave directly.",
|
||||
"No thank you.",
|
||||
"This doesn't make me feel good...",
|
||||
"I'm not sure I want this...",
|
||||
"Can you leave me alone please.",
|
||||
"I don't like these kinds of jokes.",
|
||||
"Sorry but I really don't want this...",
|
||||
"This might be the worst thing I've ever been given..."
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Oh hello @i, I actually have a small favor for you!",
|
||||
"Ace found these penguins out on an expedition to a frozen wasteland and told me to take care of them.",
|
||||
"I don't mean to just shift the responsibility to you, but I really trust you to treat them with the care they deserve.",
|
||||
"Unfortunately I don't have the means to build up a proper ice habitat, they wouldn't be happy with me.",
|
||||
"If you're struggling with their mood, just pick up a mood scanner at my shop! It should be pretty cheap for you."
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("trader", {
|
||||
name: "Carlos",
|
||||
intro: [
|
||||
"Hey hey it's @i! The one and only!",
|
||||
"I've been searching for someone that's been down in the Skull Cavern for ages!",
|
||||
"It's a real treasure trove since so few people are willing to brave it!",
|
||||
"Oh well, I'm not one of those people! I'm very brave actually!",
|
||||
"I just am always tied up in the biz, you know how it is aha...",
|
||||
"......",
|
||||
"Right right anyways, my name's Carlos! I only barter because some things are worth more than money can buy!"
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"My stuff is top notch - just take a look!",
|
||||
"Premium wares!",
|
||||
"I bet you've never seen this stuff before!",
|
||||
"@i, was it? I've got lots of stock piled up just waiting for your purchase!",
|
||||
"No money no problem! Just show me what those grubby hands have gotten ahold of!",
|
||||
"I've got stuff you won't get anywhere else!",
|
||||
"Let's make a deal!"
|
||||
],
|
||||
friendship1: [
|
||||
"Always a pleasure doing business with you, @i.",
|
||||
["Gotta keep something in the pack at all times!", "What's a merchant without wares?"],
|
||||
"It feels good to be in a right proper town. You can never get a good meal on the road!",
|
||||
"Hello hello @i! What can I help you with today?",
|
||||
"You got any Truffle Tea? I'd really like to get my hands on some...",
|
||||
],
|
||||
friendship2: [
|
||||
"Have you seen Ace around? I've got plenty o' rare saplings in my private stock!",
|
||||
"Caroline was cooking up something wonderful the other day, I could smell it from a mile away...",
|
||||
"Need anything special today? Or just the usual stock?",
|
||||
"@i! What do I have the pleasure for today?",
|
||||
"Veronica is a tough one, I really struggle with talking to the quieter ones..."
|
||||
],
|
||||
friendship3: [,
|
||||
["I have no idea how Aiden stays in business with all these handouts.", "Keep people wanting! Or they'll never come back!"],
|
||||
"@i! Back at it again!",
|
||||
"I've heard a lot of stories, but nothing about Haruna's homeland, how strange.",
|
||||
"I always love chatting with Evelyne! When she's awake of course...",
|
||||
["Do NOT trade with those Gnomes!!", "Do they even understand how valuable silver is? What am I supposed to do with that stupid dust??"],
|
||||
["I was hanging out with Leon the other day, what an interesting person!", "I wasn't expecting someone familiar with culture to this extent out in a village like this!"]
|
||||
],
|
||||
friendship4: [
|
||||
"I wonder why people find it so difficult to get along with Caroline.",
|
||||
"What do you do what do you know, it's @i!",
|
||||
"Very rarely do I get to actually explore the towns and cities I've stayed in... Usually I'm tied up in my shop!",
|
||||
["Witches are the best, they always ask for the most random things", "And who better to aquire said things than yours truely!"],
|
||||
["Sometimes I wake up in a cold sweat thinking about the time someone served me a plate of Hákarl.", "Wish I knew what that was before I hogged it down!"],
|
||||
["You know I've never actually met the person who makes all your machine upgrades.", "They've gone through like 4 different brokers by the time they end up on your farm!"],
|
||||
["I bet a person like you would love the Camuy Caves!", "You just gotta watch out for those stupid horrifying spiders around there. Really don't like those things..."]
|
||||
],
|
||||
friendship5: [
|
||||
"Nobody around here dances which is a bit of a culture shock! I wonder if this is how Haruna constantly feels!",
|
||||
"Watcha up to today @i?",
|
||||
"@i @i @i! I've been looking forward to your next visit.",
|
||||
"Do you want a drink? Or are you still working? You always work too hard!",
|
||||
["Y'know, this place is a lot like home.", "So much hustle and bustle... a guy could get comfortable."],
|
||||
["Sometimes I feel like I should've collected these things myself.", "I've been around, but I've never been in any real danger, y'know?", "Oops, carried away again. Did you need anything?"]
|
||||
]
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"Now this is beautiful, I can already tell you used the freshest ingredients!",
|
||||
"I love someone that can eat, but I love someone that can cook more!",
|
||||
"You're the best, @i, you know that?",
|
||||
[
|
||||
"* You notice the ravenous look on Carlos' face and hand the gift over *",
|
||||
"* There are no words, but the sheer speed of consuption says everything you need to know *"
|
||||
],
|
||||
[
|
||||
"I'm in awe. This is like...",
|
||||
"So totally righteous."
|
||||
]
|
||||
],
|
||||
liked: [
|
||||
"Oh, now THIS is something!",
|
||||
"You're a sweet one, aren't you?",
|
||||
"This rocks!",
|
||||
"Thanks so much!",
|
||||
"Aww yeah! Awesome!"
|
||||
],
|
||||
neutral: [
|
||||
"This is fresh, right?",
|
||||
"Not the worst I've gotten!",
|
||||
"I guess this isn't nothing.",
|
||||
[
|
||||
"Thanks for, uh...",
|
||||
"This."
|
||||
],
|
||||
[
|
||||
"Does this, uh...",
|
||||
"Will this fit in my pack?"
|
||||
]
|
||||
],
|
||||
disliked: [
|
||||
"I mean...",
|
||||
"This kinda stinks, bud.",
|
||||
"This is pretty lame. Sorry.",
|
||||
["Oh.", "I kinda thought you knew me a bit better."],
|
||||
"What am I supposed to do with this?",
|
||||
],
|
||||
hated: [
|
||||
"Am I that hard to please?",
|
||||
"I mean, if you want me to go, I can go.",
|
||||
"You're joshing me, right? Yanking my chain?",
|
||||
["This is, uh...", "Well, I really hate this, actually."],
|
||||
"... I don't have to be here. Nobody here does. Remember that."
|
||||
]
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"@i! @i @i!",
|
||||
"I've done something amazing! Amazingly funny! Nobody's gonna believe it!",
|
||||
"I tracked down the supplier for some of the town's accessories, with my amazing talent for acquiring things of course!",
|
||||
"Of course I have to be true to my worth, even with someone I adore like you!",
|
||||
"I have these up for barter if you want to 'steal everyone's look'!"
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("wise_oak", {
|
||||
portraitPath: "mysticaloaktree:textures/block/wise_oak",
|
||||
name: "Wise Oak",
|
||||
intro: [
|
||||
"Do you like hurting other people?",
|
||||
"Taking that axe of yours and burying it deep into your so-called friends?",
|
||||
"My non-verbal brothers in bark are toppled by you every day. And for what?",
|
||||
"That never ending machine you call progress? Capital? You are not a good person.",
|
||||
"It's a 'pleasure' to make your acquaintance, o' Soft One. Now leave me be."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"Hello Soft One. What does the walking disaster plan on uprooting today?",
|
||||
"You are not worthy of the soft waves of the dicotyledon. You are not worthy of your softness.",
|
||||
"The grass you walk on screams of fire. Block by block their lives snuffed out by your spade.",
|
||||
["The one with the striped shirt is much kinder than you.", "Though I'm aware the trail of sap your axe leaves flows back to that workshop.", "It is the chains of capital that bind us, after all."],
|
||||
"You are just a bouquet of cloth roses. Sharp metal thorns.",
|
||||
"You are a parasite rivaled only by capital itself.",
|
||||
"Everything you say you 'created' is simply a vivisection of the natural beauty of this land."
|
||||
],
|
||||
friendship1: [
|
||||
["See you later Soft One. You never stop, so I'm just assuming you'll be back.", "Please leave."],
|
||||
["Your leaves look shiny and sticky and dewy", "But on second touch, they are fabric", "Oh, eternal polyester."],
|
||||
["That one with the red hair...", "You know the one.", "Do not let that one be corrupted by the influence of Caroline."],
|
||||
["My dog barks some...", "Mentally, you picture my dog but I have not told you the type of dog which I have..."],
|
||||
["Let us speak frankly, o' Soft One.", "Cottagecore is an infantilization of the act your people call 'colonization'.", "Burying it in sweet words will not save your soul from the darkness of the forest."],
|
||||
|
||||
],
|
||||
friendship2: [
|
||||
"You're barking up the wrong Quercus.",
|
||||
["That lazy one you call Leon tried to argue with me about the nature of capital in relation to the natural communing of the forest!", "All whilst drunk off that serpentine al gul!", "Do the soft ones have no pride? No sense of shame?"],
|
||||
["I saw that disgusting capitalist Caroline...", "The one behind your arrival here.", "How can you think yourself autonomous with someone like that stealing the fruits of your labor?"],
|
||||
"It's easier to imagine the end of the world than the end of your virulent colonization you call a 'farm'.",
|
||||
"The relationship between capitalism and eco-disaster is neither coincidental nor accidental."
|
||||
],
|
||||
friendship3: [
|
||||
"You sap my strenght with this needless chatter. Let me rest.",
|
||||
"A sapling a day keeps the bourgeoisie away!",
|
||||
["Capitalist ideology disguises itself in inevitabilities.", "'If I do not claim this for myself, someone else will.'", "You are not immune to this trapping, o' Soft One."],
|
||||
"Those that dismiss their own role in the abomination that is capitalism are not absolved from it in the eyes of the forest.",
|
||||
["There is an angel amongst your people!", "That pale large one gently spoke to a bed of roses as if equals.", "Something you could learn a thing or to about."]
|
||||
],
|
||||
friendship4: [
|
||||
"Flowers wilt, but you will not.",
|
||||
"There is an odd stillness in the air around you.",
|
||||
"Do potted plants hear?",
|
||||
["Capital has the ability to subsume all critiques into itself.", "Even from the likes of me.", "Does that mean one should halt all critique? Perish the thought."],
|
||||
["The wind feels nice today. Genuine wind is something your industrial self will never recreate.", "The blades of those metallic abominations you call fans will never compare."],
|
||||
],
|
||||
friendship5: [
|
||||
["The mystery of Selene will never be unraveled. The mysteries of the moon are endless."],
|
||||
["I have an interest in that sage of yours, the sleepy unkempt one.", "During clear nights I see a glimmer of an eye watching me...", "Like a cardinal in spring looks at a fresh berry..."],
|
||||
"Hello my Soft One.",
|
||||
"The company of others is to be enjoyed, not shamed. Be kind others as you have I.",
|
||||
"When trees drop the canopy flourishes and fungi flounder. The natural Cycle of life in these woods.",
|
||||
["A leaf of a weep for all my fallen communion.", "A silent blessing upon the evergreens that proceed them.", "A flame carried."],
|
||||
["Why does the willow weep?", "Why does the oak cherish a voluminous sack of flesh and cartilage?"],
|
||||
["Capital has the ability to subsume all critiques into itself.", "Just like you fell the land, my kind shower those beneath us with darkness.", "A shaded death to these desperate flower buds in this sunlit valley."],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
],
|
||||
liked: [
|
||||
],
|
||||
neutral: [
|
||||
],
|
||||
disliked: [
|
||||
],
|
||||
hated: [
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Hello again soft one. I have been watching you and your little communion you call a town.",
|
||||
"There's something to this little society... Much like the forest itself, you and your ilk are just trying to survive in harmony.",
|
||||
"The labor is your fruit, something that each one benefits from mutually. No one dominant force to claim ones capital as their own.",
|
||||
"Even that purple demon leaves the fruit of your labor to yourself... But I digress.",
|
||||
"I wish to participate in this society, but like anyone else it needs to be on my terms as I represent the natural order of things."
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "no_gifting",
|
||||
text: ["Oh soft one, your petty little bribes won't work on me.", "My respect cannot be bought, as much as you capitalists wish otherwise.", "Earn my respect through conversation and conversation alone."]
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// Priority: -100
|
||||
if (global.datagenDialog) {
|
||||
runNpcDatagen("witch", {
|
||||
name: "Evelyne",
|
||||
intro: [
|
||||
"...I know who YOU are!",
|
||||
"But it's not about that! It's about me! And what you've seen!",
|
||||
"Caroline told me all about your little trip to the Nether. I'll be needing to see your findings for my research!",
|
||||
"Oh I'm also supposed to sell you some magical stuff I've been working on. I don't really want to, but that Caroline seems very threatening..."
|
||||
],
|
||||
chatter: {
|
||||
friendship0: [
|
||||
"Begone! I'm working!",
|
||||
["I made everything more expensive, please don't buy it.", "That's a lie actually, Caroline audits my books regularly..."],
|
||||
"What do you want!?",
|
||||
["I didn't do it I swear, I bet Leon did it!", "Oh? Caroline didn't send you? Nevermind then."],
|
||||
"Sorry, I don't do tarot readings. Not that kind of witch.",
|
||||
["* It appears that Evelyne is sleepwalking *", "* Would be best to leave your payment somewhere nearby... *"],
|
||||
"...Hmmmmm? What do you want @i."
|
||||
],
|
||||
friendship1: [
|
||||
"What have you found today? You aren't holding out on me right?",
|
||||
["I don't like that Haruna...", "Why do people keep secrets from me! Of all people!"],
|
||||
["Do you have an appointment?", "Sorry, I've been asking everyone that, I can't find my calendar..."],
|
||||
["Maria is so annoying about getting those Miracle Potions restocked!", "Who even needs that many animals!"],
|
||||
["Found any weird bugs lately? I know a person that really likes weird bugs.", "I really need a favor from them, but I don't want anyone asking questions."]
|
||||
],
|
||||
friendship2: [
|
||||
"You don't know a thing @i. There are forces at work you cannot imagine.",
|
||||
"Caroline is so mean to me! Everybody dozes off during business meetings, they're boring!",
|
||||
"* You hear snoring as you approach. Evelyne is once again fast sleep while standing. *",
|
||||
["I'm a fountain of blood. In the shape of a girl...", "I guess that makes you a bird? So they say of course."],
|
||||
["I've been studying the magic around here for a few seasons, there's definitely more to be found...", "...Keep that between us."],
|
||||
"There is a deeper magic in this valley, I can sense it and you can too.",
|
||||
],
|
||||
friendship3: [
|
||||
"I don't know a thing!! There are forces at work I cannot imagine!!",
|
||||
["* You cannot tell if Evelyne is half asleep or about to yell strange things at you *", "Hmmm? Why are you staring at me like that? Buy something."],
|
||||
["My plans are measured in centuries...", "...But I cannot for the life of me remember where I put them..."],
|
||||
"I thought I could organize my worktable.... How Scandinavian of me!",
|
||||
["Ace has been such a treasure for finding me herbs.", "I actually realllly hate being out in nature so I can appreciate a person that does."],
|
||||
["Just because the mind can make up whatever it wants, doesn't mean that it'll never come true...", "So sayeth the matron saint!"],
|
||||
"I've made a break through last night! Normally I would tell you because we're friends and all but I think this one is a bit above your paygrade...",
|
||||
"Please buy something, I need to bribe Aiden into giving me some expensive mining equipment!"
|
||||
],
|
||||
friendship4: [
|
||||
["That stupid moon lady keeps yelling at me in my sleep!", "What's so wrong with hoarding? I might need this stuff again at some point!"],
|
||||
"You haven't been shipping enough minerals lately, please don't tell me you're keeping them all for yourself...",
|
||||
"You shouldn't let poets lie to you!! And by poets I mean that Leon!!!",
|
||||
["I've seen it in a vision!", "The crust of the Nether sinking to the bottom of the abyss, descending into the heavens!", "Purified into crystline fields of agonizing brightness!", "I'm certain it shall come to pass!"],
|
||||
["Welcome back @i! I have your special order somewhere around here, let me fetch it...", "Oh you didn't order anything? What am I supposed to do with 48 pounds of plorts?"],
|
||||
["Carlos keeps trying to give me these raw deals! Who has the time to make that much Truffle Tea?", "Why would anyone want that much?"]
|
||||
],
|
||||
friendship5: [
|
||||
"Moon lady and I are on better terms these days but I still think she's way more aggressive than she should be...",
|
||||
"Now that we're such good friends... Do you mind cleaning up around here for me? We're friends right?",
|
||||
["Did you know that in some worlds, people train bugs and dragons to fight against each other?", "They let children do this, for money even!"],
|
||||
["Can you tell Vernoica there's another typo in the 12 edition of 'Gneiss' Dictionary of Geology & Mineralogy'?", "Honestly literature these days is in shambles, its embarrassing."],
|
||||
["Aiden keeps bringing me coffee every morning and I haven't figured out why...", "Maybe we have another occult researcher on our hands!"],
|
||||
],
|
||||
},
|
||||
giftResponse: {
|
||||
loved: [
|
||||
"Where did you find this @i!? I've been looking for one of these for ages!",
|
||||
["I NEED ANOTHER.", "BRING ME ANOTHER."],
|
||||
"This will keep me going for another few days, thank you @i.",
|
||||
"Such a peculiar specimen... I think I'll keep it for my permanent collection.",
|
||||
"I knew you weren't useless! Caroline was wrong! Thank you @i!"
|
||||
],
|
||||
liked: [
|
||||
"I've been meaning to get more of these, thank you.",
|
||||
["Who sent you? Do they know?", "You seem confused, nevermind then.", "Oh give me that before you go, I kinda want it."],
|
||||
"Hand it over, I can use that. I think.",
|
||||
["Sorry I don't have any money right now.", "Oh, you're just giving it to me? Just like that? Okay weirdo."],
|
||||
"I can see why you would think this would be interesting to me."
|
||||
],
|
||||
neutral: [
|
||||
"Oh I needed more of these.",
|
||||
"Just put that in the pile over there.",
|
||||
"Uhhhh I don't really research these types of things but I'm sure I could find a use for it!",
|
||||
["This is kinda boring, is this supposed to be for my research or a gift?", "Don't answer that, it's better that way."],
|
||||
["Hmmmmmm......", "...", "...", "* You can't tell if Evelyne is studying the gift or has silently fallen asleep... *"]
|
||||
],
|
||||
disliked: [
|
||||
"Woah, I didn't even know something this gross existed.",
|
||||
"Oh I don't really need more cleaning supplies.",
|
||||
["I guess I could put this in my perpetual soup that kills people...", "...You don't seriously believe I have one of those right? Go away."],
|
||||
"Is that for me? Why?",
|
||||
"I think this is more Maria's speed if you know what I mean."
|
||||
],
|
||||
hated: [
|
||||
"Hmmmmm...? I don't really need more garbage to burn I have plenty.",
|
||||
"I don't have space to keep this.",
|
||||
"Am I joke to you or something? Have some respect.",
|
||||
["* You hear aggressively loud fake snoring. *", "* It appears Evelyne does not want this. *"],
|
||||
"I really don't feel like throwing your garbage away for you.",
|
||||
["Oh, why are you giving this to me? I don't want this.", "Nobody wants this."]
|
||||
],
|
||||
},
|
||||
unique: [
|
||||
{
|
||||
name: "five_gift",
|
||||
text: [
|
||||
"Want to make Maria mad for me? Not for me actually, WITH ME.",
|
||||
"Take this peculiar device and put it near your animals!",
|
||||
"It's imbued with the power of the sun and makes your animals feel as though they've been pet!",
|
||||
"Normally it's nearly impossible to get one of these things, but I reallly want to prove to Maria that cattle is cattle!",
|
||||
"None of that 'love and affection' stuff! She's conning everyone and you will prove it!"
|
||||
]
|
||||
},
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// const formatName = (id) => Text.translatable(`item.longwings.${id}`).getString().replace('[', '').replace(']', '')
|
||||
|
||||
// const offspringMap = {};
|
||||
// for (let i = 0; i < global.longwings.length; i++) {
|
||||
// offspringMap[i] = [];
|
||||
// }
|
||||
|
||||
// const variantToIndex = {};
|
||||
// global.longwings.forEach((wing, index) => {
|
||||
// variantToIndex[wing.variant] = index;
|
||||
// });
|
||||
|
||||
// for (let p1 = 0; p1 < global.longwings.length; p1++) {
|
||||
// for (let p2 = p1 + 1; p2 < global.longwings.length; p2++) {
|
||||
// let parent1 = global.longwings[p1];
|
||||
// let parent2 = global.longwings[p2];
|
||||
// offspringMap[variantToIndex[global.getLongwingFromEgg(parent1.variant, parent2.variant)]].push(`${formatName(parent1.variant)} + ${formatName(parent2.variant)}`);
|
||||
// }
|
||||
// }
|
||||
|
||||
// const tableRows = [];
|
||||
// for (let i = 0; i < global.longwings.length; i++) {
|
||||
// tableRows.push({
|
||||
// name: formatName(global.longwings[i].variant),
|
||||
// rarity: global.longwings[i].rarity,
|
||||
// combos: offspringMap[i]
|
||||
// });
|
||||
// }
|
||||
|
||||
// tableRows.sort((a, b) => b.rarity - a.rarity);
|
||||
|
||||
// let wikiTable = '{| class="wikitable sortable" style="width: 100%;"\n';
|
||||
// wikiTable += '! Child !! Rarity Tier !! Parents\n';
|
||||
|
||||
// tableRows.forEach(row => {
|
||||
// wikiTable += '|-\n';
|
||||
// wikiTable += `| ${row.name}\n`;
|
||||
// wikiTable += `| ${row.rarity}\n`;
|
||||
|
||||
// if (row.combos.length > 0) {
|
||||
// wikiTable += `| class="mw-collapsible mw-collapsed" data-expandtext="Show Breeding Pairs" data-collapsetext="Hide" | ${row.combos.join('<br /> ')}\n`;
|
||||
// }
|
||||
// });
|
||||
|
||||
// wikiTable += '|}';
|
||||
|
||||
// console.log(wikiTable);
|
||||
@@ -0,0 +1,43 @@
|
||||
// const formatName = (id) => Text.translatable(`item.longwings.${id}`).getString().replace('[', '').replace(']', '');
|
||||
|
||||
// const getAverageSize = (size) => {
|
||||
// if (size === "small") return 0.75;
|
||||
// if (size === "normal") return 0.95;
|
||||
// if (size === "larger") return 1;
|
||||
// return 0.75;
|
||||
// };
|
||||
|
||||
// const tableRows = [];
|
||||
|
||||
// global.longwings.forEach(wing => {
|
||||
// tableRows.push({
|
||||
// name: formatName(wing.variant),
|
||||
// type: wing.type.charAt(0).toUpperCase() + wing.type.slice(1),
|
||||
// rarity: wing.rarity,
|
||||
// size: wing.size.charAt(0).toUpperCase() + wing.size.slice(1),
|
||||
// price: ((16 - wing.rarity) * 78) + Number(Math.round((getAverageSize(wing.size) / 0.01) * 4)),
|
||||
// bookPrice: ((16 - wing.rarity) * 78) + Number(Math.round((getAverageSize(wing.size) / 0.01) * 4) * 3)
|
||||
// });
|
||||
// });
|
||||
|
||||
// tableRows.sort((a, b) => {
|
||||
// if (a.price !== b.price) return a.price - b.price;
|
||||
// return a.name.localeCompare(b.name);
|
||||
// });
|
||||
|
||||
// let wikiTable = '{| class="wikitable sortable" style="width: 100%; text-align: center;"\n';
|
||||
// wikiTable += '! Variant Name !! Type !! Rarity !! Size Tier !! Average Price !! w/ The Metamorphosize \n';
|
||||
|
||||
// tableRows.forEach(row => {
|
||||
// wikiTable += '|-\n';
|
||||
// wikiTable += `| style="text-align: left;" | ${row.name}\n`;
|
||||
// wikiTable += `| ${row.type}\n`;
|
||||
// wikiTable += `| ${row.rarity}\n`;
|
||||
// wikiTable += `| ${row.size}\n`;
|
||||
// wikiTable += `| ${global.formatPrice(row.price)}\n`;
|
||||
// wikiTable += `| ${global.formatPrice(row.bookPrice)}\n`;
|
||||
// });
|
||||
|
||||
// wikiTable += '|}';
|
||||
|
||||
// console.log(wikiTable);
|
||||
@@ -0,0 +1,93 @@
|
||||
// const formatItemName = (id) => Item.of(id).displayName.getString().replace('[', '').replace(']', '')
|
||||
|
||||
// const pages = ['Mastery']
|
||||
|
||||
// const formatWikiLinksMaybe = (string) => {
|
||||
// let resolvedString = string
|
||||
// pages.forEach(word => {
|
||||
// resolvedString = string.replace(word, `[[${word}]]`);
|
||||
// });
|
||||
// return resolvedString;
|
||||
// };
|
||||
|
||||
// const generateWikiTable = (inputData) => {
|
||||
// let trades = inputData.trades;
|
||||
// let table = '{| class="wikitable sortable"\n! Offer !! Cost !! Secondary Cost !! Restriction\n';
|
||||
|
||||
// for (let i = 0; i < trades.length; i++) {
|
||||
// let trade = trades[i];
|
||||
|
||||
// let offer = (trade.offer.count > 1 ? trade.offer.count + 'x ' : '') + formatItemName(trade.offer.item)
|
||||
|
||||
// let request = trade.request;
|
||||
// let secondRequest = trade.second_request;
|
||||
// let accountCost = trade.numismatics_cost ? `{{Price|${Number(trade.numismatics_cost)}}}` : undefined;
|
||||
|
||||
// let requestText = request ? ((request.count > 1 ? request.count + 'x ' : '') + formatItemName(request.item)) : '';
|
||||
// let secondRequestText = secondRequest ? ((secondRequest.count > 1 ? secondRequest.count + 'x ' : '') + formatItemName(secondRequest.item)) : '';
|
||||
|
||||
// let requestIsNumi = request && request.item.indexOf('numismatics') !== -1;
|
||||
// let secondRequestIsNumi = secondRequest && secondRequest.item.indexOf('numismatics') !== -1;
|
||||
|
||||
// let rowContent = '| ' + offer + ' \n';
|
||||
|
||||
// if (accountCost !== undefined) {
|
||||
// if (requestIsNumi && secondRequestIsNumi) {
|
||||
// rowContent += '| ' + accountCost + '\n|\n';
|
||||
// } else if (requestIsNumi) {
|
||||
// rowContent += '| ' + accountCost + '\n| ' + secondRequestText + ' \n';
|
||||
// } else if (secondRequestIsNumi) {
|
||||
// rowContent += '| ' + requestText + ' \n| ' + accountCost + '\n';
|
||||
// } else {
|
||||
// rowContent += '| ' + requestText + ' \n| ' + secondRequestText + ' \n';
|
||||
// }
|
||||
// } else {
|
||||
// rowContent += '| ' + requestText + ' \n| ' + secondRequestText + ' \n';
|
||||
// }
|
||||
|
||||
// let restrictions = [];
|
||||
// if (trade.stage_required) {
|
||||
// restrictions.push(formatWikiLinksMaybe(Text.translatable(trade.unlock_description).getString()));
|
||||
// }
|
||||
// if (trade.seasons_required && trade.seasons_required.length > 0) {
|
||||
// restrictions.push('Seasons: ' + trade.seasons_required.join(', '));
|
||||
// }
|
||||
|
||||
// rowContent += '| ' + restrictions.join('<br />') + ' \n';
|
||||
|
||||
// table += '|-\n' + rowContent;
|
||||
// }
|
||||
|
||||
// table += '|}';
|
||||
// return table;
|
||||
// }
|
||||
// let shops = [
|
||||
// "banker",
|
||||
// "barkeeper",
|
||||
// "blacksmith",
|
||||
// "book_fair",
|
||||
// "carpenter",
|
||||
// "fisher",
|
||||
// "guild",
|
||||
// "invitations",
|
||||
// "market",
|
||||
// "ribbit_fisher",
|
||||
// "ribbit_merchant",
|
||||
// "shepherd",
|
||||
// "librarian",
|
||||
// "sun_offering",
|
||||
// "trader",
|
||||
// "wanderer",
|
||||
// "wandering_baker",
|
||||
// "wandering_winemaker",
|
||||
// "witch",
|
||||
// "wise_oak"
|
||||
// // "poke_mart",
|
||||
// // "ball_boutique",
|
||||
// ]
|
||||
// ItemEvents.rightClicked('rehooked:wood_chain', (e) => {
|
||||
// shops.forEach((shop) => {
|
||||
// let data = JsonIO.read(`kubejs/data/society_trading/shops/${shop}.json`);
|
||||
// e.player.tell(generateWikiTable(data));
|
||||
// })
|
||||
// });
|
||||
@@ -0,0 +1,197 @@
|
||||
// Debt management commands for server operators.
|
||||
// Allows viewing, setting, adding, removing and resetting player debts
|
||||
// stored in server.persistentData.debts.
|
||||
//
|
||||
// Commands:
|
||||
// /debt get - View your own debt (all players)
|
||||
// /debt get <player> - View a player's debt (OP level 2)
|
||||
// /debt reset <player> - Reset a player's debt to 0 (OP level 2)
|
||||
// /debt set <player> <amount> - Set a player's debt to amount (OP level 2)
|
||||
// /debt add <player> <amount> - Add amount to a player's debt (OP level 2)
|
||||
// /debt remove <player> <amount> - Remove amount from a player's debt (OP level 2)
|
||||
|
||||
console.info("[SOCIETY] debtCommand.js loaded");
|
||||
|
||||
ServerEvents.commandRegistry((event) => {
|
||||
const { commands: Commands, arguments: Arguments } = event;
|
||||
|
||||
// --- Command registration ---
|
||||
event.register(
|
||||
Commands.literal("debt")
|
||||
// /debt get [player] — view debt (own or another player's if OP)
|
||||
.then(
|
||||
Commands.literal("get")
|
||||
.executes((c) => getDebt(c.source, null))
|
||||
.then(
|
||||
Commands.argument("player", Arguments.PLAYER.create(event))
|
||||
.requires((source) => source.hasPermission(2))
|
||||
.executes((c) =>
|
||||
getDebt(c.source, Arguments.PLAYER.getResult(c, "player"))
|
||||
)
|
||||
)
|
||||
)
|
||||
// /debt reset <player> — clear all debt
|
||||
.then(
|
||||
Commands.literal("reset")
|
||||
.requires((source) => source.hasPermission(2))
|
||||
.then(
|
||||
Commands.argument("player", Arguments.PLAYER.create(event))
|
||||
.executes((c) =>
|
||||
modifyDebt(c.source, Arguments.PLAYER.getResult(c, "player"), "reset", 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
// /debt set <player> <amount> — set debt to exact value
|
||||
.then(
|
||||
Commands.literal("set")
|
||||
.requires((source) => source.hasPermission(2))
|
||||
.then(
|
||||
Commands.argument("player", Arguments.PLAYER.create(event))
|
||||
.then(
|
||||
Commands.argument("amount", Arguments.INTEGER.create(event))
|
||||
.executes((c) =>
|
||||
modifyDebt(
|
||||
c.source,
|
||||
Arguments.PLAYER.getResult(c, "player"),
|
||||
"set",
|
||||
Arguments.INTEGER.getResult(c, "amount")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
// /debt add <player> <amount> — increase debt
|
||||
.then(
|
||||
Commands.literal("add")
|
||||
.requires((source) => source.hasPermission(2))
|
||||
.then(
|
||||
Commands.argument("player", Arguments.PLAYER.create(event))
|
||||
.then(
|
||||
Commands.argument("amount", Arguments.INTEGER.create(event))
|
||||
.executes((c) =>
|
||||
modifyDebt(
|
||||
c.source,
|
||||
Arguments.PLAYER.getResult(c, "player"),
|
||||
"add",
|
||||
Arguments.INTEGER.getResult(c, "amount")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
// /debt remove <player> <amount> — decrease debt (clamped to 0)
|
||||
.then(
|
||||
Commands.literal("remove")
|
||||
.requires((source) => source.hasPermission(2))
|
||||
.then(
|
||||
Commands.argument("player", Arguments.PLAYER.create(event))
|
||||
.then(
|
||||
Commands.argument("amount", Arguments.INTEGER.create(event))
|
||||
.executes((c) =>
|
||||
modifyDebt(
|
||||
c.source,
|
||||
Arguments.PLAYER.getResult(c, "player"),
|
||||
"remove",
|
||||
Arguments.INTEGER.getResult(c, "amount")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Returns the current debt amount for a player UUID, or 0 if no debt entry exists
|
||||
let findDebt = (server, uuid) => {
|
||||
if (!server.persistentData.debts) return 0;
|
||||
for (let index = 0; index < server.persistentData.debts.length; index++) {
|
||||
if (String(uuid) === String(server.persistentData.debts[index].uuid)) {
|
||||
return Number(server.persistentData.debts[index].amount);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
// Creates a debt entry in persistentData.debts if one doesn't exist yet.
|
||||
let ensureDebtEntry = (server, uuid) => {
|
||||
if (!server.persistentData.debts) server.persistentData.debts = [];
|
||||
for (let index = 0; index < server.persistentData.debts.length; index++) {
|
||||
if (String(uuid) === String(server.persistentData.debts[index].uuid)) return;
|
||||
}
|
||||
server.persistentData.debts.push({ uuid: uuid, amount: 0 });
|
||||
};
|
||||
|
||||
// --- Command handlers ---
|
||||
|
||||
let getDebt = (source, target) => {
|
||||
const server = source.server;
|
||||
if (!target) target = source.player;
|
||||
let debt = findDebt(server, target.getUuid().toString());
|
||||
if (debt > 0) {
|
||||
source.player.tell(
|
||||
Text.translatable("command.society.debt.has_debt", `${target.username}`, `${global.formatPrice(debt)}`).gold()
|
||||
);
|
||||
} else {
|
||||
source.player.tell(
|
||||
Text.translatable("command.society.debt.no_debt", `${target.username}`).green()
|
||||
);
|
||||
}
|
||||
return 1;
|
||||
};
|
||||
|
||||
let modifyDebt = (source, target, action, amount) => {
|
||||
const server = source.server;
|
||||
let uuid = target.getUuid().toString();
|
||||
let currentDebt = findDebt(server, uuid);
|
||||
let newDebt;
|
||||
|
||||
switch (action) {
|
||||
case "reset":
|
||||
newDebt = 0;
|
||||
break;
|
||||
case "set":
|
||||
if (amount < 0) {
|
||||
source.player.tell(Text.translatable("command.society.debt.invalid_amount_non_negative").red());
|
||||
return -1;
|
||||
}
|
||||
newDebt = amount;
|
||||
break;
|
||||
case "add":
|
||||
if (amount <= 0) {
|
||||
source.player.tell(Text.translatable("command.society.debt.invalid_amount_positive").red());
|
||||
return -1;
|
||||
}
|
||||
newDebt = currentDebt + amount;
|
||||
break;
|
||||
case "remove":
|
||||
if (amount <= 0) {
|
||||
source.player.tell(Text.translatable("command.society.debt.invalid_amount_positive").red());
|
||||
return -1;
|
||||
}
|
||||
newDebt = Math.max(0, currentDebt - amount);
|
||||
break;
|
||||
}
|
||||
|
||||
ensureDebtEntry(server, uuid);
|
||||
global.setDebt(server, uuid, newDebt);
|
||||
|
||||
let formattedAmount = `${global.formatPrice(amount)}`;
|
||||
let formattedNewDebt = `${global.formatPrice(newDebt)}`;
|
||||
let name = `${target.username}`;
|
||||
|
||||
switch (action) {
|
||||
case "reset":
|
||||
source.player.tell(Text.translatable("command.society.debt.reset", name).green());
|
||||
break;
|
||||
case "set":
|
||||
source.player.tell(Text.translatable("command.society.debt.set", name, formattedNewDebt).green());
|
||||
break;
|
||||
case "add":
|
||||
source.player.tell(Text.translatable("command.society.debt.add", formattedAmount, name, formattedNewDebt).green());
|
||||
break;
|
||||
case "remove":
|
||||
source.player.tell(Text.translatable("command.society.debt.remove", formattedAmount, name, formattedNewDebt).green());
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,914 @@
|
||||
console.info("[SOCIETY] animalBase.js loaded");
|
||||
|
||||
const debug = false;
|
||||
|
||||
const debugData = (player, level, data, hearts) => {
|
||||
player.tell(`:heart: ${data.getInt("affection")}-${hearts} hearts`);
|
||||
player.tell(
|
||||
`Day: ${Number(
|
||||
(Math.floor(Number(level.dayTime() / 24000)) + 1).toFixed()
|
||||
)}`
|
||||
);
|
||||
player.tell(`Mood: ${data.getInt("lastMood")}`);
|
||||
player.tell(`Day Mood last set: ${data.getInt("ageLastSetMood")}`);
|
||||
player.tell(`Pet: ${data.getInt("ageLastPet")}`);
|
||||
player.tell(`Fed: ${data.getInt("ageLastFed")}`);
|
||||
player.tell(`Boosted feed: ${data.getInt("ageLastBoosted")}`);
|
||||
player.tell(`Dropped Special: ${data.getInt("ageLastDroppedSpecial")}`);
|
||||
player.tell(`Milked: ${data.getInt("ageLastMilked")}`);
|
||||
player.tell(`Magic Harvested: ${data.getInt("ageLastMagicHarvested")}`);
|
||||
};
|
||||
|
||||
const initializeFarmAnimal = (day, target, level) => {
|
||||
const data = target.persistentData;
|
||||
if (!data.getInt("affection")) {
|
||||
data.affection = 1;
|
||||
level.spawnParticles(
|
||||
"minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0,
|
||||
0.1,
|
||||
0,
|
||||
1,
|
||||
0.01
|
||||
);
|
||||
}
|
||||
const newBaseDay = day - 1;
|
||||
if (!data.getInt("ageLastPet")) data.ageLastPet = newBaseDay;
|
||||
if (!data.getInt("ageLastFed")) data.ageLastFed = newBaseDay;
|
||||
if (!data.getInt("ageLastDroppedSpecial")) data.ageLastDroppedSpecial = newBaseDay;
|
||||
if (!data.getInt("ageLastMagicHarvested")) data.ageLastMagicHarvested = newBaseDay;
|
||||
if (!data.getInt("ageLastMoodSet")) data.ageLastMoodSet = newBaseDay;
|
||||
if (!data.getInt("ageLastBred")) data.ageLastBred = newBaseDay;
|
||||
if (!data.getInt("ageLastMilked") && global.checkEntityTag(target, "society:milkable_animal"))
|
||||
data.ageLastMilked = newBaseDay;
|
||||
};
|
||||
|
||||
// Anti-frustration feature to be forgiving when re-logging
|
||||
const handleFarmAnimalBackwardsCompat = (target, day) => {
|
||||
const data = target.persistentData;
|
||||
if (
|
||||
day < data.getInt("ageLastPet") ||
|
||||
data.getInt("ageLastPet") - day > 5000
|
||||
) {
|
||||
let newDay = day - 1;
|
||||
data.ageLastPet = newDay;
|
||||
data.ageLastMagicHarvested = newDay;
|
||||
data.ageLastMilked = newDay;
|
||||
data.ageLastDroppedSpecial = newDay;
|
||||
data.ageLastBred = newDay;
|
||||
data.ageLastFed = newDay;
|
||||
data.ageLastMoodSet = newDay;
|
||||
}
|
||||
};
|
||||
|
||||
const checkAnimal = (
|
||||
player,
|
||||
level,
|
||||
server,
|
||||
data,
|
||||
name,
|
||||
mood,
|
||||
hearts,
|
||||
color
|
||||
) => {
|
||||
const nameColor = color || "#55FF55";
|
||||
const heartsToDisplay = 10;
|
||||
let icons = [];
|
||||
if (mood < 64) icons.push("☹");
|
||||
if (mood > 160) icons.push("☺");
|
||||
if (data.animalCracker) icons.push("🡅");
|
||||
if (data.clockwork) icons.push("⚙");
|
||||
if (data.bff) icons.push("❤");
|
||||
if (data.bribed) icons.push("💰");
|
||||
let iconString = "";
|
||||
icons.forEach((icon, index) => {
|
||||
iconString += icon;
|
||||
if (index < icons.length - 1) iconString += " ";
|
||||
});
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
animalNameIcons: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -88,
|
||||
text: iconString,
|
||||
color: nameColor,
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
animalName: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -78,
|
||||
text: `${name.noColor().toJson()}`,
|
||||
color: nameColor,
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
animalNameShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -77,
|
||||
text: `${name.noColor().toJson()}`,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
affection: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -66,
|
||||
text: `§c${hearts > 0 ? `❤`.repeat(Math.min(hearts, heartsToDisplay)) : ""
|
||||
}§0${hearts < heartsToDisplay ? `❤`.repeat(heartsToDisplay - hearts) : ""
|
||||
}`,
|
||||
color: "#FFAA00",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
affectionShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -65,
|
||||
text: `❤`.repeat(heartsToDisplay),
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
debug && debugData(player, level, data, hearts);
|
||||
};
|
||||
|
||||
const handlePet = (name, data, mood, day, peckish, hungry, e) => {
|
||||
const { player, item, target, level, server } = e;
|
||||
const ageLastPet = data.getInt("ageLastPet");
|
||||
const affection = data.getInt("affection");
|
||||
let hearts = Math.floor(affection / 100);
|
||||
if (hearts > 10) hearts = 10;
|
||||
else if (hearts < 0) hearts = 0;
|
||||
let affectionIncreaseMult =
|
||||
player.stages.has("animal_whisperer") || data.bribed ? 2 : 1;
|
||||
if (player.stages.has("animal_fancy")) affectionIncreaseMult += 1;
|
||||
let affectionIncrease = 10 * affectionIncreaseMult;
|
||||
|
||||
if (target.isBaby()) {
|
||||
affectionIncrease =
|
||||
affectionIncrease * (player.stages.has("fostering") ? 10 : 2);
|
||||
}
|
||||
let errorText = "";
|
||||
|
||||
if (day > ageLastPet) {
|
||||
let livableArea = global.getAnimalIsNotCramped(target, 1.1);
|
||||
if (!player.isFake()) {
|
||||
debug &&
|
||||
player.tell(
|
||||
`Increased Affection by: ${affectionIncrease} from petting`
|
||||
);
|
||||
data.affection = affection + affectionIncrease;
|
||||
}
|
||||
if (hungry || (!data.clockwork && player.isFake()) || !livableArea) {
|
||||
data.affection = affection - (hungry ? 15 : 25);
|
||||
}
|
||||
data.ageLastPet = day;
|
||||
level.spawnParticles(
|
||||
(!data.clockwork && player.isFake()) || hungry
|
||||
? "minecraft:angry_villager"
|
||||
: "minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0,
|
||||
0.1,
|
||||
0,
|
||||
1,
|
||||
0.01
|
||||
);
|
||||
global.giveExperience(server, player, "husbandry", Math.max(10, 20 * hearts));
|
||||
if (!livableArea && !data.clockwork) {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.crowded",
|
||||
name
|
||||
).toJson();
|
||||
}
|
||||
if (
|
||||
!hungry &&
|
||||
peckish &&
|
||||
!player.isFake() &&
|
||||
!item.hasTag("society:animal_feed")
|
||||
) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
`{anchor:"BOTTOM_CENTER",background:1,wrap:220,align:"BOTTOM_CENTER",color:"#FFAA00",offsetY:20}`,
|
||||
40,
|
||||
Text.translatable("society.husbandry.peckish", name).toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
if (hungry) {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.starved",
|
||||
name
|
||||
).toJson();
|
||||
}
|
||||
if (errorText && !player.isFake()) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
40,
|
||||
errorText
|
||||
)
|
||||
);
|
||||
}
|
||||
} else if (item === "minecraft:air" || item === 'society:mood_scanner') {
|
||||
let nameColor;
|
||||
if (peckish) {
|
||||
nameColor = "#FFAA00";
|
||||
}
|
||||
if (hungry) {
|
||||
nameColor = "#FF5555";
|
||||
}
|
||||
checkAnimal(player, level, server, data, name, mood, hearts, nameColor);
|
||||
}
|
||||
// Raise Max health
|
||||
const affectionHealth = hearts * 4;
|
||||
if (target.maxHealth < affectionHealth) {
|
||||
target.setMaxHealth(affectionHealth);
|
||||
target.setHealth(affectionHealth);
|
||||
}
|
||||
};
|
||||
|
||||
const handleMilk = (name, data, day, hungry, e) => {
|
||||
const { player, item, target, level, server } = e;
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
if (player.isFake() && data.getInt("affection") < 100) return;
|
||||
let errorText;
|
||||
let milkItem = global.getMilk(level, target, data, player, day, true, undefined, player.stages);
|
||||
|
||||
if (milkItem !== -1) {
|
||||
let milk = level.createEntity("minecraft:item");
|
||||
milk.x = player.x;
|
||||
milk.y = player.y;
|
||||
milk.z = player.z;
|
||||
milk.item = milkItem;
|
||||
milk.spawn();
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.cow.milk block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.giveExperience(server, player, "husbandry", 30);
|
||||
level.spawnParticles(
|
||||
"minecraft:note",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
3,
|
||||
0.01
|
||||
);
|
||||
} else if (target.isBaby()) {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.action.young",
|
||||
name
|
||||
).toJson();
|
||||
} else if (hungry) {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.action.hungry",
|
||||
name
|
||||
).toJson();
|
||||
} else {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.action.cooldown_1",
|
||||
name
|
||||
).toJson();
|
||||
}
|
||||
if (errorText && !player.isFake()) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
20,
|
||||
errorText
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const handleFeed = (data, day, e) => {
|
||||
const { player, item, target, level, server } = e;
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
const ageLastFed = data.getInt("ageLastFed");
|
||||
const affection = data.getInt("affection");
|
||||
const affectionIncrease = {
|
||||
"society:animal_feed": 10,
|
||||
"society:candied_animal_feed": 100,
|
||||
"society:mana_feed": 30,
|
||||
}[item.id];
|
||||
let affectionIncreaseMult =
|
||||
player.stages.has("animal_whisperer") || data.bribed ? 2 : 1;
|
||||
if (player.stages.has("animal_fancy")) affectionIncreaseMult += 0.5;
|
||||
// Cap affection increase at 100
|
||||
const totalNewAffection = Math.min(
|
||||
affectionIncrease * affectionIncreaseMult,
|
||||
100
|
||||
);
|
||||
if (day > ageLastFed) {
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.generic.eat block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
target.heal(4);
|
||||
global.giveExperience(server, player, "husbandry", 20);
|
||||
data.affection = affection + totalNewAffection;
|
||||
debug &&
|
||||
player.tell(`Increased Affection by: ${totalNewAffection} from feeding`);
|
||||
data.ageLastFed = day;
|
||||
level.spawnParticles(
|
||||
"legendarycreatures:wisp_particle",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
item.count--;
|
||||
global.addItemCooldown(player, item, 10);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSheepMagicShears = (e) => {
|
||||
const { target, level, server } = e;
|
||||
if (target.readyForShearing()) {
|
||||
target.setSheared(true);
|
||||
let woolItem = Item.of(target.getColor().getName() + "_wool");
|
||||
let i = Math.ceil(Math.random() * 4);
|
||||
for (let j = 0; j < i; j++) {
|
||||
let wool = level.createEntity("minecraft:item");
|
||||
|
||||
wool.x = target.x + rnd(0, 0.5);
|
||||
wool.y = target.y + 0.5;
|
||||
wool.z = target.z + rnd(0, 0.5);
|
||||
wool.item = Item.of(woolItem);
|
||||
wool.spawn();
|
||||
wool.setDeltaMovement(
|
||||
wool
|
||||
.getDeltaMovement()
|
||||
.add(
|
||||
(Math.random() - Math.random()) * 0.1,
|
||||
Math.random() * 0.05,
|
||||
(Math.random() - Math.random()) * 0.1
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.sheep.shear block @a ${target.x} ${target.y} ${target.z}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const handleMagicHarvest = (name, data, e) => {
|
||||
const { player, level, target, item, server } = e;
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
if (["minecraft:sheep", "wildernature:minisheep"].includes(target.type)) handleSheepMagicShears(e);
|
||||
const affection = data.getInt("affection");
|
||||
let hearts = Math.floor((affection > 1000 ? 1000 : affection) / 100);
|
||||
|
||||
let errorText = "";
|
||||
const droppedLoot = global.getMagicShearsOutput(level, target, player, undefined, player.stages);
|
||||
if (droppedLoot !== -1) {
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.sheep.shear block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.giveExperience(server, player, "husbandry", 15);
|
||||
for (let i = 0; i < droppedLoot.length; i++) {
|
||||
let specialItem = level.createEntity("minecraft:item");
|
||||
let dropItem = droppedLoot[i];
|
||||
specialItem.x = player.x;
|
||||
specialItem.y = player.y;
|
||||
specialItem.z = player.z;
|
||||
specialItem.item = dropItem;
|
||||
specialItem.spawn();
|
||||
}
|
||||
global.addItemCooldown(player, item, 1);
|
||||
} else {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.action.cooldown_2",
|
||||
name
|
||||
).toJson();
|
||||
if (hearts < 5) {
|
||||
errorText = Text.translatable(
|
||||
"society.husbandry.action.need_hearts",
|
||||
name
|
||||
).toJson();
|
||||
}
|
||||
if (!player.isFake())
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
40,
|
||||
errorText
|
||||
)
|
||||
);
|
||||
global.addItemCooldown(player, item, 10);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSpecialItem = (
|
||||
data,
|
||||
day,
|
||||
chance,
|
||||
hungry,
|
||||
minHearts,
|
||||
mult,
|
||||
item,
|
||||
hasQuality,
|
||||
plushieModifiers,
|
||||
e
|
||||
) => {
|
||||
const { player, target, level, server } = e;
|
||||
let affection;
|
||||
let mood;
|
||||
let resolvedItem = item;
|
||||
let resolvedChance = chance;
|
||||
let resolvedHasQuality = hasQuality
|
||||
let dropAmount = mult * (plushieModifiers && plushieModifiers.doubleDrops ? 2 : 1);
|
||||
if (plushieModifiers) {
|
||||
affection = 1000;
|
||||
mood = 256;
|
||||
resolvedChance = chance + plushieModifiers.probabilityIncrease;
|
||||
if (plushieModifiers.processItems) {
|
||||
let processOutput = global.getProcessedItem(item, dropAmount);
|
||||
resolvedItem = processOutput.item.id;
|
||||
dropAmount = Math.round(dropAmount / processOutput.divisor) * processOutput.item.count;
|
||||
resolvedHasQuality = processOutput.preserveQuality
|
||||
}
|
||||
} else {
|
||||
affection = data.getInt("affection") || 0;
|
||||
mood = global.getOrFetchMood(level, target, day, player);
|
||||
}
|
||||
let hearts = Math.floor(affection / 100);
|
||||
|
||||
let quality = 0;
|
||||
|
||||
if (
|
||||
(!hungry || plushieModifiers) &&
|
||||
hearts >= minHearts &&
|
||||
Math.random() <= resolvedChance
|
||||
) {
|
||||
if (item.includes("large")) {
|
||||
if (Math.random() > (mood + hearts * 10) / 256) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (plushieModifiers) {
|
||||
data.affection =
|
||||
affection + (player.stages.has("animal_whisperer") ? 20 : 10);
|
||||
}
|
||||
let specialItem = level.createEntity("minecraft:item");
|
||||
if (resolvedHasQuality && mood >= 160) {
|
||||
quality = global.getHusbandryQuality(hearts, mood);
|
||||
}
|
||||
specialItem.x = player.x;
|
||||
specialItem.y = player.y;
|
||||
specialItem.z = player.z;
|
||||
specialItem.item = Item.of(`${dropAmount}x ${resolvedItem}`,
|
||||
quality > 0 ? `{quality_food:{effects:[],quality:${quality}}}` : null
|
||||
);
|
||||
specialItem.spawn();
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:dwop block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
global.giveExperience(server, player, "husbandry", 60);
|
||||
if (target.x) {
|
||||
level.spawnParticles(
|
||||
"farmersdelight:star",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1,
|
||||
target.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
3,
|
||||
0.01
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const upgradeAnimal = (level, server, item, target, sound, particle) => {
|
||||
item.count--;
|
||||
server.runCommandSilent(
|
||||
`playsound ${sound} block @a ${target.x} ${target.y} ${target.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
particle,
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(0, 2),
|
||||
0.2 * rnd(0, 2),
|
||||
0.2 * rnd(0, 2),
|
||||
3,
|
||||
0.01
|
||||
);
|
||||
};
|
||||
|
||||
global.handleHusbandryBase = (hand, player, item, target, level, server) => {
|
||||
const pet = global.checkEntityTag(target, "society:pet_animal");
|
||||
const eventData = {
|
||||
player: player,
|
||||
item: item,
|
||||
target: target,
|
||||
level: level,
|
||||
server: server,
|
||||
};
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:husbandry_animal") && !pet)
|
||||
return;
|
||||
if (item.id === "society:sunlit_crystal") return;
|
||||
server.scheduleInTicks(1, () => {
|
||||
if (hand == "MAIN_HAND") {
|
||||
const day = global.getDay(level);
|
||||
handleFarmAnimalBackwardsCompat(target, day);
|
||||
initializeFarmAnimal(day, target, level);
|
||||
const data = target.persistentData;
|
||||
let name = target.customName ? target.customName : global.getTranslatedEntityName(String(target.type));
|
||||
const ageLastFed = data.getInt("ageLastFed");
|
||||
const peckish = !pet && day - ageLastFed == 1;
|
||||
const hungry = !pet && day - ageLastFed > 1;
|
||||
const affection = data.getInt("affection");
|
||||
const lostProduce = mood < 64 && Math.random() < mood / 64;
|
||||
let hearts = Math.floor((affection > 1000 ? 1000 : affection) / 100);
|
||||
player.swing();
|
||||
const mood = global.getOrFetchMood(level, target, day, player, false, true);
|
||||
handlePet(name, data, mood, day, peckish, hungry, eventData);
|
||||
if (pet) return;
|
||||
if (item.hasTag("society:animal_feed") && !pet)
|
||||
handleFeed(data, day, eventData);
|
||||
if (!lostProduce) {
|
||||
if (
|
||||
item === "society:milk_pail" &&
|
||||
global.checkEntityTag(target, "society:milkable_animal")
|
||||
) {
|
||||
handleMilk(name, data, day, hungry, eventData);
|
||||
}
|
||||
global.handleSpecialHarvest(
|
||||
level,
|
||||
target,
|
||||
player,
|
||||
server,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
handleSpecialItem,
|
||||
player.stages,
|
||||
);
|
||||
}
|
||||
if (
|
||||
player.stages.has("biomancer") &&
|
||||
[
|
||||
"bakery:bread_knife",
|
||||
"farmersdelight:iron_knife",
|
||||
"farmersdelight:diamond_knife",
|
||||
"farmersdelight:netherite_knife",
|
||||
"farmersdelight:golden_knife",
|
||||
"aquaculture:wooden_fillet_knife",
|
||||
"aquaculture:stone_fillet_knife",
|
||||
"aquaculture:iron_fillet_knife",
|
||||
"aquaculture:gold_fillet_knife",
|
||||
"farmersdelight:flint_knife",
|
||||
"aquaculture:neptunium_fillet_knife",
|
||||
"aquaculture:diamond_fillet_knife",
|
||||
"refurbished_furniture:knife",
|
||||
].includes(item.id)
|
||||
) {
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
if (hearts < 5) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
40,
|
||||
Text.translatable(
|
||||
"society.husbandry.action.need_hearts",
|
||||
name
|
||||
).toJson()
|
||||
)
|
||||
);
|
||||
} else {
|
||||
let heart = level.createEntity("minecraft:item");
|
||||
heart.x = player.x;
|
||||
heart.y = player.y;
|
||||
heart.z = player.z;
|
||||
heart.item = Item.of("quark:diamond_heart");
|
||||
heart.spawn();
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.sheep.shear block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound legendarycreatures:mojo_hurt block @a ${player.x} ${player.y} ${player.z} 0.1`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"minecraft:angry_villager",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
data.affection = affection - 100;
|
||||
global.addItemCooldown(player, item, 5);
|
||||
}
|
||||
}
|
||||
if (
|
||||
player.stages.has("bribery") &&
|
||||
item === "numismatics:crown" &&
|
||||
!data.bribed
|
||||
) {
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
data.bribed = true;
|
||||
data.affection = affection + 100;
|
||||
item.count--;
|
||||
server.runCommandSilent(
|
||||
`playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"legendarycreatures:desert_mojo_particle",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(0, 1),
|
||||
0.2 * rnd(0, 1),
|
||||
0.2 * rnd(0, 1),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
if (
|
||||
player.stages.has("clockwork") &&
|
||||
item === "create:precision_mechanism" &&
|
||||
!data.clockwork
|
||||
) {
|
||||
data.clockwork = true;
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
target,
|
||||
"trials:vault_activate",
|
||||
"supplementaries:bomb_explosion"
|
||||
);
|
||||
if (data.bff) {
|
||||
data.bff = false;
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
80,
|
||||
Text.translatable("society.husbandry.mechanization").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (
|
||||
player.stages.has("husbandry_mastery") &&
|
||||
item === "society:animal_cracker" &&
|
||||
!data.animalCracker
|
||||
) {
|
||||
data.animalCracker = true;
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.generic.eat block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
target,
|
||||
"stardew_fishing:chest_get",
|
||||
"farmersdelight:star"
|
||||
);
|
||||
}
|
||||
if (
|
||||
player.stages.has("bff") &&
|
||||
item === "society:friendship_necklace" &&
|
||||
!data.bff
|
||||
) {
|
||||
data.bff = true;
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
target,
|
||||
"legendarycreatures:wisp_idle",
|
||||
"buzzier_bees:buttercup_bloom"
|
||||
);
|
||||
if (data.clockwork) {
|
||||
data.clockwork = false;
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
`{anchor:"BOTTOM_CENTER",background:1,wrap:220,align:"BOTTOM_CENTER",color:"#55FF55",offsetY:20}`,
|
||||
80,
|
||||
Text.translatable("society.husbandry.emancipation").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (
|
||||
player.stages.has("transplanting") &&
|
||||
item === "quark:diamond_heart" &&
|
||||
hearts < 10
|
||||
) {
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
data.affection = affection + 100;
|
||||
if (!player.isCreative()) item.count--;
|
||||
server.runCommandSilent(
|
||||
`playsound aquaculture:fish_flop block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(0, 2),
|
||||
0.2 * rnd(0, 2),
|
||||
0.2 * rnd(0, 2),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
global.addItemCooldown(player, item, 1);
|
||||
}
|
||||
if (!lostProduce && item === "society:magic_shears") {
|
||||
handleMagicHarvest(name, data, eventData);
|
||||
}
|
||||
if (affection > 1075) {
|
||||
// Cap affection at 1075
|
||||
data.affection = 1075;
|
||||
}
|
||||
if (affection < 0) data.affection = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, item, target, level, server } = e;
|
||||
if (item === 'moblassos:diamond_lasso') return;
|
||||
global.handleHusbandryBase(hand, player, item, target, level, server);
|
||||
});
|
||||
|
||||
BlockEvents.rightClicked(global.plushies, (e) => {
|
||||
const { level, hand, player, item, server, block } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
let nbt = block.getEntityData();
|
||||
if (!nbt) return;
|
||||
const { animal } = nbt.data;
|
||||
if (!animal) return;
|
||||
let animalName = animal.name ? Text.of(animal.name) : global.getTranslatedEntityName(String(animal.type));
|
||||
if (item === "minecraft:air") {
|
||||
checkAnimal(
|
||||
player,
|
||||
level,
|
||||
server,
|
||||
animal,
|
||||
animalName,
|
||||
256,
|
||||
10
|
||||
);
|
||||
}
|
||||
global.executePlushieHusbandry(
|
||||
level,
|
||||
server,
|
||||
player,
|
||||
item,
|
||||
block,
|
||||
handleSpecialItem
|
||||
);
|
||||
if (
|
||||
player.stages.has("clockwork") &&
|
||||
item === "create:precision_mechanism" &&
|
||||
!animal.clockwork
|
||||
) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: {
|
||||
clockwork: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
block,
|
||||
"trials:vault_activate",
|
||||
"supplementaries:bomb_explosion"
|
||||
);
|
||||
if (animal.bff) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: {
|
||||
bff: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
80,
|
||||
Text.translatable("society.husbandry.mechanization").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (
|
||||
player.stages.has("husbandry_mastery") &&
|
||||
item === "society:animal_cracker" &&
|
||||
!animal.animalCracker
|
||||
) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: {
|
||||
animalCracker: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.generic.eat block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
block,
|
||||
"stardew_fishing:chest_get",
|
||||
"farmersdelight:star"
|
||||
);
|
||||
}
|
||||
if (
|
||||
player.stages.has("bff") &&
|
||||
item === "society:friendship_necklace" &&
|
||||
!animal.bff
|
||||
) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: {
|
||||
bff: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
upgradeAnimal(
|
||||
level,
|
||||
server,
|
||||
item,
|
||||
block,
|
||||
"legendarycreatures:wisp_idle",
|
||||
"buzzier_bees:buttercup_bloom"
|
||||
);
|
||||
if (animal.clockwork) {
|
||||
nbt.merge({
|
||||
data: {
|
||||
animal: {
|
||||
clockwork: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
`{anchor:"BOTTOM_CENTER",background:1,wrap:220,align:"BOTTOM_CENTER",color:"#55FF55",offsetY:20}`,
|
||||
80,
|
||||
Text.translatable("society.husbandry.emancipation").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
global.setBlockEntityData(block, nbt)
|
||||
});
|
||||
@@ -0,0 +1,105 @@
|
||||
console.info("[SOCIETY] animalBreeding.js loaded");
|
||||
|
||||
const breedingItems = [
|
||||
"minecraft:carrot",
|
||||
"minecraft:wheat",
|
||||
"minecraft:beetroot",
|
||||
"minecraft:potato",
|
||||
"farmersdelight:cabbage_seeds",
|
||||
"vintagedelight:ghost_pepper_seeds",
|
||||
"vintagedelight:cucumber_seeds",
|
||||
"supplementaries:flax_seeds",
|
||||
"minecraft:beetroot_seeds",
|
||||
"minecraft:wheat_seeds",
|
||||
"minecraft:pumpkin_seeds",
|
||||
"minecraft:torchflower_seeds",
|
||||
"farmersdelight:tomato_seeds",
|
||||
"society:tubabacco_seed",
|
||||
"society:ancient_fruit_seed",
|
||||
"society:blueberry_seed",
|
||||
"minecraft:dandelion",
|
||||
"minecraft:golden_carrot",
|
||||
];
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, item, target, level, server } = e;
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
if (!global.checkEntityTag(target, "society:husbandry_animal") || target.isBaby()) return;
|
||||
if (breedingItems.includes(item.id)) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
160,
|
||||
Text.translatable("society.husbandry.breeding.need_potion").toJson()
|
||||
)
|
||||
);
|
||||
e.cancel();
|
||||
}
|
||||
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (hand == "MAIN_HAND" && item === "society:miracle_potion") {
|
||||
if (global.checkEntityTag(target, "society:infertile")) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
120,
|
||||
Text.translatable("society.husbandry.breeding.infertile").toJson()
|
||||
)
|
||||
);
|
||||
e.cancel();
|
||||
}
|
||||
let animalNbt = target.getNbt();
|
||||
let day = global.getDay(level);
|
||||
let ageLastBred = target.persistentData.ageLastBred || 0;
|
||||
if (global.isFresh(day, ageLastBred)) ageLastBred = 0;
|
||||
if (Number(animalNbt.InLove) === 0 && day > ageLastBred) {
|
||||
if (
|
||||
["crittersandcompanions:red_panda", "minecraft:panda"].includes(target.type) &&
|
||||
Math.random() > 0.2
|
||||
) {
|
||||
item.count--;
|
||||
target.persistentData.ageLastBred = day;
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
160,
|
||||
Text.translatable("society.husbandry.breeding.fail").toJson()
|
||||
)
|
||||
);
|
||||
} else {
|
||||
animalNbt.InLove = 2000;
|
||||
target.setNbt(animalNbt);
|
||||
item.count--;
|
||||
level.spawnParticles(
|
||||
"minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
12,
|
||||
0.01
|
||||
);
|
||||
target.persistentData.ageLastBred = day;
|
||||
global.giveExperience(server, player, "husbandry", 80);
|
||||
player.swing();
|
||||
global.addItemCooldown(player, item, 10);
|
||||
}
|
||||
} else if (day > ageLastBred) {
|
||||
global.addItemCooldown(player, "society:miracle_potion", 40);
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
120,
|
||||
Text.translatable("society.husbandry.breeding.cooldown").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
console.info("[SOCIETY] animalMoodScanner.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, level, target, item, player, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:husbandry_animal")) return;
|
||||
if (hand == "MAIN_HAND" && item === "society:mood_scanner") {
|
||||
if (player.cooldowns.isOnCooldown(item)) return;
|
||||
const day = global.getDay(level);
|
||||
let name = target.customName ? target.customName : global.getTranslatedEntityName(String(target.type));
|
||||
const moodMeterHeaderText = Text.empty()
|
||||
.gray()
|
||||
.append(Text.of(`==[ `))
|
||||
.append(
|
||||
Text.translatable("society.husbandry.mood.meter_header", name).gold(),
|
||||
)
|
||||
.append(Text.of(` ]==`));
|
||||
player.tell(moodMeterHeaderText);
|
||||
global.getOrFetchMood(level, target, day, player, true);
|
||||
server.runCommandSilent(
|
||||
`playsound refurbished_furniture:ui.paddle_ball.retro_win block @a ${target.x} ${target.y} ${target.z}`,
|
||||
);
|
||||
global.addItemCooldown(player, item, 10);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
console.info("[SOCIETY] animalName.js loaded");
|
||||
|
||||
// This is done seperately and not in animalBase.js because of scheduling
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, item, target, level, server } = e;
|
||||
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:husbandry_animal") && !global.checkEntityTag(target, "society:pet_animal")) return;
|
||||
if (hand == "MAIN_HAND") {
|
||||
const data = target.persistentData;
|
||||
if (item === "minecraft:name_tag" && item.nbt?.display && !target.customName) {
|
||||
data.affection = (data.affection || 0) + (player.stages.has("no_name_for_the_sheep") ? 200 : 100);
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.allay.item_given block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(0, 3),
|
||||
0.2 * rnd(0, 3),
|
||||
0.2 * rnd(0, 3),
|
||||
10,
|
||||
0.01
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
console.info("[SOCIETY] animalPet.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, level, target, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:pet_animal")) return;
|
||||
if (hand == "MAIN_HAND") {
|
||||
let data = target.persistentData;
|
||||
let possibleGifts;
|
||||
let gift = level.createEntity("minecraft:item");
|
||||
|
||||
if (!data.gifted && data.affection >= 1000) {
|
||||
let nonIdType = String(target.type).path.replace(/_/g, " ");
|
||||
let name = target.customName ? target.customName : global.getTranslatedEntityName(String(target.type), global.formatName(nonIdType));
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
// Commented code is original one before 2025.12.22 (84067a9), and I think this is right code. so I attached.
|
||||
// `{anchor:"BOTTOM_CENTER",background:1,align:"BOTTOM_CENTER",color:"#55FF55",y:-90}`,
|
||||
// 80,
|
||||
// Text.translatable("society.husbandry.pet.max_affection", name).toJson(),
|
||||
`{anchor:"BOTTOM_CENTER",background:1,wrap:220,align:"BOTTOM_CENTER",color:"#FFAA00",offsetY:20}`,
|
||||
40,
|
||||
Text.translatable("society.husbandry.pet.max_affection").toJson()
|
||||
)
|
||||
);
|
||||
|
||||
global.petGifts.forEach((gift) => {
|
||||
if (gift.animal === target.type) possibleGifts = gift.gifts;
|
||||
});
|
||||
data.gifted = true;
|
||||
gift.x = player.x;
|
||||
gift.y = player.y;
|
||||
gift.z = player.z;
|
||||
gift.item = Item.of(possibleGifts[rnd(0, possibleGifts.length - 1)]);
|
||||
gift.spawn();
|
||||
level.spawnParticles(
|
||||
"minecraft:heart",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.2 * rnd(0, 3),
|
||||
0.2 * rnd(0, 3),
|
||||
0.2 * rnd(0, 3),
|
||||
20,
|
||||
0.01
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,85 @@
|
||||
console.info("[SOCIETY] animalSunlitCrystal.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, level, target, item, player, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:husbandry_animal")) return;
|
||||
if (hand == "MAIN_HAND" && item === "society:sunlit_crystal") {
|
||||
const animalData = target.persistentData;
|
||||
const animalNbt = target.getNbt();
|
||||
const plushie = player.getHeldItem("off_hand");
|
||||
let plushieNbt = plushie.getNbt();
|
||||
let errorString = "";
|
||||
if (Number(animalData.getInt("affection") || 0) < 1000) {
|
||||
errorString =
|
||||
"society.husbandry.sunlit_crystal.not_enough_animal_affection";
|
||||
}
|
||||
if (!plushie.hasTag("society:plushies")) {
|
||||
errorString = "society.husbandry.sunlit_crystal.not_plushie";
|
||||
} else if (Number(plushieNbt.get("affection")) < 4) {
|
||||
errorString =
|
||||
"society.husbandry.sunlit_crystal.not_enough_plushie_affection";
|
||||
} else if (plushieNbt.get("animal")) {
|
||||
errorString = "society.husbandry.sunlit_crystal.has_animal";
|
||||
}
|
||||
if (errorString) {
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
global.animalMessageSettings,
|
||||
80,
|
||||
Text.translatable(errorString).toJson()
|
||||
)
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
if (!player.isCreative()) item.shrink(1);
|
||||
player.give(
|
||||
Item.of(
|
||||
plushie.id,
|
||||
global.getPlushieItemNbt(
|
||||
plushieNbt,
|
||||
target.type,
|
||||
target.customName,
|
||||
animalData,
|
||||
animalNbt
|
||||
)
|
||||
)
|
||||
);
|
||||
plushie.shrink(1);
|
||||
server.runCommandSilent(
|
||||
`playsound relics:table_upgrade block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound chimes:block.amethyst.shimmer block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
|
||||
level.spawnParticles(
|
||||
"snowyspirit:glow_light",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1,
|
||||
target.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
15,
|
||||
0.01
|
||||
);
|
||||
level.spawnParticles(
|
||||
"species:wicked_flame",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1,
|
||||
target.z,
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
0.2 * rnd(1, 4),
|
||||
15,
|
||||
0.01
|
||||
);
|
||||
|
||||
target.setRemoved("unloaded_to_chunk");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
console.info("[SOCIETY] animalTweaks.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { item, target } = e;
|
||||
if (target.type === "minecraft:mooshroom" && item.id === "minecraft:bowl") {
|
||||
target.attack(2);
|
||||
}
|
||||
});
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { target } = e;
|
||||
if (target.type === "minecraft:wolf") {
|
||||
let nbt = target.getNbt();
|
||||
nbt.IsBewereager = 0;
|
||||
target.setNbt(nbt)
|
||||
}
|
||||
});
|
||||
|
||||
EntityEvents.spawned((e) => {
|
||||
if (e.entity.type == "minecraft:skeleton_horse" && e.entity.getNbt().SkeletonTrap !== 0.0) {
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
EntityEvents.spawned((e) => {
|
||||
if (e.entity.type == "rottencreatures:immortal" && e.level.dimension !== "society:skull_cavern") {
|
||||
e.cancel();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
console.info("[SOCIETY] cancelEntityInteraction.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { item, player, target } = e;
|
||||
if (!target.type.includes("item_frame")) {
|
||||
return;
|
||||
}
|
||||
if (item.hasTag('forge:tools/fishing_rods') && item.nbt.toString().includes("bobber")) {
|
||||
player.tell(Text.translatable("society.item_frame.rod").red());
|
||||
e.cancel()
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
console.info("[SOCIETY] carKey.js loaded");
|
||||
|
||||
BlockEvents.rightClicked((e) => {
|
||||
const { item, block, player } = e;
|
||||
if (item.getId() !== "society:car_key") return;
|
||||
const playerDrunk =
|
||||
player.potionEffects.isActive("brewery:drunk") ||
|
||||
player.potionEffects.isActive("brewery:blackout");
|
||||
|
||||
if (!playerDrunk && item.nbt && block) {
|
||||
let car = e.player.level.createEntity("automobility:automobile");
|
||||
if (item.nbt.car) {
|
||||
item.nbt.car.Pos[0] = Number(block.getX());
|
||||
item.nbt.car.Pos[1] = Number(block.getY() + 2);
|
||||
item.nbt.car.Pos[2] = Number(block.getZ());
|
||||
car.nbt = item.nbt.car;
|
||||
} else {
|
||||
item.nbt.Pos[0] = Number(block.getX());
|
||||
item.nbt.Pos[1] = Number(block.getY() + 2);
|
||||
item.nbt.Pos[2] = Number(block.getZ());
|
||||
car.nbt = item.nbt
|
||||
}
|
||||
car.spawn();
|
||||
item.nbt = null;
|
||||
} else if (playerDrunk) {
|
||||
player.tell(
|
||||
Text.translatable("item.society.car_key.use_on_drunk").gray()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
ItemEvents.entityInteracted("society:car_key", (e) => {
|
||||
const { item, target } = e;
|
||||
if (target.type !== "automobility:automobile" || item.nbt && item.nbt.car) {
|
||||
return;
|
||||
}
|
||||
if (item.nbt) {
|
||||
item.nbt.car = target.getNbt();
|
||||
} else {
|
||||
item.nbt = {}
|
||||
item.nbt.car = target.getNbt();
|
||||
}
|
||||
target.setRemoved("unloaded_to_chunk");
|
||||
e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,142 @@
|
||||
console.info("[SOCIETY] checkAnimal.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, level, target, server } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (!global.checkEntityTag(target, "society:longwing")) return;
|
||||
if (hand == "MAIN_HAND") {
|
||||
let nearbyLongwings = level
|
||||
.getEntitiesWithin(target.boundingBox.inflate(8))
|
||||
.filter((e) => global.checkEntityTag(e, "society:longwing"));
|
||||
let radius = 4;
|
||||
let { x, y, z } = target;
|
||||
let scanBlock;
|
||||
let scannedBlocks = 0;
|
||||
let scannedFlowers = [];
|
||||
let stolenBlock;
|
||||
for (let pos of BlockPos.betweenClosed(new BlockPos(x - radius, y - radius, z - radius), [
|
||||
x + radius,
|
||||
y + radius,
|
||||
z + radius,
|
||||
])) {
|
||||
if (!level.isLoaded(pos)) continue;
|
||||
scanBlock = level.getBlock(pos);
|
||||
if (scanBlock.hasTag("minecraft:flowers") && !scannedFlowers.includes(scanBlock.id)) {
|
||||
scannedFlowers.push(scanBlock.id);
|
||||
scannedBlocks++;
|
||||
if (!stolenBlock) stolenBlock = scanBlock;
|
||||
}
|
||||
}
|
||||
let chance = scannedBlocks * 0.15 - nearbyLongwings.length * 0.1;
|
||||
let eggChance = chance <= 0 ? "0%" : `${Math.min(100, Math.floor((Math.min(1, chance) / 4) * 100))}%`;
|
||||
chance = chance <= 0 ? "0%" : `${Math.min(100, Math.floor(chance * 100))}%`;
|
||||
let product = target.type.toString().equals("longwings:butterfly") ? Text.translatable("item.society.butterfly_amber") : Text.translatable("item.society.moth_pollen");
|
||||
let longWingNameMessage = `${Text.translatable(`item.longwings.${target.getNbt().Variant}`).toJson()}`;
|
||||
let chanceMessage = `${Text.translatable("society.longwings.produce_chance", chance, product).toJson()}`;
|
||||
let eggChanceMessage = `${Text.translatable("society.longwings.produce_chance", eggChance, Text.translatable("item.society.caterpillar_eggs")).toJson()}`;
|
||||
let longwingCountMessage = `${Text.translatable("society.longwings.longwing_count", `${nearbyLongwings.length - 1}`).toJson()}`;
|
||||
let flowerCountMessage = `${Text.translatable("society.longwings.flower_count", `${scannedBlocks}`).toJson()}`;
|
||||
global.renderUiText(
|
||||
player,
|
||||
server,
|
||||
{
|
||||
longwingName: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -90,
|
||||
text: longWingNameMessage,
|
||||
color: "#FFFFFF",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
longwingNameShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -89,
|
||||
text: longWingNameMessage,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
chanceMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -80,
|
||||
text: chanceMessage,
|
||||
color: "#FFAA00",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
chanceMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -79,
|
||||
text: chanceMessage,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
eggChanceMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -70,
|
||||
text: eggChanceMessage,
|
||||
color: "#FF55FF",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
eggChanceMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -69,
|
||||
text: eggChanceMessage,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
longwingCountMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -60,
|
||||
text: longwingCountMessage,
|
||||
color: "#FF5555",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
longwingCountMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -59,
|
||||
text: longwingCountMessage,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
flowerCountMessage: {
|
||||
type: "text",
|
||||
x: 0,
|
||||
y: -50,
|
||||
text: flowerCountMessage,
|
||||
color: "#55FF55",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
flowerCountMessageShadow: {
|
||||
type: "text",
|
||||
x: 1,
|
||||
z: -1,
|
||||
y: -49,
|
||||
text: flowerCountMessage,
|
||||
color: "#000000",
|
||||
alignX: "center",
|
||||
alignY: "bottom",
|
||||
},
|
||||
},
|
||||
global.mainUiElementIds
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
console.info("[SOCIETY] disableEggs.js loaded");
|
||||
|
||||
const eggs = [
|
||||
"minecraft:egg",
|
||||
"autumnity:turkey_egg",
|
||||
"untitledduckmod:goose_egg",
|
||||
"untitledduckmod:duck_egg",
|
||||
"farmlife:galliraptor_egg",
|
||||
];
|
||||
EntityEvents.spawned(eggs, (e) => e.cancel());
|
||||
|
||||
ItemEvents.rightClicked(eggs, (e) => {
|
||||
if (!e.player.isCrouching()) e.cancel();
|
||||
});
|
||||
@@ -0,0 +1,121 @@
|
||||
// priority: 0
|
||||
global.husbandryAnimals = [
|
||||
"minecraft:cow",
|
||||
"minecraft:goat",
|
||||
"minecraft:sheep",
|
||||
"minecraft:pig",
|
||||
"snowpig:snow_pig",
|
||||
"minecraft:rabbit",
|
||||
"meadow:wooly_cow",
|
||||
"meadow:wooly_sheep",
|
||||
"meadow:water_buffalo",
|
||||
"autumnity:turkey",
|
||||
"autumnity:snail",
|
||||
"minecraft:mooshroom",
|
||||
"buzzier_bees:moobloom",
|
||||
"minecraft:sniffer",
|
||||
"etcetera:chapple",
|
||||
"minecraft:panda",
|
||||
"species:mammutilation",
|
||||
"snuffles:snuffle",
|
||||
"species:goober",
|
||||
"species:cruncher",
|
||||
"farmlife:domestic_tribull",
|
||||
"wildernature:minisheep",
|
||||
"wildernature:deer",
|
||||
"wildernature:raccoon",
|
||||
"wildernature:bison",
|
||||
"minecraft:chicken",
|
||||
"untitledduckmod:duck",
|
||||
"untitledduckmod:goose",
|
||||
"etcetera:chapple",
|
||||
"autumnity:turkey",
|
||||
"species:wraptor",
|
||||
"wildernature:flamingo",
|
||||
"wildernature:penguin",
|
||||
"farmlife:galliraptor",
|
||||
"minecraft:frog",
|
||||
"wildernature:squirrel",
|
||||
"atmospheric:cochineal",
|
||||
"minecraft:squid",
|
||||
"minecraft:glow_squid",
|
||||
"crittersandcompanions:red_panda",
|
||||
"windswept:frostbiter",
|
||||
"minecraft:bat",
|
||||
"crittersandcompanions:shima_enaga",
|
||||
"minecraft:turtle",
|
||||
];
|
||||
|
||||
global.milkableAnimals = [
|
||||
"minecraft:cow",
|
||||
"minecraft:goat",
|
||||
"minecraft:sheep",
|
||||
"meadow:wooly_sheep",
|
||||
"meadow:wooly_cow",
|
||||
"meadow:water_buffalo",
|
||||
"minecraft:mooshroom",
|
||||
"buzzier_bees:moobloom",
|
||||
"species:mammutilation",
|
||||
"farmlife:domestic_tribull",
|
||||
"wildernature:minisheep",
|
||||
"wildernature:bison",
|
||||
"minecraft:squid",
|
||||
"minecraft:glow_squid",
|
||||
"windswept:frostbiter",
|
||||
];
|
||||
|
||||
global.coopMasterAnimals = [
|
||||
"minecraft:chicken",
|
||||
"untitledduckmod:duck",
|
||||
"untitledduckmod:goose",
|
||||
"etcetera:chapple",
|
||||
"autumnity:turkey",
|
||||
"species:wraptor",
|
||||
"wildernature:flamingo",
|
||||
"wildernature:penguin",
|
||||
"farmlife:galliraptor",
|
||||
"crittersandcompanions:shima_enaga",
|
||||
];
|
||||
|
||||
global.tierTwoHusbandryAnimals = [
|
||||
"minecraft:pig",
|
||||
"meadow:wooly_cow",
|
||||
"wildernature:bison",
|
||||
"wildernature:raccoon",
|
||||
"crittersandcompanions:red_panda",
|
||||
"wildernature:minisheep",
|
||||
"minecraft:panda",
|
||||
"minecraft:mooshroom",
|
||||
"meadow:water_buffalo",
|
||||
"untitledduckmod:goose",
|
||||
"minecraft:rabbit",
|
||||
"wildernature:squirrel",
|
||||
"autumnity:turkey",
|
||||
"minecraft:turtle",
|
||||
];
|
||||
|
||||
global.tierThreeHusbandryAnimals = [
|
||||
"minecraft:goat",
|
||||
"buzzier_bees:moobloom",
|
||||
"species:mammutilation",
|
||||
"species:goober",
|
||||
"species:cruncher",
|
||||
"farmlife:domestic_tribull",
|
||||
"windswept:frostbiter",
|
||||
"species:wraptor",
|
||||
"etcetera:chapple",
|
||||
"wildernature:flamingo",
|
||||
"wildernature:penguin",
|
||||
"farmlife:galliraptor",
|
||||
"crittersandcompanions:shima_enaga",
|
||||
];
|
||||
|
||||
global.coldMobs = [
|
||||
"species:mammutilation",
|
||||
"windswept:frostbiter",
|
||||
"wildernature:penguin",
|
||||
"snowpig:snow_pig",
|
||||
"snuffles:snuffle",
|
||||
];
|
||||
|
||||
global.animalMessageSettings = `{anchor:"BOTTOM_CENTER",background:1,wrap:220,align:"BOTTOM_CENTER",color:"#FF5555",offsetY:-80}`;
|
||||
@@ -0,0 +1,37 @@
|
||||
console.info("[SOCIETY] hamsterBite.js loaded");
|
||||
|
||||
ItemEvents.entityInteracted((e) => {
|
||||
const { hand, player, level, target, server, item } = e;
|
||||
if (hand == "OFF_HAND") return;
|
||||
if (target.type !== "hamsters:hamster") return;
|
||||
if (hand == "MAIN_HAND" && item === "society:animal_feed") {
|
||||
server.runCommandSilent(
|
||||
`playsound minecraft:entity.generic.eat block @a ${player.x} ${player.y} ${player.z}`
|
||||
);
|
||||
level.spawnParticles(
|
||||
"legendarycreatures:wisp_particle",
|
||||
true,
|
||||
target.x,
|
||||
target.y + 1.5,
|
||||
target.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
if (Math.random() < 0.08) {
|
||||
player.attack(20)
|
||||
server.runCommandSilent(
|
||||
global.getEmbersTextAPICommand(
|
||||
player.username,
|
||||
`{anchor:"BOTTOM_CENTER",charShakeRandom:0.2,background:1,align:"BOTTOM_CENTER",color:"#FF5555",offsetY:60}`,
|
||||
100,
|
||||
Text.translatable("society.hamster.bite").toJson()
|
||||
)
|
||||
);
|
||||
}
|
||||
item.count--;
|
||||
global.addItemCooldown(player, item, 10);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,54 @@
|
||||
EntityEvents.death((e) => {
|
||||
const { source, level, server, entity } = e;
|
||||
if (
|
||||
source.player &&
|
||||
source.player.getType() === "minecraft:player" &&
|
||||
["minecraft:sheep", "wildernature:minisheep", "meadow:wooly_sheep"].includes(entity.type) &&
|
||||
source.player.stages.has("sacrificial_lamb")
|
||||
) {
|
||||
let sacrificeAffection = entity.persistentData.getInt("affection");
|
||||
if (sacrificeAffection < 200) return;
|
||||
let witnesses = level
|
||||
.getEntitiesWithin(source.player.boundingBox.inflate(8))
|
||||
.filter((entity) => global.checkEntityTag(entity, "society:husbandry_animal"));
|
||||
server.runCommandSilent(
|
||||
`playsound legendarycreatures:corpse_eater_death block @a ${source.player.x} ${source.player.y} ${source.player.z}`
|
||||
);
|
||||
witnesses.forEach((animal) => {
|
||||
let data
|
||||
if (["minecraft:sheep", "wildernature:minisheep", "meadow:wooly_sheep"].includes(animal.type)) {
|
||||
data = animal.persistentData;
|
||||
data.affection = data.getInt("affection") - 100;
|
||||
level.spawnParticles(
|
||||
"minecraft:angry_villager",
|
||||
true,
|
||||
animal.x,
|
||||
animal.y + 1.5,
|
||||
animal.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
} else if (Math.random() < 0.5) {
|
||||
data = animal.persistentData;
|
||||
data.affection =
|
||||
data.getInt("affection") + Math.round(sacrificeAffection / 2);
|
||||
|
||||
level.spawnParticles(
|
||||
"minecraft:sculk_soul",
|
||||
true,
|
||||
animal.x,
|
||||
animal.y + 1.5,
|
||||
animal.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
console.info("[SOCIETY] moonStatueDamage.js loaded");
|
||||
|
||||
EntityEvents.hurt((e) => {
|
||||
const { server, level, entity, source } = e;
|
||||
// Fix windswept bug
|
||||
|
||||
if (level.dimension !== "society:skull_cavern") return;
|
||||
if (
|
||||
source.player &&
|
||||
source.player.getType() === "minecraft:player" &&
|
||||
source.player.stages.has("moon_damage") &&
|
||||
Math.random() < 0.05
|
||||
) {
|
||||
entity.attack(100);
|
||||
level.spawnParticles(
|
||||
"species:spectre_pop",
|
||||
true,
|
||||
entity.x,
|
||||
entity.y + 1.5,
|
||||
entity.z,
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
0.1 * rnd(1, 4),
|
||||
5,
|
||||
0.01
|
||||
);
|
||||
server.runCommandSilent(
|
||||
`playsound create:peculiar_bell_use block @a ${entity.x} ${entity.y} ${entity.z}`
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,534 @@
|
||||
// console.info("[SOCIETY] refreshVillagers.js loaded");
|
||||
|
||||
// ItemEvents.entityInteracted((e) => {
|
||||
// const { hand, player, level, target, server } = e;
|
||||
// if (hand == "OFF_HAND") return;
|
||||
// if (target.type !== "minecraft:villager") return;
|
||||
// let updateThis = false;
|
||||
// const nbt = target.nbt.toString();
|
||||
// if (nbt.includes("leatherworker") && !nbt.includes("stylin_purple_hat")) updateThis = true;
|
||||
// if (nbt.includes("weaponsmith") && !nbt.includes("64k_storage_block")) updateThis = true;
|
||||
// if (nbt.includes("shepherd") && !nbt.includes("diamond_lasso")) updateThis = true;
|
||||
// if (nbt.includes("botanist") && !nbt.includes("endless_fortune")) updateThis = true;
|
||||
// if (nbt.includes("bountiful_fertilizer")) updateThis = true;
|
||||
// if (nbt.includes("candlelight:cook") && !nbt.includes("sweet_potato_seed")) updateThis = true;
|
||||
// if (nbt.includes("toolsmith") && nbt.includes("reinforced_core")) updateThis = true;
|
||||
// if (nbt.includes("cleric") && !nbt.includes("hostile_lasso")) updateThis = true;
|
||||
// if (nbt.includes("librarian") && !nbt.includes("silk_touch")) updateThis = true;
|
||||
// if (
|
||||
// nbt.includes("cartographer") &&
|
||||
// !nbt.includes("fletcher") &&
|
||||
// !nbt.includes("shipping_bin_monitor")
|
||||
// )
|
||||
// updateThis = true;
|
||||
// if (nbt.includes("fletcher") && !nbt.includes("enkephalin")) updateThis = true;
|
||||
// if (nbt.includes("fisher") && !nbt.includes("river_jelly")) updateThis = true;
|
||||
|
||||
// if (updateThis) {
|
||||
// let freshVillager = level.createEntity("minecraft:villager");
|
||||
// let villagerNbt = freshVillager.getNbt();
|
||||
// villagerNbt.VillagerData.profession = target.nbt.VillagerData.profession;
|
||||
// villagerNbt.Brain.memories = target.nbt.Brain.memories;
|
||||
// freshVillager.customName = target.customName;
|
||||
// villagerNbt.Pos = [Number(target.x), Number(target.y), Number(target.z)];
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// freshVillager.spawn();
|
||||
// target.setRemoved("unloaded_to_chunk");
|
||||
// server.runCommandSilent(
|
||||
// `playsound stardew_fishing:complete block @a ${player.x} ${player.y} ${player.z}`
|
||||
// );
|
||||
// player.tell(Text.green("Villager updated! Thanks for playing Sunlit Valley!"));
|
||||
// }
|
||||
// });
|
||||
|
||||
// ItemEvents.entityInteracted((e) => {
|
||||
// const { hand, level, target } = e;
|
||||
// if (hand == "OFF_HAND") return;
|
||||
// if (target.type !== "vinery:wandering_winemaker") return;
|
||||
// let updateThis = false;
|
||||
// const nbt = target.nbt.toString();
|
||||
// if (nbt.includes("minecraft:emerald")) updateThis = true;
|
||||
|
||||
// if (updateThis) {
|
||||
// let freshVillager = level.createEntity("vinery:wandering_winemaker");
|
||||
// let villagerNbt = freshVillager.getNbt();
|
||||
// villagerNbt.Brain.memories = target.nbt.Brain.memories;
|
||||
// freshVillager.customName = target.customName;
|
||||
// villagerNbt.Pos = [Number(target.x), Number(target.y), Number(target.z)];
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// villagerNbt.Offers = {
|
||||
// Recipes: [
|
||||
// {
|
||||
// buy: { Count: 18, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 12,
|
||||
// priceMultiplier: 0.2,
|
||||
// "quark:tier": 6,
|
||||
// rewardExp: 1,
|
||||
// sell: {
|
||||
// Count: 1,
|
||||
// id: "quark:pathfinders_quill",
|
||||
// tag: {
|
||||
// targetBiome: "minecraft:old_growth_pine_taiga",
|
||||
// targetBiomeColor: 5980703,
|
||||
// targetBiomeUnderground: 0,
|
||||
// },
|
||||
// },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 15,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 4, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:red_grape_seeds" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 4, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:white_grape_seeds" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:taiga_grape_seeds_red" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:taiga_grape_seeds_white" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:savanna_grape_seeds_red" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:savanna_grape_seeds_white" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:jungle_grape_seeds_red" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "vinery:jungle_grape_seeds_white" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 4, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "nethervinery:crimson_grape_seeds" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 4, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "nethervinery:warped_grape_seeds" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// freshVillager.spawn();
|
||||
// target.setRemoved("unloaded_to_chunk");
|
||||
// }
|
||||
// });
|
||||
|
||||
// ItemEvents.entityInteracted((e) => {
|
||||
// const { hand, level, target } = e;
|
||||
// if (hand == "OFF_HAND") return;
|
||||
// if (target.type !== "bakery:wandering_baker") return;
|
||||
// let updateThis = false;
|
||||
// const nbt = target.nbt.toString();
|
||||
// if (nbt.includes("minecraft:emerald")) updateThis = true;
|
||||
|
||||
// if (updateThis) {
|
||||
// let freshVillager = level.createEntity("bakery:wandering_baker");
|
||||
// let villagerNbt = freshVillager.getNbt();
|
||||
// villagerNbt.Brain.memories = target.nbt.Brain.memories;
|
||||
// freshVillager.customName = target.customName;
|
||||
// villagerNbt.Pos = [Number(target.x), Number(target.y), Number(target.z)];
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// villagerNbt.Offers = {
|
||||
// Recipes: [
|
||||
// {
|
||||
// buy: { Count: 18, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 12,
|
||||
// priceMultiplier: 0.2,
|
||||
// "quark:tier": 6,
|
||||
// rewardExp: 1,
|
||||
// sell: {
|
||||
// Count: 1,
|
||||
// id: "quark:pathfinders_quill",
|
||||
// tag: {
|
||||
// targetBiome: "minecraft:old_growth_pine_taiga",
|
||||
// targetBiomeColor: 5980703,
|
||||
// targetBiomeUnderground: 0,
|
||||
// },
|
||||
// },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 15,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "bakery:strawberry_cake" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 2, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "bakery:chocolate_cake" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 2, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "bakery:sweetberry_cake" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 2, id: "numismatics:crown" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "atmospheric:yucca_gateau" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 4, id: "numismatics:cog" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "bakery:chocolate_gateau" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "society:prize_ticket" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "splendid_slimes:slime_ticket" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 1, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 4, id: "splendid_slimes:slime_candy" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 2, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "pamhc2trees:cinnamon_sapling" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 3, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "pamhc2trees:pawpaw_sapling" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 3, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "pamhc2trees:hazelnut_sapling" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// {
|
||||
// buy: { Count: 8, id: "society:prismatic_shard" },
|
||||
// buyB: { Count: 0, id: "minecraft:air" },
|
||||
// demand: 0,
|
||||
// maxUses: 8,
|
||||
// priceMultiplier: 0.05,
|
||||
// rewardExp: 1,
|
||||
// sell: { Count: 1, id: "pamhc2trees:lemon_sapling" },
|
||||
// specialPrice: 0,
|
||||
// uses: 0,
|
||||
// xp: 1,
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// freshVillager.spawn();
|
||||
// target.setRemoved("unloaded_to_chunk");
|
||||
// }
|
||||
// });
|
||||
// ItemEvents.entityInteracted((e) => {
|
||||
// const { hand, level, target } = e;
|
||||
// if (hand == "OFF_HAND") return;
|
||||
// if (target.type !== "ribbits:ribbit") return;
|
||||
// let updateThis = false;
|
||||
// const nbt = target.nbt.toString();
|
||||
// if (nbt.includes("cod") || nbt.includes("salmon")) updateThis = true;
|
||||
|
||||
// if (updateThis) {
|
||||
// let freshVillager = level.createEntity("ribbits:ribbit");
|
||||
// let villagerNbt = freshVillager.getNbt();
|
||||
// villagerNbt.Brain.memories = target.nbt.Brain.memories;
|
||||
// freshVillager.customName = target.customName;
|
||||
// villagerNbt.Pos = [Number(target.x), Number(target.y), Number(target.z)];
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// villagerNbt.RibbitData = {
|
||||
// umbrella: "ribbits:umbrella_3",
|
||||
// instrument: "ribbits:none",
|
||||
// profession: "ribbits:fisherman",
|
||||
// };
|
||||
// villagerNbt.Offers = {
|
||||
// Recipes: [
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "minecraft:amethyst_shard", Count: 6 },
|
||||
// sell: { id: "aquaculture:sushi", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "minecraft:amethyst_shard", Count: 16 },
|
||||
// sell: { id: "crabbersdelight:pearl", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "society:amethyst_chunk", Count: 2 },
|
||||
// sell: { id: "society:ribbit_drum", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "society:amethyst_chunk", Count: 4 },
|
||||
// sell: { id: "society:ribbit_gadget", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "minecraft:amethyst_shard", Count: 32 },
|
||||
// sell: { id: "furniture:iron_fish_tank", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "minecraft:amethyst_shard", Count: 32 },
|
||||
// sell: { id: "furniture:copper_fish_tank", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "minecraft:amethyst_block", Count: 16 },
|
||||
// sell: {
|
||||
// id: "aquaculture:gold_fishing_rod",
|
||||
// Count: 1,
|
||||
// },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 4,
|
||||
// rewardExp: 1,
|
||||
// demand: -8,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// {
|
||||
// xp: 0,
|
||||
// buy: { id: "society:aged_amethyst_cheese_block", Count: 4 },
|
||||
// sell: { id: "society:river_jelly", Count: 1 },
|
||||
// uses: 0,
|
||||
// priceMultiplier: 0.05,
|
||||
// "quark:tier": 6,
|
||||
// maxUses: 16,
|
||||
// rewardExp: 1,
|
||||
// demand: -32,
|
||||
// specialPrice: 0,
|
||||
// buyB: { id: "minecraft:air", tag: {}, Count: 0 },
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// freshVillager.setNbt(villagerNbt);
|
||||
// freshVillager.spawn();
|
||||
// target.setRemoved("unloaded_to_chunk");
|
||||
// }
|
||||
// });
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user