-
Notifications
You must be signed in to change notification settings - Fork 5
KubeJS
Draylar edited this page Apr 14, 2021
·
1 revision
Miner's Horizon provides KubeJS compatibility through startup script events (kubejs/.startup_scripts/xyz.js
).
This event is called every time an ore entry is loaded from the minershorizon.json
config file. Handlers can call event.cancel()
to prevent the ore from loading.
Exclude Diamond Ore from loading from the config file:
onEvent('horizon.config', event => {
if(event.ore.block.includes("diamond")) {
event.cancel()
}
});
Block ores based on namespace:
onEvent('horizon.config', event => {
if(event.ore.block.startsWith("techreborn")) {
event.cancel()
}
});
Prevent ALL ore from loading from the config file:
onEvent('horizon.config', event => {
event.cancel()
});
Miner's Horizon also exposes the horizon.ores
event, which allows handlers to attach their own ore entries to the dimension generation.
Introduce a Diamond Block entry, which spawns from y200-250, up to 25 times with a vein size of 10:
onEvent('horizon.ores', event => {
event.ore("minecraft:diamond_block").size(10).count(25).minY(200).maxY(250)
});