feat(addons): hemp plant, wild cherry tree, naturalist-lite

New addons:
- hemp-addon: silverlabs:hemp_crop (5 ages, indoor sun-lamp grown vs
  outdoor sky-lit), shears harvest, cauldron tincture, brownie food,
  bonemeal, sun-lamp redstone-lit block (light_dampening: 0 so crops
  beneath stay lit), grass-seed bootstrap, wandering-trader buyback,
  pillager raid stealing.
- trees-features-addon: ods_orch wild cherry tree — log/leaves/planks/
  stripped/sapling/fruit blocks with seasonal fruit states, structure-
  spawn worldgen.
- naturalist-lite-addon: 13-mob subset of Naturalist (deer, fox, owl,
  skunk, snake, hedgehog, red panda, capybara, elephant, kangaroo,
  moose, tiger, firefly), trimmed for Switch joinability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 22:00:06 +01:00
parent b9e3380f6c
commit 7c8cd5b075
984 changed files with 192691 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
{
"format_version": "1.21.0",
"minecraft:block": {
"description": {
"identifier": "silverlabs:hemp_crop",
"menu_category": { "category": "nature" },
"states": {
"silverlabs:hemp_age": { "values": { "min": 0, "max": 5 } },
"silverlabs:hemp_top": { "values": [false, true] }
}
},
"components": {
"minecraft:destructible_by_mining": { "seconds_to_destroy": 0.1 },
"minecraft:destructible_by_explosion": { "explosion_resistance": 0.1 },
"minecraft:flammable": { "destroy_chance_modifier": 60, "catch_chance_modifier": 60 },
"minecraft:light_dampening": 0,
"minecraft:map_color": "#5d8a3c",
"minecraft:collision_box": false,
"minecraft:selection_box": { "origin": [-6, 0, -6], "size": [12, 14, 12] },
"minecraft:geometry": "minecraft:geometry.cross",
"minecraft:material_instances": {
"*": {
"texture": "hemp_crop_0",
"render_method": "alpha_test",
"ambient_occlusion": false,
"face_dimming": false
}
},
"minecraft:loot": "loot_tables/blocks/hemp_crop.json"
},
"permutations": [
{
"condition": "query.block_state('silverlabs:hemp_age') == 1",
"components": {
"minecraft:material_instances": {
"*": { "texture": "hemp_crop_1", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false }
}
}
},
{
"condition": "query.block_state('silverlabs:hemp_age') == 2",
"components": {
"minecraft:material_instances": {
"*": { "texture": "hemp_crop_2", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false }
}
}
},
{
"condition": "query.block_state('silverlabs:hemp_age') == 3",
"components": {
"minecraft:material_instances": {
"*": { "texture": "hemp_crop_3", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false }
}
}
},
{
"condition": "query.block_state('silverlabs:hemp_age') == 4",
"components": {
"minecraft:material_instances": {
"*": { "texture": "hemp_crop_4", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false }
}
}
},
{
"condition": "query.block_state('silverlabs:hemp_age') == 5",
"components": {
"minecraft:material_instances": {
"*": { "texture": "hemp_crop_5", "render_method": "alpha_test", "ambient_occlusion": false, "face_dimming": false }
}
}
}
]
}
}

View File

@@ -0,0 +1,50 @@
{
"format_version": "1.21.0",
"minecraft:block": {
"description": {
"identifier": "silverlabs:sun_lamp",
"menu_category": {
"category": "items"
},
"states": {
"silverlabs:powered": [
false,
true
]
}
},
"components": {
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 0.3
},
"minecraft:destructible_by_explosion": {
"explosion_resistance": 0.5
},
"minecraft:map_color": "#ffd24d",
"minecraft:light_emission": 0,
"minecraft:geometry": "minecraft:geometry.full_block",
"minecraft:material_instances": {
"*": {
"texture": "sun_lamp_off",
"render_method": "opaque"
}
}
},
"permutations": [
{
"condition": "query.block_state('silverlabs:powered') == true",
"components": {
"minecraft:light_emission": 15,
"minecraft:light_dampening": 0,
"minecraft:geometry": "minecraft:geometry.full_block",
"minecraft:material_instances": {
"*": {
"texture": "sun_lamp",
"render_method": "opaque"
}
}
}
}
]
}
}

View File

@@ -0,0 +1,25 @@
{
"format_version": "1.21.0",
"minecraft:item": {
"description": {
"identifier": "silverlabs:hemp_brownie",
"menu_category": {
"category": "nature"
}
},
"components": {
"minecraft:icon": "hemp_brownie",
"minecraft:max_stack_size": 16,
"minecraft:use_animation": "eat",
"minecraft:use_modifiers": {
"use_duration": 1.6,
"movement_modifier": 0.35
},
"minecraft:food": {
"nutrition": 4,
"saturation_modifier": 0.6,
"can_always_eat": false
}
}
}
}

View File

@@ -0,0 +1,15 @@
{
"format_version": "1.21.0",
"minecraft:item": {
"description": {
"identifier": "silverlabs:hemp_bud",
"menu_category": {
"category": "nature"
}
},
"components": {
"minecraft:icon": "hemp_bud",
"minecraft:max_stack_size": 64
}
}
}

View File

@@ -0,0 +1,29 @@
{
"format_version": "1.21.0",
"minecraft:item": {
"description": {
"identifier": "silverlabs:hemp_seeds",
"menu_category": {
"category": "nature",
"group": "itemGroup.name.seed"
}
},
"components": {
"minecraft:icon": "hemp_seeds",
"minecraft:max_stack_size": 64,
"minecraft:block_placer": {
"block": "silverlabs:hemp_crop",
"use_on": [
"minecraft:dirt",
"minecraft:grass_block",
"minecraft:farmland",
"minecraft:podzol",
"minecraft:coarse_dirt",
"minecraft:rooted_dirt",
"minecraft:moss_block",
"minecraft:flower_pot"
]
}
}
}
}

View File

@@ -0,0 +1,26 @@
{
"format_version": "1.21.0",
"minecraft:item": {
"description": {
"identifier": "silverlabs:hemp_tincture",
"menu_category": {
"category": "nature"
}
},
"components": {
"minecraft:icon": "hemp_tincture",
"minecraft:max_stack_size": 16,
"minecraft:use_animation": "drink",
"minecraft:use_modifiers": {
"use_duration": 1.5,
"movement_modifier": 0.35
},
"minecraft:food": {
"nutrition": 1,
"saturation_modifier": 0.1,
"can_always_eat": true,
"using_converts_to": "minecraft:glass_bottle"
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs:hemp_seeds",
"weight": 1,
"functions": [
{ "function": "set_count", "count": { "min": 0, "max": 1 } }
]
}
]
}
]
}

View File

@@ -0,0 +1,54 @@
{
"format_version": 2,
"header": {
"name": "Hemp Plant",
"description": "Plantable hemp crop with sheers harvesting, cauldron tincture, brownie food, sun-lamp block",
"uuid": "910fafaf-bcb0-4f1a-8a05-bd235a537c3b",
"version": [
1,
0,
0
],
"min_engine_version": [
1,
21,
0
]
},
"modules": [
{
"type": "data",
"uuid": "a10b077f-703b-46b6-b45e-71ee2044c07c",
"version": [
1,
0,
0
]
},
{
"type": "script",
"language": "javascript",
"uuid": "6e6ef947-60fc-49d2-97c1-b3cab6661ece",
"version": [
1,
0,
0
],
"entry": "scripts/main.js"
}
],
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.17.0"
},
{
"uuid": "8e5c46ac-3b16-4f51-89f7-673bd06600f4",
"version": [
1,
0,
5
]
}
]
}

View File

@@ -0,0 +1,24 @@
{
"format_version": "1.21.0",
"minecraft:recipe_shapeless": {
"description": {
"identifier": "silverlabs:hemp_brownie_recipe"
},
"tags": ["crafting_table"],
"unlock": [
{ "item": "silverlabs:hemp_bud" },
{ "item": "minecraft:cocoa_beans" }
],
"ingredients": [
{ "item": "silverlabs:hemp_bud" },
{ "item": "silverlabs:hemp_bud" },
{ "item": "minecraft:cocoa_beans" },
{ "item": "minecraft:wheat" },
{ "item": "minecraft:sugar" }
],
"result": {
"item": "silverlabs:hemp_brownie",
"count": 2
}
}
}

View File

@@ -0,0 +1,26 @@
{
"format_version": "1.21.0",
"minecraft:recipe_shaped": {
"description": {
"identifier": "silverlabs:sun_lamp_recipe"
},
"tags": ["crafting_table"],
"unlock": [
{ "item": "minecraft:glowstone" }
],
"pattern": [
"WIW",
"IGI",
"WIW"
],
"key": {
"W": { "item": "minecraft:yellow_wool" },
"I": { "item": "minecraft:iron_nugget" },
"G": { "item": "minecraft:glowstone" }
},
"result": {
"item": "silverlabs:sun_lamp",
"count": 1
}
}
}

View File

@@ -0,0 +1,686 @@
import { world, system, ItemStack, BlockPermutation } from "@minecraft/server";
const CROP = "silverlabs:hemp_crop";
const SUN_LAMP = "silverlabs:sun_lamp";
const SEEDS = "silverlabs:hemp_seeds";
const BUD = "silverlabs:hemp_bud";
const TINCTURE = "silverlabs:hemp_tincture";
const BROWNIE = "silverlabs:hemp_brownie";
const AGE = "silverlabs:hemp_age";
const TOP = "silverlabs:hemp_top";
const GROWTH_INTERVAL_TICKS = 100; // 5s between growth ticks
const RABBIT_INTERVAL_TICKS = 100; // 5s between rabbit checks
const SCAN_RADIUS = 5; // ±5 horizontal — dense scan, every block looked at
const SCAN_VERT = 2; // ±2 vertical
const SUN_LAMP_RANGE = 4; // blocks searched for a lamp around indoor crop
const GROWTH_CHANCE_OUTDOOR = 0.017; // per 5s tick — ~20 min for 0→4 (prime)
const GROWTH_CHANCE_INDOOR = 0.011; // per 5s tick — ~30 min for 0→4 (sun lamp required)
const OVERRIPE_CHANCE_MULT = 0.33; // age 4→5 transition is 3x slower so prime lingers
function rand(n) { return Math.floor(Math.random() * n); }
function chance(p) { return Math.random() < p; }
function clamp(v, lo, hi) { return Math.max(lo, Math.min(hi, v)); }
function getInv(player) {
return player.getComponent("minecraft:inventory")?.container ?? null;
}
function consumeOneOfType(player, typeId) {
const inv = getInv(player);
if (!inv) return false;
const sel = player.selectedSlotIndex;
const cur = inv.getItem(sel);
if (cur && cur.typeId === typeId) {
if (cur.amount > 1) { cur.amount -= 1; inv.setItem(sel, cur); }
else inv.setItem(sel, undefined);
return true;
}
for (let i = 0; i < inv.size; i++) {
const it = inv.getItem(i);
if (it && it.typeId === typeId) {
if (it.amount > 1) { it.amount -= 1; inv.setItem(i, it); }
else inv.setItem(i, undefined);
return true;
}
}
return false;
}
function giveItem(player, typeId, count = 1) {
const inv = getInv(player);
if (!inv) return false;
try {
inv.addItem(new ItemStack(typeId, count));
return true;
} catch (_) {
return false;
}
}
// Block ids that don't block sky access — the plant grows around these like
// a vanilla tree pushes through leaves. Anything else above stops growth.
function isSkyTransparent(typeId) {
if (!typeId) return true;
if (typeId === CROP) return true; // ignore our own top half
if (typeId === "minecraft:air") return true;
// Glass / panes / bars
if (typeId.includes("glass")) return true;
if (typeId === "minecraft:iron_bars") return true;
// Leaves and saplings (canopy-style obstructions)
if (typeId.includes("leaves")) return true;
if (typeId.includes("sapling")) return true;
// Other plants / vines / hanging stuff
if (typeId === "minecraft:vine" || typeId === "minecraft:weeping_vines"
|| typeId === "minecraft:twisting_vines") return true;
return false;
}
function isAirAbove(dim, loc) {
// Walk up from y+1; sky-transparent blocks don't count as obstructions.
for (let dy = 1; dy < 64; dy++) {
let b;
try { b = dim.getBlock({ x: loc.x, y: loc.y + dy, z: loc.z }); } catch (_) { return true; }
if (!b) return true;
if (b.isAir || b.isLiquid) continue;
if (isSkyTransparent(b.typeId)) continue;
return false;
}
return true;
}
function findSunLampNear(dim, loc) {
const r = SUN_LAMP_RANGE;
for (let dy = -1; dy <= r; dy++) {
for (let dx = -r; dx <= r; dx++) {
for (let dz = -r; dz <= r; dz++) {
let b;
try { b = dim.getBlock({ x: loc.x + dx, y: loc.y + dy, z: loc.z + dz }); } catch (_) { continue; }
if (b && b.typeId === SUN_LAMP) {
try {
if (b.permutation.getState("silverlabs:powered") === true) return true;
} catch (_) {}
}
}
}
}
return false;
}
function setAge(block, newAge, outdoor) {
try {
const perm = BlockPermutation.resolve(CROP, {
[AGE]: clamp(newAge, 0, 5),
[TOP]: false,
});
block.setPermutation(perm);
if (outdoor && newAge >= 3) {
// Place top half above for the visual "tall outdoor crop"
const above = block.dimension.getBlock({ x: block.location.x, y: block.location.y + 1, z: block.location.z });
if (above && above.isAir) {
try {
const topPerm = BlockPermutation.resolve(CROP, { [AGE]: clamp(newAge, 0, 5), [TOP]: true });
above.setPermutation(topPerm);
} catch (_) {}
}
}
} catch (_) {}
}
function clearTopAbove(block) {
const above = block.dimension.getBlock({ x: block.location.x, y: block.location.y + 1, z: block.location.z });
if (above && above.typeId === CROP) {
try { above.setType("minecraft:air"); } catch (_) {}
}
}
// --- Growth: dense scan of an 11×11×5 box around each player ---
// Every hemp_crop base in range gets a roll on every tick — no random sampling.
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
const dim = player.dimension;
const px = Math.floor(player.location.x);
const py = Math.floor(player.location.y);
const pz = Math.floor(player.location.z);
for (let dy = -SCAN_VERT; dy <= SCAN_VERT; dy++) {
for (let dx = -SCAN_RADIUS; dx <= SCAN_RADIUS; dx++) {
for (let dz = -SCAN_RADIUS; dz <= SCAN_RADIUS; dz++) {
let b;
try { b = dim.getBlock({ x: px + dx, y: py + dy, z: pz + dz }); } catch (_) { continue; }
if (!b || b.typeId !== CROP) continue;
if (b.permutation.getState(TOP) === true) continue; // only base ticks
const age = b.permutation.getState(AGE) ?? 0;
if (age >= 5) continue; // overripe stops
const outdoor = isAirAbove(dim, b.location);
let baseChance = 0;
if (outdoor) baseChance = GROWTH_CHANCE_OUTDOOR;
else if (findSunLampNear(dim, b.location)) baseChance = GROWTH_CHANCE_INDOOR;
else continue;
// Prime (age 4) lingers — slow the transition into overripe
const c = age === 4 ? baseChance * OVERRIPE_CHANCE_MULT : baseChance;
if (chance(c)) setAge(b, age + 1, outdoor);
}
}
}
}
}, GROWTH_INTERVAL_TICKS);
// --- Redstone power: scan known sources adjacent to a sun_lamp ---
const REDSTONE_FACES = [
[1, 0, 0], [-1, 0, 0],
[0, 1, 0], [0, -1, 0],
[0, 0, 1], [0, 0, -1],
];
function isPowerSource(b) {
if (!b) return false;
const t = b.typeId;
if (t === "minecraft:redstone_block") return true;
if (t === "minecraft:lit_redstone_torch" || t === "minecraft:redstone_torch") {
// torch lit state
try { return b.permutation.getState("toggle_bit") !== false; } catch (_) {}
return t === "minecraft:lit_redstone_torch";
}
if (t === "minecraft:powered_repeater") return true;
if (t === "minecraft:powered_comparator") return true;
if (t === "minecraft:lever") {
try { return b.permutation.getState("open_bit") === true; } catch (_) { return false; }
}
if (t.endsWith("_button") || t.includes(":wooden_button") || t.includes(":stone_button")) {
try { return b.permutation.getState("button_pressed_bit") === true; } catch (_) { return false; }
}
if (t === "minecraft:redstone_wire") {
try {
const p = b.permutation.getState("redstone_signal") ?? 0;
return p > 0;
} catch (_) { return false; }
}
if (t === "minecraft:daylight_detector_inverted") return true;
return false;
}
function lampShouldBePowered(lamp) {
// Try the script API redstone power first (newer servers expose it)
try {
const p = lamp.getRedstonePower();
if (typeof p === "number" && p > 0) return true;
} catch (_) {}
const dim = lamp.dimension;
for (const [dx, dy, dz] of REDSTONE_FACES) {
let n;
try { n = dim.getBlock({ x: lamp.location.x + dx, y: lamp.location.y + dy, z: lamp.location.z + dz }); } catch (_) { continue; }
if (isPowerSource(n)) return true;
}
return false;
}
const LAMP_SCAN_INTERVAL_TICKS = 20; // 1s
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
const dim = player.dimension;
const px = Math.floor(player.location.x);
const py = Math.floor(player.location.y);
const pz = Math.floor(player.location.z);
for (let dy = -SCAN_VERT; dy <= SCAN_VERT; dy++) {
for (let dx = -SCAN_RADIUS; dx <= SCAN_RADIUS; dx++) {
for (let dz = -SCAN_RADIUS; dz <= SCAN_RADIUS; dz++) {
let b;
try { b = dim.getBlock({ x: px + dx, y: py + dy, z: pz + dz }); } catch (_) { continue; }
if (!b || b.typeId !== SUN_LAMP) continue;
let cur = false;
try { cur = b.permutation.getState("silverlabs:powered") === true; } catch (_) {}
const want = lampShouldBePowered(b);
if (cur !== want) {
try {
const perm = BlockPermutation.resolve(SUN_LAMP, { "silverlabs:powered": want });
b.setPermutation(perm);
} catch (_) {}
}
}
}
}
}
}, LAMP_SCAN_INTERVAL_TICKS);
// --- Rabbit threat: damage outdoor hemp ---
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
const dim = player.dimension;
let rabbits;
try {
rabbits = dim.getEntities({ type: "minecraft:rabbit", location: player.location, maxDistance: 48 });
} catch (_) { continue; }
for (const rabbit of rabbits) {
// For each rabbit, look at a small box around its feet for hemp_crop.
const rx = Math.floor(rabbit.location.x);
const ry = Math.floor(rabbit.location.y);
const rz = Math.floor(rabbit.location.z);
for (let dx = -1; dx <= 1; dx++) {
for (let dz = -1; dz <= 1; dz++) {
let b;
try { b = dim.getBlock({ x: rx + dx, y: ry, z: rz + dz }); } catch (_) { continue; }
if (!b || b.typeId !== CROP) continue;
const isTop = b.permutation.getState(TOP) === true;
if (isTop) continue;
if (chance(0.35)) {
const age = b.permutation.getState(AGE) ?? 0;
if (age <= 0) {
clearTopAbove(b);
try { b.setType("minecraft:air"); } catch (_) {}
} else {
clearTopAbove(b);
setAge(b, age - 1, isAirAbove(dim, b.location));
}
try { dim.runCommand(`particle minecraft:crit_particle ${rx + dx + 0.5} ${ry + 0.5} ${rz + dz + 0.5}`); } catch (_) {}
}
}
}
}
}
}, RABBIT_INTERVAL_TICKS);
// --- Pillager raid threat: illagers carrying a banner steal hemp during raids ---
// Gate on either an active raid (detected via a nearby ominous_banner) or a
// pillager_captain so isolated tower pillagers don't constantly cull farms
// in render distance. When triggered, drops the crop's age by 1 (or removes
// it if age 0) and spawns 1 hemp_bud at the illager's feet so the player
// can recover the loot by killing the raider.
const RAID_INTERVAL_TICKS = 100;
const ILLAGER_TYPES = new Set([
"minecraft:pillager",
"minecraft:vindicator",
"minecraft:evocation_illager",
]);
const ILLAGER_HEMP_STEAL_CHANCE = 0.30;
function illagerIsRaiding(dim, ill) {
// Cheapest: check if the illager is wearing/carrying an ominous_banner
// (raid captain marker). Also accept any nearby ominous_banner block within
// 8 blocks as evidence of an ongoing raid the illager is participating in.
const equip = (() => { try { return ill.getComponent("minecraft:equippable"); } catch (_) { return null; } })();
if (equip) {
try {
const head = equip.getEquipmentSlot("Head")?.getItem();
if (head && head.typeId === "minecraft:ominous_banner") return true;
} catch (_) {}
}
const ix = Math.floor(ill.location.x);
const iy = Math.floor(ill.location.y);
const iz = Math.floor(ill.location.z);
for (let dx = -8; dx <= 8; dx += 4) {
for (let dz = -8; dz <= 8; dz += 4) {
let b;
try { b = dim.getBlock({ x: ix + dx, y: iy, z: iz + dz }); } catch (_) { continue; }
if (b && (b.typeId === "minecraft:standing_banner" || b.typeId === "minecraft:wall_banner")) {
// Banners can be ominous via their NBT; we can't read it, so any banner
// within 8 blocks of an illager is treated as raid evidence. Still rare.
return true;
}
}
}
return false;
}
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
const dim = player.dimension;
let illagers;
try {
illagers = dim.getEntities({ families: [], location: player.location, maxDistance: 48 });
} catch (_) { continue; }
for (const ill of illagers) {
if (!ILLAGER_TYPES.has(ill.typeId)) continue;
if (!illagerIsRaiding(dim, ill)) continue;
const ix = Math.floor(ill.location.x);
const iy = Math.floor(ill.location.y);
const iz = Math.floor(ill.location.z);
for (let dx = -1; dx <= 1; dx++) {
for (let dz = -1; dz <= 1; dz++) {
let b;
try { b = dim.getBlock({ x: ix + dx, y: iy, z: iz + dz }); } catch (_) { continue; }
if (!b || b.typeId !== CROP) continue;
if (b.permutation.getState(TOP) === true) continue;
if (!chance(ILLAGER_HEMP_STEAL_CHANCE)) continue;
const age = b.permutation.getState(AGE) ?? 0;
const outdoor = isAirAbove(dim, b.location);
if (age <= 0) {
clearTopAbove(b);
try { b.setType("minecraft:air"); } catch (_) {}
} else {
clearTopAbove(b);
setAge(b, age - 1, outdoor);
}
// Drop a hemp_bud at the illager's feet — recoverable when killed.
spawnDrop(dim, ill.location, BUD, 1);
try { dim.runCommand(`particle minecraft:villager_angry ${ix + 0.5} ${iy + 1.0} ${iz + 0.5}`); } catch (_) {}
}
}
}
}
}, RAID_INTERVAL_TICKS);
// --- Wandering trader buyback: hand off hemp products for emeralds ---
// Right-click a wandering_trader while holding hemp_bud / hemp_tincture /
// hemp_seeds. Avoids overriding vanilla trade tables (which would pin us to
// one Bedrock version) by acting as an off-menu interaction. Trader animates
// a "happy villager" particle and the player's inventory swaps the items
// for emeralds at the rates below.
const TRADER_BUYBACK = {
[BUD]: { perTrade: 2, emeralds: 1 },
[TINCTURE]: { perTrade: 1, emeralds: 3 },
[SEEDS]: { perTrade: 8, emeralds: 1 },
};
world.beforeEvents.playerInteractWithEntity.subscribe((event) => {
const target = event.target;
if (!target || target.typeId !== "minecraft:wandering_trader") return;
const stack = event.itemStack;
if (!stack) return;
const deal = TRADER_BUYBACK[stack.typeId];
if (!deal) return;
event.cancel = true; // suppress the vanilla trade window for this interaction
const player = event.player;
system.run(() => {
// Count what the player has of this item across the inventory
const inv = getInv(player);
if (!inv) return;
let have = 0;
for (let i = 0; i < inv.size; i++) {
const it = inv.getItem(i);
if (it && it.typeId === stack.typeId) have += it.amount;
}
if (have < deal.perTrade) {
player.sendMessage(`§7[Trader] Brings me at least §f${deal.perTrade}§7 of those and I'll pay you in emeralds.`);
return;
}
const trades = Math.floor(have / deal.perTrade);
let consumed = 0;
for (let n = 0; n < trades * deal.perTrade; n++) {
if (!consumeOneOfType(player, stack.typeId)) break;
consumed++;
}
const actualTrades = Math.floor(consumed / deal.perTrade);
if (actualTrades <= 0) return;
giveItem(player, "minecraft:emerald", actualTrades * deal.emeralds);
const loc = target.location;
try { target.dimension.runCommand(`particle minecraft:villager_happy ${loc.x} ${loc.y + 1.5} ${loc.z}`); } catch (_) {}
try { target.dimension.runCommand(`playsound mob.villager.yes @a ${loc.x} ${loc.y} ${loc.z} 0.8 1.1`); } catch (_) {}
player.sendMessage(`§a[Trader] §fTraded §e${actualTrades * deal.perTrade}§f for §a${actualTrades * deal.emeralds} emerald${actualTrades * deal.emeralds === 1 ? "" : "s"}§f.`);
});
});
// --- Outdoor detection on placement ---
world.afterEvents.playerPlaceBlock.subscribe((event) => {
const block = event.block;
if (!block || block.typeId !== CROP) return;
// newly-placed crop is age 0 by default — we don't need to set anything,
// outdoor status is computed live during ticks.
});
// --- Cleanup: breaking either half of a tall plant removes the other ---
// Also: rare hemp_seeds drop from breaking vanilla grass / tall_grass /
// short_grass — gives players a way to bootstrap into hemp without
// already having seeds. Mirrors how vanilla wheat seeds work.
const GRASS_BLOCK_IDS = new Set([
"minecraft:short_grass",
"minecraft:tall_grass",
"minecraft:fern",
"minecraft:large_fern",
// Pre-1.21 alias kept for safety on mixed-version worlds
"minecraft:grass",
]);
const GRASS_HEMP_SEED_CHANCE = 0.04; // ~1 in 25 grass tufts
world.afterEvents.playerBreakBlock.subscribe((event) => {
const brokenType = event.brokenBlockPermutation?.type?.id;
// Hemp_crop tall-plant cleanup
if (brokenType === CROP) {
const block = event.block;
const dim = block.dimension;
const wasTop = event.brokenBlockPermutation.getState(TOP) === true;
const dy = wasTop ? -1 : 1;
let neighbor;
try { neighbor = dim.getBlock({ x: block.location.x, y: block.location.y + dy, z: block.location.z }); } catch (_) { return; }
if (!neighbor || neighbor.typeId !== CROP) return;
const neighborIsTop = neighbor.permutation.getState(TOP) === true;
if (wasTop === neighborIsTop) return;
try { neighbor.setType("minecraft:air"); } catch (_) {}
return;
}
// Hemp seed bootstrap from grass blocks
if (brokenType && GRASS_BLOCK_IDS.has(brokenType)) {
if (!chance(GRASS_HEMP_SEED_CHANCE)) return;
const block = event.block;
const loc = block.location;
spawnDrop(block.dimension, loc, SEEDS, 1);
}
});
// Per-player debounce so a single click that fires the event twice
// (a known Bedrock quirk for some interact paths) only does work once.
const recentInteract = new Map(); // key: playerId|x|y|z -> system.currentTick
function consumeInteractToken(player, block) {
const key = `${player.id}|${block.location.x}|${block.location.y}|${block.location.z}`;
const last = recentInteract.get(key) ?? -999;
const now = system.currentTick;
if (now - last < 4) return false; // <200ms — treat as duplicate
recentInteract.set(key, now);
// Lazy cleanup: prune any entries older than ~4s on each successful claim
if (recentInteract.size > 64) {
for (const [k, t] of recentInteract) {
if (now - t > 80) recentInteract.delete(k);
}
}
return true;
}
// --- Bonemeal on hemp_crop bumps growth ---
world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
const block = event.block;
const stack = event.itemStack;
const player = event.player;
if (!block || block.typeId !== CROP) return;
// Sheers harvest path
if (stack && stack.typeId === "minecraft:shears") {
event.cancel = true;
if (!consumeInteractToken(player, block)) return;
system.run(() => harvestWithShears(player, block, stack));
return;
}
// Bone meal path
if (stack && stack.typeId === "minecraft:bone_meal") {
event.cancel = true;
if (!consumeInteractToken(player, block)) return;
system.run(() => {
// If the player clicked the top half, redirect to the base
let target = block;
if (block.permutation.getState(TOP) === true) {
const below = block.dimension.getBlock({ x: block.location.x, y: block.location.y - 1, z: block.location.z });
if (below && below.typeId === CROP) target = below;
else return;
}
const age = target.permutation.getState(AGE) ?? 0;
// Cap bone meal at age 4 (prime) — overripe (5) only via neglect
if (age >= 4) {
player.sendMessage("§e[Hemp] Already mature — harvest with shears.");
return;
}
// Always consume the bone meal, but only 50% chance to advance
consumeOneOfType(player, "minecraft:bone_meal");
const loc = target.location;
try { target.dimension.runCommand(`particle minecraft:crop_growth_emitter ${loc.x + 0.5} ${loc.y + 0.5} ${loc.z + 0.5}`); } catch (_) {}
if (!chance(0.5)) return;
const outdoor = isAirAbove(target.dimension, loc);
setAge(target, age + 1, outdoor);
try { target.dimension.runCommand(`playsound random.fizz @a ${loc.x + 0.5} ${loc.y + 0.5} ${loc.z + 0.5} 0.6 1.6`); } catch (_) {}
});
return;
}
});
function harvestWithShears(player, block, shearsStack) {
if (!block || block.typeId !== CROP) return; // already harvested / replaced
// Read state on the BASE block (not top)
let base = block;
if (block.permutation.getState(TOP) === true) {
const below = block.dimension.getBlock({ x: block.location.x, y: block.location.y - 1, z: block.location.z });
if (below && below.typeId === CROP) base = below;
}
const age = base.permutation.getState(AGE) ?? 0;
const dim = base.dimension;
const loc = base.location;
const outdoor = isAirAbove(dim, loc);
// Too early — leave the plant alone, don't damage shears
if (age <= 1) {
player.sendMessage("§7[Hemp] Too early — leave it to grow.");
return;
}
const yields = computeYield(age, outdoor);
if (yields.msg) player.sendMessage(yields.msg);
if (yields.bud > 0) spawnDrop(dim, loc, BUD, yields.bud);
if (yields.seeds > 0) spawnDrop(dim, loc, SEEDS, yields.seeds);
// Fully remove the plant — player replants from seeds
clearTopAbove(base);
try { base.setType("minecraft:air"); } catch (_) {}
damageShears(player, shearsStack);
try { dim.runCommand(`playsound mob.sheep.shear @a ${loc.x + 0.5} ${loc.y + 0.5} ${loc.z + 0.5}`); } catch (_) {}
}
function computeYield(age, outdoor) {
// Outdoor gets a bud bonus; indoor (sun-lamp grown) is baseline.
const out = outdoor ? 1 : 0;
switch (age) {
case 2: return { bud: 1, seeds: 1 + out };
case 3: return { bud: 2 + out, seeds: 1 + out };
case 4: return { bud: 3 + out * 2, seeds: 1 + out, msg: "§a[Hemp] Prime harvest." }; // peak
case 5: return { bud: rand(3), seeds: 3 + rand(3), msg: "§7[Hemp] Overripe — mostly seeds now." };
default: return { bud: 0, seeds: 0 };
}
}
function spawnDrop(dim, loc, typeId, count) {
try {
const it = new ItemStack(typeId, count);
dim.spawnItem(it, { x: loc.x + 0.5, y: loc.y + 0.5, z: loc.z + 0.5 });
} catch (_) {}
}
function damageShears(player, shearsStack) {
try {
const equippable = player.getComponent("minecraft:equippable");
if (!equippable) return;
const slot = equippable.getEquipmentSlot("Mainhand");
if (!slot) return;
const item = slot.getItem();
if (!item || item.typeId !== "minecraft:shears") return;
const dur = item.getComponent("minecraft:durability");
if (!dur) return;
const damage = dur.damage + 1;
if (damage >= dur.maxDurability) {
slot.setItem(undefined);
try { player.dimension.runCommand(`playsound random.break @a ${player.location.x} ${player.location.y} ${player.location.z}`); } catch (_) {}
} else {
dur.damage = damage;
slot.setItem(item);
}
} catch (_) {}
}
// --- Cauldron tincture brewing: hemp_bud + water cauldron + glass bottle => tincture ---
world.afterEvents.itemUse.subscribe((event) => {
const player = event.source;
const stack = event.itemStack;
if (!stack || stack.typeId !== BUD) return;
system.run(() => {
const target = player.getBlockFromViewDirection({ maxDistance: 6 });
const block = target?.block;
if (!block) return;
const isCauldron = block.typeId === "minecraft:cauldron" || block.typeId === "minecraft:water_cauldron";
if (!isCauldron) return;
// Need at least 3 buds total in inventory and 1 glass bottle
const inv = getInv(player);
if (!inv) return;
let budCount = 0, bottleCount = 0;
for (let i = 0; i < inv.size; i++) {
const it = inv.getItem(i);
if (!it) continue;
if (it.typeId === BUD) budCount += it.amount;
else if (it.typeId === "minecraft:glass_bottle") bottleCount += it.amount;
}
if (budCount < 3) {
player.sendMessage("§c[Hemp] Need 3 hemp buds to brew tincture.");
return;
}
if (bottleCount < 1) {
player.sendMessage("§c[Hemp] Need an empty glass bottle.");
return;
}
// Check water level (water cauldron has fill_level state 1-3; vanilla cauldron = empty)
let level = 0;
try { level = block.permutation.getState("fill_level") ?? 0; } catch (_) {}
if (block.typeId === "minecraft:cauldron") {
player.sendMessage("§c[Hemp] Cauldron must contain water.");
return;
}
if (level <= 0) {
player.sendMessage("§c[Hemp] Cauldron is empty.");
return;
}
// Consume 3 buds, 1 bottle
for (let i = 0; i < 3; i++) consumeOneOfType(player, BUD);
consumeOneOfType(player, "minecraft:glass_bottle");
// Decrement water level
try {
const newLevel = level - 1;
if (newLevel <= 0) {
block.setType("minecraft:cauldron");
} else {
const perm = BlockPermutation.resolve("minecraft:water_cauldron", { fill_level: newLevel });
block.setPermutation(perm);
}
} catch (_) {}
// Give tincture
giveItem(player, TINCTURE, 1);
const loc = block.location;
try { block.dimension.runCommand(`particle minecraft:water_splash_particle_manual ${loc.x + 0.5} ${loc.y + 1.0} ${loc.z + 0.5}`); } catch (_) {}
try { block.dimension.runCommand(`playsound bucket.fill_water @a ${loc.x + 0.5} ${loc.y + 0.5} ${loc.z + 0.5}`); } catch (_) {}
player.sendMessage("§a[Hemp] Hemp tincture brewed.");
});
});
// --- Consumption effects ---
world.afterEvents.itemCompleteUse.subscribe((event) => {
const player = event.source;
const stack = event.itemStack;
if (!stack) return;
if (stack.typeId === TINCTURE) {
try {
player.addEffect("regeneration", 100, { amplifier: 1, showParticles: true });
player.addEffect("slowness", 200, { amplifier: 0, showParticles: true });
} catch (_) {}
player.sendMessage("§a[Hemp] You feel a warm, calming wave.");
} else if (stack.typeId === BROWNIE) {
try {
player.addEffect("regeneration", 200, { amplifier: 0, showParticles: true });
player.addEffect("slowness", 400, { amplifier: 0, showParticles: true });
} catch (_) {}
player.sendMessage("§a[Hemp] Mmm. You feel relaxed.");
}
});
system.run(() => {
world.sendMessage("§a[Hemp] §7Hemp pack loaded.");
});

