removed problematic delights and butcher removed abyssal sovereign disabled man & deeplings for now until controls are made removed trevor giants in lieu of pehkui giant scaling mod removed lunar events removed shadows in the dark for overspawning and not doing anything added ghast resourcepack added incontrol for mob controls added spore infection added hateflesh dimension generated configs and modified some
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
// priority: 0
|
|
// Visit the wiki for more info - https://kubejs.com/
|
|
const dimrule = [
|
|
['man:managgresive','the_deep_void:deep_void'],
|
|
['man:manfromthefog','the_deep_void:deep_void'],
|
|
['man:manfromthefogback','the_deep_void:deep_void'],
|
|
['man:mftfhang','the_deep_void:deep_void']
|
|
];
|
|
EntityEvents.spawned(event => {
|
|
const { entity } = event;
|
|
let type = entity.type;
|
|
if (!dimrule.includes(type)) {return;};
|
|
const t = findRowWithValue(dimrule, entity.type);
|
|
let d = dimrule[t][1];
|
|
if(entity.level.name != d) {event.cancel();};
|
|
|
|
});
|
|
|
|
function findRowWithValue(matrix, value) {
|
|
for (let i = 0; i < matrix.length; i++) {
|
|
if (matrix[i].includes(value)) {
|
|
return i; // Return the row index if the value is found
|
|
};
|
|
};
|
|
return -1; // Return -1 if the value is not found in any row
|
|
};
|
|
/*
|
|
@silytonta
|
|
Is there a way for me to make mobs spawn in a dimension/biome that they usually dont?
|
|
|
|
@dob3a
|
|
yea, u can use "entity.block.biomeId" to get their current biome, and u can use "entity.level.name" to get their current dimension.
|
|
|
|
sry for late reply i didnt see the notify*/ |