#Replicating new wolf spawn locations in older versions

18 messages · Page 1 of 1 (latest)

finite tapir
#

Simply put, i have things set up in my modpack so all wolves spawn in the same locations they do in the newer mc versions, and my texture pack gives the biome variants in 1.20, but the method i cause the wolves to spawn, aka using the InControl mod
It does work... ok, but i am unable to control how common the wolves are in their biomes, and i am hoping that something with kubejs can give me more control over spawning so i can make this more accurate...
also i hate InControl so any ways to get rid of it are appreciated!

placid depotBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

high sundialBOT
#

EntityJS is an addon that allows you to create custom entities with KubeJS.

vague bone
finite tapir
#

like if i want to have certain mobs spawn in the Battle Tower mod structures or smth to make them harder

vague bone
#

I thought it's biome since you were asking for wolves

#

For structure, I think you need to use the spawnPlacement method

#

And do some trick to check if the blockPos is inside a structure

finite tapir
high sundialBOT
#

[➤](#1308333093760929844 message)
Returns an array of ids of structures at specific location.

The code that gets the id is stolen from https://www.curseforge.com/minecraft/mc-mods/wits, MIT license.

//Credit: TelepathicGrunt (www.curseforge.com/minecraft/mc-mods/wits)
const {STRUCTURE_REGISTRY} = Java.loadClass('net.minecraft.core.Registry');
function structuresAtPos(level, pos) {
    const structureManager = level.structureManager();
    const all = structureManager.getAllStructuresAt(pos);
    const registry = structureManager.registryAccess().registryOrThrow(STRUCTURE_REGISTRY);
    const result = [];
    all.forEach(key => result.push(registry.getKey(key)));

    return result;
}

function structuresAtFeet(entity) { //nothing new, just for people too lazy to type
    return structuresAtPos(entity.level, entity.blockPosition())
}

//Usage
ItemEvents.rightClicked(e => {
    //from block pos
    e.server.tell(structuresAtPos(e.level, e.player.blockPosition()))
    //also accepts coords
    e.server.tell(structuresAtPos(e.level, [e.player.x, e.player.y, e.player.z]))

    e.server.tell(structuresAtFeet(e.player))
})
finite tapir
#

i am doing like 7 things at once

vague bone
#

This is to check the structure of a pos

finite tapir
#

my focus is way too all over the place ._ .

#

what do each of these numbers do...?

high sundialBOT