View File

@@ -0,0 +1,5 @@
{
"format_version": [1, 1, 0],
"silverlabs:hemp_crop": { "sound": "grass" },
"silverlabs:sun_lamp": { "sound": "glass" }
}

View File

@@ -0,0 +1,29 @@
{
"format_version": 2,
"header": {
"name": "Hemp Plant Resources",
"description": "Textures, models, lang for the Hemp Plant addon",
"uuid": "8e5c46ac-3b16-4f51-89f7-673bd06600f4",
"version": [
1,
0,
5
],
"min_engine_version": [
1,
21,
0
]
},
"modules": [
{
"type": "resources",
"uuid": "5fcc737f-d224-409d-85e9-99274afd72a9",
"version": [
1,
0,
5
]
}
]
}

View File

@@ -0,0 +1,6 @@
item.silverlabs:hemp_seeds.name=Hemp Seeds
item.silverlabs:hemp_bud.name=Hemp Bud
item.silverlabs:hemp_tincture.name=Hemp Tincture
item.silverlabs:hemp_brownie.name=Hemp Brownie
tile.silverlabs:hemp_crop.name=Hemp Plant
tile.silverlabs:sun_lamp.name=Sun Lamp

View File

@@ -0,0 +1 @@
["en_US"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

View File

@@ -0,0 +1,10 @@
{
"resource_pack_name": "hemp_RP",
"texture_name": "atlas.items",
"texture_data": {
"hemp_seeds": { "textures": "textures/items/hemp_seeds" },
"hemp_bud": { "textures": "textures/items/hemp_bud" },
"hemp_tincture": { "textures": "textures/items/hemp_tincture" },
"hemp_brownie": { "textures": "textures/items/hemp_brownie" }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

View File

@@ -0,0 +1,16 @@
{
"resource_pack_name": "hemp_RP",
"texture_name": "atlas.terrain",
"padding": 8,
"num_mip_levels": 4,
"texture_data": {
"hemp_crop_0": { "textures": "textures/blocks/hemp_crop_0" },
"hemp_crop_1": { "textures": "textures/blocks/hemp_crop_1" },
"hemp_crop_2": { "textures": "textures/blocks/hemp_crop_2" },
"hemp_crop_3": { "textures": "textures/blocks/hemp_crop_3" },
"hemp_crop_4": { "textures": "textures/blocks/hemp_crop_4" },
"hemp_crop_5": { "textures": "textures/blocks/hemp_crop_5" },
"sun_lamp": { "textures": "textures/blocks/sun_lamp" },
"sun_lamp_off": { "textures": "textures/blocks/sun_lamp_off" }
}
}

View File

@@ -0,0 +1,27 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.alligator.evict_riders": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"eject_rider": "query.has_target"
}
]
},
"eject_rider": {
"transitions": [
{
"default": "(1.0)"
}
],
"on_entry": [
"/ride @s evict_riders"
]
}
}
}
}
}

View File

@@ -0,0 +1,27 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.anteater": {
"initial_state": "default",
"states": {
"default": {
"on_entry": ["/effect @s clear slowness"],
"transitions": [
{
"not_move": "q.is_interested || q.timer_flag_1 || query.property('silverlabs_nat:on_defensive_mode') == 'enabled'"
}
]
},
"not_move": {
"on_entry": ["/effect @s slowness infinite 255 true"],
"transitions": [
{
"default": "!q.is_interested && !q.timer_flag_1 && query.property('silverlabs_nat:on_defensive_mode') != 'enabled'"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,71 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.badger.daylight_controller": {
"initial_state": "init",
"states": {
"init": {
"transitions": [
{
"daylight_tamed": "((q.time_of_day - 0.25) <= 0.5) && q.is_tamed"
},
{
"daylight_untamed": "((q.time_of_day - 0.25) <= 0.5)"
},
{
"night": "((q.time_of_day - 0.25) > 0.5)"
}
]
},
"daylight_tamed": {
"on_entry": [
"@s silverlabs_nat:badger_daytime_tamed"
],
"transitions": [
{
"daylight_tamed": "((q.time_of_day - 0.25) <= 0.5) && q.is_tamed"
},
{
"daylight_untamed": "((q.time_of_day - 0.25) <= 0.5)"
},
{
"night": "((q.time_of_day - 0.25) > 0.5)"
}
]
},
"daylight_untamed": {
"on_entry": [
"@s silverlabs_nat:badger_daytime_wild"
],
"transitions": [
{
"daylight_tamed": "((q.time_of_day - 0.25) <= 0.5) && q.is_tamed"
},
{
"daylight_untamed": "((q.time_of_day - 0.25) <= 0.5)"
},
{
"night": "((q.time_of_day - 0.25) > 0.5)"
}
]
},
"night": {
"on_entry": [
"@s silverlabs_nat:badger_nighttime"
],
"transitions": [
{
"daylight_tamed": "((q.time_of_day - 0.25) <= 0.5) && q.is_tamed"
},
{
"daylight_untamed": "((q.time_of_day - 0.25) <= 0.5)"
},
{
"night": "((q.time_of_day - 0.25) > 0.5)"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,37 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.bear.eat": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"can_use": "query.property('silverlabs_nat:is_sitting')"
}
]
},
"can_use": {
"transitions": [
{
"default": "!query.property('silverlabs_nat:is_sitting')"
},
{
"configure_eating": "!math.random_integer(0, 79)"
}
]
},
"configure_eating": {
"on_entry": [
"@s silverlabs_nat:configure_eating"
],
"transitions": [
{
"default": "!query.property('silverlabs_nat:is_sitting')"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.beaver.chew_watcher": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "chewing": "query.property('silverlabs_nat:is_chewing')" }
]
},
"chewing": {
"on_exit": [
"/scriptevent silverlabs_nat:beaver_chew"
],
"transitions": [
{ "default": "!query.property('silverlabs_nat:is_chewing')" }
]
}
}
}
}
}

View File

@@ -0,0 +1,116 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.bird.landing_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"v.switch_chance = 200;"
],
"transitions": [
{
"walking": "query.property('silverlabs_nat:movement_mode') == 'walk'"
},
{
"flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
}
]
},
"walking": {
"on_entry": [
"v.switch_delay = query.life_time + Math.random_integer(5, 10);"
],
"transitions": [
{
"start_flying": "!q.is_baby && (Math.random_integer(0, (v.switch_chance ?? 1)) == (v.switch_chance ?? 1) && (query.life_time > (v.switch_delay ?? 0))) && !query.property('silverlabs_nat:is_tempted') && !q.is_sitting && !q.is_in_love"
},
{
"flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
}
]
},
"start_flying": {
"on_entry": [
"@s silverlabs_nat:bird_set_flying_mode"
],
"transitions": [
{
"flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
}
]
},
"flying": {
"on_entry": [
"v.switch_delay = query.life_time + Math.random_integer(5, 10);"
],
"transitions": [
{
"landing_check": "q.is_baby || (Math.random_integer(0, (v.switch_chance ?? 1)) == (v.switch_chance ?? 1) && (query.life_time > (v.switch_delay ?? 0)) && !q.has_target) || query.property('silverlabs_nat:is_tempted') || q.is_sitting || q.is_in_love"
},
{
"walking": "query.property('silverlabs_nat:movement_mode') == 'walk'"
}
]
},
"landing_check": {
"on_entry": [
"/scriptevent silverlabs_nat:bird_landing_check"
],
"transitions": [
{
"default": "1"
}
]
}
}
},
"controller.animation.silverlabs_nat.bird.tempt_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"@s silverlabs_nat:not_tempted"
],
"transitions": [
{
"tempted": "q.is_interested"
}
]
},
"tempted": {
"on_entry": [
"@s silverlabs_nat:is_tempted"
],
"transitions": [
{
"default": "!q.is_interested"
}
]
}
}
},
"controller.animation.silverlabs_nat.bird.smooth_landing": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"tempted": "!q.is_on_ground"
}
]
},
"tempted": {
"on_entry": [
"/effect @s slow_falling 2 1 true"
],
"transitions": [
{
"default": "1"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,46 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.blobfish": {
"initial_state": "init",
"states": {
"init": {
"transitions": [
{
"normal_blobfish": "query.is_in_water && q.position(1) < 30"
},
{
"land_blobfish": "q.position(1) > 30"
}
]
},
"normal_blobfish": {
"animations": [
"blobfish.duration"
],
"on_entry": [
"@s silverlabs_nat:blobfish_normal"
],
"transitions": [
{
"land_blobfish": "q.anim_time > 3.0 && q.position(1) > 30"
}
]
},
"land_blobfish": {
"animations": [
"blobfish.duration"
],
"on_entry": [
"@s silverlabs_nat:blobfish_land"
],
"transitions": [
{
"normal_blobfish": "q.anim_time > 3.0 && query.is_in_water && q.position(1) < 30"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.bucketable_entity": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"on_bucket": "q.has_any_family('silverlabs_nat:bucketable_entity') && query.property('silverlabs_nat:on_bucket')"
}
]
},
"on_bucket": {
"on_entry": [
"/scriptevent silverlabs_nat:bucketable_entity_interaction @initiator"
]
}
}
}
}
}

View File

@@ -0,0 +1,51 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.clam.launch": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"before_open": "query.property('silverlabs_nat:before_open')"
}
]
},
"before_open": {
"on_entry": [
"/scriptevent silverlabs_nat:clam_launch"
],
"transitions": [
{
"default": "!query.property('silverlabs_nat:before_open')"
}
]
}
}
},
"controller.animation.silverlabs_nat.clam.took_item": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"has_item": "query.property('silverlabs_nat:has_item')"
}
]
},
"has_item": {
"transitions": [
{
"took_item": "query.property('silverlabs_nat:took_item')"
}
]
},
"took_item": {
"on_entry": [
"/replaceitem entity @s slot.weapon.mainhand 0 minecraft:air"
]
}
}
}
}
}

View File

