Skip to content

Commit

Permalink
add zip args parser
Browse files Browse the repository at this point in the history
  • Loading branch information
12rcu committed Aug 29, 2024
1 parent 371d53d commit 7146281
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/lop/devtools/monstera/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ class MinecraftAddonPaths(

class MinecraftFormatVersions(
var behEntity: String = "1.20.81",
var behItem: String = "1.10.0",
var behItem: String = "1.20.50",
var behAnim: String = "1.8.0",
var behBlock: String = "1.20.81",
var behBlock: String = "1.20.60",
var behRecipe: String = "1.17.41",
var behSpawnRule: String = "1.8.0",
var behAnimController: String = "1.10.0",
Expand Down
11 changes: 11 additions & 0 deletions src/main/kotlin/com/lop/devtools/monstera/addon/Addon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.lop.devtools.monstera.addon.block.Block
import com.lop.devtools.monstera.addon.dev.buildToMcFolder
import com.lop.devtools.monstera.addon.dev.overwriteResourceInMcFolder
import com.lop.devtools.monstera.addon.dev.validateTextures
import com.lop.devtools.monstera.addon.dev.zipper.zipWorld
import com.lop.devtools.monstera.addon.entity.Entity
import com.lop.devtools.monstera.addon.item.Item
import com.lop.devtools.monstera.addon.mcfunction.McFunction
Expand Down Expand Up @@ -322,6 +323,16 @@ open class Addon(val config: Config, val args: Array<String>) {
onPackage.forEach {
it.invoke(this)
}

when(argParsed["zipworld"]) {
null, "true" -> zipWorld(config)
else -> zipWorld(config, argParsed["zipworld"]!!)
}

when(argParsed["zipaddon"]) {
null, "true" -> zipWorld(config)
else -> zipWorld(config, argParsed["zipaddon"]!!)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,57 @@ class ItemEnchantable : MonsteraRawFile() {
}

enum class EnchantableSlot {
@SerializedName("armor_feet")
@SerializedName("armor_feet")
ARMOR_FEET,

@SerializedName("armor_torso")
ARMOR_TORSO,

@SerializedName("armor_head")
ARMOR_HEAD,

@SerializedName("armor_legs")
ARMOR_LEGS,

@SerializedName("armor_axe")
AXE,

@SerializedName("armor_bow")
BOW,

@SerializedName("cosmetic_head")
COSMETIC_HEAD,

@SerializedName("crossbow")
CROSSBOW,

@SerializedName("elytra")
ELYTRA,

@SerializedName("fishing_rod")
FISHING_ROD,

@SerializedName("flintsteel")
FLINTSTEEL,

@SerializedName("hoe")
HOE,

@SerializedName("pickaxe")
PICKAXE,

@SerializedName("shears")
SHEARS,

@SerializedName("shield")
SHIELD,

@SerializedName("shovel")
SHOVEL,

@SerializedName("sword")
SWORD,

@SerializedName("all")
ALL;

Expand Down

0 comments on commit 7146281

Please sign in to comment.