recreate veins for kjs
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
// priority: 0
|
||||
|
||||
// script..
|
||||
5
kubejs/server_scripts/mainServerScript.js
Normal file
5
kubejs/server_scripts/mainServerScript.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// priority: 0
|
||||
|
||||
ServerEvents.highPriorityData(event => {
|
||||
addOreVeins(event);
|
||||
})
|
||||
@@ -1,7 +1,6 @@
|
||||
// priority: 0
|
||||
|
||||
ServerEvents.highPriorityData(event => {
|
||||
|
||||
const addOreVeins = (event) => {
|
||||
const veinsJson = {
|
||||
replace: true,
|
||||
values: []
|
||||
@@ -12,7 +11,7 @@ ServerEvents.highPriorityData(event => {
|
||||
const placedFeatureVeinJson = {
|
||||
feature: `tfc:vein/${vein.random_name}`,
|
||||
placement: []
|
||||
}
|
||||
}
|
||||
|
||||
const configuredFeatureVeinJson = {
|
||||
type: vein.veinType,
|
||||
@@ -27,8 +26,21 @@ ServerEvents.highPriorityData(event => {
|
||||
size: vein.size,
|
||||
density: vein.density,
|
||||
blocks: [],
|
||||
random_name: vein.random_name,
|
||||
|
||||
// may be empty
|
||||
indicator: vein.indicator,
|
||||
random_name: vein.random_name
|
||||
biomes: vein.biomes, // not work (maybe tfc bug)
|
||||
|
||||
// disc vein stuff
|
||||
height: vein.height,
|
||||
|
||||
// pipe vein stuff
|
||||
radius: vein.radius,
|
||||
minSkew: vein.minSkew,
|
||||
maxSkew: vein.maxSkew,
|
||||
minSlant: vein.minSlant,
|
||||
maxSlant: vein.maxSlant
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,10 +63,10 @@ ServerEvents.highPriorityData(event => {
|
||||
})
|
||||
|
||||
veinsJson.values.push(`tfc:vein/${vein.random_name}`)
|
||||
|
||||
console.log(configuredFeatureVeinJson)
|
||||
event.addJson(`tfc:worldgen/configured_feature/vein/${vein.random_name}`, configuredFeatureVeinJson)
|
||||
event.addJson(`tfc:worldgen/placed_feature/vein/${vein.random_name}`, placedFeatureVeinJson)
|
||||
})
|
||||
|
||||
event.addJson(`tfc:tags/worldgen/placed_feature/in_biome/veins`, veinsJson)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user