@@ -0,0 +1,39 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.crab": {
"initial_state": "on_load",
"states": {
"on_load": {
"on_entry": ["@s silverlabs_nat:crab_is_not_dancing"],
"transitions": [
{
"try_collect_sand": "query.property('silverlabs_nat:sand_block_interaction_state') == 'try_collect_sand'"
},
{
"try_place_sand": "query.property('silverlabs_nat:sand_block_interaction_state') == 'try_place_sand'"
}
]
},
"try_collect_sand": {
"on_entry": ["/scriptevent silverlabs_nat:crab_try_collect_sand"],
"transitions": [
{
"on_load": "query.property('silverlabs_nat:sand_block_interaction_state') != 'try_collect_sand'"
}
]
},
"try_place_sand": {
"on_entry": ["/scriptevent silverlabs_nat:crab_try_place_sand"],
"transitions": [
{
"on_load": "query.property('silverlabs_nat:sand_block_interaction_state') != 'try_place_sand'"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,36 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.eel_water_land": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"land": "!q.is_in_water"
},
{
"water": "q.is_in_water"
}
]
},
"land": {
"on_entry": ["@s silverlabs_nat:eel_on_land"],
"transitions": [
{
"water": "q.is_in_water"
}
]
},
"water": {
"on_entry": ["@s silverlabs_nat:eel_in_water"],
"transitions": [
{
"land": "!q.is_in_water"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,82 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.emperor_penguin.fall": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"fall": "query.property('silverlabs_nat:slip_anim') == 'none' && q.is_on_ground && !q.is_in_water && q.modified_move_speed > 0.05 && !query.property('silverlabs_nat:egg_protector') && math.random_integer(0, 333) == 0"
}
]
},
"fall": {
"on_entry": [
"/scriptevent silverlabs_nat:emperor_penguin_fall",
"v.cooldown_timer = query.life_time;"
],
"transitions": [
{
"default": "query.life_time >= (v.cooldown_timer + 16.0)"
}
]
}
}
},
"controller.animation.silverlabs_nat.emperor_penguin.egg_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"v.cooldown_timer = 0;"
],
"transitions": [
{
"remove": "query.property('silverlabs_nat:egg_protector') && q.has_rider"
},
{
"cooldown": "query.property('silverlabs_nat:egg_protector') && !q.has_target"
}
]
},
"cooldown": {
"on_entry": [
"v.cooldown_timer = query.life_time;"
],
"transitions": [
{
"remove": "q.has_rider"
},
{
"default": "!query.property('silverlabs_nat:egg_protector') || q.has_target"
},
{
"egg_check": "query.life_time >= (v.cooldown_timer + 6.0)"
}
]
},
"egg_check": {
"on_entry": [
"/execute unless entity @e[type=silverlabs_nat:emperor_penguin_egg,c=1,r=24] run event entity @s silverlabs_nat:remove_egg_protector"
],
"transitions": [
{
"default": "1"
}
]
},
"remove": {
"on_entry": [
"@s silverlabs_nat:remove_egg_protector"
],
"transitions": [
{
"default": "1"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,133 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.light": {
"states": {
"default": {
"on_entry": [
"@s silverlabs_nat:reset_all"
],
"transitions": [
{
"reset": "q.is_shaking"
},
{
"on": "!q.is_shaking"
}
]
},
"on": {
"on_entry": [
"/tag @s add silverlabs_nat:light_source",
"/function sf/nba/lighting/setup"
],
"transitions": [
{
"default": "query.property('silverlabs_nat:furniture_variant') == 1"
},
{
"reset": "q.is_shaking"
}
]
},
"reset": {
"on_entry": [
"/function sf/nba/lighting/remove",
"/tag @s remove silverlabs_nat:light_source"
]
}
}
},
"controller.animation.silverlabs_nat.furniture_moved": {
"initial_state": "not_moving",
"states": {
"not_moving": {
"transitions": [
{
"moving": "math.abs(q.position_delta(0)) > 0.01 || math.abs(q.position_delta(1)) > 0.01 || math.abs(q.position_delta(2)) > 0.01 || q.is_in_lava"
}
]
},
"moving": {
"on_entry": [
"@s silverlabs_nat:drop_egg"
]
}
}
},
"controller.animation.silverlabs_nat.furniture_hit": {
"initial_state": "not_hit",
"states": {
"not_hit": {
"transitions": [
{
"hit": "query.property('silverlabs_nat:furniture_hit')"
},
{
"destroy": "query.is_shaking"
}
]
},
"hit": {
"on_entry": [
"@s silverlabs_nat:furniture_not_hit",
"/playsound dig.stone @a[r=16] ~ ~ ~ 0.75 1.45"
],
"transitions": [
{
"destroy": "query.is_shaking"
},
{
"not_hit": "1"
}
]
},
"destroy": {}
}
},
"controller.animation.silverlabs_nat.furniture_spawn": {
"states": {
"default": {
"transitions": [
{
"just_spawned": "query.property('silverlabs_nat:just_spawned')"
}
]
},
"just_spawned": {
"on_entry": [
"@s silverlabs_nat:finish_spawned",
"/playsound dig.stone @a[r=16] ~ ~ ~ 0.75 1.45"
]
}
}
},
"controller.animation.silverlabs_nat.firefly_jar.furniture_remove": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"egg_drop": "1"
}
]
},
"egg_drop": {
"on_entry": [
"/loot spawn ~0.5 ~0.5 ~0.5 loot \"sf/nba/items/firefly_jar.loot\""
],
"transitions": [
{
"dropped_egg": "1"
}
]
},
"dropped_egg": {
"on_entry": [
"@s silverlabs_nat:remove"
]
}
}
}
}
}

View File

@@ -0,0 +1,30 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.giraffe.head_collision": {
"initial_state": "head_normal",
"states": {
"head_normal": {
"on_entry": [
"@s silverlabs_nat:set_head_normal"
],
"transitions": [
{
"head_low": "q.has_rider && q.rider_head_x_rotation(0) >= 45"
}
]
},
"head_low": {
"on_entry": [
"@s silverlabs_nat:set_head_low"
],
"transitions": [
{
"head_normal": "!q.has_rider || q.rider_head_x_rotation(0) < 45"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,63 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.hamster.riding_check": {
"states": {
"default": {
"on_entry": ["@s silverlabs_nat:remove_move_away"],
"transitions": [
{ "riding": "q.is_riding" }
]
},
"riding": {
"transitions": [
{ "unriding": "!q.is_riding" }
],
"on_exit": ["@s silverlabs_nat:move_away"]
},
"unriding": {
"transitions": [
{ "default": "q.state_time >= 3.0" }
]
}
}
},
"controller.animation.silverlabs_nat.hamster.variant_fixer": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "variant_0": "q.had_component_group('silverlabs_nat:variant_0')" },
{ "variant_1": "q.had_component_group('silverlabs_nat:variant_1')" },
{ "variant_2": "q.had_component_group('silverlabs_nat:variant_2')" },
{ "variant_3": "q.had_component_group('silverlabs_nat:variant_3')" },
{ "variant_4": "q.had_component_group('silverlabs_nat:variant_4')" },
{ "variant_5": "q.had_component_group('silverlabs_nat:variant_5')" },
{ "variant_6": "q.had_component_group('silverlabs_nat:variant_6')" }
]
},
"variant_0": {
"on_entry": ["@s silverlabs_nat:set_variant_black"]
},
"variant_1": {
"on_entry": ["@s silverlabs_nat:set_variant_blackwhite"]
},
"variant_2": {
"on_entry": ["@s silverlabs_nat:set_variant_brown"]
},
"variant_3": {
"on_entry": ["@s silverlabs_nat:set_variant_grey"]
},
"variant_4": {
"on_entry": ["@s silverlabs_nat:set_variant_orange"]
},
"variant_5": {
"on_entry": ["@s silverlabs_nat:set_variant_peach"]
},
"variant_6": {
"on_entry": ["@s silverlabs_nat:set_variant_white"]
}
}
}
}
}

View File

@@ -0,0 +1,22 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.hamster_wheel.initialize": {
"states": {
"default": {
"transitions": [
{
"initialize": "!query.property('silverlabs_nat:initialized')"
}
]
},
"initialize": {
"on_entry": [
"/function sf/nba/cardinal_orientation",
"@s silverlabs_nat:initialized"
]
}
}
}
}
}

View File

@@ -0,0 +1,34 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.hedgehog.hit": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"hit": "query.property('silverlabs_nat:hit')"
}
]
},
"hit": {
"on_entry": [
"/scriptevent silverlabs_nat:hedgehog_hit",
"@s silverlabs_nat:remove_projectile"
],
"transitions": [
{
"fallback": "q.state_time > 3"
}
]
},
"fallback": {
"on_entry": [
"/scriptevent silverlabs_nat:hedgehog_hit",
"@s silverlabs_nat:remove_projectile"
]
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.block_animals.hippo.ram_watcher": {
"states": {
"default": {
"transitions": [
{ "ram_attack": "q.is_casting" }
]
},
"ram_attack": {
"on_entry": [
"/scriptevent silverlabs_nat:hippo_ram_attack",
"v.ram_attack_delay = query.life_time + 1.5;"
],
"transitions": [
{ "default": "query.life_time > (v.ram_attack_delay ?? 0)" }
]
}
}
}
}
}

View File

@@ -0,0 +1,47 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.info_book.orient": {
"initial_state": "not_oriented",
"states": {
"not_oriented": {
"on_entry": [
"/function sf/nba/cardinal_orientation"
],
"transitions": [
{
"oriented": "1"
}
]
},
"oriented": {
"on_entry": [
"@s silverlabs_nat:oriented"
]
}
}
},
"controller.animation.silverlabs_nat.info_book.hit": {
"initial_state": "not_hit",
"states": {
"not_hit": {
"transitions": [
{
"hit": "query.property('silverlabs_nat:hit')"
}
]
},
"hit": {
"on_entry": [
"@s silverlabs_nat:not_hit"
],
"transitions": [
{
"not_hit": "1"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,133 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.kiwi.digging_control": {
"states": {
"default": {
"transitions": [
{
"init": "!q.is_tamed"
}
]
},
"init": {
"on_entry": [
"/event entity @s silverlabs_nat:end_feeling_happy",
"/event entity @s silverlabs_nat:scenting"
],
"transitions": [
{
"test_digging_success": "query.property('silverlabs_nat:digging_states') == 'test_digging_success'"
}
]
},
"test_digging_success": {
"on_entry": [
"/function sf/nba/gameplay/digging/init_digging"
],
"on_exit": [
"v.stand_delay_trigger = query.life_time + 2;"
],
"transitions": [
{
"digging_successful": "query.property('silverlabs_nat:digging_states') == 'successful'"
},
{
"digging_unsuccessful": "query.property('silverlabs_nat:digging_states') == 'unsuccessful'"
}
]
},
"digging_successful": {
"on_entry": [
"/function sf/nba/gameplay/digging/digging_loot"
],
"transitions": [
{
"feeling_happy": "query.life_time >= v.stand_delay_trigger"
}
]
},
"digging_unsuccessful": {
"transitions": [
{
"default": "query.life_time >= v.stand_delay_trigger"
}
]
},
"feeling_happy": {
"on_entry": [
"/event entity @s silverlabs_nat:feeling_happy"
],
"transitions": [
{
"default": "1"
}
]
}
}
},
"controller.animation.silverlabs_nat.kiwi.sniffing_control": {
"states": {
"default": {
"transitions": [
{
"start_sniffing": "!q.is_tamed && (query.property('silverlabs_nat:digging_states') == 'trigger_digging')"
}
]
},
"start_sniffing": {
"on_entry": [
"/function sf/nba/gameplay/digging/init_sniffing"
],
"transitions": [
{
"default": "query.property('silverlabs_nat:digging_states') != 'trigger_digging'"
}
]
}
}
},
"controller.animation.silverlabs_nat.kiwi.pickup_control": {
"states": {
"default": {
"transitions": [
{
"start_sniffing": "q.is_tamed && !q.is_item_name_any('slot.weapon.mainhand', 'minecraft:wheat')"
}
]
},
"start_sniffing": {
"on_entry": [
"/replaceitem entity @s slot.weapon.mainhand 0 wheat"
],
"transitions": [
{
"start_sniffing": "!q.is_tamed || q.is_item_name_any('slot.weapon.mainhand', 'minecraft:wheat')"
}
]
}
}
},
"controller.animation.silverlabs_nat.kiwi.following_owner_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"@s silverlabs_nat:not_following_owner"
],
"transitions": [
{ "following": "!q.is_sitting && q.is_tamed" }
]
},
"following": {
"on_entry": [
"@s silverlabs_nat:is_following_owner"
],
"transitions": [
{ "default": "q.is_sitting || !q.is_tamed" }
]
}
}
}
}
}

View File

@@ -0,0 +1,27 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.reptile_tail.flop": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"flop": "q.is_on_ground && !q.is_in_water"
}
]
},
"flop": {
"on_entry": [
"/scriptevent silverlabs_nat:reptile_tail_flop"
],
"transitions": [
{
"default": "!q.is_on_ground || q.is_in_water"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,40 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.mole.trail": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"state_check": "(math.abs(q.position_delta(0)) > 0.01|| math.abs(q.position_delta(2)) > 0.01) && query.property('silverlabs_nat:mole_state') != 'unrolled'"
},
{
"state_check_baby": "(math.abs(q.position_delta(0)) > 0.01|| math.abs(q.position_delta(2)) > 0.01) && query.property('silverlabs_nat:mole_state') != 'unrolled' && q.is_baby"
}
]
},
"state_check": {
"on_entry": [
"/execute positioned ~~~ unless entity @e[type=silverlabs_nat:dirt_trail,r=0.5] run summon silverlabs_nat:dirt_trail ~ ~ ~"
],
"transitions": [
{
"default": "(1.0)"
}
]
},
"state_check_baby": {
"on_entry": [
"/execute positioned ~~~ unless entity @e[type=silverlabs_nat:dirt_trail,r=0.5] run summon silverlabs_nat:dirt_trail ~ ~ ~ ~ ~ silverlabs_nat:baby"
],
"transitions": [
{
"default": "(1.0)"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,81 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.ostrich.egg_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"v.cooldown_timer = 0;"
],
"transitions": [
{
"remove": "query.property('silverlabs_nat:egg_protector') && q.has_rider"
},
{
"cooldown": "query.property('silverlabs_nat:egg_protector') && !q.has_target"
}
]
},
"cooldown": {
"on_entry": [
"v.cooldown_timer = query.life_time;"
],
"transitions": [
{
"remove": "q.has_rider"
},
{
"default": "!query.property('silverlabs_nat:egg_protector') || q.has_target"
},
{
"egg_check": "query.life_time >= (v.cooldown_timer + 6.0)"
}
]
},
"egg_check": {
"on_entry": [
"/execute unless entity @e[type=silverlabs_nat:ostrich_egg,c=1,r=24] run event entity @s silverlabs_nat:remove_egg_protector"
],
"transitions": [
{
"default": "1"
}
]
},
"remove": {
"on_entry": [
"@s silverlabs_nat:remove_egg_protector"
],
"transitions": [
{
"default": "1"
}
]
}
}
},
"controller.animation.silverlabs_nat.ostrich.flap": {
"initial_state": "grounded",
"states": {
"grounded": {
"transitions": [
{
"flapping": "query.property('silverlabs_nat:has_rider') && !q.is_on_ground"
}
]
},
"flapping": {
"on_entry": [
"/effect @s slow_falling 2 0 true"
],
"transitions": [
{
"grounded": "q.is_on_ground || !query.property('silverlabs_nat:has_rider')"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,22 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.ostrich_egg.on_hatch": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"on_hatch": "q.is_transforming"
}
]
},
"on_hatch": {
"on_entry": [
"/event entity @e[c=1,type=silverlabs_nat:ostrich,r=12] silverlabs_nat:remove_egg_protector"
]
}
}
}
}
}

View File

@@ -0,0 +1,103 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.otter.eat": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"v.eat_step = 0;",
"v.float_delay = query.life_time + 1;",
"@s silverlabs_nat:not_floating"
],
"transitions": [
{
"float": "(query.life_time > (v.float_delay ?? 0)) && q.is_item_equipped(0) && q.is_in_water && (math.random_integer(1,100) == 100)"
},
{
"give_to_player": "(query.life_time > (v.float_delay ?? 0)) && q.is_item_equipped(0) && (math.random_integer(1,100) == 100)"
}
]
},
"float": {
"on_entry": [
"@s silverlabs_nat:is_floating",
"v.eat_delay = query.life_time + math.random(2,5);"
],
"transitions": [
{
"default": "!q.is_item_equipped(0) || !q.is_in_water || (q.modified_move_speed >= 0.075)"
},
{
"eat": "(query.life_time > (v.eat_delay ?? 0))"
}
]
},
"eat": {
"on_entry": [
"v.eat_step = (v.eat_step ?? 0) + 1;",
"v.eat_delay = query.life_time + 0.15;"
],
"transitions": [
{
"munch": "((v.eat_step ?? 0) < 3) && (query.life_time > (v.eat_delay ?? 0))"
},
{
"digest": "(query.life_time > (v.eat_delay ?? 0))"
}
]
},
"munch": {
"on_entry": ["/playsound mob.fox.eat @a ~ ~ ~"],
"transitions": [
{
"eat": "1"
}
]
},
"digest": {
"on_entry": [
"/playsound mob.fox.eat @a ~ ~ ~ 1 1.2",
"/replaceitem entity @s slot.inventory 0 air",
"/replaceitem entity @s slot.weapon.mainhand 0 air",
"@s silverlabs_nat:otter_on_finish_eat",
"@s silverlabs_nat:not_floating"
],
"transitions": [
{
"default": "1"
}
]
},
"give_to_player": {
"on_entry": ["@s silverlabs_nat:give_item_to_player"],
"transitions": [
{
"default": "!q.is_item_equipped(0)"
}
]
}
}
},
"controller.animation.silverlabs_nat.otter.item_check": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"test": "q.is_item_equipped(0)"
}
]
},
"test": {
"on_entry": ["/scriptevent silverlabs_nat:otter_check"],
"transitions": [
{
"default": "!q.is_item_equipped(0)"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,43 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.piranha.attack": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"v.attack_start = 0.0;"
],
"transitions": [
{ "attack": "q.is_delayed_attacking" }
]
},
"attack": {
"on_entry": [
"v.attack_start = q.life_time;"
],
"transitions": [
{ "apply_damage": "q.life_time >= v.attack_start + 0.3" }
]
},
"apply_damage": {
"on_entry": [
"/damage @e[family=!silverlabs_nat:piranha, r=2, c=1] 1 none",
"v.despawn_time = q.life_time;"
],
"transitions": [
{ "despawn": "q.life_time >= v.despawn_time + 0.25" }
]
},
"despawn": {
"on_entry": [
"@s silverlabs_nat:despawn"
],
"transitions": [
{ "default": "1" }
]
}
}
}
}
}

View File

