recreate veins for kjs

This commit is contained in:
SpeeeDCraft
2023-10-23 21:25:35 +07:00
parent 35f66e252b
commit a3305f8dec
11 changed files with 1573 additions and 156 deletions

View File

@@ -1,3 +0,0 @@
// priority: 0
// script..

View File

@@ -0,0 +1,5 @@
// priority: 0
ServerEvents.highPriorityData(event => {
addOreVeins(event);
})

View File

@@ -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)
})
}