Test adding thermoelectric generator and cobble gens
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
86a1c29baf
commit
ed727b23a5
62
index.toml
62
index.toml
@ -1824,10 +1824,22 @@ hash = "a6d5e0dc16e5ca935f5a3a4f97eb2fdfaba8d7ea04112225b93cf79a400830ae"
|
||||
file = "kubejs/assets/simplehats/textures/item/hats/greyfoxhat.png.mcmeta"
|
||||
hash = "020dfb05389de6887ac1cb12eb5aa94fdd2a81b0eee29183f6477aaa751f4ed6"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/blockstates/thermoelectric_generator.json"
|
||||
hash = "47c42214ac292f30997fa24b3cbd17e699f975c04b82bbd552ff757a8986d48e"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/lang/en_us.json"
|
||||
hash = "d1829634fb82cacd3b07da340868bcf0596b0ae5873b4b8213837a25c3d53d52"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/models/block/cobblestone_generator.json"
|
||||
hash = "1d402d2f200570edb3a932461e618ba158d8767a4497c53b3e1e55916c5563c9"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/models/block/thermoelectric_generator.json"
|
||||
hash = "7230a3b969259cb09cbee4386a133666bd51d8c60f6fd27e878398bc0a122ae2"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/sounds.json"
|
||||
hash = "305fde008fe3357fdb1daa2ed5bb426ba7165927b3160723d00b014c132753ed"
|
||||
@ -1848,6 +1860,18 @@ hash = "0275a03c17d535c3a81a23713c1dd05137cd0c5922d0a66ef431104c16d540db"
|
||||
file = "kubejs/assets/skapa/sounds/microchip.ogg"
|
||||
hash = "da344e194679cc03c307b836e7c427ee30f4086af7abaf1690288cbc4d91f8b3"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/textures/block/thermoelectric_gen_bottom.png"
|
||||
hash = "14925ca4124817d9a7fd75dc82ecf1b02b4295c5ad8ec5e3728a13633e74b409"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/textures/block/thermoelectric_gen_side.png"
|
||||
hash = "a11ff856269fce50a03c7d5bd74357920460e510ad7cd1d8c36fecca075a35fd"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/textures/block/thermoelectric_gen_top.png"
|
||||
hash = "8b729db393fbc5f17f5fc477401f4fb0c2ee07f958c5f496cba1d2b063e5d9b3"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/assets/skapa/textures/item/music_disc_diggy_diggy_hole.png"
|
||||
hash = "8bacaad528d2707e807bdb215e03be035f15567d166535971f850638f4819817"
|
||||
@ -2982,11 +3006,15 @@ hash = "f834d97b5014866af431bdbc0791176562a69999b85e6900cd9c070662ef95ef"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/client_scripts/embellishcraft.js"
|
||||
hash = "bbca23983ef9b2af1874c13e1a5a6bee543dae774862eeffb9b254c2bdf57319"
|
||||
hash = "de39f1eda29e49e60182c173d391bfb9752de0e70d195c0d0981c0a762e4345e"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/client_scripts/skapa.js"
|
||||
hash = "52de0886206bb57e8a20cb0eb82bbb5afa913d3a5a19e2b283780f4a5e5b7c91"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/client_scripts/storagedrawers.js"
|
||||
hash = "e25e98d0dcbcf2e4ff3a20a378bed1da20775beee15c5f4343b690a525faaca2"
|
||||
hash = "d3be481056a0d9336b073df8bff0ccd3ff5ed60a631d49006ae568b916158aa1"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/config/client.properties"
|
||||
@ -3750,11 +3778,11 @@ hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/calendar.js"
|
||||
hash = "044e66b0dd2820cba0cdf613759f101882cdbcf8bbb9f9f96b1e8e99380c25da"
|
||||
hash = "3276014597e435f5bc364eb85742d20cadf6a6bdcbf9638653326fe8dc0e1b3e"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/create_chipped_compat.js"
|
||||
hash = "eaf9c03ef9e3bf61dcaa42e892d2f625a08d67f21985879623c08b9bcddc517e"
|
||||
hash = "2f03a884ddd59d444524fce54df1a0045730a7ceec8ada7999a466ff1c56439f"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/create_cutting_planks.js"
|
||||
@ -3764,9 +3792,13 @@ hash = "b19f1564d6c037bb6cb0df6e3391b88fb7037195370fc32806acbd948377cea9"
|
||||
file = "kubejs/server_scripts/createcasing.js"
|
||||
hash = "db0ec4a244c92816a3bbf36ea558a3ee137702312e1195b596a9320902b987f4"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/croptopia_delight.js"
|
||||
hash = "b2ba2119bdf679aeb551ea0324073bb3a45eabf27aad832ae3021ee62d589e3a"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/embellishcraft.js"
|
||||
hash = "800c4f294eb261cc2d757dfd9f1753515aaca7ad0c120f22138ae04ca598eeb2"
|
||||
hash = "043ffb9c976d5bbbffbabc6ccde31edd91d6ea7cd4f3ebcff778b6e575f6b4f8"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/ftb_quests.js"
|
||||
@ -3782,7 +3814,7 @@ hash = "6ed7c72b9e02059c86fe16f0d410f8fd89a4dfe4c40df4cd9d6f0ccd0862e60a"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/skapa.js"
|
||||
hash = "28e3f4d4bd982bdc6d0b76b28a597787371fa226e2636c32f0337a8b30bf687b"
|
||||
hash = "535b121d0c4d06a7533dc15388116d30cbe4ab2a152310319502416237036369"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/soul_soil_farmland.js"
|
||||
@ -3790,7 +3822,7 @@ hash = "5d0d62b6222141d8dabf5c583a2c3c5b168b11b8a5eabe2aeaa85ea0e1f8bdc6"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/storagedrawers.js"
|
||||
hash = "2260defff18fe5663cff60881b7ecb1f7edfc59de91974852018de81391db6ff"
|
||||
hash = "c78e1025884a511b0f2a521706dac1707487c04e625a2b22f241f6c4df0183cd"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/wither.js"
|
||||
@ -3806,7 +3838,7 @@ hash = "9c7078e3b803559ece2f9dcbf1b3248b8645c36f5b863de736315db496eff9ff"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/apocalypsenow.js"
|
||||
hash = "98f5fe593e849495f384f81ea2bdef0b858eaf7a6903e9ea169f298bf2df7a9f"
|
||||
hash = "96f90651a109f02aabaad2a23f8149ca64e4aba16324102f992c8801cd391514"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/create_chipped_compat.js"
|
||||
@ -3814,11 +3846,11 @@ hash = "bef6743d0934277f674641f3ff4cf389c7b5c3de9ff62584dae2f426b0a4755d"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/create_dd.js"
|
||||
hash = "a81bebe196c1b4d95bcdc71bbf2b4414c4b876f4358afe915294e8caa6ae43a6"
|
||||
hash = "091da5a2a451c99bf1914090c68cb02a59923848b24bb193d10ea155c5fd2879"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/embellishcraft.js"
|
||||
hash = "596852ffd7e4b92d6fe398e488e67c1a8d811bb5623fa057e723953e517ed847"
|
||||
hash = "2e9af1f8c234205373948e55b36bb0f6ebfa54e4bb2a82477eb3c5585aba2984"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/jetpacks.js"
|
||||
@ -3826,11 +3858,11 @@ hash = "ac9b8568032cd7dbc7ac9f963f84a259706a4b2acd54f0d1196c0e20b95a9ebd"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/morepaths.js"
|
||||
hash = "3f19be1e38352e7bcf26bc8cf96e2a7cab95d3a9f36cbdbcd46ac314a5ae774f"
|
||||
hash = "92fcf556368252285cd4fba3528974b3a1c7b98d826f9d6737a7015c2bf79b60"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/music_discs.js"
|
||||
hash = "5704377d947812c93e5a35c5fd6c8325de19bad9f01ba14e8971660b8613844b"
|
||||
hash = "1f20a395c3012731a8986cb0d21867096073cebecdd7a1d8c1160a19c607b449"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/simplehats.js"
|
||||
@ -3838,15 +3870,15 @@ hash = "39884208ba36c0b0363bb60895fe8010b0563ae3350c6bdd8f8a214c94e0e453"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/skapa.js"
|
||||
hash = "4285501d06342aa3fe36c069af4827cac3559b14ec069b9035ea8aafe62d58ed"
|
||||
hash = "ecdd0658474aa6780cba88ff2c443fc8d5336c547aeac94da55544b745d6ce26"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/soul_soil_farmland.js"
|
||||
hash = "61db071254d89040060ef38aba89a8f843e35e5089152619b3ec43a09c7d2449"
|
||||
hash = "ec3342cf7571c09713c1b0360e21d23452730728621967a41c36366362961c38"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/storagedrawers.js"
|
||||
hash = "4682cd267b4bee9028288315759f4f3ba121b8ee3cff713bf89c54b5964ebd9f"
|
||||
hash = "4ef69aa1417a8a7695dd3a3d507c30a1df41c8e904e371c0cce7dcc222afa683"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/startup_scripts/wither.js"
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "skapa:block/thermoelectric_generator"
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kubejs/assets/skapa/models/block/cobblestone_generator.json
Normal file
89
kubejs/assets/skapa/models/block/cobblestone_generator.json
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"particle": "minecraft:block/cobblestone",
|
||||
"glass": "minecraft:block/glass",
|
||||
"water": "minecraft:block/water_still",
|
||||
"lava": "minecraft:block/lava_still"
|
||||
},
|
||||
"render_type": "cutout",
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 4, 16],
|
||||
"faces": {
|
||||
"down": { "texture": "#material", "cullface": "down" },
|
||||
"up": { "texture": "#material" },
|
||||
"north": { "texture": "#material", "cullface": "north" },
|
||||
"south": { "texture": "#material", "cullface": "south" },
|
||||
"west": { "texture": "#material", "cullface": "west" },
|
||||
"east": { "texture": "#material", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 12, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"down": { "texture": "#material" },
|
||||
"up": { "texture": "#material", "cullface": "up" },
|
||||
"north": { "texture": "#material", "cullface": "north" },
|
||||
"south": { "texture": "#material", "cullface": "south" },
|
||||
"west": { "texture": "#material", "cullface": "west" },
|
||||
"east": { "texture": "#material", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 4, 0],
|
||||
"to": [16, 12, 16],
|
||||
"faces": {
|
||||
"north": { "texture": "#glass", "cullface": "north" },
|
||||
"south": { "texture": "#glass", "cullface": "south" },
|
||||
"west": { "texture": "#glass", "cullface": "west" },
|
||||
"east": { "texture": "#glass", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 4, 15],
|
||||
"to": [1, 12, 1],
|
||||
"faces": {
|
||||
"north": { "texture": "#glass", "cullface": "north" },
|
||||
"south": { "texture": "#glass", "cullface": "south" },
|
||||
"west": { "texture": "#glass", "cullface": "west" },
|
||||
"east": { "texture": "#glass", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 4, 1],
|
||||
"to": [15, 9, 5],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"up": { "texture": "#water", "tintindex": 1 },
|
||||
"north": { "texture": "#water", "tintindex": 1 },
|
||||
"west": { "texture": "#water", "tintindex": 1 },
|
||||
"east": { "texture": "#water", "tintindex": 1 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 4, 11],
|
||||
"to": [15, 9, 15],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"up": { "texture": "#lava" },
|
||||
"south": { "texture": "#lava" },
|
||||
"west": { "texture": "#lava" },
|
||||
"east": { "texture": "#lava" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 4, 5],
|
||||
"to": [15, 9, 11],
|
||||
"faces": {
|
||||
"up": { "texture": "#particle" },
|
||||
"north": { "texture": "#particle" },
|
||||
"south": { "texture": "#particle" },
|
||||
"west": { "texture": "#particle" },
|
||||
"east": { "texture": "#particle" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_bottom_top",
|
||||
"textures": {
|
||||
"side": "skapa:block/thermoelectric_gen_side",
|
||||
"bottom": "skapa:block/thermoelectric_gen_bottom",
|
||||
"top": "skapa:block/thermoelectric_gen_top"
|
||||
}
|
||||
}
|
||||
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_bottom.png
Normal file
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_side.png
Normal file
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 B |
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_top.png
Normal file
BIN
kubejs/assets/skapa/textures/block/thermoelectric_gen_top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
@ -1,11 +1,11 @@
|
||||
ClientEvents.lang('en_us', (event) => {
|
||||
global.suspendedStairs.forEach((suspendedStair) => {
|
||||
global.embellishcraft.suspendedStairs.forEach((suspendedStair) => {
|
||||
event.add('block.embellishcraft.' + suspendedStair['id'].split(':')[1], suspendedStair['name'])
|
||||
})
|
||||
})
|
||||
|
||||
ClientEvents.highPriorityAssets((event) => {
|
||||
global.suspendedStairs.forEach((suspendedStair) => {
|
||||
global.embellishcraft.suspendedStairs.forEach((suspendedStair) => {
|
||||
let stair_id = suspendedStair['id'].split(':')[1]
|
||||
|
||||
event.addBlockState('embellishcraft:' + stair_id, (gen) => {
|
||||
|
||||
22
kubejs/client_scripts/skapa.js
Normal file
22
kubejs/client_scripts/skapa.js
Normal file
@ -0,0 +1,22 @@
|
||||
ClientEvents.highPriorityAssets((event) => {
|
||||
global.cobblegen.tiers.forEach((tier) => {
|
||||
if (tier == 'andesite_alloy') {
|
||||
tier = 'andesite'
|
||||
}
|
||||
|
||||
event.addBlockState('skapa:' + tier + '_cobblestone_generator', (gen) => {
|
||||
gen.variant('', (variant) => {
|
||||
variant.model('skapa:block/' + tier + '_cobblestone_generator')
|
||||
})
|
||||
})
|
||||
|
||||
event.addModel('block', 'skapa:' + tier + '_cobblestone_generator', (gen) => {
|
||||
gen.parent('skapa:block/cobblestone_generator')
|
||||
gen.texture('material', 'create:block/' + tier + '_block')
|
||||
})
|
||||
|
||||
event.addModel('item', 'skapa:' + tier + '_cobblestone_generator', (gen) => {
|
||||
gen.parent('skapa:block/' + tier + '_cobblestone_generator')
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -1,4 +1,7 @@
|
||||
if (Platform.isLoaded('storagedrawers')) {
|
||||
let drawerCounts = [1, 2, 4];
|
||||
let drawerDepths = [true, false];
|
||||
|
||||
ClientEvents.lang('en_us', (event) => {
|
||||
// block.storagedrawers.acacia_full_drawers_1=Acacia Drawers 1x1
|
||||
// block.storagedrawers.acacia_full_drawers_2=Acacia Drawers 1x2
|
||||
@ -8,24 +11,24 @@ if (Platform.isLoaded('storagedrawers')) {
|
||||
// block.storagedrawers.acacia_half_drawers_4=Acacia Half Drawers 2x2
|
||||
|
||||
global.storageDrawers.drawerTypes.forEach((drawerType) => {
|
||||
let pretty_name = 'display_name' in drawerType ? drawerType['display_name'] : drawerType['name'].charAt(0).toUpperCase() + string.slice(1);
|
||||
let pretty_name = 'display_name' in drawerType ? drawerType['display_name'] : drawerType['name'].charAt(0).toUpperCase() + drawerType['name'].slice(1);
|
||||
|
||||
[1, 2, 4].forEach((drawerCount) => {
|
||||
drawerCounts.forEach((drawerCount) => {
|
||||
let countLabel = null;
|
||||
|
||||
if (count == 1) {
|
||||
if (drawerCount == 1) {
|
||||
countLabel = '1x1'
|
||||
} else if (count == 2) {
|
||||
} else if (drawerCount == 2) {
|
||||
countLabel = '1x2'
|
||||
} else if (count == 4) {
|
||||
} else if (drawerCount == 4) {
|
||||
countLabel = '2x2'
|
||||
}
|
||||
|
||||
[true, false].forEach((halfDepth) => {
|
||||
drawerDepths.forEach((halfDepth) => {
|
||||
let drawer_id = drawerType['name'] + '_' + (halfDepth ? 'half' : 'full') + '_drawers_' + drawerCount
|
||||
|
||||
event.add(
|
||||
'block.storagedrawers.' + drawer_id,
|
||||
'block.storagedrawers.' + drawer_id,
|
||||
pretty_name + (halfDepth ? ' Half' : '') + ' Drawers ' + countLabel
|
||||
)
|
||||
})
|
||||
@ -35,8 +38,8 @@ if (Platform.isLoaded('storagedrawers')) {
|
||||
|
||||
ClientEvents.highPriorityAssets((event) => {
|
||||
global.storageDrawers.drawerTypes.forEach((drawerType) => {
|
||||
[1, 2, 4].forEach((drawerCount) => {
|
||||
[true, false].forEach((halfDepth) => {
|
||||
drawerCounts.forEach((drawerCount) => {
|
||||
drawerDepths.forEach((halfDepth) => {
|
||||
let drawer_id = drawerType['name'] + '_' + (halfDepth ? 'half' : 'full') + '_drawers_' + drawerCount
|
||||
|
||||
event.addBlockState('storagedrawers:' + drawer_id, (gen) => {
|
||||
|
||||
26
kubejs/server_scripts/croptopia_delight.js
Normal file
26
kubejs/server_scripts/croptopia_delight.js
Normal file
@ -0,0 +1,26 @@
|
||||
// ServerEvents.recipes(event => {
|
||||
// event.forEachRecipe({type:'minecraft:crafting_shapeless'}, recipe => {
|
||||
// let ingredients = recipe.originalRecipeIngredients
|
||||
// let output = recipe.originalRecipeResult
|
||||
|
||||
// if (output.isEmpty() || ingredients.isEmpty()) return;
|
||||
|
||||
// let cookingPot = false;
|
||||
// let fryingPan = false;
|
||||
// let foodPress = false;
|
||||
|
||||
// ingredients.forEach((ingredient) => {
|
||||
// ingredient.itemIds.forEach((itemId) => {
|
||||
// cookingPot = itemId == 'croptopia:cooking_pot' ? true : cookingPot
|
||||
// fryingPan = itemId == 'croptopia:frying_pan' ? true : fryingPan
|
||||
// foodPress = itemId == 'croptopia:food_press' ? true : foodPress
|
||||
// })
|
||||
// })
|
||||
|
||||
// if (cookingPot || fryingPan) {
|
||||
// // Add a farmersdelight cooking recipe
|
||||
// } else if (foodPress) {
|
||||
// // Add a create pressing recipe
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
@ -1,6 +1,6 @@
|
||||
ServerEvents.recipes((event) => {
|
||||
// Suspended stairs
|
||||
global.suspendedStairs.forEach((suspendedStair) => {
|
||||
global.embellishcraft.suspendedStairs.forEach((suspendedStair) => {
|
||||
event
|
||||
.shaped(
|
||||
Item.of(suspendedStair['id'], 1),
|
||||
@ -14,31 +14,43 @@ ServerEvents.recipes((event) => {
|
||||
'S': { 'tag': 'forge:rods/wooden' }
|
||||
}
|
||||
)
|
||||
.id(suspendedStair['id'])
|
||||
})
|
||||
})
|
||||
.id(suspendedStair['id']);
|
||||
});
|
||||
});
|
||||
|
||||
ServerEvents.tags('block', (event) => {
|
||||
[
|
||||
let pickaxe_mineable_blocks = [
|
||||
'embellishcraft:steel_wall_ladder',
|
||||
'embellishcraft:steel_rungs',
|
||||
'embellishcraft:sturdy_steel_door',
|
||||
'embellishcraft:warning_steel_door'
|
||||
].forEach((block) => {
|
||||
event.add('minecraft:mineable/pickaxe', block)
|
||||
});
|
||||
];
|
||||
|
||||
[
|
||||
pickaxe_mineable_blocks.forEach((block) => {
|
||||
if (Object.keys(global.embellishcraft.CustomBlocks).includes(block)) {
|
||||
event.add('minecraft:mineable/pickaxe', block);
|
||||
}
|
||||
})
|
||||
|
||||
let door_blocks = [
|
||||
'embellishcraft:sturdy_steel_door',
|
||||
'embellishcraft:warning_steel_door'
|
||||
].forEach((block) => {
|
||||
event.add('minecraft:doors', block)
|
||||
});
|
||||
];
|
||||
|
||||
[
|
||||
door_blocks.forEach((block) => {
|
||||
if (Object.keys(global.embellishcraft.CustomBlocks).includes(block)) {
|
||||
event.add('minecraft:doors', block);
|
||||
}
|
||||
})
|
||||
|
||||
let ladder_blocks = [
|
||||
'embellishcraft:steel_wall_ladder',
|
||||
'embellishcraft:steel_rungs'
|
||||
].forEach((block) => {
|
||||
event.add('minecraft:climbable', block)
|
||||
});
|
||||
];
|
||||
|
||||
ladder_blocks.forEach((block) => {
|
||||
if (Object.keys(global.embellishcraft.CustomBlocks).includes(block)) {
|
||||
event.add('minecraft:climbable', block);
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -13,4 +13,43 @@ ServerEvents.recipes((event) => {
|
||||
'D': { 'item': 'minecraft:black_dye' }
|
||||
}
|
||||
)
|
||||
|
||||
event
|
||||
.shaped(
|
||||
Item.of('skapa:thermoelectric_generator', 1),
|
||||
[
|
||||
'III',
|
||||
'BLB',
|
||||
'BBB'
|
||||
],
|
||||
{
|
||||
'I': { 'tag': 'forge:ingots/industrial_iron' },
|
||||
'B': { 'tag': 'forge:ingots/brass' },
|
||||
'L': { 'item': 'createaddition:electrum_spool' }
|
||||
}
|
||||
)
|
||||
|
||||
global.cobblegen.tiers.forEach((tier) => {
|
||||
let item_id = 'skapa:' + tier + '_cobblestone_generator'
|
||||
|
||||
if (tier == 'andesite_alloy') {
|
||||
item_id = 'skapa:andesite_cobblestone_generator'
|
||||
}
|
||||
|
||||
event
|
||||
.shaped(
|
||||
Item.of(item_id, 1),
|
||||
[
|
||||
'RRR',
|
||||
'WGL',
|
||||
'RRR',
|
||||
],
|
||||
{
|
||||
'R': { 'tag': 'forge:ingots/' + tier },
|
||||
'W': { 'item': 'minecraft:water_bucket' },
|
||||
'L': { 'item': 'minecraft:lava_bucket' },
|
||||
'G': { 'tag': 'forge:glass' }
|
||||
}
|
||||
)
|
||||
})
|
||||
})
|
||||
@ -35,6 +35,7 @@ StartupEvents.registry('block', (event) => {
|
||||
.lightLevel(0)
|
||||
.notSolid()
|
||||
.hardness(3.0)
|
||||
.tagBlock('minecraft:mineable/pickaxe')
|
||||
.defaultCutout()
|
||||
.renderType('cutout_mipped')
|
||||
.soundType('metal')
|
||||
|
||||
@ -9,15 +9,15 @@ const SpiritSoundType = new $ForgeSoundType(
|
||||
);
|
||||
|
||||
const createDD = {
|
||||
'blocks': {},
|
||||
'blocks': [],
|
||||
'items': {},
|
||||
'blockSetTypes': {},
|
||||
'woodTypes': [
|
||||
{
|
||||
'id': 'rose',
|
||||
'name': 'Rose',
|
||||
'name': 'Rose',
|
||||
'mapColor': $MapColor.TERRACOTTA_RED,
|
||||
'woodType': $WoodType.MANGROVE,
|
||||
'woodType': $WoodType.MANGROVE,
|
||||
'soundType': $SoundType.WOOD,
|
||||
'baseLog': $Blocks.OAK_LOG,
|
||||
'baseWood': $Blocks.OAK_WOOD,
|
||||
@ -26,13 +26,13 @@ const createDD = {
|
||||
'basePlanks': $Blocks.OAK_PLANKS,
|
||||
'baseDoor': $Blocks.OAK_DOOR,
|
||||
'baseTrapDoor': $Blocks.OAK_TRAPDOOR,
|
||||
/* 'boatType': $Boat.Type.MANGROVE */
|
||||
/* 'boatType': $Boat.Type.MANGROVE */
|
||||
},
|
||||
{
|
||||
'id': 'rubber',
|
||||
'name': 'Rubber',
|
||||
'name': 'Rubber',
|
||||
'mapColor': $MapColor.TERRACOTTA_CYAN,
|
||||
'woodType': $WoodType.ACACIA,
|
||||
'woodType': $WoodType.ACACIA,
|
||||
'soundType': $SoundType.WOOD,
|
||||
'baseLog': $Blocks.OAK_LOG,
|
||||
'baseWood': $Blocks.OAK_WOOD,
|
||||
@ -41,13 +41,13 @@ const createDD = {
|
||||
'basePlanks': $Blocks.OAK_PLANKS,
|
||||
'baseDoor': $Blocks.OAK_DOOR,
|
||||
'baseTrapDoor': $Blocks.OAK_TRAPDOOR,
|
||||
/* 'boatType': $Boat.Type.ACACIA */
|
||||
/* 'boatType': $Boat.Type.ACACIA */
|
||||
},
|
||||
{
|
||||
'id': 'spirit',
|
||||
'name': 'Spirit',
|
||||
'name': 'Spirit',
|
||||
'mapColor': $MapColor.TERRACOTTA_PURPLE,
|
||||
'woodType': $WoodType.WARPED,
|
||||
'woodType': $WoodType.WARPED,
|
||||
'soundType': SpiritSoundType,
|
||||
'baseLog': $Blocks.WARPED_STEM,
|
||||
'baseWood': $Blocks.WARPED_HYPHAE,
|
||||
@ -56,13 +56,13 @@ const createDD = {
|
||||
'basePlanks': $Blocks.WARPED_PLANKS,
|
||||
'baseDoor': $Blocks.WARPED_DOOR,
|
||||
'baseTrapDoor': $Blocks.WARPED_TRAPDOOR,
|
||||
/* 'boatType': $Boat.Type.WARPED */
|
||||
/* 'boatType': $Boat.Type.WARPED */
|
||||
},
|
||||
{
|
||||
'id': 'smoked',
|
||||
'name': 'Smoked',
|
||||
'name': 'Smoked',
|
||||
'mapColor': $MapColor.TERRACOTTA_BROWN,
|
||||
'woodType': $WoodType.SPRUCE,
|
||||
'woodType': $WoodType.SPRUCE,
|
||||
'soundType': $SoundType.WOOD,
|
||||
'baseLog': $Blocks.OAK_LOG,
|
||||
'baseWood': $Blocks.OAK_WOOD,
|
||||
@ -71,7 +71,7 @@ const createDD = {
|
||||
'basePlanks': $Blocks.OAK_PLANKS,
|
||||
'baseDoor': $Blocks.OAK_DOOR,
|
||||
'baseTrapDoor': $Blocks.OAK_TRAPDOOR,
|
||||
/* 'boatType': $Boat.Type.SPRUCE */
|
||||
/* 'boatType': $Boat.Type.SPRUCE */
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -111,121 +111,116 @@ createDD.woodTypes.forEach((wood) => {
|
||||
)
|
||||
})
|
||||
|
||||
function properties(wood, copyFrom) {
|
||||
return $Properties
|
||||
.copy(wood[copyFrom])
|
||||
.sound(wood['soundType'])
|
||||
}
|
||||
|
||||
|
||||
// TODO: Make them flammable
|
||||
// TODO: Map colors
|
||||
StartupEvents.registry('block', (event) => {
|
||||
createDD.woodTypes.forEach((wood) => {
|
||||
let item_id = null
|
||||
let block_id = null
|
||||
let block = null
|
||||
|
||||
// Button
|
||||
item_id = 'create_dd:' + wood['id'] + '_button'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'button')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.BlockSetType)'](createDD.blockSetTypes[wood['id']])
|
||||
block_id = 'create_dd:' + wood['id'] + '_button'
|
||||
block = event.create(block_id, 'button')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.BlockSetType)'](createDD.blockSetTypes[wood['id']])
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.tagBlock('minecraft:wooden_buttons')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_buttons'] })
|
||||
|
||||
// Door
|
||||
item_id = 'create_dd:' + wood['id'] + '_door'
|
||||
createDD.blocks[item_id] = event.createCustom(
|
||||
item_id,
|
||||
() => new $DoorBlock(
|
||||
$Properties
|
||||
.copy(wood['baseDoor'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.noOcclusion(),
|
||||
createDD.blockSetTypes[wood['id']]
|
||||
)
|
||||
)
|
||||
block_id = 'create_dd:' + wood['id'] + '_door'
|
||||
block = event.createCustom(block_id, () => new $DoorBlock(properties(wood, 'baseDoor').noOcclusion(), createDD.blockSetTypes[wood['id']]))
|
||||
.tag('minecraft:wooden_doors')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_doors'] })
|
||||
|
||||
// Fence
|
||||
item_id = 'create_dd:' + wood['id'] + '_fence'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'fence')
|
||||
block_id = 'create_dd:' + wood['id'] + '_fence'
|
||||
block = event.create(block_id, 'fence')
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.tagBlock('minecraft:wooden_fences')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_fences'] })
|
||||
|
||||
// Fence Gate
|
||||
item_id = 'create_dd:' + wood['id'] + '_fence_gate'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'fence_gate')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.WoodType)'](wood['woodType'])
|
||||
block_id = 'create_dd:' + wood['id'] + '_fence_gate'
|
||||
block = event.create(block_id, 'fence_gate')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.WoodType)'](wood['woodType'])
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.tagBlock('minecraft:fence_gates')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:fence_gates'] })
|
||||
|
||||
// Log
|
||||
item_id = 'create_dd:' + wood['id'] + '_log'
|
||||
createDD.blocks[item_id] = event.createCustom(item_id, () => new $RotatedPillarBlock(
|
||||
$Properties
|
||||
.copy(wood['baseLog'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
))
|
||||
block_id = 'create_dd:' + wood['id'] + '_log'
|
||||
block = event.createCustom(block_id, () => new $RotatedPillarBlock(properties(wood, 'baseLog')))
|
||||
.tag('minecraft:logs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:logs'] })
|
||||
|
||||
// Planks
|
||||
item_id = 'create_dd:' + wood['id'] + '_planks'
|
||||
createDD.blocks[item_id] = event.createCustom(item_id, () => new $Block(
|
||||
$Properties
|
||||
.copy(wood['basePlanks'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
))
|
||||
block_id = 'create_dd:' + wood['id'] + '_planks'
|
||||
block = event.createCustom(block_id, () => new $Block(properties(wood, 'basePlanks')))
|
||||
.tag('minecraft:planks')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:planks'] })
|
||||
|
||||
// Pressure Plate
|
||||
item_id = 'create_dd:' + wood['id'] + '_pressure_plate'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'pressure_plate')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.BlockSetType)'](createDD.blockSetTypes[wood['id']])
|
||||
block_id = 'create_dd:' + wood['id'] + '_pressure_plate'
|
||||
block = event.create(block_id, 'pressure_plate')
|
||||
['behaviour(net.minecraft.world.level.block.state.properties.BlockSetType)'](createDD.blockSetTypes[wood['id']])
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.tagBlock('minecraft:wooden_pressure_plates')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_pressure_plates'] })
|
||||
|
||||
// Sign
|
||||
// item_id = 'create_dd:' + wood['id'] + '_sign'
|
||||
// createDD.blocks[item_id] = event.createCustom(item_id, () => new $SignBlock($Properties.copy($Blocks.OAK_SIGN), wood['woodType']))
|
||||
// Slab
|
||||
item_id = 'create_dd:' + wood['id'] + '_slab'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'slab')
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
// Stairs
|
||||
item_id = 'create_dd:' + wood['id'] + '_stairs'
|
||||
createDD.blocks[item_id] = event.create(item_id, 'stairs')
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
// Stripped Log
|
||||
item_id = 'create_dd:stripped_' + wood['id'] + '_log'
|
||||
createDD.blocks[item_id] = event.createCustom(item_id, () => new $RotatedPillarBlock(
|
||||
$Properties
|
||||
.copy(wood['baseStrippedLog'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
))
|
||||
// Stripped Wood
|
||||
item_id = 'create_dd:stripped_' + wood['id'] + '_wood'
|
||||
createDD.blocks[item_id] = event.createCustom(item_id, () => new $RotatedPillarBlock(
|
||||
$Properties
|
||||
.copy(wood['baseStrippedWood'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
))
|
||||
// Trapdoor
|
||||
item_id = 'create_dd:' + wood['id'] + '_trapdoor'
|
||||
createDD.blocks[item_id] = event.createCustom(
|
||||
item_id,
|
||||
() => new $TrapDoorBlock(
|
||||
$Properties
|
||||
.copy(wood['baseTrapDoor'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
.noOcclusion(),
|
||||
createDD.blockSetTypes[wood['id']]
|
||||
)
|
||||
)
|
||||
// Wood
|
||||
item_id = 'create_dd:' + wood['id'] + '_wood'
|
||||
createDD.blocks[item_id] = event.createCustom(item_id, () => new $RotatedPillarBlock(
|
||||
$Properties
|
||||
.copy(wood['baseWood'])
|
||||
.sound(wood['soundType'])
|
||||
// .mapColor(wood['mapColor'])
|
||||
))
|
||||
|
||||
// Slab
|
||||
block_id = 'create_dd:' + wood['id'] + '_slab'
|
||||
block = event.create(block_id, 'slab')
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
.tagBlock('minecraft:wooden_slabs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_slabs'] })
|
||||
|
||||
// Stairs
|
||||
block_id = 'create_dd:' + wood['id'] + '_stairs'
|
||||
block = event.create(block_id, 'stairs')
|
||||
.noItem()
|
||||
.soundType(wood['soundType'])
|
||||
.tagBlock('minecraft:wooden_stairs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:wooden_stairs'] })
|
||||
|
||||
// Stripped Log
|
||||
block_id = 'create_dd:stripped_' + wood['id'] + '_log'
|
||||
block = event.createCustom(block_id, () => new $RotatedPillarBlock(properties(wood, 'baseStrippedLog')))
|
||||
.tag('minecraft:logs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:logs'] })
|
||||
|
||||
// Stripped Wood
|
||||
block_id = 'create_dd:stripped_' + wood['id'] + '_wood'
|
||||
block = event.createCustom(block_id, () => new $RotatedPillarBlock(properties(wood, 'baseStrippedWood')))
|
||||
.tag('minecraft:logs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:logs'] })
|
||||
|
||||
// Trapdoor
|
||||
block_id = 'create_dd:' + wood['id'] + '_trapdoor'
|
||||
block = event.createCustom(block_id, () => new $TrapDoorBlock(properties(wood, 'baseTrapDoor').noOcclusion(), createDD.blockSetTypes[wood['id']]))
|
||||
.tag('minecraft:logs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:logs'] })
|
||||
|
||||
// Wood
|
||||
block_id = 'create_dd:' + wood['id'] + '_wood'
|
||||
block = event.createCustom(block_id, () => new $RotatedPillarBlock(properties(wood, 'baseWood')))
|
||||
.tag('minecraft:logs')
|
||||
createDD.blocks.push({ 'id': block_id, 'block': block, 'tags': ['minecraft:logs'] })
|
||||
})
|
||||
})
|
||||
|
||||
@ -237,8 +232,12 @@ StartupEvents.registry('block', (event) => {
|
||||
// })
|
||||
|
||||
StartupEvents.registry('item', event => {
|
||||
Object.keys(createDD.blocks).forEach((block_id) => {
|
||||
createDD.items[block_id] = event.createCustom(block_id, () => new $BlockItem(createDD.blocks[block_id].get(), new $IProperties()))
|
||||
createDD.blocks.forEach((block) => {
|
||||
let item = event.createCustom(block['id'], () => new $BlockItem(block['block'].get(), new $IProperties()))
|
||||
|
||||
block['tags'].forEach((tag) => {
|
||||
item.tag(tag)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -1,61 +1,77 @@
|
||||
global.suspendedStairs = [
|
||||
{
|
||||
'id': 'embellishcraft:iron_large_suspended_stairs',
|
||||
'name': 'Iron Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/iron_block',
|
||||
'ingredient': 'minecraft:iron_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:copper_large_suspended_stairs',
|
||||
'name': 'Copper Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/copper_block',
|
||||
'ingredient': 'minecraft:copper_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:gold_large_suspended_stairs',
|
||||
'name': 'Gold Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/gold_block',
|
||||
'ingredient': 'minecraft:gold_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:diamond_large_suspended_stairs',
|
||||
'name': 'Diamond Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/diamond_block',
|
||||
'ingredient': 'minecraft:diamond_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:netherite_large_suspended_stairs',
|
||||
'name': 'Netherite Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/netherite_block',
|
||||
'ingredient': 'minecraft:netherite_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:emerald_large_suspended_stairs',
|
||||
'name': 'Emerald Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/emerald_block',
|
||||
'ingredient': 'minecraft:emerald_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:industrial_iron_large_suspended_stairs',
|
||||
'name': 'Industrial Iron Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'create:block/industrial_iron_block',
|
||||
'ingredient': 'create:industrial_iron_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:brass_large_suspended_stairs',
|
||||
'name': 'Industrial Brass Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'create:block/brass_block',
|
||||
'ingredient': 'create:brass_block'
|
||||
}
|
||||
]
|
||||
global.embellishcraft = {
|
||||
'CustomBlocks': {},
|
||||
'suspendedStairs': [
|
||||
{
|
||||
'id': 'embellishcraft:iron_large_suspended_stairs',
|
||||
'name': 'Iron Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/iron_block',
|
||||
'ingredient': 'minecraft:iron_block',
|
||||
'tool': 'pickaxe'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:copper_large_suspended_stairs',
|
||||
'name': 'Copper Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/copper_block',
|
||||
'ingredient': 'minecraft:copper_block',
|
||||
'tool': 'pickaxe'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:gold_large_suspended_stairs',
|
||||
'name': 'Gold Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/gold_block',
|
||||
'ingredient': 'minecraft:gold_block',
|
||||
'tool': 'pickaxe'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:diamond_large_suspended_stairs',
|
||||
'name': 'Diamond Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/diamond_block',
|
||||
'ingredient': 'minecraft:diamond_block',
|
||||
'tool': 'pickaxe'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:netherite_large_suspended_stairs',
|
||||
'name': 'Netherite Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/netherite_block',
|
||||
'ingredient': 'minecraft:netherite_block',
|
||||
'tool': 'pickaxe'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:emerald_large_suspended_stairs',
|
||||
'name': 'Emerald Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'minecraft:block/emerald_block',
|
||||
'ingredient': 'minecraft:emerald_block',
|
||||
'tool': 'pickaxe'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
if (Platform.isLoaded('create')) {
|
||||
[
|
||||
{
|
||||
'id': 'embellishcraft:industrial_iron_large_suspended_stairs',
|
||||
'name': 'Industrial Iron Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'create:block/industrial_iron_block',
|
||||
'ingredient': 'create:industrial_iron_block'
|
||||
},
|
||||
{
|
||||
'id': 'embellishcraft:brass_large_suspended_stairs',
|
||||
'name': 'Industrial Brass Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': 'create:block/brass_block',
|
||||
'ingredient': 'create:brass_block'
|
||||
}
|
||||
].forEach((stairType) => {
|
||||
global.embellishcraft.suspendedStairs.push(stairType)
|
||||
})
|
||||
}
|
||||
|
||||
global.woodTypes.forEach((wood) => {
|
||||
let planks_item = ('mod' in wood['planks'] ? wood['planks']['mod'] : wood['mod']) + ':' + wood['planks']['id']
|
||||
@ -76,26 +92,24 @@ global.woodTypes.forEach((wood) => {
|
||||
}
|
||||
|
||||
// Regular suspended stairs
|
||||
let suspended_stairs = {
|
||||
global.embellishcraft.suspendedStairs.push({
|
||||
'id': 'embellishcraft:' + wood['id'] + '_suspended_stairs',
|
||||
'name': wood['name'] + ' Suspended Stairs',
|
||||
'isLarge': false,
|
||||
'texture': planks_texture,
|
||||
'ingredient': slab_item
|
||||
}
|
||||
global.suspendedStairs.push(suspended_stairs);
|
||||
// console.log(suspended_stairs);
|
||||
'ingredient': slab_item,
|
||||
'tool': 'axe'
|
||||
});
|
||||
|
||||
// Large suspended stairs
|
||||
let large_suspended_stairs = {
|
||||
global.embellishcraft.suspendedStairs.push({
|
||||
'id': 'embellishcraft:' + wood['id'] + '_large_suspended_stairs',
|
||||
'name': wood['name'] + ' Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': planks_texture,
|
||||
'ingredient': planks_item
|
||||
}
|
||||
global.suspendedStairs.push(large_suspended_stairs);
|
||||
// console.log(large_suspended_stairs);
|
||||
'ingredient': planks_item,
|
||||
'tool': 'axe'
|
||||
});
|
||||
|
||||
let logVariants = []
|
||||
if (!('log' in wood && wood['log'] == null)) {
|
||||
@ -165,68 +179,50 @@ global.woodTypes.forEach((wood) => {
|
||||
}
|
||||
}
|
||||
|
||||
let log_suspended_stairs = {
|
||||
global.embellishcraft.suspendedStairs.push({
|
||||
'id': 'embellishcraft:' + (isStripped ? 'stripped_' : '') + wood['id'] + '_' + log_name.toLowerCase() + '_large_suspended_stairs',
|
||||
'name': (isStripped ? 'Stripped ' : '') + wood['name'] + ' ' + log_name + ' Large Suspended Stairs',
|
||||
'isLarge': true,
|
||||
'texture': log_texture,
|
||||
'ingredient': log_item
|
||||
}
|
||||
global.suspendedStairs.push(log_suspended_stairs)
|
||||
})
|
||||
// console.log(log_suspended_stairs)
|
||||
})
|
||||
})
|
||||
|
||||
let embellishcraftCustomBlocks = {}
|
||||
|
||||
StartupEvents.registry('block', (event) => {
|
||||
// Suspended stairs
|
||||
global.suspendedStairs.forEach((suspendedStair) => {
|
||||
global.embellishcraft.suspendedStairs.forEach((suspendedStair) => {
|
||||
let builder = event.create(suspendedStair['id'], 'cardinal')
|
||||
.displayName(suspendedStair['name'])
|
||||
.waterlogged()
|
||||
.tagBlock('minecraft:mineable/' + suspendedStair['tool'])
|
||||
.placementState((cb) => {
|
||||
let blockstate = cb.getBlockStateToModify(this.AudioContext, this.block)
|
||||
blockstate.setValue(BlockProperties.FACING, cb.getClickedFace())
|
||||
blockstate.setValue(BlockProperties.WATERLOGGED, cb.getFluidStateAtClickedPos().getType() == $Fluids.WATER)
|
||||
return blockstate
|
||||
})
|
||||
// private static final VoxelShape BAR1_N = Block.m_49796_(6.0D, -1.0D, 0.0D, 10.0D, 3.0D, 4.0D);
|
||||
.box(6.0, -1.0, 0.0, 10.0, 3.0, 4.0)
|
||||
// private static final VoxelShape BAR2_N = Block.m_49796_(6.0D, 3.0D, 4.0D, 10.0D, 7.0D, 8.0D);
|
||||
.box(6.0, 3.0, 4.0, 10.0, 7.0, 8.0)
|
||||
// private static final VoxelShape BAR3_N = Block.m_49796_(6.0D, 7.0D, 8.0D, 10.0D, 11.0D, 12.0D);
|
||||
.box(6.0, 7.0, 8.0, 10.0, 11.0, 12.0)
|
||||
// private static final VoxelShape BAR4_N = Block.m_49796_(6.0D, 11.0D, 12.0D, 10.0D, 15.0D, 16.0D);
|
||||
.box(6.0, 11.0, 12.0, 10.0, 15.0, 16.0)
|
||||
|
||||
if (suspendedStair['isLarge']) {
|
||||
builder
|
||||
// private static final VoxelShape STEP1_LARGE_N = Block.m_49796_(0.0D, 6.0D, 0.0D, 16.0D, 8.0D, 8.0D);
|
||||
.box(0.0, 6.0, 0.0, 16.0, 8.0, 8.0)
|
||||
// private static final VoxelShape STEP2_LARGE_N = Block.m_49796_(0.0D, 14.0D, 8.0D, 16.0D, 16.0D, 16.0D);
|
||||
.box(0.0, 14.0, 8.0, 16.0, 16.0, 16.0)
|
||||
} else {
|
||||
builder
|
||||
// private static final VoxelShape STEP1_N = Block.m_49796_(0.0D, 3.0D, 0.0D, 16.0D, 4.0D, 4.0D);
|
||||
.box(0.0, 3.0, 0.0, 16.0, 4.0, 4.0)
|
||||
// private static final VoxelShape STEP2_N = Block.m_49796_(0.0D, 7.0D, 4.0D, 16.0D, 8.0D, 8.0D);
|
||||
.box(0.0, 7.0, 4.0, 16.0, 8.0, 8.0)
|
||||
// private static final VoxelShape STEP3_N = Block.m_49796_(0.0D, 11.0D, 8.0D, 16.0D, 12.0D, 12.0D);
|
||||
.box(0.0, 11.0, 8.0, 16.0, 12.0, 12.0)
|
||||
// private static final VoxelShape STEP4_N = Block.m_49796_(0.0D, 15.0D, 12.0D, 16.0D, 16.0D, 16.0D);
|
||||
.box(0.0, 15.0, 12.0, 16.0, 16.0, 16.0)
|
||||
}
|
||||
})
|
||||
|
||||
// // Steel Rungs
|
||||
// // public static final RegistryObject<CustomLadderBlock> STEEL_RUNGS = INDUSTRIAL_BLOCK_REGISTRY.register("steel_rungs", () -> new CustomLadderBlock(BlockBehaviour.Properties
|
||||
// // .m_60944_(Material.f_76279_, MaterialColor.f_76404_)
|
||||
// // .m_60978_(0.8F)
|
||||
// // .m_60918_(SoundType.f_56762_)
|
||||
// // .m_60955_(),
|
||||
// // ToolTypes.PICKAXE));
|
||||
embellishcraftCustomBlocks['embellishcraft:steel_rungs'] = event.createCustom(
|
||||
// Steel Rungs
|
||||
global.embellishcraft.CustomBlocks['embellishcraft:steel_rungs'] = event.createCustom(
|
||||
'embellishcraft:steel_rungs',
|
||||
() => new $MetalLadderBlock(
|
||||
$Properties.copy($Blocks.LADDER)
|
||||
@ -236,14 +232,8 @@ StartupEvents.registry('block', (event) => {
|
||||
)
|
||||
)
|
||||
|
||||
// // Steel Wall Ladder
|
||||
// // public static final RegistryObject<CustomLadderBlock> STEEL_WALL_LADDER = INDUSTRIAL_BLOCK_REGISTRY.register("steel_wall_ladder", () -> new CustomLadderBlock(BlockBehaviour.Properties
|
||||
// // .m_60944_(Material.f_76279_, MaterialColor.f_76404_)
|
||||
// // .m_60978_(0.8F)
|
||||
// // .m_60918_(SoundType.f_56762_)
|
||||
// // .m_60955_(),
|
||||
// // ToolTypes.PICKAXE));
|
||||
embellishcraftCustomBlocks['embellishcraft:steel_wall_ladder'] = event.createCustom(
|
||||
// Steel Wall Ladder
|
||||
global.embellishcraft.CustomBlocks['embellishcraft:steel_wall_ladder'] = event.createCustom(
|
||||
'embellishcraft:steel_wall_ladder',
|
||||
() => new $MetalLadderBlock(
|
||||
$Properties.copy($Blocks.LADDER)
|
||||
@ -253,14 +243,8 @@ StartupEvents.registry('block', (event) => {
|
||||
)
|
||||
)
|
||||
|
||||
// // Sturdy Steel Door
|
||||
// // public static final RegistryObject<CustomDoorBlock> STURDY_STEEL_DOOR = INDUSTRIAL_BLOCK_REGISTRY.register("sturdy_steel_door", () -> new CustomDoorBlock(BlockBehaviour.Properties
|
||||
// // .m_60944_(Material.f_76279_, MaterialColor.f_76404_)
|
||||
// // .m_60913_(5.0F, 1200.0F)
|
||||
// // .m_60918_(SoundType.f_56762_)
|
||||
// // .m_60999_(),
|
||||
// // ToolTypes.PICKAXE));
|
||||
embellishcraftCustomBlocks['embellishcraft:sturdy_steel_door'] = event.createCustom(
|
||||
// Sturdy Steel Door
|
||||
global.embellishcraft.CustomBlocks['embellishcraft:sturdy_steel_door'] = event.createCustom(
|
||||
'embellishcraft:sturdy_steel_door',
|
||||
() => new $DoorBlock(
|
||||
$Properties.copy($Blocks.IRON_DOOR)
|
||||
@ -271,14 +255,8 @@ StartupEvents.registry('block', (event) => {
|
||||
)
|
||||
)
|
||||
|
||||
// // Warning Steel Door
|
||||
// // public static final RegistryObject<CustomDoorBlock> WARNING_STEEL_DOOR = INDUSTRIAL_BLOCK_REGISTRY.register("warning_steel_door", () -> new CustomDoorBlock(BlockBehaviour.Properties
|
||||
// // .m_60944_(Material.f_76279_, MaterialColor.f_76404_)
|
||||
// // .m_60978_(3.0F)
|
||||
// // .m_60918_(SoundType.f_56762_)
|
||||
// // .m_60999_(),
|
||||
// // ToolTypes.PICKAXE));
|
||||
embellishcraftCustomBlocks['embellishcraft:warning_steel_door'] = event.createCustom(
|
||||
// Warning Steel Door
|
||||
global.embellishcraft.CustomBlocks['embellishcraft:warning_steel_door'] = event.createCustom(
|
||||
'embellishcraft:warning_steel_door',
|
||||
() => new $DoorBlock(
|
||||
$Properties.copy($Blocks.IRON_DOOR)
|
||||
@ -291,7 +269,7 @@ StartupEvents.registry('block', (event) => {
|
||||
})
|
||||
|
||||
StartupEvents.registry('item', (event) => {
|
||||
Object.keys(embellishcraftCustomBlocks).forEach((id) => {
|
||||
event.createCustom(id, () => new $BlockItem(embellishcraftCustomBlocks[id].get(), new $IProperties()))
|
||||
Object.keys(global.embellishcraft.CustomBlocks).forEach((id) => {
|
||||
event.createCustom(id, () => new $BlockItem(global.embellishcraft.CustomBlocks[id].get(), new $IProperties()))
|
||||
})
|
||||
})
|
||||
@ -1,3 +1,124 @@
|
||||
global.temperatures = {
|
||||
'minecraft:blue_ice': 200,
|
||||
'minecraft:ice': 260,
|
||||
'minecraft:magma_block': 1300,
|
||||
'minecraft:packed_ice': 240,
|
||||
'minecraft:snow': 273,
|
||||
}
|
||||
|
||||
global.cobblegen = {
|
||||
'getSlots': (be) => {
|
||||
let iih = be.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.NORTH).orElse(null);
|
||||
return iih.getSlots();
|
||||
},
|
||||
'serverTick': (quantity) => (be) => {
|
||||
let count = be.persistentData.getInt('count')
|
||||
be.persistentData.putInt('count', Math.min(count + quantity, global.cobblegen.getSlots(be) * 64))
|
||||
},
|
||||
'tiers': ['andesite_alloy', 'brass'],
|
||||
'getStackInSlot': (be, slot) => {
|
||||
if (slot > global.cobblegen.getSlots(be)) return Item.getEmpty();
|
||||
|
||||
let count = be.persistentData.getInt('count');
|
||||
let offset = (slot - 1) * 64;
|
||||
|
||||
if (count <= offset) return Item.getEmpty();
|
||||
|
||||
return Item.of('minecraft:cobblestone').withCount(Math.min(count - offset, 64))
|
||||
},
|
||||
'insertItem': (be, slot, stack, simulate) => {
|
||||
return false;
|
||||
},
|
||||
'extractItem': (be, slot, amount, simulate) => {
|
||||
if (slot > global.cobblegen.getSlots(be)) return Item.getEmpty();
|
||||
|
||||
let count = be.persistentData.getInt('count');
|
||||
let offset = (slot - 1) * 64;
|
||||
if (count <= offset) return Item.getEmpty();
|
||||
|
||||
let result = Item.of('minecraft:cobblestone').withCount(Math.min(64, amount, count - offset));
|
||||
|
||||
if (!simulate) {
|
||||
be.persistentData.putInt('count', count - result.getCount())
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
'isItemValid': (be, slot, stack) => {
|
||||
return ((slot <= global.cobblegen.getSlots(be)) && (stack.areItemsEqual(Item.of('minecraft:cobblestone'))))
|
||||
},
|
||||
}
|
||||
|
||||
global.thermoelectricgen = {
|
||||
'calculateEnergyOutput': (be) => {
|
||||
let energy = 0;
|
||||
|
||||
let directions = [Direction.DOWN, Direction.NORTH, Direction.WEST];
|
||||
|
||||
directions.forEach((fd) => {
|
||||
let block0 = be.getBlock().offset(fd);
|
||||
let block1 = be.getBlock().offset(fd, -1);
|
||||
|
||||
if (block0.equals('minecraft:air') || block1.equals('minecraft:air')) return;
|
||||
|
||||
let temp0 = global.thermoelectricgen.getTemperature(block0);
|
||||
let temp1 = global.thermoelectricgen.getTemperature(block1);
|
||||
|
||||
if (temp0 < 0 || temp1 < 0) return;
|
||||
|
||||
let diff = Math.abs(temp0 - temp1);
|
||||
energy += Math.floor(Math.sqrt(diff) / 2.0);
|
||||
})
|
||||
|
||||
return energy;
|
||||
},
|
||||
'generateEnergy': (be) => {
|
||||
let energy = be.persistentData.getInt('energy');
|
||||
energy += global.thermoelectricgen.calculateEnergyOutput(be);
|
||||
energy = Math.min(energy, 5000);
|
||||
be.persistentData.putInt('energy', energy);
|
||||
return energy;
|
||||
},
|
||||
'getTemperature': (block) => {
|
||||
let block_id = block.getId();
|
||||
|
||||
if (Object.keys(global.temperatures).includes(block_id)) {
|
||||
return global.temperatures[block_id]
|
||||
}
|
||||
|
||||
let f = block.getBlockState().getFluidState();
|
||||
|
||||
if (!(f.isEmpty())) {
|
||||
return f.getFluidType().getTemperature(f, block.getLevel(), block.getPos());
|
||||
}
|
||||
return -1;
|
||||
},
|
||||
'extractEnergy': (be, amount, simulate) => {
|
||||
let energy = be.persistentData.getInt('energy');
|
||||
let extracted = Math.min(energy, amount)
|
||||
if (!simulate) {
|
||||
be.persistentData.putInt('energy', energy - extracted)
|
||||
}
|
||||
return extracted
|
||||
},
|
||||
'serverTick': (be) => {
|
||||
let energy = global.thermoelectricgen.generateEnergy(be);
|
||||
|
||||
Object.values(Direction.ALL).forEach((side) => {
|
||||
let te = be.getBlock().offset(side).getEntity();
|
||||
if (te == null) return;
|
||||
|
||||
let ies = te.getCapability(ForgeCapabilities.ENERGY, side.getOpposite()).orElse(null);
|
||||
if (ies == null) return;
|
||||
|
||||
let amount = ies.receiveEnergy(energy, false);
|
||||
energy -= amount;
|
||||
})
|
||||
|
||||
be.persistentData.putInt('energy', energy);
|
||||
},
|
||||
}
|
||||
|
||||
StartupEvents.registry('block', (event) => {
|
||||
event.create('skapa:sturdy_metal_block')
|
||||
.displayName('Sturdy Metal Block')
|
||||
@ -5,7 +126,68 @@ StartupEvents.registry('block', (event) => {
|
||||
.soundType('anvil')
|
||||
.tagBlock('minecraft:mineable/pickaxe')
|
||||
.tagBlock('minecraft:needs_iron_tool')
|
||||
.tagBlock('create:wrench_pickup')
|
||||
.requiresTool(true)
|
||||
.lightLevel(0)
|
||||
.textureAll('minecraft:block/smithing_table_top')
|
||||
|
||||
event.create('skapa:andesite_cobblestone_generator')
|
||||
.displayName('Andesite Cobblestone Generator')
|
||||
.tagBlock('minecraft:mineable/pickaxe')
|
||||
.tagBlock('minecraft:needs_iron_tool')
|
||||
.tagBlock('create:wrench_pickup')
|
||||
.blockEntity((info) => {
|
||||
info.serverTick(20, 0, global.cobblegen.serverTick(4))
|
||||
|
||||
info.attachCapability(
|
||||
CapabilityBuilder.ITEM.blockEntity()
|
||||
.getSlots((be) => 8)
|
||||
.getStackInSlot(global.cobblegen.getStackInSlot)
|
||||
.insertItem(global.cobblegen.insertItem)
|
||||
.extractItem(global.cobblegen.extractItem)
|
||||
.getSlotLimit((be) => 64)
|
||||
.isItemValid(global.cobblegen.isItemValid)
|
||||
)
|
||||
})
|
||||
|
||||
event.create('skapa:brass_cobblestone_generator')
|
||||
.displayName('Brass Cobblestone Generator')
|
||||
.tagBlock('minecraft:mineable/pickaxe')
|
||||
.tagBlock('minecraft:needs_iron_tool')
|
||||
.tagBlock('create:wrench_pickup')
|
||||
.blockEntity((info) => {
|
||||
info.serverTick(20, 0, global.cobblegen.serverTick(64))
|
||||
|
||||
info.attachCapability(
|
||||
CapabilityBuilder.ITEM.blockEntity()
|
||||
.getSlots((be) => 32)
|
||||
.getStackInSlot(global.cobblegen.getStackInSlot)
|
||||
.insertItem(global.cobblegen.insertItem)
|
||||
.extractItem(global.cobblegen.extractItem)
|
||||
.getSlotLimit((be) => 64)
|
||||
.isItemValid(global.cobblegen.isItemValid)
|
||||
)
|
||||
})
|
||||
|
||||
event.create('skapa:thermoelectric_generator')
|
||||
.displayName('Thermoelectric Generator')
|
||||
.hardness(30.0)
|
||||
.soundType('metal')
|
||||
.tagBlock('minecraft:mineable/pickaxe')
|
||||
.tagBlock('minecraft:needs_iron_tool')
|
||||
.requiresTool(true)
|
||||
.lightLevel(0)
|
||||
.blockEntity((info) => {
|
||||
info.serverTick(global.thermoelectricgen.serverTick);
|
||||
|
||||
info.attachCapability(CapabilityBuilder.ENERGY.customBlockEntity()
|
||||
.canExtract(() => true)
|
||||
.canReceive(() => false)
|
||||
.extractEnergy(global.thermoelectricgen.extractEnergy)
|
||||
.getEnergyStored((be) => {
|
||||
return be.persistentData.getInt('energy')
|
||||
})
|
||||
.getMaxEnergyStored(() => 5000)
|
||||
);
|
||||
})
|
||||
})
|
||||
Loading…
Reference in New Issue
Block a user