@@ -0,0 +1,40 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.raccoon": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"is_searching_item": "query.property('silverlabs_nat:search_state') == 'searching_item'"
}
]
},
"is_searching_item": {
"on_entry": ["/scriptevent silverlabs_nat:raccoon_searching_item"],
"transitions": [
{
"cancel_searching_item": "query.property('silverlabs_nat:search_state') == 'cancel_searching_item'"
},
{
"default": "query.property('silverlabs_nat:search_state') != 'searching_item'"
}
]
},
"cancel_searching_item": {
"on_entry": ["/scriptevent silverlabs_nat:raccoon_cancel_searching_item"],
"transitions": [
{
"default": "query.property('silverlabs_nat:search_state') != 'cancel_searching_item'"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,37 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.ray.main": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"@s silverlabs_nat:complete_attack"
],
"transitions": [
{ "escape": "!q.is_powered && q.is_avoiding_mobs" }
]
},
"escape": {
"on_entry": [
"v.escape_timer = query.life_time + 3;"
],
"transitions": [
{ "hide": "query.life_time > (v.escape_timer ?? 0)" }
]
},
"hide": {
"on_entry": [
"v.hide_timer = query.life_time + 3;",
"@s silverlabs_nat:start_hide"
],
"transitions": [
{
"default": "(query.life_time > (v.hide_timer ?? 0)) || !q.is_powered"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,105 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.red_panda.sleep_stand": {
"initial_state": "init",
"states": {
"init": {
"transitions": [
{
"wake_up": "query.property('silverlabs_nat:red_panda_energy') >= 10"
},
{
"fall_asleep": "query.property('silverlabs_nat:red_panda_energy') < 10 && !query.property('silverlabs_nat:red_panda_jolt_awake') && !q.is_moving && !q.is_in_water_or_rain"
}
]
},
"wake_up": {
"on_entry": [
"@s silverlabs_nat:awake"
],
"transitions": [
{
"awake": "1"
}
]
},
"awake": {
"animations": [
"duration"
],
"transitions": [
{
"fall_asleep": "query.property('silverlabs_nat:red_panda_energy') < 10 && !query.property('silverlabs_nat:red_panda_jolt_awake') && !q.is_moving && !q.is_in_water_or_rain"
},
{
"awake_2": "q.anim_time >= 1"
}
]
},
"awake_2": {
"on_entry": [
"@s silverlabs_nat:decrement_energy"
],
"transitions": [
{
"standing": "math.random_integer(0, 20) == 0"
},
{
"awake": "1"
}
]
},
"standing": {
"on_entry": [
"@s silverlabs_nat:start_standing"
],
"on_exit": [
"@s silverlabs_nat:stop_standing"
],
"animations": [
"duration"
],
"transitions": [
{
"awake": "q.anim_time >= math.die_roll(3, 0.5, 4) || q.is_moving"
}
]
},
"fall_asleep": {
"on_entry": [
"@s silverlabs_nat:sleeping"
],
"transitions": [
{
"sleeping": "1"
}
]
},
"sleeping": {
"animations": [
"duration"
],
"transitions": [
{
"wake_up": "query.property('silverlabs_nat:red_panda_energy') >= 960 || query.property('silverlabs_nat:red_panda_jolt_awake')"
},
{
"sleeping_2": "q.anim_time >= 1"
}
]
},
"sleeping_2": {
"on_entry": [
"@s silverlabs_nat:increment_energy"
],
"transitions": [
{
"sleeping": "1"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,57 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.block_animals.rhino.ram_watcher": {
"states": {
"default": {
"on_entry": [
"/tag @s remove ram_attack",
"@s silverlabs_nat:stop_ram"
],
"transitions": [
{ "start_ram_attack": "q.is_casting" }
]
},
"start_ram_attack": {
"on_entry": [
"v.ram_attack_delay = query.life_time + 2.2;"
],
"transitions": [
{ "default": "!q.is_casting" },
{
"using_ram_attack": "query.life_time > (v.ram_attack_delay ?? 0)"
}
]
},
"using_ram_attack": {
"on_entry": [
"/scriptevent silverlabs_nat:rhino_ram_attack",
"/tag @s add ram_attack",
"@s silverlabs_nat:start_ram",
"v.ram_attack_end_delay = query.life_time + 1.95;"
],
"transitions": [
{ "default": "query.life_time > (v.ram_attack_end_delay ?? 0)" }
]
}
}
},
"controller.animation.silverlabs_nat.block_animals.rhino.angry_watcher": {
"states": {
"default": {
"transitions": [
{ "scared": "q.has_target" }
]
},
"scared": {
"on_entry": [
"/scriptevent silverlabs_nat:rhino_angry"
],
"transitions": [
{ "default": "!q.has_target" }
]
}
}
}
}
}

View File

@@ -0,0 +1,48 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.skunk_spray": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"spraying": "query.property('silverlabs_nat:is_spraying') == true"
}
]
},
"spraying": {
"transitions": [
{
"default": "query.property('silverlabs_nat:is_spraying') == false"
}
],
"on_entry": [
"/scriptevent silverlabs_nat:skunk_spray"
]
}
}
},
"controller.animation.silverlabs_nat.skunk.breed_check": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"@s silverlabs_nat:set_not_breeding"
],
"transitions": [
{ "breeding": "q.is_in_love" }
]
},
"breeding": {
"on_entry": [
"@s silverlabs_nat:set_is_breeding"
],
"transitions": [
{ "default": "!q.is_in_love" }
]
}
}
}
}
}

View File

@@ -0,0 +1,28 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.slug.bounce": {
"initial_state": "default",
"states": {
"default": {
"on_entry": ["@s silverlabs_nat:can_detect_bounce"],
"transitions": [
{ "bounce": "query.property('silverlabs_nat:bounce')" }
]
},
"bounce": {
"on_entry": [
"v.delay = 2;",
"v.current_delay = query.life_time;",
"/scriptevent silverlabs_nat:should_bounce_player @p"
],
"transitions": [
{ "default": "(query.life_time - v.current_delay >= v.delay)" }
]
}
}
}
}
}

View File

@@ -0,0 +1,64 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.snail.crush_check": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "test": "query.property('silverlabs_nat:was_stepped_on')" }
]
},
"test": {
"on_entry": [
"/scriptevent silverlabs_nat:snail_crush_check"
],
"transitions": [
{ "default": "!query.property('silverlabs_nat:was_stepped_on')" }
]
}
}
},
"controller.animation.silverlabs_nat.snail.catch_check": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "test": "query.property('silverlabs_nat:was_caught')" }
]
},
"test": {
"on_entry": [
"/scriptevent silverlabs_nat:snail_bucket"
],
"transitions": [
{ "default": "!query.property('silverlabs_nat:was_caught')" }
]
}
}
},
"controller.animation.silverlabs_nat.snail.lay_egg": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "ready": "q.is_pregnant" }
]
},
"ready": {
"transitions": [
{ "done": "!q.is_pregnant" }
]
},
"done": {
"on_entry": [
"/scriptevent silverlabs_nat:snailegg_formed"
],
"transitions": [
{ "default": "1" }
]
}
}
}
}
}

View File

@@ -0,0 +1,70 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.snake.digest": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "digest": "query.property('silverlabs_nat:digested_item')" }
]
},
"digest": {
"on_entry": [
"/replaceitem entity @s slot.inventory 0 air",
"/replaceitem entity @s slot.weapon.mainhand 0 air",
"@s silverlabs_nat:snake_on_finish_eat"
],
"transitions": [
{ "default": "1" }
]
}
}
},
"controller.animation.silverlabs_nat.snake.food_check": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "test": "q.is_item_equipped(0)" }
]
},
"test": {
"on_entry": [
"/scriptevent silverlabs_nat:snake_check"
],
"transitions": [
{ "default": "!q.is_item_equipped(0)" }
]
}
}
},
"controller.animation.silverlabs_nat.snake.wake_up_check": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "wake_up": "q.is_in_love" },
{ "can_sleep": "!q.is_in_love" }
]
},
"wake_up": {
"on_entry": [
"/tag @s add woken_up"
],
"transitions": [
{ "can_sleep": "!q.is_in_love" }
]
},
"can_sleep": {
"on_entry": [
"/tag @s remove woken_up"
],
"transitions": [
{ "wake_up": "q.is_in_love" }
]
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.termite.chew_watcher": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{ "chewing": "query.property('silverlabs_nat:is_chewing')" }
]
},
"chewing": {
"on_exit": [
"/scriptevent silverlabs_nat:termite_chew"
],
"transitions": [
{ "default": "!query.property('silverlabs_nat:is_chewing')" }
]
}
}
}
}
}

View File

