Reinitailized repository
This commit is contained in:
commit
b4fb99fc02
2864 changed files with 697863 additions and 0 deletions
72
kubejs/server_scripts/creative.js
Normal file
72
kubejs/server_scripts/creative.js
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// Creates and configures the Creative dimension
|
||||
|
||||
/*
|
||||
const config = global.config;
|
||||
const hexToRgb = global.hexToRgb;
|
||||
|
||||
/////////////////
|
||||
/// DIMENSION ///
|
||||
/////////////////
|
||||
// Defines the Creative dimension
|
||||
ServerEvents.highPriorityData((event) => {
|
||||
event.addJson("retards:dimension/creative.json", {
|
||||
type: "minecraft:overworld",
|
||||
generator: {
|
||||
type: "minecraft:flat",
|
||||
settings: {
|
||||
biome: "minecraft:plains",
|
||||
lakes: false,
|
||||
features: false,
|
||||
layers: Object.entries(config.creative.layers).map(
|
||||
([block, count]) => ({
|
||||
block: block,
|
||||
height: count,
|
||||
}),
|
||||
),
|
||||
structures: {},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
//////////////
|
||||
/// PORTAL ///
|
||||
//////////////
|
||||
// Defines the Creative portal
|
||||
/*
|
||||
ServerEvents.highPriorityData((event) => {
|
||||
const portal = config.creative;
|
||||
const color = hexToRgb(portal.color);
|
||||
event.addJson("retards:portals/creative.json", {
|
||||
block: portal.material,
|
||||
dim: "retards:creative",
|
||||
r: color.r,
|
||||
g: color.g,
|
||||
b: color.b,
|
||||
ignitionType: "FLUID",
|
||||
ignitionSource: portal.fluid,
|
||||
});
|
||||
});
|
||||
|
||||
//////////////
|
||||
/// DIMINV ///
|
||||
//////////////
|
||||
// Applies Dimensional Inventories to the Creative dimension
|
||||
PlayerEvents.loggedIn((event) => {
|
||||
const data = event.server.persistentData;
|
||||
if (!data.creativeInitialized) {
|
||||
data.creativeInitialized = true;
|
||||
event.server.runCommandSilent("diminv pool creative create");
|
||||
event.server.runCommandSilent(
|
||||
"diminv pool creative dimension retards:creative assign",
|
||||
);
|
||||
event.server.runCommandSilent("diminv pool creative gameMode creative");
|
||||
event.server.runCommandSilent(
|
||||
"diminv pool creative progressAdvancements false",
|
||||
);
|
||||
event.server.runCommandSilent(
|
||||
"diminv pool creative incrementStatistics false",
|
||||
);
|
||||
}
|
||||
});
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue