
[feature request] Support datapack format config
GoldenTotem opened this issue ยท 1 comments
Minecraft Version
1.16.5
Block Swap Version
1.1.1
Mod Loader
Forge
Mod Loader Version
36.2.35
Bug Severity
Major
What happened?
Block swap is a good mod, but I think it is not strong enough, the things that you can configure is too little, it needs more functions.
Maybe mod can add datapack support or use config file in datapack format to realize complex features such as sawp conditions.
I have designed a json file. I am a novice in datapack and there maybe some problems in the file. But I hope that it can provide some ideas can do some help.
Untitled-1.zip json in zip
The first sawp means if you place a stone in desert biome in overworld OR basalt_deltas biome in nether AND the block is between y:32 and y:128, this stone will turn into netherrack.
The second means grass blocks with block state [snowy=true] will turn into snow block when worldgen.
The third means any block with block tag (minecraft:enderman_holdable OR twilightforest:portal/edge) AND forge:dirt will turn into bedrock.
I got this idea from advancements of datapack, I don't know whether this idea is easy or difficulty to realize, but I am looking forward to it!
json file:
{
"sawp": [
{
"name":"every string is vaild, can have no name",
"before":"minecraft:stone",
"after":"minecraft:netherrack",
"conditions":[
{
"condition_A(You can costomize the condition name)":{
"condition":"in_dimension",
"dimension":"minecraft:overworld"
}
},
{
"condition_B":{
"condition":"in_dimension",
"dimension":"minecraft:the_nether"
}
},
{
"condition_C":{
"condition":"in_biome",
"biome":"minecraft:desert"
}
},
{
"condition_D":{
"condition":"in_biome",
"biome":"minecraft:basalt_deltas"
}
},
{
"condition_E":{
"condition":"location",
"location_y":{
"min":32,
"max":128
}
}
},
{
"condition_P":{
"condition":"placed_by_player"
}
}
],
"requirements":[
[
"condition_A",
"condition_B"
],
[
"condition_C",
"condition_D"
],
[
"condition_E"
],
[
"condition_P"
]
]
},
{
"before":"minecraft:grass_block",
"after":"minecraft:snow_block",
"conditions":[
{
"condition_A":{
"condition":"block_state",
"state":{
"snowy":true
}
}
},
{
"condition_W":{
"condition":"placed_at_worldgen"
}
}
],
"requirements":[
[
"condition_A"
],
[
"condition_W"
]
]
},
{
"before":"any",
"after":"minecraft:bedrock",
"conditions":[
{
"condition_A":{
"condition":"block_tag",
"tags":[
[
"minecraft:enderman_holdable",
"twilightforest:portal/edge"
],
[
"forge:dirt"
]
]
}
},
{
"condition_P":{
"condition":"placed_by_player"
}
},
{
"condition_W":{
"condition":"placed_at_worldgen"
}
}
],
"requirements":[
[
"condition_A"
],
[
"condition_P",
"condition_W"
]
]
}
]
}
latest.log
_