First iteration of script, finally no errors but it also doesn't work.
This commit is contained in:
BIN
1.20.1-FearFactoryTest/minecraft/EffekseerNativeForJava.dll
Normal file
BIN
1.20.1-FearFactoryTest/minecraft/EffekseerNativeForJava.dll
Normal file
Binary file not shown.
@ -1,16 +1,29 @@
|
||||
// priority: 0
|
||||
// Visit the wiki for more info - https://kubejs.com/
|
||||
/*EntityEvents.spawned(event => {
|
||||
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;
|
||||
|
||||
// Only apply restrictions to natural spawns
|
||||
if (entity.spawnReason !== 'natural') return;
|
||||
|
||||
switch (entity.type) {
|
||||
case "entity.man.
|
||||
|
||||
let type = entity.type;
|
||||
if (!dimrule.includes(entity.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?
|
||||
|
BIN
1.20.1-FearFactoryTest/minecraft/mods/boss-refreshed-v1.2.zip
(Stored with Git LFS)
BIN
1.20.1-FearFactoryTest/minecraft/mods/boss-refreshed-v1.2.zip
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user