add first patch

This commit is contained in:
2026-07-31 10:34:32 +09:00
parent 03aac2e45e
commit b1cbc6c78d
6390 changed files with 547430 additions and 0 deletions
@@ -0,0 +1 @@
// DEPRECATED
@@ -0,0 +1,110 @@
console.info("[SOCIETY] gnome.js loaded");
const getGnomeState = (name, type) => {
const path = `society:block/kubejs/gnome/${name}`;
let cardianal = [
{
when: { type: type, facing: "north" },
apply: { model: path, y: 0, uvlock: false },
},
{
when: { type: type, facing: "east" },
apply: { model: path, y: 90, uvlock: false },
},
{
when: { type: type, facing: "south" },
apply: { model: path, y: 180, uvlock: false },
},
{
when: { type: type, facing: "west" },
apply: { model: path, y: -90, uvlock: false },
},
];
return cardianal;
};
StartupEvents.registry("block", (e) => {
e
.create("society:gnome", "cardinal")
.property(integerProperty.create("type", 0, 3))
.defaultCutout()
.item((item) => {
item.tooltip(Text.translatable("block.society.gnome.description").gray());
item.modelJson({
parent: "society:block/kubejs/gnome/base",
});
})
.defaultState((state) => {
state.set(integerProperty.create("type", 0, 3), 0);
})
.placementState((state) => {
state.set(integerProperty.create("type", 0, 3), 0);
})
.rightClick((click) => {
const { block, item, hand } = click;
const type = Number(block.properties.get("type"));
const facing = block.properties.get("facing");
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
if (item == "minecraft:lantern") {
block.set("society:lantern_gnome", {
facing: facing,
});
} else {
block.set(block.id, {
facing: facing,
type: type == 3 ? "0" : String(type + 1),
});
}
}
}).blockstateJson = {
multipart: []
.concat(getGnomeState("base", 0))
.concat(getGnomeState("fish", 1))
.concat(getGnomeState("twig", 2))
.concat(getGnomeState("swing", 3)),
};
e
.create("society:lantern_gnome", "cardinal")
.property(integerProperty.create("type", 0, 3))
.defaultCutout()
.item((item) => {
item.tooltip(Text.translatable("block.society.lantern_gnome.description").gray());
item.modelJson({
parent: "society:block/kubejs/gnome/lantern",
});
})
.lightLevel(0.8)
.rightClick((click) => {
const { block, hand } = click;
const type = Number(block.properties.get("type"));
const facing = block.properties.get("facing");
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
block.set(block.id, {
facing: facing,
type: type == 3 ? "0" : String(type + 1),
});
}
}).blockstateJson = {
multipart: [
{
when: { facing: "north" },
apply: { model: "society:block/kubejs/gnome/lantern", y: 0, uvlock: false },
},
{
when: { facing: "east" },
apply: { model: "society:block/kubejs/gnome/lantern", y: 90, uvlock: false },
},
{
when: { facing: "south" },
apply: { model: "society:block/kubejs/gnome/lantern", y: 180, uvlock: false },
},
{
when: { facing: "west" },
apply: { model: "society:block/kubejs/gnome/lantern", y: -90, uvlock: false },
},
],
};
});
@@ -0,0 +1,257 @@
ItemEvents.modification((e) => {
e.modify("*", (item) => {
item.maxDamage *= 3;
});
e.modify("gag:energized_hearthstone", (item) => {
item.maxDamage = 2;
});
e.modify("gag:hearthstone", (item) => {
item.maxDamage = 2;
});
e.modify("gag:escape_rope", (item) => {
item.maxDamage = 1024;
});
global.geodeList.forEach((geodeItem) => {
const { item } = geodeItem;
e.modify(item, (item) => {
item.rarity = "uncommon";
});
});
global.frozenGeodeList.forEach((geodeItem) => {
const { item } = geodeItem;
e.modify(item, (item) => {
item.rarity = "rare";
});
});
global.magmaGeodeList.forEach((geodeItem) => {
const { item } = geodeItem;
e.modify(item, (item) => {
item.rarity = "epic";
});
});
e.modify("society:sparkstone", (item) => {
item.rarity = "epic";
});
e.modify("numismatics:neptunium_coin", (item) => {
item.rarity = "rare";
});
e.modify(
[
"numismatics:ancient_coin",
"numismatics:prismatic_coin",
"society:ancient_fruit_seed",
"society:ancient_fruit",
"society:sunlit_crystal",
"society:plushie_wand",
"society:treasure_totem",
"society:recycled_core",
"society:bubble_totem",
"society:mystic_syrup",
"society:net_bobber",
"society:needle_bobber",
"society:sparkpod",
"society:sparkpod_seed",
"cluttered:willow_sapling",
"cluttered:willow_log",
"cluttered:flowering_willow_log",
"cluttered:flowering_willow_leaves",
"cluttered:willow_leaves",
"cluttered:willow_vines",
"society:women_who_run_with_the_plushies",
"society:the_spark_also_rises",
"society:the_red_and_the_black",
"society:the_quality_of_the_earth",
"society:pond_house_five",
"society:animal_cracker",
"society:moon_statue",
"society:roe_recycler",
"minecraft:enchanting_table",
"domesticationinnovation:collar_tag",
"domesticationinnovation:wayward_lantern",
"domesticationinnovation:drum",
"society:spinel"
],
(item) => {
item.rarity = "epic";
},
);
e.modify(
["society:milk_pail", "society:magic_shears", "society:mood_scanner"],
(item) => {
item.maxStackSize = 1;
},
);
e.modify("society:aquamarine", (item) => {
item.rarity = "uncommon";
});
e.modify("society:amethyst_chunk", (item) => {
item.rarity = "uncommon";
});
e.modify("society:ruby", (item) => {
item.rarity = "rare";
});
e.modify("society:topaz", (item) => {
item.rarity = "rare";
});
e.modify("society:magic_rope", (item) => {
item.rarity = "rare";
});
e.modify("society:magic_tunnel", (item) => {
item.rarity = "rare";
});
e.modify("quark:diamond_heart", (item) => {
item.rarity = "epic";
});
e.modify("society:jade", (item) => {
item.rarity = "epic";
});
e.modify("society:prismatic_shard", (item) => {
item.rarity = "epic";
});
e.modify("society:prismatic_shard_block", (item) => {
item.rarity = "epic";
});
e.modify("society:golden_clock", (item) => {
item.rarity = "epic";
});
const goldVanillaTools = [
"minecraft:golden_hoe",
"minecraft:golden_axe",
"minecraft:golden_pickaxe",
"minecraft:golden_shovel",
];
goldVanillaTools.forEach((tool) => {
e.modify(tool, (item) => {
item.digSpeed = 7;
item.tier = (tier) => {
tier.level = 3;
};
});
});
const goldHammers = [
"justhammers:gold_reinforced_impact_hammer",
"justhammers:gold_hammer",
"justhammers:gold_destructor_hammer",
"justhammers:gold_impact_hammer",
"justhammers:gold_reinforced_hammer",
];
goldHammers.forEach((tool) => {
e.modify(tool, (item) => {
item.digSpeed = 7;
item.tier = (tier) => {
tier.level = 3;
};
});
});
e.modify("minecraft:golden_sword", (item) => {
item.setAttackDamage(5.5);
});
e.modify("minecraft:golden_axe", (item) => {
item.setAttackDamage(8);
});
const goldTools = [
"farmersdelight:golden_knife",
"aquaculture:gold_fishing_rod",
"aquaculture:gold_fillet_knife",
"sewingkit:gold_sewing_needle",
"justhammers:gold_reinforced_hammer",
"minecraft:golden_sword",
"minecraft:golden_hoe",
"minecraft:golden_axe",
"minecraft:golden_pickaxe",
"minecraft:golden_shovel",
"justhammers:gold_reinforced_impact_hammer",
"justhammers:gold_destructor_hammer",
"justhammers:gold_impact_hammer",
"justhammers:gold_hammer",
];
goldTools.forEach((tool) => {
e.modify(tool, (item) => {
item.maxDamage *= tool.namespace === "justhammers" ? 2 : 16;
});
});
e.modify("minecraft:golden_helmet", (item) => {
item.maxDamage *= 3;
item.setArmorProtection(2.5);
});
e.modify("minecraft:golden_chestplate", (item) => {
item.maxDamage *= 3;
item.setArmorProtection(7);
});
e.modify("minecraft:golden_leggings", (item) => {
item.maxDamage *= 3;
item.setArmorProtection(5.5);
});
e.modify("minecraft:golden_boots", (item) => {
item.maxDamage *= 3;
item.setArmorProtection(2.5);
});
e.modify("twigs:twig", (item) => (item.burnTime = 200));
const netheriteTools = [
"minecraft:netherite_axe",
"minecraft:netherite_hoe",
"minecraft:netherite_pickaxe",
"minecraft:netherite_shovel",
];
netheriteTools.forEach((armor) => {
e.modify(armor, (item) => {
item.setDigSpeed(item.digSpeed + 1);
item.setAttackDamage(item.attackDamage + 2);
});
});
e.modify("minecraft:netherite_sword", (item) => {
item.setAttackDamage(10);
});
e.modify("minecraft:netherite_helmet", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(4);
});
e.modify("minecraft:netherite_chestplate", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(9);
});
e.modify("minecraft:netherite_leggings", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(7);
});
e.modify("minecraft:netherite_boots", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(3);
});
e.modify("botania:terrasteel_helmet", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(4);
});
e.modify("botania:terrasteel_chestplate", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(9);
});
e.modify("botania:terrasteel_leggings", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(7);
});
e.modify("botania:terrasteel_boots", (item) => {
item.maxDamage *= 1.5;
item.setArmorProtection(3);
});
e.modify("botania:manasteel_sword", (item) => {
item.setAttackDamage(7);
});
e.modify("botania:elementium_sword", (item) => {
item.setAttackDamage(8);
});
e.modify("oreganized:electrum_sword", (item) => {
item.setAttackDamage(8);
});
// Netherite Tier
e.modify("botania:terra_sword", (item) => {
item.setAttackDamage(10);
});
e.modify("botania:star_sword", (item) => {
item.setAttackDamage(10);
});
e.modify("botania:thunder_sword", (item) => {
item.setAttackDamage(10);
});
});
@@ -0,0 +1,154 @@
console.info("[SOCIETY] plushieReRegister.js loaded");
global.plushieRightClick = (click) => {
const { item, block, player, level, server, hand } = click;
const { x, y, z } = block;
let nbt = block.getEntityData();
const { type, quest_id, affection, animal } = nbt.data;
if (player.isFake()) return;
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
if (!Number(type)) {
global.plushieTraits.forEach((trait, index) => {
if (trait.trait.equals(type)) {
nbt.merge({
data: {
type: index,
},
});
global.setBlockEntityData(block, nbt)
}
})
}
if (!animal) {
if (
player.stages.has("women_who_run_with_the_plushies") &&
affection < 2
) {
nbt.merge({
data: {
affection: 2,
},
});
global.setBlockEntityData(block, nbt)
level.spawnParticles(
"minecraft:heart",
true,
x + 0.5,
y + 0.5,
z + 0.5,
0.1 * rnd(1, 4),
0.1 * rnd(1, 4),
0.1 * rnd(1, 4),
10,
0.1
);
}
if (quest_id > 0) {
let questList = Ingredient.of(global.plushieTraits[type].tag).itemIds;
let questOffset = 3;
if (questList.length < 12) questOffset = 2;
if (questList.length > 36) questOffset = 6;
let questItem =
questList[affection * questOffset + Number(quest_id) - 1];
let questName = Item.of(questItem).displayName;
if (item && item == questItem) {
if (!player.isCreative()) item.count--;
level.spawnParticles(
"minecraft:heart",
true,
x + 0.5,
y + 0.5,
z + 0.5,
0.1 * rnd(1, 4),
0.1 * rnd(1, 4),
0.1 * rnd(1, 4),
10,
0.1
);
nbt.merge({
data: {
quest_id: affection == 3 ? "0" : String(rnd(1, 3)),
affection: affection + 1,
},
});
if (
player.stages.has("husbandry_mastery") &&
!player.stages.has("women_who_run_with_the_plushies") &&
affection > 2 &&
Math.random() <= 0.05
) {
block.popItemFromFace(
"society:women_who_run_with_the_plushies",
block.properties.get("facing")
);
}
global.setBlockEntityData(block, nbt)
player.tell(Text.translatable("society.plushie.thank").gray());
} else {
player.tell(Text.translatable("society.plushie.want_gift").gray());
player.tell(questName);
}
}
if (
item == "minecraft:air" &&
block.id === "whimsy_deco:adv_singing_frog_plushie"
) {
server.runCommandSilent(
`playsound species:music.disk.spawner block @a ${x} ${y} ${z}`
);
block.set("whimsy_deco:sunlit_singing_frog", block.properties);
global.setBlockEntityData(block, nbt)
server.scheduleInTicks(0, () => {
server.scheduleInTicks(2740, () => {
if (
level.getBlock(block.pos).id === "whimsy_deco:sunlit_singing_frog"
) {
block.set(
"whimsy_deco:adv_singing_frog_plushie",
block.properties
);
global.setBlockEntityData(block, nbt)
}
});
});
} else
server.runCommandSilent(
`playsound tanukidecor:block.mini_figure.squeak block @a ${x} ${y} ${z}`
);
}
}
};
StartupEvents.registry("block", (event) => {
global.originalPlushies.forEach((plushie) => {
const splitStr = plushie.split(":");
let modelPath = `${splitStr[0]}:block/${splitStr[1]}`;
if (splitStr[0].equals("tanukidecor"))
modelPath = `tanukidecor:block/mini_figure/${splitStr[1]}`;
event
.create(`${splitStr[0]}:adv_${splitStr[1]}`, "cardinal")
.defaultCutout()
.box(2, 0, 2, 14, 14, 14)
.tagBlock("minecraft:mineable/axe")
.soundType("wool")
.hardness(1.0)
.requiresTool(false)
.model(modelPath)
.item((item) => {
item.modelJson({
parent: modelPath,
});
})
.rightClick((click) => global.plushieRightClick(click))
.blockEntity((blockInfo) => {
blockInfo.initialData({
type: "",
quest_id: 0,
quality: 0,
affection: 0,
});
});
});
});
@@ -0,0 +1 @@
// DEPREACTED
@@ -0,0 +1,845 @@
StartupEvents.registry("block", (e) => {
e
.create("society:treated_log")
.soundType("wood")
.property(BlockProperties.AXIS)
.placementState((e) => e.set(BlockProperties.AXIS, e.clickedFace.axis))
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.tagBlock("minecraft:mineable/axe").blockstateJson = {
variants: {
"axis=x": {
model: "society:block/kubejs/treated_log_horizontal",
x: 90,
y: 90,
},
"axis=y": {
model: "society:block/kubejs/treated_log",
},
"axis=z": {
model: "society:block/kubejs/treated_log_horizontal",
x: 90,
},
},
};
// Ores
e.create("society:earth_crystal")
.box(2, 0, 2, 14, 8, 14)
.defaultCutout()
.soundType("stone")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_stone_tool")
.model("society:block/kubejs/earth_crystal")
.lightLevel(0.5)
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/geode/earth_crystal",
},
});
});
e.create("society:fire_quartz")
.box(2, 0, 2, 14, 8, 14)
.defaultCutout()
.soundType("amethyst")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_iron_tool")
.lightLevel(0.8)
.model("society:block/kubejs/fire_quartz")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/magma_geode/fire_quartz",
},
});
});
e.create("society:geode_node")
.box(4, 0, 4, 12, 9, 12)
.defaultCutout()
.soundType("stone")
.hardness(4.5)
.resistance(9.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_stone_tool")
.model("society:block/kubejs/geode_node");
e.create("society:magma_geode_node")
.box(4, 0, 4, 12, 9, 12)
.defaultCutout()
.soundType("stone")
.hardness(22.5)
.resistance(9.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_iron_tool")
.model("society:block/kubejs/magma_geode_node");
e.create("society:omni_geode_node")
.box(4, 0, 4, 12, 9, 12)
.defaultCutout()
.soundType("stone")
.hardness(30.0)
.resistance(9.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_diamond_tool")
.model("society:block/kubejs/omni_geode_node");
// Skull Cavern
e.create("society:skull_cavern_teleporter")
.texture("up", "society:block/teleporter_top")
.texture("down", "society:block/teleporter_bottom")
.texture("north", "society:block/teleporter_side")
.texture("east", "society:block/teleporter_side")
.texture("south", "society:block/teleporter_side")
.texture("west", "society:block/teleporter_side")
.texture("particle", "society:block/teleporter_side")
.mapColor("stone")
.soundType("stone")
.hardness(1.0)
.resistance(3600000.0)
.lightLevel(1)
.requiresTool(false);
const createBoulder = (type) => {
e.create(`society:${type}_boulder`)
.texture("up", `society:block/${type}_boulder_top`)
.texture("down", `society:block/${type}_boulder`)
.texture("north", `society:block/${type}_boulder`)
.texture("east", `society:block/${type}_boulder`)
.texture("south", `society:block/${type}_boulder`)
.texture("west", `society:block/${type}_boulder`)
.texture("particle", `society:block/${type}_boulder`)
.soundType("stone")
.hardness(2)
.resistance(1.0)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_iron_tool");
};
createBoulder("stone");
createBoulder("ice");
createBoulder("sandstone");
createBoulder("blackstone");
createBoulder("end_stone");
const createSkullVariant = (type, path) => {
e.create(`society:skull_${type}`)
.soundType("stone")
.resistance(3600000)
.requiresTool(true)
.textureAll(path)
.texture("particle", path)
.unbreakable()
.tagBlock("society:skull_block");
};
createSkullVariant("stone", "minecraft:block/stone");
createSkullVariant("permafrost", "quark:block/permafrost");
createSkullVariant("sandstone", "minecraft:block/sandstone_top");
createSkullVariant("arid_sandstone", "atmospheric:block/arid_sandstone_top");
createSkullVariant("blackstone", "minecraft:block/blackstone");
createSkullVariant("end_stone", "minecraft:block/end_stone");
const createSupplyCrate = (type, path) => {
e.create(`society:${type}_supply_crate`)
.soundType("wood")
.tagBlock("minecraft:mineable/axe")
.model(path)
.tagBlock("society:supply_crate");
};
createSupplyCrate("oak", "refurbished_furniture:block/oak_crate_closed");
createSupplyCrate(
"spruce",
"refurbished_furniture:block/spruce_crate_closed"
);
createSupplyCrate("palm", "everycomp:block/rfm/beachparty/palm_crate_closed");
createSupplyCrate(
"grimwood",
"everycomp:block/rfm/atmospheric/grimwood_crate_closed"
);
e.create("society:cavern_air")
.box(0, 0, 0, 0, 0, 0)
.property(integerProperty.create("type", 0, 4))
.property(integerProperty.create("chunkbit", 0, 1))
.model("minecraft:block/air")
.hardness(-1)
.resistance(3600000)
.randomTick((tick) => {
global.handleSkullCavernRegen(tick.level, tick.block);
})
.defaultState((state) => {
state.set(integerProperty.create("type", 0, 4), 0);
state.set(integerProperty.create("chunkbit", 0, 1), 0);
})
.placementState((state) => {
state.set(integerProperty.create("type", 0, 4), 0);
state.set(integerProperty.create("chunkbit", 0, 1), 0);
});
e.create("society:iridium_ore")
.soundType("stone")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_diamond_tool")
.model("society:block/kubejs/iridium_ore");
e.create("society:deepslate_iridium_ore")
.soundType("stone")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_diamond_tool")
.model("society:block/kubejs/deepslate_iridium_ore");
e.create("society:sparkstone_ore")
.soundType("stone")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_diamond_tool")
.model("society:block/kubejs/sparkstone_ore");
e.create("society:deepslate_sparkstone_ore")
.soundType("stone")
.hardness(2.5)
.resistance(1.0)
.requiresTool(true)
.tagBlock("minecraft:mineable/pickaxe")
.tagBlock("minecraft:needs_diamond_tool")
.model("society:block/kubejs/deepslate_sparkstone_ore");
e.create(`society:sparkstone_block`)
.soundType("amethyst")
.hardness(2)
.resistance(1.0)
.tagBlock("minecraft:mineable/pickaxe")
.textureAll("society:block/sparkstone_block");
e.create(`society:prismatic_shard_block`)
.soundType("amethyst")
.hardness(2)
.resistance(1.0)
.tagBlock("minecraft:mineable/pickaxe")
.textureAll("society:block/prismatic_shard_block");
// Compressed Crops block
e.create("society:animal_feed_sack", "cardinal")
.model("society:block/kubejs/animal_feed_sack")
.mapColor("dirt")
.soundType("sand")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false);
e.create("herbalbrews:coffee_beans_sack")
.texture("up", "quark:block/cocoa_beans_sack_top")
.texture("down", "quark:block/cocoa_beans_sack_bottom")
.texture("north", "quark:block/cocoa_beans_sack")
.texture("east", "quark:block/cocoa_beans_sack")
.texture("south", "quark:block/cocoa_beans_sack")
.texture("west", "quark:block/cocoa_beans_sack")
.mapColor("dirt")
.soundType("sand")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.texture("particle", "quark:block/cocoa_beans_sack");
e.create("herbalbrews:yerba_mate_leaf_block")
.textureAll("herbalbrews:block/green_tea_leaf2")
.mapColor("grass")
.soundType("azalea_leaves")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.texture("particle", "herbalbrews:block/green_tea_leaf2");
e.create("herbalbrews:rooibos_leaf_block")
.textureAll("herbalbrews:block/green_tea_leaf2")
.mapColor("grass")
.soundType("azalea_leaves")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.texture("particle", "herbalbrews:block/green_tea_leaf2");
const createCrate = (type) => {
e.create(`society:${type}_crate`)
.texture("up", `society:block/${type}_crate_top`)
.texture("down", "farmersdelight:block/crate_bottom")
.texture("north", `society:block/${type}_crate_side`)
.texture("east", `society:block/${type}_crate_side`)
.texture("south", `society:block/${type}_crate_side`)
.texture("west", `society:block/${type}_crate_side`)
.texture("particle", `society:block/${type}_crate_top`)
.mapColor("grass")
.soundType("wood")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false);
};
const crates = [
"blueberry",
"eggplant",
"ancient_fruit",
"sparkpod",
"salmonberry",
"boysenberry",
"cranberry",
"crystalberry",
"mana_fruit",
];
crates.forEach((crate) => {
createCrate(crate);
});
e.create("society:tubabacco_leaf_block")
.textureAll("herbalbrews:block/green_tea_leaf1")
.mapColor("grass")
.soundType("azalea_leaves")
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.texture("particle", "herbalbrews:block/green_tea_leaf1");
// Decor
e
.create("society:sturdy_bamboo_block")
.tag("minecraft:logs")
.property(BlockProperties.AXIS)
.placementState((e) => e.set(BlockProperties.AXIS, e.clickedFace.axis))
.displayName("Sturdy Block of Bamboo")
.soundType("wood")
.hardness(1.0)
.resistance(1.0)
.item((item) => {
item.modelJson({
parent: "society:block/kubejs/sturdy_bamboo_block",
});
})
.requiresTool(true)
.tagBlock("minecraft:mineable/axe").blockstateJson = {
variants: {
"axis=x": {
model: "society:block/kubejs/sturdy_bamboo_block_horizontal",
x: 90,
y: 90,
},
"axis=y": {
model: "society:block/kubejs/sturdy_bamboo_block",
},
"axis=z": {
model: "society:block/kubejs/sturdy_bamboo_block_horizontal",
x: 90,
},
},
};
// Drinks
e.create("society:espresso")
.box(6, 0, 6, 10, 4, 10)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/espresso_cup_block")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/espresso",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("minecraft:speed", 2400, 1, 1.0);
});
item.useAnimation("drink");
});
e.create("society:steamed_milk")
.box(5, 0, 5, 11, 7, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/steamed_milk")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/steamed_milk",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.hunger(2);
food.saturation(4);
});
item.useAnimation("drink");
});
e.create("society:mocha")
.box(5, 0, 5, 11, 7, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/mocha")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/mocha",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("minecraft:speed", 1200, 1, 1.0);
});
item.useAnimation("drink");
});
e.create("society:latte")
.box(5, 0, 5, 11, 7, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/latte")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/latte",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("minecraft:speed", 1200, 1, 1.0);
});
item.useAnimation("drink");
});
e.create("society:dirty_chai")
.box(5, 0, 5, 11, 7, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/dirty_chai")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/dirty_chai",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("minecraft:speed", 2400, 1, 1.0);
food.effect("herbalbrews:tough", 2400, 1, 1.0);
});
item.useAnimation("drink");
});
e.create("society:bowl_of_soul")
.box(5, 0, 5, 11, 3, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/bowl_of_soul")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/bowl_of_soul",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("herbalbrews:fortune", 3600, 1, 1.0);
});
item.useAnimation("drink");
});
e.create("society:truffle_tea")
.box(5, 0, 5, 11, 3, 11)
.defaultCutout()
.soundType("glass")
.hardness(1.0)
.requiresTool(false)
.model("society:block/kubejs/drinks/truffle_tea")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/truffle_tea",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("legendarycreatures:convulsion", 1600, 1, 1.0);
});
item.tooltip(
Text.translatable("block.society.truffle_tea.description").darkPurple()
);
item.useAnimation("drink");
});
e.create("society:beer_london", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.model("society:block/kubejs/drinks/beer_london")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/beer_london",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.fastToEat(true);
food.effect("vinery:jellie", 1200, 1, 1.0);
});
item.useAnimation("drink");
})
.displayName("London Beer");
e.create("society:beer_attunecore", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.model("society:block/kubejs/drinks/beer_attunecore")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/beer_attunecore",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.fastToEat(true);
food.effect("vinery:jellie", 200, 1, 1.0);
});
item.useAnimation("drink");
})
.displayName("Attunecore Beer");
e.create("society:ancient_cider", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.soundType("glass")
.defaultCutout()
.model("society:block/kubejs/drinks/ancient_cider")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/ancient_cider",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("nethervinery:netherite", 400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:ancient_vespertine", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.soundType("glass")
.defaultCutout()
.model("society:block/kubejs/drinks/ancient_vespertine")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/ancient_vespertine",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("vinery:luck_effect", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:dewy_star", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/dewy_star")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/dewy_star",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("brewery:haley", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:starcardi", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/starcardi")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/starcardi",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("brewery:haley", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:star_coquito", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/star_coquito")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/star_coquito",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("brewery:haley", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:violet_moon", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/dewy_star")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/violet_moon",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("brewery:lightning_strike", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:sparkling_le_roy", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.soundType("glass")
.defaultCutout()
.model("society:block/kubejs/drinks/ancient_vespertine")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/sparkling_le_roy",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("windswept:frost_resistance", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:laputa_franc", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.soundType("glass")
.defaultCutout()
.model("society:block/kubejs/drinks/ancient_vespertine")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/laputa_franc",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("botania:soul_cross", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:mana_king", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.soundType("glass")
.defaultCutout()
.model("society:block/kubejs/drinks/ancient_vespertine")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/mana_king",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("botania:clear", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:forks_of_blue", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/forks_of_blue")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/forks_of_blue",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("autumnity:extension", 1200, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:good_catawba", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/good_catawba")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/good_catawba",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("herbalbrews:tough", 2400, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:nutty_basil", "cardinal")
.box(2, 0, 2, 14, 14, 14)
.defaultCutout()
.soundType("glass")
.model("society:block/kubejs/drinks/nutty_basil")
.item((item) => {
item.modelJson({
parent: "minecraft:item/generated",
textures: {
layer0: "society:item/drinks/nutty_basil",
},
});
item.food((food) => {
food.alwaysEdible(true);
food.effect("atmospheric:spitting", 1000, 1, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
e.create("society:supreme_mayonnaise", "cardinal")
.model("society:block/kubejs/supreme_mayonnaise")
.soundType("stone")
.defaultCutout()
.hardness(1.0)
.resistance(1.0)
.requiresTool(false)
.item((item) => {
item.tooltip(
Text.translatable("block.society.supreme_mayonnaise.description").red()
);
item.tooltip(
Text.translatable(
"block.society.supreme_mayonnaise.description.obtain"
).gray()
);
item.food((food) => {
food.alwaysEdible(true);
food.effect("vinery:creeper_effect", 120, 4, 1.0);
food.fastToEat(true);
});
item.useAnimation("drink");
});
// Catalogs
e.create("society:tanuki_catalog", "cardinal")
.box(2, 0, 3, 14, 1.025, 13)
.defaultCutout()
.resistance(1.0)
.requiresTool(false)
.model("society:block/kubejs/tanuki_catalog")
.displayName("♤ §aTanuki Catalog");
e.create("society:modern_catalog", "cardinal")
.box(2, 0, 3, 14, 1.025, 13)
.defaultCutout()
.resistance(1.0)
.requiresTool(false)
.model("society:block/kubejs/modern_catalog")
.displayName("♧ Modern Catalog");
e.create("society:fantasy_catalog", "cardinal")
.box(2, 0, 3, 14, 1.025, 13)
.defaultCutout()
.resistance(1.0)
.requiresTool(false)
.model("society:block/kubejs/fantasy_catalog")
.displayName("♡ §eFantasy Catalog");
e.create("moreminecarts:greenhouse_glass_stairs", "stairs")
.soundType("glass")
.resistance(0.8)
.renderType("translucent")
.textureAll("moreminecarts:block/chiseled_organic_glass");
e.create("moreminecarts:greenhouse_glass_slab", "slab")
.soundType("glass")
.resistance(0.8)
.renderType("translucent")
.textureAll("moreminecarts:block/chiseled_organic_glass");
});
@@ -0,0 +1,836 @@
global.updateBerryBush = (level, block) => {
let type = 0;
switch (global.getSeasonFromLevel(level)) {
case "spring":
type = 1;
break;
case "summer":
type = 2;
break;
case "autumn":
type = 3;
break;
default:
case "winter":
type = 4;
}
block.set(block.id, {
type: String(type),
});
};
StartupEvents.registry("block", (e) => {
// TODO: 4.0
// e.create("society:berry_bush_crop", "crop")
// .age(3, (builder) => {
// builder
// .shape(0, 0, 0, 0, 16, 4, 16)
// .shape(1, 0, 0, 0, 16, 13, 16)
// .shape(2, 0, 0, 0, 16, 16, 16)
// .shape(3, 0, 0, 0, 16, 16, 16);
// })
// .survive((state, level, pos) => global.surviveCheck(level, pos))
// .dropSeed(false)
// .tagBlock("minecraft:mineable/hoe")
// .tagBlock("minecraft:crops")
// .property(integerProperty.create("type", 0, 4))
// .defaultState((state) => {
// state.set(integerProperty.create("type", 0, 4), 0);
// })
// .placementState((state) => {
// state.set(integerProperty.create("type", 0, 4), 0);
// })
// .item((seedItem) => {
// seedItem.texture("society:item/berry_bush_seed");
// }).blockstateJson = {
// multipart: [
// {
// when: { age: 0 },
// apply: { model: "society:block/kubejs/berry_bush/start" },
// },
// {
// when: { age: 1 },
// apply: { model: "society:block/kubejs/berry_bush/middle" },
// },
// {
// when: { age: 2 },
// apply: { model: "society:block/kubejs/berry_bush/base" },
// },
// {
// when: { age: 3 },
// apply: { model: "society:block/kubejs/berry_bush/base" },
// },
// ],
// };
e
.create("society:ancient_fruit", "crop")
.age(10, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 3, 16)
.shape(1, 0, 0, 0, 16, 4, 16)
.shape(2, 0, 0, 0, 16, 4, 16)
.shape(3, 0, 0, 0, 16, 8, 16)
.shape(4, 0, 0, 0, 16, 8, 16)
.shape(5, 0, 0, 0, 16, 16, 16)
.shape(6, 0, 0, 0, 16, 16, 16)
.shape(7, 0, 0, 0, 16, 16, 16)
.shape(8, 0, 0, 0, 16, 16, 16)
.shape(9, 0, 0, 0, 16, 16, 16)
.shape(10, 0, 0, 0, 16, 24, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:ancient_fruit", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/ancient_seed");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage1" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage1" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage2" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage2" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage2" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage3" },
},
{
when: { age: 7 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage3" },
},
{
when: { age: 8 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage4" },
},
{
when: { age: 9 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage4" },
},
{
when: { age: 10 },
apply: { model: "society:block/kubejs/crops/ancient_fruit_crop_stage5" },
},
],
};
e
.create("society:tubabacco_leaf", "crop")
.age(9, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 4, 16)
.shape(2, 0, 0, 0, 16, 5, 16)
.shape(3, 0, 0, 0, 16, 5, 16)
.shape(4, 0, 0, 0, 16, 10, 16)
.shape(5, 0, 0, 0, 16, 10, 16)
.shape(6, 0, 0, 0, 16, 10, 16)
.shape(7, 0, 0, 0, 16, 10, 16)
.shape(8, 0, 0, 0, 16, 16, 16)
.shape(9, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:tubabacco_leaf", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/tubabacco_seed");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage0" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage0" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage1" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage1" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage2" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage2" },
},
{
when: { age: 7 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage3" },
},
{
when: { age: 8 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage3" },
},
{
when: { age: 9 },
apply: { model: "society:block/kubejs/crops/tubabacco_plant_stage4" },
},
],
};
e
.create("farm_and_charm:strawberry", "crop")
.age(5, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 2, 16)
.shape(1, 0, 0, 0, 16, 4, 16)
.shape(2, 0, 0, 0, 16, 6, 16)
.shape(3, 0, 0, 0, 16, 8, 16)
.shape(4, 0, 0, 0, 16, 10, 16)
.shape(5, 0, 0, 0, 16, 12, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("farm_and_charm:strawberry", 2)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("farm_and_charm:item/strawberry_seeds");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "farm_and_charm:block/strawberries_stage0" },
},
{
when: { age: 1 },
apply: { model: "farm_and_charm:block/strawberries_stage1" },
},
{
when: { age: 2 },
apply: { model: "farm_and_charm:block/strawberries_stage2" },
},
{
when: { age: 3 },
apply: { model: "farm_and_charm:block/strawberries_stage3" },
},
{
when: { age: 4 },
apply: { model: "farm_and_charm:block/strawberries_stage4" },
},
{
when: { age: 5 },
apply: { model: "farm_and_charm:block/strawberries_stage5" },
},
],
};
e
.create("brewery:hop_trellis", "crop")
.age(6, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 16, 16)
.shape(1, 0, 0, 0, 16, 16, 16)
.shape(2, 0, 0, 0, 16, 16, 16)
.shape(3, 0, 0, 0, 16, 16, 16)
.shape(4, 0, 0, 0, 16, 16, 16)
.shape(5, 0, 0, 0, 16, 16, 16)
.shape(6, 0, 0, 0, 16, 22, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("brewery:hops", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("brewery:item/hops_seeds");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage1" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage1" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage2" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage2" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage3" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/hops_crop_stage4" },
},
],
};
e
.create("society:blueberry", "crop")
.age(7, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 6, 16)
.shape(3, 0, 0, 0, 16, 12, 16)
.shape(4, 0, 0, 0, 16, 12, 16)
.shape(5, 0, 0, 0, 16, 16, 16)
.shape(6, 0, 0, 0, 16, 16, 16)
.shape(7, 0, 0, 0, 16, 20, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:blueberry", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/blueberry_seeds");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage1" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage1" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage2" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage2" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage3" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage4" },
},
{
when: { age: 7 },
apply: { model: "society:block/kubejs/crops/blueberry_crop_stage5" },
},
],
};
e
.create("society:cranberry", "crop")
.age(5, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 6, 16)
.shape(3, 0, 0, 0, 16, 12, 16)
.shape(4, 0, 0, 0, 16, 12, 16)
.shape(5, 0, 0, 0, 16, 16, 16)
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:cranberry", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/cranberry_seeds");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage1" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage2" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage3" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage4" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/cranberry_crop_stage5" },
},
],
};
e
.create("society:eggplant", "crop")
.age(6, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 7, 16)
.shape(4, 0, 0, 0, 16, 13, 16)
.shape(5, 0, 0, 0, 16, 13, 16)
.shape(6, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:eggplant", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/eggplant_seeds");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage1" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage1" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage2" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage2" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage3" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/eggplant_crop_stage4" },
},
],
};
e
.create("society:carrot", "crop")
.age(7, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 7, 16)
.shape(4, 0, 0, 0, 16, 13, 16)
.shape(5, 0, 0, 0, 16, 13, 16)
.shape(6, 0, 0, 0, 16, 16, 16)
.shape(7, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("minecraft:carrot", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/carrot_seed");
}).blockstateJson = {
variants: {
"age=0": {
model: "minecraft:block/carrots_stage0",
},
"age=1": {
model: "minecraft:block/carrots_stage0",
},
"age=2": {
model: "minecraft:block/carrots_stage1",
},
"age=3": {
model: "minecraft:block/carrots_stage1",
},
"age=4": {
model: "minecraft:block/carrots_stage2",
},
"age=5": {
model: "minecraft:block/carrots_stage2",
},
"age=6": {
model: "minecraft:block/carrots_stage2",
},
"age=7": {
model: "minecraft:block/carrots_stage3",
},
},
};
e
.create("society:potato", "crop")
.age(7, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 7, 16)
.shape(4, 0, 0, 0, 16, 13, 16)
.shape(5, 0, 0, 0, 16, 13, 16)
.shape(6, 0, 0, 0, 16, 16, 16)
.shape(7, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("minecraft:potato", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/potato_seed");
}).blockstateJson = {
variants: {
"age=0": {
model: "minecraft:block/potatoes_stage0",
},
"age=1": {
model: "minecraft:block/potatoes_stage0",
},
"age=2": {
model: "minecraft:block/potatoes_stage1",
},
"age=3": {
model: "minecraft:block/potatoes_stage1",
},
"age=4": {
model: "minecraft:block/potatoes_stage2",
},
"age=5": {
model: "minecraft:block/potatoes_stage2",
},
"age=6": {
model: "minecraft:block/potatoes_stage2",
},
"age=7": {
model: "minecraft:block/potatoes_stage3",
},
},
};
e
.create("society:onion", "crop")
.age(4, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 13, 16)
.shape(4, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("farm_and_charm:onion", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/onion_seed");
}).blockstateJson = {
variants: {
"age=0": [
{
model: "farm_and_charm:block/onion_stage0",
weight: 1,
},
],
"age=1": [
{
model: "farm_and_charm:block/onion_stage1",
weight: 1,
},
],
"age=2": [
{
model: "farm_and_charm:block/onion_stage2",
weight: 1,
},
],
"age=3": [
{
model: "farm_and_charm:block/onion_stage3",
weight: 1,
},
],
"age=4": [
{
model: "farm_and_charm:block/onion_stage4_1",
weight: 1,
},
{
model: "farm_and_charm:block/onion_stage4_2",
weight: 1,
},
{
model: "farm_and_charm:block/onion_stage4_3",
weight: 1,
},
],
},
};
e
.create("society:sweet_potato", "crop")
.age(5, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 3, 16)
.shape(4, 0, 0, 0, 16, 13, 16)
.shape(5, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("veggiesdelight:sweet_potato", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/sweet_potato_seed");
}).blockstateJson = {
variants: {
"age=0": {
model: "veggiesdelight:block/sweet_potato_stage0",
},
"age=1": {
model: "veggiesdelight:block/sweet_potato_stage1",
},
"age=2": {
model: "veggiesdelight:block/sweet_potato_stage2",
},
"age=3": {
model: "veggiesdelight:block/sweet_potato_stage3",
},
"age=4": {
model: "veggiesdelight:block/sweet_potato_stage3",
},
"age=5": {
model: "veggiesdelight:block/sweet_potato_stage4",
},
},
};
e
.create("society:peanut", "crop")
.age(7, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 4, 16)
.shape(1, 0, 0, 0, 16, 6, 16)
.shape(2, 0, 0, 0, 16, 7, 16)
.shape(3, 0, 0, 0, 16, 7, 16)
.shape(4, 0, 0, 0, 16, 13, 16)
.shape(5, 0, 0, 0, 16, 13, 16)
.shape(6, 0, 0, 0, 16, 16, 16)
.shape(7, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("vintagedelight:peanut", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/peanut_seed");
}).blockstateJson = {
variants: {
"age=0": {
model: "vintagedelight:block/peanuts_stage0",
},
"age=1": {
model: "vintagedelight:block/peanuts_stage0",
},
"age=2": {
model: "vintagedelight:block/peanuts_stage1",
},
"age=3": {
model: "vintagedelight:block/peanuts_stage1",
},
"age=4": {
model: "vintagedelight:block/peanuts_stage2",
},
"age=5": {
model: "vintagedelight:block/peanuts_stage3",
},
"age=6": {
model: "vintagedelight:block/peanuts_stage3",
},
"age=7": {
model: "vintagedelight:block/peanuts_stage4",
},
},
};
e
.create("society:berry_bush")
.defaultCutout()
.hardness(0)
.resistance(0)
.mapColor("grass")
.noCollision()
.soundType("azalea_leaves")
.property(integerProperty.create("type", 0, 4))
.defaultCutout()
.item((item) => {
item.modelJson({
parent: "society:block/kubejs/berry_bush/base",
});
})
.defaultState((state) => {
state.set(integerProperty.create("type", 0, 4), 0);
})
.placementState((state) => {
state.set(integerProperty.create("type", 0, 4), 0);
})
.rightClick((click) => {
const { block, level, hand } = click;
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
global.updateBerryBush(level, block);
}
})
.randomTick((tick) => {
const { block, level } = tick;
global.updateBerryBush(level, block);
}).blockstateJson = {
multipart: [
{
when: { type: "0" },
apply: { model: "society:block/kubejs/berry_bush/base" },
},
{
when: { type: "1" },
apply: { model: "society:block/kubejs/berry_bush/salmonberry" },
},
{
when: { type: "2" },
apply: { model: "society:block/kubejs/berry_bush/boysenberry" },
},
{
when: { type: "3" },
apply: { model: "society:block/kubejs/berry_bush/cranberry" },
},
{
when: { type: "4" },
apply: { model: "society:block/kubejs/berry_bush/crystalberry" },
},
],
};
e
.create("society:sparkpod", "crop")
.age(8, (builder) => {
builder
.shape(0, 0, 0, 0, 16, 3, 16)
.shape(1, 0, 0, 0, 16, 3, 16)
.shape(2, 0, 0, 0, 16, 5, 16)
.shape(3, 0, 0, 0, 16, 5, 16)
.shape(4, 0, 0, 0, 16, 8, 16)
.shape(5, 0, 0, 0, 16, 8, 16)
.shape(6, 0, 0, 0, 16, 11, 16)
.shape(7, 0, 0, 0, 16, 11, 16)
.shape(8, 0, 0, 0, 16, 16, 16);
})
.survive((state, level, pos) => global.surviveCheck(level, pos))
.dropSeed(false)
.crop("society:sparkpod", 1)
.tagBlock("minecraft:mineable/hoe")
.tagBlock("minecraft:crops")
.randomTick((tick) => {})
.item((seedItem) => {
seedItem.texture("society:item/sparkpod_spores");
}).blockstateJson = {
multipart: [
{
when: { age: 0 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage0" },
},
{
when: { age: 1 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage0" },
},
{
when: { age: 2 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage1" },
},
{
when: { age: 3 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage1" },
},
{
when: { age: 4 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage2" },
},
{
when: { age: 5 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage2" },
},
{
when: { age: 6 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage3" },
},
{
when: { age: 7 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage3" },
},
{
when: { age: 8 },
apply: { model: "society:block/kubejs/crops/sparkpod_crop_stage4" },
},
],
};
});
@@ -0,0 +1,34 @@
// global.carpetTick = (entity) => {
// let nearbyEntities = entity.level
// .getEntitiesWithin(entity.getBoundingBox().inflate(3))
// .filter((entity) => entity.isPlayer());
// if (nearbyEntities.length > 0) {
// let player = nearbyEntities[0];
// if (player.isCrouching()) {
// entity.setRemoved("unloaded_to_chunk");
// Utils.getServer().runCommandSilent(
// `playsound minecraft:block.wool.break block @a ${player.x} ${player.y} ${player.z}`
// );
// player.give(Item.of("whimsy_deco:paw_carpet"));
// }
// }
// };
// StartupEvents.registry("entity_type", (e) => {
// e.create("whimsy_deco:paw_carpet_entity", "entityjs:mob")
// .isPushable(false)
// .onHurt((context) => {
// context.entity.setRemoved("unloaded_to_chunk");
// })
// .translationKey("entity.whimsy_deco.paw_carpet")
// .sized(0.1, 0.1)
// .isPushable(false)
// .canBeCollidedWith((entity) => false)
// .canCollideWith((entity) => false)
// .setDeathSound("minecraft:block.wool.break")
// .isImmobile((entity) => true)
// .tick((entity) => {
// if (entity.age % 80 != 0) return;
// global.carpetTick(entity);
// });
// });
@@ -0,0 +1,112 @@
console.info("[SOCIETY] registerFluids.js loaded");
StartupEvents.registry("fluid", (e) => {
e.create("society:oak_resin")
.thickTexture(0xfffefc)
.bucketColor(0xfffefc)
.displayName("Oak Resin")
.tag("society:oak_resin");
e.create("society:pine_tar")
.thickTexture(0x6e4117)
.bucketColor(0x6e4117)
.displayName("Pine Tar")
.tag("society:pine_tar");
e.create("society:maple_syrup")
.thickTexture(0x8a3727)
.bucketColor(0x8a3727)
.displayName("Maple Syrup")
.tag("society:maple_syrup");
e.create("society:mystic_syrup")
.thickTexture(0xcf8cf6)
.bucketColor(0xcf8cf6)
.displayName("Mystic Syrup")
.tag("society:mystic_syrup");
e.create("society:vinegar")
.thickTexture(0x680000)
.bucketColor(0x680000)
.displayName("Vinegar")
.tag("society:vinegar");
e.create("society:alchemical_varnish")
.thickTexture(0xa2b7bd)
.bucketColor(0xa2b7bd)
.displayName("Alchemical Varnish")
.tag("society:alchemical_varnish");
e.create("society:mystic_jelly")
.thickTexture(0x9cd8e0)
.bucketColor(0x9cd8e0)
.displayName("Mystic Jelly")
.tag("society:mystic_jelly");
e.create("society:milk")
.thinTexture(0xffffff)
.bucketColor(0xffffff)
.displayName("Milk")
.tag("forge:milk");
//Vinery
e.create("vinery:apple_juice")
.thinTexture(0xfff1a3)
.bucketColor(0xfff1a3)
.displayName("Apple Juice")
.tag("vinery:apple_juice");
e.create("vinery:white_grape_juice")
.thinTexture(0xbdd9b2)
.bucketColor(0xbdd9b2)
.displayName("White Grape Juice")
.tag("vinery:white_grape_juice");
e.create("vinery:red_grape_juice")
.thinTexture(0x6c3c74)
.bucketColor(0x6c3c74)
.displayName("Red Grape Juice")
.tag("vinery:red_grape_juice");
e.create("nethervinery:crimson_grape_juice")
.thinTexture(0xf10959)
.bucketColor(0xf10959)
.displayName("Crimson Grape Juice")
.tag("nethervinery:crimson_grape_juice");
e.create("nethervinery:warped_grape_juice")
.thinTexture(0x2cbcba)
.bucketColor(0x2cbcba)
.displayName("Warped Grape Juice")
.tag("nethervinery:warped_grape_juice");
e.create("society:ancient_fruit_juice")
.thinTexture(0x5be3e4)
.bucketColor(0x5be3e4)
.displayName("Ancient Fruit Juice")
.tag("society:ancient_fruit_juice");
e.create("society:starfruit_juice")
.thinTexture(0xffa31c)
.bucketColor(0xffa31c)
.displayName("Starfruit Juice")
.tag("society:starfruit_juice");
e.create("society:sparkpod_juice")
.thinTexture(0xdf31f2)
.bucketColor(0xdf31f2)
.displayName("Sparkpod Juice")
.tag("society:sparkpod_juice");
e.create("society:mana_fruit_juice")
.thinTexture(0x00dedf)
.bucketColor(0x00dedf)
.displayName("Mana Fruit Juice")
.tag("society:mana_fruit_juice");
e.create("relics:relic_experience")
.thickTexture(0xf7b23f)
.bucketColor(0xf7b23f)
.displayName("Relic Experience")
.tag("relics:relic_experience");
});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,60 @@
let $BlockEntity = Java.loadClass(
"net.minecraft.world.level.block.entity.BlockEntity"
);
const registerKey = (blockEntity, tag, key) => {
if (blockEntity.data != null) {
if (blockEntity.data[key] != null && !Number.isNaN(blockEntity.data[key])) {
if (typeof blockEntity.data[key] == Number) {
tag.putInt(key, blockEntity.data[key]);
} else {
tag.putString(key, blockEntity.data[key]);
}
}
}
};
JadeEvents.onCommonRegistration((e) => {
const artisanMachineNbtKeys = ["stage", "recipe"];
e.blockDataProvider("society:artisan_machine_jade", $BlockEntity).setCallback(
(tag, accessor) => {
const { blockEntity } = accessor;
artisanMachineNbtKeys.forEach((key) => {
registerKey(blockEntity, tag, key);
});
}
);
const plushieNbtKeys = ["type", "quality", "affection"];
e.blockDataProvider("society:plushie_jade", $BlockEntity).setCallback(
(tag, accessor) => {
const { blockEntity } = accessor;
plushieNbtKeys.forEach((key) => {
registerKey(blockEntity, tag, key);
});
if (blockEntity.data != null && blockEntity.data.animal != null) {
tag.putString("animal", blockEntity.data.animal.type);
}
}
);
const fishPondNbtKeys = ["type", "population", "max_population"];
e.blockDataProvider("society:fish_pond_jade", $BlockEntity).setCallback(
(tag, accessor) => {
const { blockEntity } = accessor;
fishPondNbtKeys.forEach((key) => {
registerKey(blockEntity, tag, key);
});
}
);
e.blockDataProvider("kubejs:shipping_bin_jade", $BlockEntity).setCallback(
(tag, accessor) => {
const { blockEntity } = accessor;
if (blockEntity.data != null && blockEntity.data.customName != null) {
tag.putString("customName", blockEntity.data.customName.toString());
}
}
);
});
@@ -0,0 +1,3 @@
StartupEvents.registry('sound_event', e => {
e.create("society:blazing_drift_fever_ex")
});
@@ -0,0 +1,56 @@
StartupEvents.registry("block", (e) => {
let baseboardTypes = [
"minecraft:birch_planks",
"minecraft:dark_oak_planks",
"minecraft:jungle_planks",
"minecraft:oak_planks",
"minecraft:spruce_planks",
];
["bee", "hive", "bunny", "cloud", "pink_flower"].forEach((wallpaperType) => {
e.create(`society:${wallpaperType}_wallpaper`)
.model(`society:block/kubejs/wallpaper/${wallpaperType}_wallpaper`)
.soundType("wool")
.hardness(1.0)
.resistance(1.0)
.tagBlock("minecraft:mineable/axe")
.requiresTool(true);
if (wallpaperType !== "bee") {
e.create(`society:${wallpaperType}_baseboard`)
.model(`society:block/kubejs/wallpaper/${wallpaperType}_baseboard`)
.item((item) => {
item.tooltip(Text.translatable("society.wallpaper.description").gray());
item.tooltip(Text.translatable("society.wallpaper.description.tip").green());
})
.soundType("wood")
.hardness(1.0)
.resistance(1.0)
.tagBlock("minecraft:mineable/axe")
.requiresTool(true)
.property(integerProperty.create("type", 0, baseboardTypes.length))
.defaultState((state) => {
state.set(integerProperty.create("type", 0, baseboardTypes.length), 0);
})
.placementState((state) => {
state.set(integerProperty.create("type", 0, baseboardTypes.length), 0);
})
.rightClick((click) => {
const { block, item, hand, player, server } = click;
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
if (baseboardTypes.includes(item.id)) {
server.runCommandSilent(
`playsound minecraft:block.wood.place block @a ${block.x} ${block.y} ${block.z}`
);
block.set(block.id, {
type: String(baseboardTypes.indexOf(item.id) + 1),
});
} else if (player.isCrouching()) {
block.set(block.id, {
type: "0",
});
}
}
});
}
});
});
@@ -0,0 +1,76 @@
console.info("[SOCIETY] registerWeapons.js loaded");
ItemEvents.toolTierRegistry((e) => {
e.add("prismatic", (tier) => {
tier.uses = 1000;
tier.speed = 8;
tier.attackDamageBonus = 2.0;
tier.level = 2;
tier.enchantmentValue = 14;
tier.repairIngredient = "society:prismatic_shard";
});
});
StartupEvents.registry("item", (e) => {
e.create("society:galaxy_sword", "sword")
.texture("society:item/galaxy_sword")
.rarity("epic")
.tier("prismatic")
.displayName("<ltcolor>c=AA0000;c=FFAA00;c=FF55FF;c=FFFF55;c=00AA00;c=00AAAA;c=AA00AA;c=FF55FF;w=10;p=2;Galaxy Sword</ltcolor>")
.tag("minecraft:swords")
.attackDamageBaseline(10.0)
.speed(3.0)
.modifyTier((tier) => {
tier.setRepairIngredient(
Ingredient.custom((item) => {
if (item.id == "society:prismatic_shard") return true;
return false;
})
);
});
e.create("society:dragontooth_axe", "axe")
.texture("society:item/dragontooth_axe")
.rarity("epic")
.tier("prismatic")
.attackDamageBaseline(12.0)
.speed(5.0)
.modifyTier((tier) => {
tier.setRepairIngredient(
Ingredient.custom((item) => {
if (item.id == "society:prismatic_shard") return true;
return false;
})
);
});
e.create("society:princess_hairbrush", "sword")
.texture("society:item/artifacts/princess_hairbrush")
.rarity("epic")
.tier("prismatic")
.tag("minecraft:swords")
.attackDamageBaseline(6.0)
.speed(3.0)
.modifyTier((tier) => {
tier.setRepairIngredient(
Ingredient.custom((item) => {
if (item.id == "society:prismatic_shard") return true;
return false;
})
);
});
e.create("society:meowmageddon", "sword")
.texture("society:item/meowmageddon")
.rarity("epic")
.tier("prismatic")
.displayName("<ltcolor>c=55FFFF;c=77DDCC;c=FF55FF;c=FFFFFF;Meowmageddon</ltcolor>")
.tag("minecraft:swords")
.attackDamageBaseline(11.0)
.speed(4.0)
.modifyTier((tier) => {
tier.setRepairIngredient(
Ingredient.custom((item) => {
if (item.id == "society:prismatic_shard") return true;
return false;
})
);
});
});
@@ -0,0 +1,166 @@
console.info("[WHIMSY_DECO] registerWhimsyBlocks.js loaded");
StartupEvents.registry("block", (e) => {
e.create("whimsy_deco:statue_endless_fortune", "animatable")
.box(1, 0, 1, 15, 18, 15, true)
.displayName("Statue of Endless Fortune")
.animatableBlockEntity((info) => {
info.addAnimation((state) =>
state.setAndContinue(RawAnimation.begin().thenLoop("rotating"))
);
info.serverTick(artMachineTickRate, 0, (entity) => {
const { level, block } = entity;
const { x, y, z } = block;
let dayTime = level.dayTime();
let morningModulo = dayTime % 24000;
if (
morningModulo >= artMachineProgTime &&
morningModulo < artMachineProgTime + artMachineTickRate
) {
level.server.runCommandSilent(
`playsound tanukidecor:block.cash_register.ring block @a ${x} ${y} ${z}`
);
block.set(block.id, {
facing: block.properties.get("facing"),
mature: true,
});
}
});
})
.defaultGeoModel()
.property(BlockProperties.HORIZONTAL_FACING)
.property(booleanProperty.create("mature"))
.placementState((state) => {
state
.set(
BlockProperties.HORIZONTAL_FACING,
String(state.getHorizontalDirection().getOpposite())
)
.set(booleanProperty.create("mature"), false);
})
.rightClick((click) => {
const { block, level, hand } = click;
const { x, y, z } = block;
const mature = String(block.properties.get("mature")) === "true";
const facing = block.properties.get("facing");
if (click.player.isFake()) return;
if (hand == "OFF_HAND") return;
if (hand == "MAIN_HAND") {
if (mature) {
const possibleDrops = [
"society:pristine_diamond",
"minecraft:netherite_ingot",
"society:omni_geode",
"oreganized:electrum_ingot",
];
block.popItemFromFace(
possibleDrops[Math.floor(Math.random() * possibleDrops.length)],
facing
);
level.server.runCommandSilent(
`playsound tanukidecor:block.cash_register.ring block @a ${x} ${y} ${z}`
);
block.set(block.id, {
facing: facing,
mature: false,
});
}
}
});
e.create("whimsy_deco:sunlit_singing_frog", "animatable")
.animatableBlockEntity((info) => {
info.addAnimation((state) =>
state.setAndContinue(RawAnimation.begin().thenLoop("sing"))
);
})
.box(1, 0, 1, 15, 18, 15, true)
.defaultGeoModel()
.property(BlockProperties.HORIZONTAL_FACING)
.property(integerProperty.create("type", 0, global.plushieTraits.length))
.placementState((state) => {
state
.set(
BlockProperties.HORIZONTAL_FACING,
String(state.getHorizontalDirection().getOpposite())
)
.set(integerProperty.create("type", 0, global.plushieTraits.length), 0);
})
.defaultState((state) => {
state.set(
integerProperty.create("type", 0, global.plushieTraits.length),
0
);
})
.rightClick((click) => {
const { block, server } = click;
const { x, y, z } = block;
let nbt = block.getEntityData();
block.set("whimsy_deco:adv_singing_frog_plushie", block.properties);
global.setBlockEntityData(block, nbt)
server.runCommandSilent(
`execute positioned ${x} ${y} ${z} run stopsound @e[type=player,distance=..4] block`
);
});
});
// StartupEvents.registry("item", (e) => {
// e.create("whimsy_deco:paw_carpet")
// .tooltip(Text.gray("Sneak while standing on it to remove"))
// .modelJson({
// texture_size: [128, 128],
// textures: {
// 0: "whimsy_deco:block/paw_carpet",
// particle: "whimsy_deco:block/paw_carpet",
// },
// elements: [
// {
// from: [-16, 0, 0],
// to: [32, 1, 32],
// faces: {
// north: { uv: [0, 0, 6, 0.125], texture: "#0" },
// east: { uv: [0.125, 0, 4.125, 0.125], texture: "#0" },
// south: { uv: [0, 0, 6, 0.125], texture: "#0" },
// west: { uv: [0.5, 0, 4.5, 0.125], texture: "#0" },
// up: { uv: [12, 8, 0, 0], texture: "#0" },
// down: { uv: [12, 0, 0, 8], texture: "#0" },
// },
// },
// ],
// display: {
// thirdperson_righthand: {
// rotation: [75, 45, 0],
// translation: [0, 2.5, 0],
// scale: [0.375, 0.375, 0.375],
// },
// thirdperson_lefthand: {
// rotation: [75, 45, 0],
// translation: [0, 2.5, 0],
// scale: [0.375, 0.375, 0.375],
// },
// firstperson_righthand: {
// rotation: [0, 45, 0],
// scale: [0.4, 0.4, 0.4],
// },
// firstperson_lefthand: {
// rotation: [0, -135, 0],
// scale: [0.4, 0.4, 0.4],
// },
// ground: {
// translation: [0, 3, 0],
// scale: [0.25, 0.25, 0.25],
// },
// gui: {
// rotation: [30, -135, 0],
// translation: [1.5, 0, 0],
// scale: [0.29, 0.29, 0.29],
// },
// fixed: {
// rotation: [-90, 0, 0],
// translation: [0, -2.75, -1.75],
// scale: [0.38, 0.38, 0.38],
// },
// },
// });
// });