@@ -0,0 +1,36 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.vulture.item_equipped": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"on_equip": "!query.property('silverlabs_nat:is_item_equipped') && q.is_item_equipped"
},
{
"on_unequip": "query.property('silverlabs_nat:is_item_equipped') && !q.is_item_equipped"
}
]
},
"on_equip": {
"on_entry": ["@s silverlabs_nat:set_item_equipped"],
"transitions": [
{
"default": "query.property('silverlabs_nat:is_item_equipped')"
}
]
},
"on_unequip": {
"on_entry": ["@s silverlabs_nat:set_item_equipped"],
"transitions": [
{
"default": "!query.property('silverlabs_nat:is_item_equipped')"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,43 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.silverlabs_nat.water_drinkable": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"can_use": "!q.is_baby"
}
]
},
"can_use": {
"transitions": [
{
"can_drink": "q.is_on_ground ? {t.x_offset = -math.sin(q.body_y_rotation) * 2.5; t.z_offset = math.cos(q.body_y_rotation) * 2.5; v.can_drink = q.relative_block_has_any_tag(t.x_offset, -1.0, t.z_offset, 'water');}: {v.can_drink = 0;}; return (v.can_drink ?? 0) && !query.property('silverlabs_nat:can_drink');"
},
{
"can_move_to_water": "query.property('silverlabs_nat:can_drink') && !(v.can_drink ?? 0)"
}
]
},
"can_drink": {
"on_entry": ["@s silverlabs_nat:can_drink"],
"transitions": [
{
"can_use": "query.property('silverlabs_nat:can_drink')"
}
]
},
"can_move_to_water": {
"on_entry": ["@s silverlabs_nat:can_move_to_water"],
"transitions": [
{
"can_use": "!query.property('silverlabs_nat:can_drink')"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
{
"format_version": "1.10.0",
"animations": {
"animation.silverlabs_nat.alligator.defensive_mode_check": {
"loop": true,
"animation_length": 1.0,
"timeline": {
"0.0": [
"/execute at @s if entity @e[family=silverlabs_nat:alligator_egg,r=10] run event entity @s silverlabs_nat:defending_eggs",
"/execute at @s unless entity @e[family=silverlabs_nat:alligator_egg,r=10] run event entity @s silverlabs_nat:not_defending_eggs"
]
}
}
}
}

View File

@@ -0,0 +1,14 @@
{
"format_version": "1.10.0",
"animations": {
"animation.silverlabs_nat.bear.harvest_sensor": {
"loop": true,
"animation_length": 3.0,
"timeline": {
"1.5": [
"@s silverlabs_nat:harvest_sensor"
]
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"format_version": "1.10.0",
"animations": {
"animation.silverlabs_nat.beaver.get_stick": {
"loop": true,
"animation_length": 1.0,
"timeline": {
"0.0": [
"/replaceitem entity @s slot.weapon.mainhand 0 stick"
]
}
},
"animation.silverlabs_nat.beaver.find_stick": {
"loop": true,
"animation_length": 1.0,
"timeline": {
"0.0": [
"@s silverlabs_nat:find_stick"
]
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"format_version": "1.10.0",
"animations": {
"animation.sf_afm.duration.1": {
"animation_length": 1,
"loop": true
},
"animation.silverlabs_nat.duration_10": {
"animation_length": 10.0,
"loop": false
}
}
}

View File

@@ -0,0 +1,12 @@
{
"format_version": "1.10.0",
"animations": {
"animation.silverlabs_nat.otter.despawn_check": {
"loop": true,
"animation_length": 5.0,
"timeline": {
"2.5": ["/scriptevent silverlabs_nat:otter_despawn_check"]
}
}
}
}

View File

@@ -0,0 +1,14 @@
{
"format_version": "1.10.0",
"animations": {
"animation.silverlabs_nat.whale.particle_check": {
"loop": true,
"animation_length": 1.0,
"timeline": {
"0.0": [
"/scriptevent silverlabs_nat:whale_check"
]
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,495 @@
{
"format_version": "1.21.50",
"minecraft:entity": {
"description": {
"identifier": "silverlabs_nat:firefly",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false,
"properties": {
"silverlabs_nat:can_glow": {
"type": "bool",
"default": false,
"client_sync": true
},
"silverlabs_nat:on_hide": {
"type": "bool",
"default": false,
"client_sync": true
}
}
},
"component_groups": {
"silverlabs_nat:baby": {
"minecraft:is_baby": {},
"minecraft:physics": {
"has_gravity": true
},
"minecraft:movement.basic": {},
"minecraft:navigation.walk": {
"can_path_over_water": false,
"avoid_damage_blocks": true
},
"minecraft:behavior.random_stroll": {
"priority": 3,
"xz_dist": 8,
"y_dist": 0
},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
}
]
}
},
"silverlabs_nat:adult": {
"minecraft:flying_speed": {
"value": 0.15
},
"minecraft:navigation.hover": {
"can_path_over_water": true,
"can_sink": false,
"can_pass_doors": true,
"can_path_from_air": true,
"avoid_water": true,
"avoid_damage_blocks": true,
"avoid_sun": false
},
"minecraft:movement.hover": {},
"minecraft:jump.static": {},
"minecraft:can_fly": {},
"minecraft:behavior.random_hover": {
"priority": 2,
"xz_dist": 8,
"y_dist": 8,
"y_offset": -1,
"interval": 1,
"hover_height": [
1,
4
]
},
"minecraft:behavior.float": {
"priority": 3
}
},
"silverlabs_nat:look_for_hide": {
"minecraft:behavior.move_to_block": {
"priority": 1,
"tick_interval": 1,
"start_chance": 0.5,
"search_range": 10,
"search_height": 4,
"speed_modifier": 1.2,
"goal_radius": 0.5,
"target_selection_method": "random",
"target_offset": [
0,
0,
0
],
"target_block_filters": {
"test": "is_waterlogged",
"subject": "block",
"operator": "==",
"value": false
},
"target_blocks": [
"tallgrass:0",
"tallgrass:1",
"double_plant:2",
"double_plant:3"
],
"on_reach": {
"event": "silverlabs_nat:find_hide_event",
"target": "self"
}
},
"minecraft:timer": {
"looping": false,
"time": 30,
"time_down_event": {
"event": "silverlabs_nat:perish"
}
}
},
"silverlabs_nat:perish": {
"minecraft:out_of_control": {},
"minecraft:timer": {
"looping": false,
"time": 0.1,
"time_down_event": {
"event": "silverlabs_nat:despawn"
}
}
},
"silverlabs_nat:despawn": {
"minecraft:instant_despawn": {}
},
"silverlabs_nat:natural_despawn": {
"minecraft:despawn": {
"despawn_from_distance": {},
"remove_child_entities": true
}
},
"silverlabs_nat:persistent": {
"minecraft:persistent": {}
}
},
"components": {
"minecraft:is_hidden_when_invisible": {},
"minecraft:type_family": {
"family": [
"silverlabs_nat:firefly",
"silverlabs_nat:capturable_entity",
"mob",
"arthropod"
]
},
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? Math.Random(1,3): 0"
},
"minecraft:loot": {
"table": "loot_tables/sf/nba/entities/firefly.loot.json"
},
"minecraft:breathable": {
"totalSupply": 15,
"suffocateTime": 0
},
"minecraft:collision_box": {
"width": 0.3,
"height": 0.3
},
"minecraft:nameable": {},
"minecraft:health": {
"value": 6,
"max": 6
},
"minecraft:healable": {
"items": [
{
"item": "double_plant:4",
"heal_amount": 2
},
{
"item": "double_plant:5",
"heal_amount": 2
}
]
},
"minecraft:damage_sensor": {
"triggers": {
"cause": "fall",
"deals_damage": "no"
}
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": {
"test": "in_lava",
"subject": "self",
"operator": "==",
"value": true
},
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:movement": {
"value": 0.3
},
"minecraft:leashable": {
"soft_distance": 4,
"hard_distance": 6,
"max_distance": 10
},
"minecraft:balloonable": {
"mass": 0.5
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:game_event_movement_tracking": {
"emit_flap": true
},
"minecraft:scheduler": {
"min_delay_secs": 0,
"max_delay_secs": 0,
"scheduled_events": [
{
"filters": {
"any_of": [
{
"test": "is_daytime",
"value": false
},
{
"test": "light_level",
"operator": "<",
"value": 8
}
]
},
"event": "silverlabs_nat:can_glow"
},
{
"filters": {
"none_of": [
{
"test": "is_daytime",
"value": false
},
{
"test": "light_level",
"operator": "<",
"value": 8
}
]
},
"event": "silverlabs_nat:cannot_glow"
}
]
},
"minecraft:environment_sensor": {
"triggers": [
{
"filters": {
"all_of": {
"test": "has_component",
"value": "minecraft:behavior.move_to_block"
},
"any_of": [
{
"test": "is_brightness",
"operator": "<=",
"value": 0.5
},
{
"test": "is_daytime",
"value": false
}
]
},
"event": "silverlabs_nat:fly_around_aimlessly"
},
{
"filters": [
{
"test": "has_component",
"operator": "!=",
"value": "minecraft:behavior.move_to_block"
},
{
"test": "has_component",
"operator": "!=",
"value": "minecraft:out_of_control"
},
{
"test": "is_brightness",
"operator": ">",
"value": 0.5
},
{
"test": "is_daytime",
"value": true
}
],
"event": "silverlabs_nat:look_for_hide"
}
]
},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": true
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_no_capture"
},
"swing": false
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": false
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:capture_net"
}
},
"swing": true,
"hurt_item": 1,
"interact_text": "action.interact.silverlabs_nat.capture_net.use",
"play_sounds": "pop"
}
]
}
},
"events": {
"minecraft:entity_spawned": {
"add": {
"component_groups": [
"silverlabs_nat:adult"
]
}
},
"silverlabs_nat:can_glow": {
"set_property": {
"silverlabs_nat:can_glow": true
}
},
"silverlabs_nat:cannot_glow": {
"set_property": {
"silverlabs_nat:can_glow": false
}
},
"silverlabs_nat:fly_around_aimlessly": {
"remove": {
"component_groups": [
"silverlabs_nat:look_for_hide"
]
}
},
"silverlabs_nat:look_for_hide": {
"add": {
"component_groups": [
"silverlabs_nat:look_for_hide"
]
}
},
"silverlabs_nat:find_hide_event": {
"trigger": "silverlabs_nat:perish",
"set_property": {
"silverlabs_nat:on_hide": true
}
},
"silverlabs_nat:perish": {
"remove": {
"component_groups": [
"silverlabs_nat:look_for_hide"
]
},
"add": {
"component_groups": [
"silverlabs_nat:perish"
]
}
},
"silverlabs_nat:despawn": {
"add": {
"component_groups": [
"silverlabs_nat:despawn"
]
}
},
"silverlabs_nat:natural_despawn": {
"add": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:become_persistent": {
"add": {
"component_groups": [
"silverlabs_nat:persistent"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:revert_to_baby": {
"trigger": "silverlabs_nat:become_persistent",
"queue_command": {
"command": [
"playsound silverlabs_nat.pacifier.interact @a[r=10] ~~~"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult"
]
},
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
}
},
"silverlabs_nat:knapsack_no_capture": {}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,914 @@
{
"format_version": "1.21.50",
"minecraft:entity": {
"description": {
"name": "Kangaroo",
"identifier": "silverlabs_nat:kangaroo",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false,
"properties": {
"silverlabs_nat:has_baby_in_pouch": {
"type": "bool",
"default": false,
"client_sync": true
},
"silverlabs_nat:is_following_owner": {
"type": "bool",
"default": true,
"client_sync": false
}
}
},
"component_groups": {
"silverlabs_nat:despawn": {
"minecraft:instant_despawn": {}
},
"silverlabs_nat:baby_hitbox": {
"minecraft:collision_box": {
"width": 0.5,
"height": 1.05
}
},
"silverlabs_nat:baby": {
"minecraft:type_family": {
"family": [
"silverlabs_nat:baby_kangaroo_untamed",
"silverlabs_nat:baby",
"mob"
]
},
"minecraft:is_baby": {},
"minecraft:collision_box": {
"width": 0.5,
"height": 1.05
},
"minecraft:tameable": {
"probability": 1,
"tame_items": [
"wheat"
],
"tame_event": {
"event": "silverlabs_nat:kangaroo_tamed",
"target": "self"
}
},
"minecraft:ageable": {
"duration": 1200,
"feed_items": [
"wheat"
],
"grow_up": {
"filters": {
"test": "is_riding",
"value": false
},
"event": "silverlabs_nat:kangaroo_grow_up",
"target": "self"
}
},
"minecraft:behavior.follow_parent": {
"priority": 6,
"speed_multiplier": 1.1
},
"minecraft:environment_sensor": {
"triggers": [
{
"filters": {
"test": "is_riding"
},
"event": "silverlabs_nat:kangaroo_baby_on_pouch",
"target": "self"
},
{
"filters": {
"operator": "!=",
"test": "is_riding"
},
"event": "silverlabs_nat:kangaroo_baby_out_of_pouch",
"target": "self"
}
]
},
"minecraft:behavior.move_to_block": {
"priority": 8,
"start_chance": 0.2,
"search_range": 32,
"goal_radius": 0.25,
"stay_duration": 3,
"target_selection_method": "random",
"on_reach": {
"event": "silverlabs_nat:start_sniff",
"target": "self"
},
"target_blocks": [
"minecraft:poppy",
"minecraft:dandelion",
"minecraft:blue_orchid",
"minecraft:allium",
"minecraft:azure_bluet",
"minecraft:orange_tulip",
"minecraft:pink_tulip",
"minecraft:red_tulip",
"minecraft:white_tulip",
"minecraft:oxeye_daisy",
"minecraft:cornflower",
"minecraft:lily_of_the_valley",
"minecraft:sunflower",
"minecraft:lilac",
"minecraft:rose_bush",
"minecraft:peony",
"minecraft:pitcher_plant",
"minecraft:pink_petals",
"minecraft:wildflowers",
"minecraft:torchflower",
"minecraft:closed_eyeblossom",
"minecraft:open_eyeblossom"
]
},
"minecraft:behavior.follow_mob": {
"priority": 6,
"search_range": 16,
"stop_distance": 5,
"speed_multiplier": 1.1,
"use_home_position_restriction": true,
"filters": {
"all_of": [
{
"test": "is_underwater",
"subject": "other",
"value": false
},
{
"test": "is_baby",
"subject": "other",
"value": false
},
{
"any_of": [
{
"test": "is_family",
"subject": "other",
"value": "silverlabs_nat:butterfly"
},
{
"test": "is_family",
"subject": "other",
"value": "butterfly"
}
]
}
]
}
},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": false
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
}
],
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
},
"swing": true
}
]
}
},
"silverlabs_nat:adult_hitbox": {
"minecraft:collision_box": {
"width": 1,
"height": 2.1
}
},
"silverlabs_nat:adult": {
"minecraft:type_family": {
"family": [
"silverlabs_nat:kangaroo"
]
},
"minecraft:rideable": {
"family_types": [
"silverlabs_nat:baby_kangaroo_untamed"
],
"pull_in_entities": true,
"rider_can_interact": false,
"seat_count": 1,
"seats": [
{
"lock_rider_rotation": 0,
"position": [
0,
0.3,
0
]
}
]
},
"minecraft:entity_sensor": {
"relative_range": true,
"subsensors": [
{
"cooldown": 1,
"range": [
1,
1
],
"event_filters": [
{
"test": "rider_count",
"value": 0
},
{
"test": "has_component",
"value": "minecraft:is_baby",
"subject": "other"
},
{
"test": "is_family",
"value": "silverlabs_nat:kangaroo",
"subject": "other"
},
{
"test": "has_component",
"value": "minecraft:is_tamed",
"subject": "other",
"operator": "!="
},
{
"test": "is_riding",
"subject": "other",
"operator": "!="
}
],
"event": "silverlabs_nat:scoop_up_baby"
}
]
},
"minecraft:experience_reward": {
"on_death": "q.last_hit_by_player ? 3: 0",
"on_bred": "Math.random(1,7)"
},
"minecraft:loot": {
"table": "loot_tables/sf/nba/entities/kangaroo.loot.json"
},
"minecraft:behavior.breed": {
"priority": 1,
"speed_multiplier": 1
},
"minecraft:breedable": {
"require_tame": false,
"inherit_tamed": true,
"breeds_with": {
"mate_type": "silverlabs_nat:kangaroo",
"baby_type": "silverlabs_nat:kangaroo",
"breed_event": {
"event": "silverlabs_nat:baby",
"target": "baby"
}
},
"breed_items": [
"wheat"
]
},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": false
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
}
],
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
},
"swing": true
}
]
}
},
"silverlabs_nat:with_boxing_gloves": {
"minecraft:mark_variant": {
"value": 1
}
},
"silverlabs_nat:with_baby_in_pouch": {
"minecraft:addrider": {
"entity_type": "silverlabs_nat:kangaroo",
"spawn_event": "silverlabs_nat:baby"
}
},
"silverlabs_nat:with_baby_in_pouch_with_boxing_gloves": {
"minecraft:addrider": {
"entity_type": "silverlabs_nat:kangaroo",
"spawn_event": "silverlabs_nat:kangaroo_as_baby_with_boxing_gloves"
}
},
"silverlabs_nat:natural_despawn": {
"minecraft:despawn": {
"despawn_from_distance": {},
"remove_child_entities": true
}
},
"silverlabs_nat:persistent": {
"minecraft:persistent": {}
},
"silverlabs_nat:follow_owner": {
"minecraft:behavior.follow_owner": {
"priority": 7,
"speed_multiplier": 1.2,
"start_distance": 10,
"stop_distance": 3
},
"minecraft:behavior.random_stroll": {
"priority": 8
}
},
"silverlabs_nat:wander_around": {
"minecraft:behavior.random_stroll": {
"priority": 8
}
},
"silverlabs_nat:kangaroo_tamed": {
"minecraft:is_tamed": {},
"minecraft:healable": {
"items": [
{
"item": "wheat",
"heal_amount": 2
}
]
}
},
"silverlabs_nat:baby_kangaroo_tamed": {
"minecraft:sittable": {},
"minecraft:behavior.stay_while_sitting": {
"priority": 0
},
"minecraft:type_family": {
"family": [
"silverlabs_nat:baby_kangaroo_tamed",
"silverlabs_nat:kangaroo",
"mob"
]
}
}
},
"components": {
"minecraft:nameable": {},
"minecraft:is_hidden_when_invisible": {},
"minecraft:behavior.tempt": {
"priority": 3,
"speed_multiplier": 1.2,
"items": [
"wheat"
]
},
"minecraft:collision_box": {
"width": 1,
"height": 2.1
},
"minecraft:movement.basic": {},
"minecraft:movement": {
"value": 0.25
},
"minecraft:behavior.float": {
"priority": 0
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 2,
"reselect_targets": true,
"must_see": true,
"entity_types": [
{
"filters": {
"all_of": [
{
"any_of": [
{
"test": "is_family",
"subject": "other",
"value": "player"
},
{
"test": "is_family",
"subject": "other",
"value": "monster"
}
]
},
{
"test": "rider_count",
"value": 1
}
]
},
"max_dist": 16,
"must_see": true
},
{
"filters": {
"all_of": [
{
"test": "is_family",
"subject": "other",
"value": "player"
},
{
"test": "is_mark_variant",
"value": 1
}
]
},
"max_dist": 20,
"walk_speed_multiplier": 1.5,
"must_see": true
}
]
},
"minecraft:behavior.delayed_attack": {
"priority": 2,
"attack_duration": 0.5,
"attack_once": false,
"hit_delay_pct": 0.66,
"random_stop_interval": 0,
"reach_multiplier": 1.5,
"cooldown_time": 5,
"require_complete_path": true,
"track_target": true
},
"minecraft:behavior.random_stroll": {
"priority": 4
},
"minecraft:behavior.random_look_around": {
"priority": 5,
"look_distance": 1.5
},
"minecraft:navigation.walk": {
"is_amphibious": false,
"avoid_sun": false,
"avoid_water": true,
"can_path_over_water": false
},
"minecraft:jump.static": {},
"minecraft:can_climb": {},
"minecraft:health": {
"value": 12,
"max": 12
},
"minecraft:healable": {
"items": [
{
"item": "wheat",
"heal_amount": 2
}
]
},
"minecraft:leashable": {
"soft_distance": 4,
"hard_distance": 6,
"max_distance": 10
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:attack": {
"damage": 4
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": true
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_no_capture"
},
"swing": false
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
}
],
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
},
"swing": true
}
]
}
},
"events": {
"minecraft:entity_spawned": {
"randomize": [
{
"add": {
"component_groups": [
"silverlabs_nat:adult"
]
},
"weight": 80
},
{
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:with_baby_in_pouch"
]
},
"weight": 8
},
{
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"weight": 7
},
{
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:with_boxing_gloves"
]
},
"weight": 4
},
{
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:with_baby_in_pouch_with_boxing_gloves"
]
},
"weight": 1
}
]
},
"silverlabs_nat:despawn": {
"add": {
"component_groups": [
"silverlabs_nat:despawn"
]
}
},
"silverlabs_nat:baby": {
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult"
]
}
},
"silverlabs_nat:kangaroo_as_baby_with_boxing_gloves": {
"trigger": "silverlabs_nat:baby",
"add": {
"component_groups": [
"silverlabs_nat:with_boxing_gloves"
]
}
},
"silverlabs_nat:adult": {
"add": {
"component_groups": [
"silverlabs_nat:adult"
]
}
},
"silverlabs_nat:kangaroo_grow_up": {
"remove": {
"component_groups": [
"silverlabs_nat:baby",
"silverlabs_nat:baby_kangaroo_tamed"
]
},
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:adult_hitbox"
]
},
"queue_command": {
"command": [
"ride @s stop_riding"
]
}
},
"silverlabs_nat:kangaroo_baby_on_pouch": {
"remove": {
"component_groups": [
"silverlabs_nat:baby_hitbox"
]
},
"queue_command": {
"command": [
"effect @s invisibility infinite 1 true"
]
}
},
"silverlabs_nat:kangaroo_baby_out_of_pouch": {
"add": {
"component_groups": [
"silverlabs_nat:baby_hitbox"
]
},
"queue_command": {
"command": [
"effect @s clear"
]
}
},
"silverlabs_nat:natural_despawn": {
"add": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:become_persistent": {
"add": {
"component_groups": [
"silverlabs_nat:persistent"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:set_permanent_baby": {
"add": {
"component_groups": [
"silverlabs_nat:permanent_baby"
]
},
"queue_command": {
"command": [
"particle minecraft:villager_angry ~ ~2 ~",
"playsound random.eat @p ~ ~ ~ 0.8 1.2"
]
}
},
"silverlabs_nat:kangaroo_tamed": {
"add": {
"component_groups": [
"silverlabs_nat:kangaroo_tamed",
"silverlabs_nat:baby_kangaroo_tamed",
"silverlabs_nat:follow_owner"
]
}
},
"silverlabs_nat:start_sniff": {
"queue_command": {
"command": [
"playsound silverlabs_nat.flower_obsession.baby_sniff_medium @a[r=6]"
]
}
},
"silverlabs_nat:revert_to_baby": {
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult"
]
}
},
"silverlabs_nat:follow_owner": {
"remove": {
"component_groups": [
"silverlabs_nat:wander_around"
]
},
"add": {
"component_groups": [
"silverlabs_nat:follow_owner"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": true
},
"queue_command": {
"command": [
"title @s actionbar Following",
"playsound silverlabs_nat.whistle.whistle @a[r=8] ~~~"
],
"target": "other"
}
},
"silverlabs_nat:wander_around": {
"remove": {
"component_groups": [
"silverlabs_nat:follow_owner"
]
},
"add": {
"component_groups": [
"silverlabs_nat:wander_around"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": false
},
"queue_command": {
"command": [
"title @s actionbar Wandering",
"playsound silverlabs_nat.whistle.whistle @a[r=8] ~~~"
],
"target": "other"
}
},
"silverlabs_nat:knapsack_no_capture": {}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,840 @@
{
"format_version": "1.21.50",
"minecraft:entity": {
"description": {
"identifier": "silverlabs_nat:owl",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false,
"properties": {
"silverlabs_nat:is_following_owner": {
"type": "bool",
"default": true,
"client_sync": false
},
"silverlabs_nat:movement_mode": {
"type": "enum",
"values": [
"walk",
"fly"
],
"default": "walk"
},
"silverlabs_nat:is_tempted": {
"type": "bool",
"default": false
},
"silverlabs_nat:variant": {
"type": "int",
"default": "q.had_component_group('silverlabs_nat:spawn_snowy') ? 1: 0",
"range": [
0,
1
],
"client_sync": true
}
},
"scripts": {
"animate": [
"landing_check",
"tempt_check",
"smooth_landing"
]
},
"animations": {
"landing_check": "controller.animation.silverlabs_nat.bird.landing_check",
"tempt_check": "controller.animation.silverlabs_nat.bird.tempt_check",
"smooth_landing": "controller.animation.silverlabs_nat.bird.smooth_landing"
}
},
"component_groups": {
"silverlabs_nat:baby": {
"minecraft:is_baby": {},
"minecraft:behavior.hurt_by_target": {
"priority": 1
},
"minecraft:behavior.panic": {
"priority": 2,
"speed_multiplier": 1.2
},
"minecraft:movement": {
"value": 0.12
},
"minecraft:collision_box": {
"width": 0.4,
"height": 0.4
},
"minecraft:ageable": {
"duration": 1200,
"feed_items": [
"rabbit",
"cooked_rabbit",
"silverlabs_nat:frog_leg",
"silverlabs_nat:cooked_frog_leg"
],
"grow_up": {
"event": "silverlabs_nat:ageable_grow_up",
"target": "self"
}
}
},
"silverlabs_nat:adult": {},
"silverlabs_nat:adult_hitbox": {
"minecraft:collision_box": {
"width": 0.5,
"height": 0.6
}
},
"silverlabs_nat:owl_untamed": {
"minecraft:tameable": {
"probability": 1,
"tame_items": [
"rabbit",
"cooked_rabbit",
"silverlabs_nat:frog_leg",
"silverlabs_nat:cooked_frog_leg"
],
"tame_event": {
"event": "silverlabs_nat:owl_tamed",
"target": "self"
}
}
},
"silverlabs_nat:owl_tamed": {
"minecraft:is_tamed": {},
"minecraft:healable": {
"items": [
{
"item": "rabbit",
"heal_amount": 2
},
{
"item": "cooked_rabbit",
"heal_amount": 3
},
{
"item": "silverlabs_nat:frog_leg",
"heal_amount": 2
},
{
"item": "silverlabs_nat:cooked_frog_leg",
"heal_amount": 3
}
]
},
"minecraft:sittable": {},
"minecraft:behavior.stay_while_sitting": {
"priority": 0
}
},
"silverlabs_nat:bird_flying_mode": {
"minecraft:physics": {
"has_gravity": false
},
"minecraft:can_fly": {},
"minecraft:movement.hover": {},
"minecraft:navigation.hover": {
"can_path_over_water": true,
"can_sink": false,
"can_pass_doors": false,
"can_path_from_air": true,
"avoid_water": true,
"avoid_damage_blocks": true,
"avoid_sun": false
}
},
"silverlabs_nat:bird_walking_mode": {
"minecraft:physics": {
"has_gravity": true
},
"minecraft:navigation.walk": {
"can_path_over_water": true,
"avoid_water": true,
"avoid_damage_blocks": true
},
"minecraft:movement.basic": {},
"minecraft:jump.static": {},
"minecraft:behavior.nap": {
"priority": 1,
"cooldown_min": 2,
"cooldown_max": 4,
"can_nap_filters": {
"all_of": [
{
"test": "is_daytime",
"operator": "==",
"value": true
},
{
"test": "in_block",
"operator": "!=",
"value": "water"
},
{
"test": "on_ground",
"operator": "==",
"value": true
}
]
}
}
},
"silverlabs_nat:follow_owner": {
"minecraft:behavior.follow_owner": {
"priority": 1,
"speed_multiplier": 1.6,
"start_distance": 12,
"stop_distance": 4
}
},
"silverlabs_nat:wander_around_walk": {
"minecraft:behavior.random_stroll": {
"priority": 3,
"speed_multiplier": 0,
"interval": 120,
"xz_dist": 10,
"y_dist": 7
}
},
"silverlabs_nat:wander_around_fly": {
"minecraft:behavior.random_hover": {
"priority": 4,
"xz_dist": 10,
"y_dist": 8,
"y_offset": -1,
"interval": 2,
"hover_height": [
1,
5
]
},
"minecraft:behavior.move_to_block": {
"priority": 9,
"tick_interval": 300,
"start_chance": 1,
"search_range": 32,
"goal_radius": 1,
"stay_duration": 2,
"target_blocks": [
"minecraft:leaves",
"minecraft:leaves:1",
"minecraft:leaves:2",
"minecraft:leaves:3",
"minecraft:leaves2",
"minecraft:leaves2:1"
],
"target_selection_method": "random"
}
},
"silverlabs_nat:transition_to_ground": {
"minecraft:behavior.nap": {
"priority": 0,
"cooldown_min": 0,
"cooldown_max": 0
},
"minecraft:timer": {
"looping": false,
"time": 1,
"time_down_event": {
"event": "silverlabs_nat:timer_complete"
}
}
},
"silverlabs_nat:natural_despawn": {
"minecraft:despawn": {
"despawn_from_distance": {},
"remove_child_entities": true
}
},
"silverlabs_nat:persistent": {
"minecraft:persistent": {}
}
},
"components": {
"minecraft:behavior.beg": {
"priority": 9,
"look_distance": 8,
"look_time": 4,
"items": [
"rabbit",
"cooked_rabbit",
"silverlabs_nat:frog_leg",
"silverlabs_nat:cooked_frog_leg"
]
},
"minecraft:type_family": {
"family": [
"silverlabs_nat:owl",
"mob"
]
},
"minecraft:is_hidden_when_invisible": {},
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? Math.Random(1,3): 0"
},
"minecraft:loot": {
"table": "loot_tables/sf/nba/entities/owl.loot.json"
},
"minecraft:breathable": {
"total_supply": 15,
"suffocate_time": 0
},
"minecraft:collision_box": {
"width": 0.5,
"height": 0.6
},
"minecraft:nameable": {},
"minecraft:health": {
"value": 12,
"max": 12
},
"minecraft:healable": {
"force_use": true,
"items": [
{
"item": "rabbit",
"heal_amount": 2
},
{
"item": "cooked_rabbit",
"heal_amount": 3
},
{
"item": "silverlabs_nat:frog_leg",
"heal_amount": 2
},
{
"item": "silverlabs_nat:cooked_frog_leg",
"heal_amount": 3
},
{
"item": "cookie",
"heal_amount": 0,
"effects": [
{
"name": "fatal_poison",
"chance": 1,
"duration": 1000,
"amplifier": 0
}
]
}
]
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": {
"test": "in_lava",
"subject": "self",
"operator": "==",
"value": true
},
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:flying_speed": {
"value": 0.12
},
"minecraft:movement": {
"value": 0.15
},
"minecraft:damage_sensor": {
"triggers": {
"cause": "fall",
"deals_damage": "no"
}
},
"minecraft:jump.static": {},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:behavior.float": {
"priority": 0
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:game_event_movement_tracking": {
"emit_flap": true
},
"minecraft:leashable": {
"soft_distance": 4,
"hard_distance": 6,
"max_distance": 10
},
"minecraft:balloonable": {},
"minecraft:behavior.tempt": {
"priority": 1,
"within_radius": 16,
"items": [
"rabbit",
"cooked_rabbit",
"silverlabs_nat:frog_leg",
"silverlabs_nat:cooked_frog_leg"
]
},
"minecraft:environment_sensor": {
"triggers": {
"filters": [
{
"test": "is_variant",
"value": 1
},
{
"test": "int_property",
"domain": "silverlabs_nat:variant",
"operator": "!=",
"value": 1
}
],
"event": "silverlabs_nat:set_variant_1"
}
},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": true
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_no_capture"
},
"swing": false
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "bool_property",
"domain": "silverlabs_nat:is_following_owner",
"value": false
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
},
{
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
]
}
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "bool_property",
"domain": "silverlabs_nat:is_following_owner",
"value": true
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
},
{
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
]
}
},
"swing": true
}
]
}
},
"events": {
"silverlabs_nat:owl_tamed": {
"sequence": [
{
"add": {
"component_groups": [
"silverlabs_nat:owl_tamed",
"silverlabs_nat:follow_owner"
]
}
},
{
"remove": {
"component_groups": [
"silverlabs_nat:owl_untamed",
"silverlabs_nat:bird_walking_mode"
]
}
},
{
"filters": {
"test": "is_baby",
"subject": "self",
"operator": "==",
"value": false
},
"add": {
"component_groups": [
"silverlabs_nat:bird_flying_mode"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:wander_around_walk",
"silverlabs_nat:transition_to_ground"
]
},
"set_property": {
"silverlabs_nat:movement_mode": "fly"
}
},
{
"filters": {
"test": "is_baby",
"subject": "self",
"operator": "==",
"value": true
},
"set_property": {
"silverlabs_nat:movement_mode": "walk"
}
}
]
},
"minecraft:entity_spawned": {
"sequence": [
{
"add": {
"component_groups": [
"silverlabs_nat:owl_untamed",
"silverlabs_nat:wander_around_walk",
"silverlabs_nat:adult"
]
}
},
{
"trigger": "silverlabs_nat:set_variant_1",
"filters": {
"any_of": [
{
"test": "has_biome_tag",
"value": "taiga"
},
{
"test": "has_biome_tag",
"value": "forest"
}
]
}
},
{
"trigger": "silverlabs_nat:set_variant_0",
"filters": {
"any_of": [
{
"test": "has_biome_tag",
"value": "snowy_slopes"
}
]
}
},
{
"trigger": "silverlabs_nat:bird_set_walking_mode"
}
]
},
"minecraft:entity_born": {
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult"
]
},
"trigger": "silverlabs_nat:bird_set_walking_mode"
},
"silverlabs_nat:ageable_grow_up": {
"remove": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:adult_hitbox"
]
}
},
"silverlabs_nat:revert_to_baby": {
"trigger": "silverlabs_nat:become_persistent",
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:adult_hitbox"
]
}
},
"silverlabs_nat:bird_set_walking_mode": {
"add": {
"component_groups": [
"silverlabs_nat:bird_walking_mode",
"silverlabs_nat:transition_to_ground",
"silverlabs_nat:wander_around_walk"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:bird_flying_mode",
"silverlabs_nat:wander_around_fly"
]
},
"set_property": {
"silverlabs_nat:movement_mode": "walk"
}
},
"silverlabs_nat:bird_set_flying_mode": {
"add": {
"component_groups": [
"silverlabs_nat:bird_flying_mode",
"silverlabs_nat:wander_around_fly"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:bird_walking_mode",
"silverlabs_nat:wander_around_walk"
]
},
"set_property": {
"silverlabs_nat:movement_mode": "fly"
}
},
"silverlabs_nat:follow_owner": {
"sequence": [
{
"filters": {
"test": "is_baby",
"subject": "self",
"operator": "==",
"value": false
},
"add": {
"component_groups": [
"silverlabs_nat:follow_owner",
"silverlabs_nat:bird_flying_mode"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": true,
"silverlabs_nat:movement_mode": "fly"
},
"remove": {
"component_groups": [
"silverlabs_nat:wander_around_walk",
"silverlabs_nat:wander_around_fly",
"silverlabs_nat:bird_walking_mode"
]
},
"queue_command": {
"command": [
"scriptevent silverlabs_nat:whistle_follow"
],
"target": "self"
}
},
{
"filters": {
"test": "is_baby",
"subject": "self",
"operator": "==",
"value": true
},
"add": {
"component_groups": [
"silverlabs_nat:follow_owner",
"silverlabs_nat:bird_walking_mode"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": true,
"silverlabs_nat:movement_mode": "walk"
},
"remove": {
"component_groups": [
"silverlabs_nat:wander_around_fly",
"silverlabs_nat:bird_flying_mode"
]
},
"queue_command": {
"command": [
"scriptevent silverlabs_nat:whistle_follow"
],
"target": "self"
}
}
]
},
"silverlabs_nat:wander_around": {
"sequence": [
{
"add": {
"component_groups": [
"silverlabs_nat:wander_around_fly"
]
}
},
{
"remove": {
"component_groups": [
"silverlabs_nat:follow_owner",
"silverlabs_nat:bird_walking_mode"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": false
},
"queue_command": {
"command": [
"scriptevent silverlabs_nat:whistle_wander"
],
"target": "self"
}
}
]
},
"silverlabs_nat:timer_complete": {
"remove": {
"component_groups": [
"silverlabs_nat:transition_to_ground"
]
}
},
"silverlabs_nat:set_variant_0": {
"set_property": {
"silverlabs_nat:variant": 0
}
},
"silverlabs_nat:set_variant_1": {
"set_property": {
"silverlabs_nat:variant": 1
}
},
"silverlabs_nat:natural_despawn": {
"add": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:become_persistent": {
"add": {
"component_groups": [
"silverlabs_nat:persistent"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:knapsack_no_capture": {}
}
}
}

View File

@@ -0,0 +1,803 @@
{
"format_version": "1.21.50",
"minecraft:entity": {
"description": {
"identifier": "silverlabs_nat:red_panda",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false,
"animations": {
"duration": "animation.silverlabs_nat.duration_10",
"sleep_stand_controller": "controller.animation.silverlabs_nat.red_panda.sleep_stand"
},
"scripts": {
"animate": [
"sleep_stand_controller"
]
},
"properties": {
"silverlabs_nat:is_following_owner": {
"type": "bool",
"default": true,
"client_sync": false
},
"silverlabs_nat:red_panda_sleep": {
"client_sync": true,
"default": false,
"type": "bool"
},
"silverlabs_nat:red_panda_energy": {
"client_sync": false,
"default": 1080,
"range": [
0,
1080
],
"type": "int"
},
"silverlabs_nat:red_panda_jolt_awake": {
"client_sync": true,
"default": false,
"type": "bool"
},
"silverlabs_nat:red_panda_standing": {
"client_sync": true,
"default": false,
"type": "bool"
}
}
},
"component_groups": {
"silverlabs_nat:red_panda_awake": {
"minecraft:movement": {
"value": 0.2
},
"minecraft:navigation.walk": {
"can_path_over_water": true,
"avoid_water": true,
"avoid_damage_blocks": true
},
"minecraft:movement.basic": {},
"minecraft:jump.static": {},
"minecraft:can_climb": {},
"minecraft:behavior.float": {
"priority": 0
},
"minecraft:behavior.tempt": {
"priority": 2,
"speed_multiplier": 1.2,
"items": [
"bamboo"
]
},
"minecraft:behavior.look_at_player": {
"priority": 8,
"look_distance": 6,
"probability": 0.02
},
"minecraft:behavior.random_look_around": {
"priority": 9
}
},
"silverlabs_nat:red_panda_sleep": {
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"event": "silverlabs_nat:jolt_awake",
"target": "self"
},
"deals_damage": "yes",
"cause": "all"
}
]
},
"minecraft:environment_sensor": {
"triggers": [
{
"event": "silverlabs_nat:jolt_awake",
"target": "self",
"filters": {
"all_of": [
{
"test": "bool_property",
"domain": "silverlabs_nat:red_panda_jolt_awake",
"subject": "self",
"value": false
},
{
"any_of": [
{
"test": "is_moving",
"subject": "self",
"value": true
},
{
"test": "in_water_or_rain",
"subject": "self",
"value": true
}
]
}
]
}
}
]
}
},
"silverlabs_nat:red_panda_wild": {
"minecraft:tameable": {
"probability": 0.3,
"tame_event": {
"event": "silverlabs_nat:on_tame",
"target": "self"
},
"tame_items": [
"bamboo"
]
},
"minecraft:behavior.avoid_mob_type": {
"priority": 2,
"entity_types": [
{
"filters": [
{
"all_of": [
{
"test": "is_family",
"subject": "other",
"value": "player"
},
{
"test": "has_component",
"value": "minecraft:is_tamed",
"subject": "self",
"operator": "!="
}
]
}
],
"max_dist": 8,
"walk_speed_multiplier": 1,
"sprint_speed_multiplier": 1.5
}
]
}
},
"silverlabs_nat:red_panda_tamed": {
"minecraft:is_tamed": {},
"minecraft:healable": {
"items": [
{
"item": "bamboo",
"heal_amount": 2
}
]
},
"minecraft:behavior.random_stroll": {
"priority": 3,
"speed_multiplier": 1
},
"minecraft:sittable": {},
"minecraft:behavior.stay_while_sitting": {
"priority": 0
}
},
"silverlabs_nat:follow_owner": {
"minecraft:behavior.follow_owner": {
"priority": 7,
"speed_multiplier": 1.2,
"start_distance": 10,
"stop_distance": 3
},
"minecraft:behavior.random_stroll": {
"priority": 8
}
},
"silverlabs_nat:wander_around": {
"minecraft:behavior.random_stroll": {
"priority": 8
}
},
"silverlabs_nat:baby": {
"minecraft:is_baby": {},
"minecraft:scale": {
"value": 0.5
},
"minecraft:ageable": {
"duration": 1200,
"feed_items": [
"bamboo"
],
"grow_up": {
"event": "silverlabs_nat:ageable_grow_up",
"target": "self"
}
},
"minecraft:behavior.panic": {
"priority": 5,
"speed_multiplier": 1.4
},
"minecraft:behavior.follow_parent": {
"priority": 6,
"speed_multiplier": 1.1
},
"minecraft:behavior.move_to_block": {
"priority": 8,
"start_chance": 0.2,
"search_range": 32,
"goal_radius": 0.25,
"stay_duration": 3,
"target_selection_method": "random",
"on_reach": {
"event": "silverlabs_nat:start_sniff",
"target": "self"
},
"target_blocks": [
"minecraft:poppy",
"minecraft:dandelion",
"minecraft:blue_orchid",
"minecraft:allium",
"minecraft:azure_bluet",
"minecraft:orange_tulip",
"minecraft:pink_tulip",
"minecraft:red_tulip",
"minecraft:white_tulip",
"minecraft:oxeye_daisy",
"minecraft:cornflower",
"minecraft:lily_of_the_valley",
"minecraft:sunflower",
"minecraft:lilac",
"minecraft:rose_bush",
"minecraft:peony",
"minecraft:pitcher_plant",
"minecraft:pink_petals",
"minecraft:wildflowers",
"minecraft:torchflower",
"minecraft:closed_eyeblossom",
"minecraft:open_eyeblossom"
]
},
"minecraft:behavior.follow_mob": {
"priority": 6,
"search_range": 16,
"stop_distance": 5,
"speed_multiplier": 1.1,
"use_home_position_restriction": true,
"filters": {
"all_of": [
{
"test": "is_underwater",
"subject": "other",
"value": false
},
{
"test": "is_baby",
"subject": "other",
"value": false
},
{
"any_of": [
{
"test": "is_family",
"subject": "other",
"value": "silverlabs_nat:butterfly"
},
{
"test": "is_family",
"subject": "other",
"value": "butterfly"
}
]
}
]
}
}
},
"silverlabs_nat:adult_hitbox": {
"minecraft:collision_box": {
"width": 0.7,
"height": 0.6
}
},
"silverlabs_nat:adult": {
"minecraft:experience_reward": {
"on_death": "q.last_hit_by_player ? Math.random(1, 3): 0",
"on_bred": "Math.Random(1,7)"
},
"minecraft:loot": {
"table": "loot_tables/sf/nba/entities/red_panda.loot.json"
},
"minecraft:behavior.breed": {
"priority": 1,
"speed_multiplier": 1
},
"minecraft:breedable": {
"require_tame": true,
"inherit_tamed": true,
"breeds_with": {
"mate_type": "silverlabs_nat:red_panda",
"baby_type": "silverlabs_nat:red_panda",
"breed_event": {
"event": "silverlabs_nat:from_breeding",
"target": "baby"
}
},
"breed_items": [
"bamboo"
]
}
},
"silverlabs_nat:natural_despawn": {
"minecraft:despawn": {
"despawn_from_distance": {},
"remove_child_entities": true
}
},
"silverlabs_nat:persistent": {
"minecraft:persistent": {}
}
},
"components": {
"minecraft:behavior.beg": {
"priority": 9,
"look_distance": 8,
"look_time": 4,
"items": [
"bamboo"
]
},
"minecraft:is_hidden_when_invisible": {},
"minecraft:type_family": {
"family": [
"silverlabs_nat:red_panda",
"mob"
]
},
"minecraft:breathable": {
"total_supply": 15,
"suffocate_time": 0
},
"minecraft:nameable": {},
"minecraft:health": {
"value": 12,
"max": 12
},
"minecraft:healable": {
"items": [
{
"item": "bamboo",
"heal_amount": 2
}
]
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": {
"test": "in_lava",
"subject": "self",
"operator": "==",
"value": true
},
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:collision_box": {
"width": 0.7,
"height": 0.6
},
"minecraft:leashable": {
"soft_distance": 4,
"hard_distance": 6,
"max_distance": 10
},
"minecraft:balloonable": {
"mass": 0.9
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "is_baby",
"subject": "self",
"value": true
},
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_swing"
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:empty_knapsack"
}
]
},
"event": "silverlabs_nat:knapsack_no_capture"
},
"swing": false
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_equipment",
"subject": "other",
"domain": "hand",
"value": "silverlabs_nat:pacifier"
}
]
},
"event": "silverlabs_nat:revert_to_baby"
},
"use_item": false,
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "bool_property",
"domain": "silverlabs_nat:is_following_owner",
"value": false
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
},
{
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
]
}
},
"swing": true
},
{
"on_interact": {
"filters": {
"all_of": [
{
"test": "has_component",
"value": "minecraft:is_tamed"
},
{
"test": "is_sitting",
"operator": "!="
},
{
"test": "bool_property",
"domain": "silverlabs_nat:is_following_owner",
"value": true
},
{
"test": "is_sneaking",
"subject": "other",
"operator": "!="
},
{
"any_of": [
{
"test": "has_equipment",
"value": "silverlabs_nat:whistle",
"subject": "other"
},
{
"test": "has_equipment",
"value": "sf_hba:whistle",
"subject": "other"
}
]
}
]
}
},
"swing": true
}
]
}
},
"events": {
"minecraft:entity_spawned": {
"add": {
"component_groups": [
"silverlabs_nat:red_panda_wild"
]
},
"randomize": [
{
"weight": 9,
"trigger": "silverlabs_nat:adult"
},
{
"weight": 1,
"trigger": "silverlabs_nat:entity_born"
}
],
"set_property": {
"silverlabs_nat:red_panda_energy": "math.random(15, 1080)"
}
},
"silverlabs_nat:force_sleep": {
"set_property": {
"silverlabs_nat:red_panda_energy": 0
}
},
"silverlabs_nat:force_awake": {
"set_property": {
"silverlabs_nat:red_panda_energy": 1080
}
},
"silverlabs_nat:jolt_awake": {
"set_property": {
"silverlabs_nat:red_panda_energy": "query.property('silverlabs_nat:red_panda_energy') + 60",
"silverlabs_nat:red_panda_jolt_awake": true
}
},
"silverlabs_nat:sleeping": {
"set_property": {
"silverlabs_nat:red_panda_sleep": true,
"silverlabs_nat:red_panda_jolt_awake": false
},
"add": {
"component_groups": [
"silverlabs_nat:red_panda_sleep"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:red_panda_awake"
]
}
},
"silverlabs_nat:awake": {
"set_property": {
"silverlabs_nat:red_panda_sleep": false,
"silverlabs_nat:red_panda_jolt_awake": false
},
"add": {
"component_groups": [
"silverlabs_nat:red_panda_awake"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:red_panda_sleep"
]
}
},
"silverlabs_nat:from_breeding": {
"sequence": [
{
"trigger": "silverlabs_nat:entity_born"
},
{
"trigger": "silverlabs_nat:on_tame"
}
]
},
"silverlabs_nat:decrement_energy": {
"set_property": {
"silverlabs_nat:red_panda_energy": "query.property('silverlabs_nat:red_panda_energy') - math.random_integer(0, 3)"
}
},
"silverlabs_nat:increment_energy": {
"set_property": {
"silverlabs_nat:red_panda_energy": "query.property('silverlabs_nat:red_panda_energy') + math.random_integer(1, 5)"
}
},
"silverlabs_nat:start_standing": {
"set_property": {
"silverlabs_nat:red_panda_standing": true
},
"remove": {
"component_groups": [
"silverlabs_nat:red_panda_awake"
]
}
},
"silverlabs_nat:stop_standing": {
"set_property": {
"silverlabs_nat:red_panda_standing": false
},
"add": {
"component_groups": [
"silverlabs_nat:red_panda_awake"
]
}
},
"silverlabs_nat:adult": {
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:red_panda_wild",
"silverlabs_nat:wander_around"
]
}
},
"silverlabs_nat:entity_born": {
"add": {
"component_groups": [
"silverlabs_nat:red_panda_wild",
"silverlabs_nat:baby",
"silverlabs_nat:wander_around"
]
}
},
"silverlabs_nat:ageable_grow_up": {
"remove": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"add": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:adult_hitbox"
]
}
},
"silverlabs_nat:on_tame": {
"add": {
"component_groups": [
"silverlabs_nat:red_panda_tamed",
"silverlabs_nat:follow_owner"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:red_panda_wild"
]
}
},
"silverlabs_nat:follow_owner": {
"add": {
"component_groups": [
"silverlabs_nat:follow_owner"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:wander_around"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": true
},
"queue_command": {
"command": [
"scriptevent silverlabs_nat:whistle_follow"
],
"target": "self"
}
},
"silverlabs_nat:wander_around": {
"add": {
"component_groups": [
"silverlabs_nat:wander_around"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:follow_owner"
]
},
"set_property": {
"silverlabs_nat:is_following_owner": false
},
"queue_command": {
"command": [
"scriptevent silverlabs_nat:whistle_wander"
],
"target": "self"
}
},
"silverlabs_nat:natural_despawn": {
"add": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:become_persistent": {
"add": {
"component_groups": [
"silverlabs_nat:persistent"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:natural_despawn"
]
}
},
"silverlabs_nat:set_permanent_baby": {
"add": {
"component_groups": [
"silverlabs_nat:permanent_baby"
]
},
"queue_command": {
"command": [
"particle minecraft:villager_angry ~ ~2 ~",
"playsound random.eat @p ~ ~ ~ 0.8 1.2"
]
}
},
"silverlabs_nat:start_sniff": {
"queue_command": {
"command": [
"playsound silverlabs_nat.flower_obsession.baby_sniff_small @a[r=6]"
]
}
},
"silverlabs_nat:revert_to_baby": {
"trigger": "silverlabs_nat:become_persistent",
"queue_command": {
"command": [
"playsound silverlabs_nat.pacifier.interact @a[r=10] ~~~"
]
},
"add": {
"component_groups": [
"silverlabs_nat:baby"
]
},
"remove": {
"component_groups": [
"silverlabs_nat:adult",
"silverlabs_nat:adult_hitbox"
]
}
},
"silverlabs_nat:knapsack_no_capture": {}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,166 @@
{
"format_version": "1.21.50",
"minecraft:entity": {
"description": {
"identifier": "silverlabs_nat:snake_egg",
"is_summonable": true
},
"components": {
"minecraft:collision_box": {
"width": 0.2,
"height": 0.2
},
"minecraft:health": {
"value": 1,
"max": 1
},
"minecraft:knockback_resistance": {
"value": 1
},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": false
},
"minecraft:physics": {},
"minecraft:type_family": {
"family": [
"silverlabs_nat:snake_egg",
"inanimate"
]
},
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "entity_attack",
"on_damage": {
"filters": {
"test": "is_family",
"subject": "other",
"value": "player"
},
"event": "silverlabs_nat:drop"
},
"deals_damage": "no"
},
{
"cause": "all",
"deals_damage": "no"
}
]
},
"minecraft:persistent": {}
},
"component_groups": {
"silverlabs_nat:stage_0": {
"minecraft:variant": {
"value": 0
}
},
"silverlabs_nat:stage_1": {
"minecraft:variant": {
"value": 1
}
},
"silverlabs_nat:stage_2": {
"minecraft:variant": {
"value": 2
}
},
"silverlabs_nat:hatch_timer": {
"minecraft:timer": {
"looping": true,
"time": 200,
"time_down_event": {
"event": "silverlabs_nat:next_stage"
}
}
},
"silverlabs_nat:hatch": {
"minecraft:transformation": {
"into": "silverlabs_nat:snake<silverlabs_nat:entity_born>",
"keep_owner": true,
"delay": 0.2
}
},
"silverlabs_nat:drop": {
"minecraft:instant_despawn": {},
"minecraft:spawn_entity": {
"entities": [
{
"min_wait_time": 0,
"max_wait_time": 0,
"spawn_item": "silverlabs_nat:snake_egg"
}
]
}
}
},
"events": {
"minecraft:entity_born": {
"trigger": "minecraft:entity_spawned"
},
"minecraft:entity_spawned": {
"add": {
"component_groups": [
"silverlabs_nat:hatch_timer",
"silverlabs_nat:stage_0"
]
}
},
"silverlabs_nat:next_stage": {
"sequence": [
{
"filters": {
"test": "is_variant",
"value": 2
},
"add": {
"component_groups": [
"silverlabs_nat:hatch"
]
}
},
{
"filters": {
"test": "is_variant",
"value": 1
},
"remove": {
"component_groups": [
"silverlabs_nat:stage_1"
]
},
"add": {
"component_groups": [
"silverlabs_nat:stage_2"
]
}
},
{
"filters": {
"test": "is_variant",
"value": 0
},
"remove": {
"component_groups": [
"silverlabs_nat:stage_0"
]
},
"add": {
"component_groups": [
"silverlabs_nat:stage_1"
]
}
}
]
},
"silverlabs_nat:drop": {
"add": {
"component_groups": [
"silverlabs_nat:drop"
]
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "empty",
"weight": 3
},
{
"type": "item",
"name": "silverlabs_nat:bushmeat",
"weight": 5,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "empty",
"weight": 1
},
{
"type": "item",
"name": "silverlabs_nat:fur",
"weight": 4,
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,94 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:venison",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:leather",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 2
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,103 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:venison",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:leather",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 2
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:saddle"
}
]
}
]
}

