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!
#Replicating new wolf spawn locations in older versions
18 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
check entityjs
EntityJS is an addon that allows you to create custom entities with KubeJS.
honestly prolly a better question is is it possible to make mobs spawn in specific structures
i assume the answer is yes but figure i still ask lol
like if i want to have certain mobs spawn in the Battle Tower mod structures or smth to make them harder
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
different thought, im very uh
not focused right now lmao
[➤](#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))
})
i am doing like 7 things at once
This is to check the structure of a pos
[➤](#1391541124857856133 message) weight, min number of a group, max number of a group