View File

@@ -0,0 +1,68 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:hide",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:bushmeat",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,65 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:hide",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:bushmeat",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:saddle"
}
]
}
]
}

View File

@@ -0,0 +1,42 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:morsel",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 2
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:fur",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,66 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:glowstone_dust",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
],
"conditions": [
{
"condition": "killed_by_player"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:bug_wing",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
],
"conditions": [
{
"condition": "killed_by_player"
}
]
}
]
}

View File

@@ -0,0 +1,28 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:morsel",
"weight": 1,
"functions": [
{ "function": "set_count", "count": { "min": 1, "max": 1 } },
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": { "on_fire": true }
}
]
},
{ "function": "looting_enchant", "count": { "min": 0, "max": 2 } }
]
}
]
}
]
}

View File

@@ -0,0 +1,61 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:hide",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 2
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:bushmeat",
"weight": 1,
"functions": [
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,94 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:moose_meat",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:fur",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 1,
"max": 3
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,94 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:moose_meat",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:fur",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "looting_enchant",
"count": {
"min": 1,
"max": 3
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,63 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:feather",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "empty",
"weight": 2
},
{
"type": "item",
"name": "silverlabs_nat:talon",
"weight": 1
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:morsel",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,65 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:bushmeat",
"weight": 5,
"functions": [
{
"function": "set_count",
"count": {
"min": 0,
"max": 1
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:fur",
"weight": 2,
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
}
]
}

View File

@@ -0,0 +1,24 @@
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "silverlabs_nat:stinky_glands",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": { "min": 1, "max": 1 }
},
{
"function": "looting_enchant",
"count": { "min": 0, "max": 1 }
}
]
}
]
}
]
}

Some files were not shown because too many files have changed in this diff Show More