diff --git a/src/fabric-1.16.1/achievement.definition.yaml b/src/fabric-1.16.2/achievement.definition.yaml similarity index 100% rename from src/fabric-1.16.1/achievement.definition.yaml rename to src/fabric-1.16.2/achievement.definition.yaml diff --git a/src/fabric-1.16.1/armor.definition.yaml b/src/fabric-1.16.2/armor.definition.yaml similarity index 97% rename from src/fabric-1.16.1/armor.definition.yaml rename to src/fabric-1.16.2/armor.definition.yaml index 180b4db1..48f14035 100644 --- a/src/fabric-1.16.1/armor.definition.yaml +++ b/src/fabric-1.16.2/armor.definition.yaml @@ -1,37 +1,37 @@ -templates: - - template: armor.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEArmorMaterial.java" - - template: json/item.json.ftl - writer: json - condition: enableHelmet - deleteWhenConditionFalse: true - variables: "item=helmet" - name: "@MODASSETSROOT/models/item/@registrynamehelmet.json" - - template: json/item.json.ftl - writer: json - condition: enableBody - deleteWhenConditionFalse: true - variables: "item=body" - name: "@MODASSETSROOT/models/item/@registrynamebody.json" - - template: json/item.json.ftl - writer: json - condition: enableLeggings - deleteWhenConditionFalse: true - variables: "item=leggings" - name: "@MODASSETSROOT/models/item/@registrynamelegs.json" - - template: json/item.json.ftl - writer: json - condition: enableBoots - deleteWhenConditionFalse: true - variables: "item=boots" - name: "@MODASSETSROOT/models/item/@registrynameboots.json" - -localizationkeys: - - key: item.@modid.@registrynamehelmet - mapto: helmetName - - key: item.@modid.@registrynamebody - mapto: bodyName - - key: item.@modid.@registrynamelegs - mapto: leggingsName - - key: item.@modid.@registrynameboots +templates: + - template: armor.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEArmorMaterial.java" + - template: json/item.json.ftl + writer: json + condition: enableHelmet + deleteWhenConditionFalse: true + variables: "item=helmet" + name: "@MODASSETSROOT/models/item/@registrynamehelmet.json" + - template: json/item.json.ftl + writer: json + condition: enableBody + deleteWhenConditionFalse: true + variables: "item=body" + name: "@MODASSETSROOT/models/item/@registrynamebody.json" + - template: json/item.json.ftl + writer: json + condition: enableLeggings + deleteWhenConditionFalse: true + variables: "item=leggings" + name: "@MODASSETSROOT/models/item/@registrynamelegs.json" + - template: json/item.json.ftl + writer: json + condition: enableBoots + deleteWhenConditionFalse: true + variables: "item=boots" + name: "@MODASSETSROOT/models/item/@registrynameboots.json" + +localizationkeys: + - key: item.@modid.@registrynamehelmet + mapto: helmetName + - key: item.@modid.@registrynamebody + mapto: bodyName + - key: item.@modid.@registrynamelegs + mapto: leggingsName + - key: item.@modid.@registrynameboots mapto: bootsName \ No newline at end of file diff --git a/src/fabric-1.16.1/block.definition.yaml b/src/fabric-1.16.2/block.definition.yaml similarity index 97% rename from src/fabric-1.16.1/block.definition.yaml rename to src/fabric-1.16.2/block.definition.yaml index 672965da..0c3ea967 100644 --- a/src/fabric-1.16.1/block.definition.yaml +++ b/src/fabric-1.16.2/block.definition.yaml @@ -1,226 +1,226 @@ -templates: - - template: block.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/block/@NAMEBlock.java" - - # Block item templates - - template: json/block_item.json.ftl - condition: "renderType() #?= 10,11,12,2" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/block_item_cmodel.json.ftl - condition: "renderType() #= 3" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - # Normal block templates - - template: json/block_states.json.ftl - writer: json - variables: "variant= " - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block_all_fixed.json.ftl - condition: "renderType() #= 10" - writer: json - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block.json.ftl - condition: "renderType() #= 11" - writer: json - variables: "model=cube_all;txname=all" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block.json.ftl - condition: "renderType() #= 12" - writer: json - variables: "model=cross;txname=cross" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block_cmodel.json.ftl - condition: "renderType() #= 2" - writer: json - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block_cmodel_obj.json.ftl - condition: "renderType() #= 3" - writer: json - name: "@MODASSETSROOT/models/block/@registryname.json" - - # TX: Stairs templates - - template: json/block_item.json.ftl - condition: "blockBase %= Stairs" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/stairs_states.json.ftl - condition: "blockBase %= Stairs" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block_model_tbs.json.ftl - variables: "model=stairs" - condition: "blockBase %= Stairs" - writer: json - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block_model_tbs.json.ftl - variables: "model=inner_stairs" - deleteWhenConditionFalse: true - condition: "blockBase %= Stairs" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_inner.json" - - template: json/block_model_tbs.json.ftl - variables: "model=outer_stairs" - deleteWhenConditionFalse: true - condition: "blockBase %= Stairs" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_outer.json" - - # TX: Fence templates - - template: json/txblock/fence_block_item.json.ftl - condition: "blockBase %= Fence" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/fence_states.json.ftl - condition: "blockBase %= Fence" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block.json.ftl - condition: "blockBase %= Fence" - writer: json - variables: "model=fence_side;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Fence" - writer: json - variables: "model=fence_post;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname_post.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Fence" - writer: json - variables: "model=fence_inventory;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname_inventory.json" - - # TX: Wall templates - - template: json/txblock/fence_block_item.json.ftl - condition: "blockBase %= Wall" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/wall_states.json.ftl - condition: "blockBase %= Wall" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block.json.ftl - condition: "blockBase %= Wall" - writer: json - variables: "model=template_wall_side;txname=wall" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Wall" - writer: json - variables: "model=template_wall_post;txname=wall" - name: "@MODASSETSROOT/models/block/@registryname_post.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Wall" - writer: json - variables: "model=wall_inventory;txname=wall" - name: "@MODASSETSROOT/models/block/@registryname_inventory.json" - - # TX: Slab templates - - template: json/block_item.json.ftl - condition: "blockBase %= Slab" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/slab_states.json.ftl - condition: "blockBase %= Slab" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block_model_tbs.json.ftl - condition: "blockBase %= Slab" - writer: json - variables: "model=slab" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block_model_tbs.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Slab" - writer: json - variables: "model=slab_top" - name: "@MODASSETSROOT/models/block/@registryname_top.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= Slab" - writer: json - variables: "model=cube_all;txname=all" - name: "@MODASSETSROOT/models/block/@registryname_full.json" - - # TX: TrapDoor templates - - template: json/block_item.json.ftl - condition: "blockBase %= TrapDoor" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/trapdoor_states.json.ftl - condition: "blockBase %= TrapDoor" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block.json.ftl - condition: "blockBase %= TrapDoor" - writer: json - variables: "model=template_orientable_trapdoor_bottom;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= TrapDoor" - writer: json - variables: "model=template_orientable_trapdoor_top;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname_top.json" - - template: json/block.json.ftl - deleteWhenConditionFalse: true - condition: "blockBase %= TrapDoor" - writer: json - variables: "model=template_orientable_trapdoor_open;txname=texture" - name: "@MODASSETSROOT/models/block/@registryname_open.json" - - # TX: Leaves templates - - template: json/block_item.json.ftl - condition: "blockBase %= Leaves" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/block_states.json.ftl - condition: "blockBase %= Leaves" - writer: json - variables: "variant= " - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/block.json.ftl - condition: "blockBase %= Leaves" - writer: json - variables: "model=cube_all;txname=all" - name: "@MODASSETSROOT/models/block/@registryname.json" - - # TX: Pane templates - - template: json/txblock/pane_item.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/txblock/pane_states.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/blockstates/@registryname.json" - - template: json/txblock/pane_side.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_side.json" - - template: json/txblock/pane_side_alt.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_side_alt.json" - - template: json/txblock/pane_post.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_post.json" - - template: json/txblock/pane_noside.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_noside.json" - - template: json/txblock/pane_noside_alt.json.ftl - condition: "blockBase %= Pane" - writer: json - name: "@MODASSETSROOT/models/block/@registryname_noside_alt.json" - -localizationkeys: - - key: block.@modid.@registryname - mapto: name +templates: + - template: block.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/block/@NAMEBlock.java" + + # Block item templates + - template: json/block_item.json.ftl + condition: "renderType() #?= 10,11,12,2" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/block_item_cmodel.json.ftl + condition: "renderType() #= 3" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + + # Normal block templates + - template: json/block_states.json.ftl + writer: json + variables: "variant= " + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block_all_fixed.json.ftl + condition: "renderType() #= 10" + writer: json + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block.json.ftl + condition: "renderType() #= 11" + writer: json + variables: "model=cube_all;txname=all" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block.json.ftl + condition: "renderType() #= 12" + writer: json + variables: "model=cross;txname=cross" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block_cmodel.json.ftl + condition: "renderType() #= 2" + writer: json + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block_cmodel_obj.json.ftl + condition: "renderType() #= 3" + writer: json + name: "@MODASSETSROOT/models/block/@registryname.json" + + # TX: Stairs templates + - template: json/block_item.json.ftl + condition: "blockBase %= Stairs" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/stairs_states.json.ftl + condition: "blockBase %= Stairs" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block_model_tbs.json.ftl + variables: "model=stairs" + condition: "blockBase %= Stairs" + writer: json + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block_model_tbs.json.ftl + variables: "model=inner_stairs" + deleteWhenConditionFalse: true + condition: "blockBase %= Stairs" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_inner.json" + - template: json/block_model_tbs.json.ftl + variables: "model=outer_stairs" + deleteWhenConditionFalse: true + condition: "blockBase %= Stairs" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_outer.json" + + # TX: Fence templates + - template: json/txblock/fence_block_item.json.ftl + condition: "blockBase %= Fence" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/fence_states.json.ftl + condition: "blockBase %= Fence" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block.json.ftl + condition: "blockBase %= Fence" + writer: json + variables: "model=fence_side;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Fence" + writer: json + variables: "model=fence_post;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname_post.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Fence" + writer: json + variables: "model=fence_inventory;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname_inventory.json" + + # TX: Wall templates + - template: json/txblock/fence_block_item.json.ftl + condition: "blockBase %= Wall" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/wall_states.json.ftl + condition: "blockBase %= Wall" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block.json.ftl + condition: "blockBase %= Wall" + writer: json + variables: "model=template_wall_side;txname=wall" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Wall" + writer: json + variables: "model=template_wall_post;txname=wall" + name: "@MODASSETSROOT/models/block/@registryname_post.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Wall" + writer: json + variables: "model=wall_inventory;txname=wall" + name: "@MODASSETSROOT/models/block/@registryname_inventory.json" + + # TX: Slab templates + - template: json/block_item.json.ftl + condition: "blockBase %= Slab" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/slab_states.json.ftl + condition: "blockBase %= Slab" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block_model_tbs.json.ftl + condition: "blockBase %= Slab" + writer: json + variables: "model=slab" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block_model_tbs.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Slab" + writer: json + variables: "model=slab_top" + name: "@MODASSETSROOT/models/block/@registryname_top.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= Slab" + writer: json + variables: "model=cube_all;txname=all" + name: "@MODASSETSROOT/models/block/@registryname_full.json" + + # TX: TrapDoor templates + - template: json/block_item.json.ftl + condition: "blockBase %= TrapDoor" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/trapdoor_states.json.ftl + condition: "blockBase %= TrapDoor" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block.json.ftl + condition: "blockBase %= TrapDoor" + writer: json + variables: "model=template_orientable_trapdoor_bottom;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= TrapDoor" + writer: json + variables: "model=template_orientable_trapdoor_top;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname_top.json" + - template: json/block.json.ftl + deleteWhenConditionFalse: true + condition: "blockBase %= TrapDoor" + writer: json + variables: "model=template_orientable_trapdoor_open;txname=texture" + name: "@MODASSETSROOT/models/block/@registryname_open.json" + + # TX: Leaves templates + - template: json/block_item.json.ftl + condition: "blockBase %= Leaves" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/block_states.json.ftl + condition: "blockBase %= Leaves" + writer: json + variables: "variant= " + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/block.json.ftl + condition: "blockBase %= Leaves" + writer: json + variables: "model=cube_all;txname=all" + name: "@MODASSETSROOT/models/block/@registryname.json" + + # TX: Pane templates + - template: json/txblock/pane_item.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/txblock/pane_states.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/blockstates/@registryname.json" + - template: json/txblock/pane_side.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_side.json" + - template: json/txblock/pane_side_alt.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_side_alt.json" + - template: json/txblock/pane_post.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_post.json" + - template: json/txblock/pane_noside.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_noside.json" + - template: json/txblock/pane_noside_alt.json.ftl + condition: "blockBase %= Pane" + writer: json + name: "@MODASSETSROOT/models/block/@registryname_noside_alt.json" + +localizationkeys: + - key: block.@modid.@registryname + mapto: name diff --git a/src/fabric-1.16.1/code.definition.yaml b/src/fabric-1.16.2/code.definition.yaml similarity index 100% rename from src/fabric-1.16.1/code.definition.yaml rename to src/fabric-1.16.2/code.definition.yaml diff --git a/src/fabric-1.16.1/command.definition.yaml b/src/fabric-1.16.2/command.definition.yaml similarity index 98% rename from src/fabric-1.16.1/command.definition.yaml rename to src/fabric-1.16.2/command.definition.yaml index 43fbb253..d2597234 100644 --- a/src/fabric-1.16.1/command.definition.yaml +++ b/src/fabric-1.16.2/command.definition.yaml @@ -1,3 +1,3 @@ -templates: - - template: command.java.ftl +templates: + - template: command.java.ftl name: "@SRCROOT/@BASEPACKAGEPATH/server/@NAMECommand.java" \ No newline at end of file diff --git a/src/fabric-1.16.1/enchantment.definition.yaml b/src/fabric-1.16.2/enchantment.definition.yaml similarity index 96% rename from src/fabric-1.16.1/enchantment.definition.yaml rename to src/fabric-1.16.2/enchantment.definition.yaml index 33d04c3c..d3f39a62 100644 --- a/src/fabric-1.16.1/enchantment.definition.yaml +++ b/src/fabric-1.16.2/enchantment.definition.yaml @@ -1,7 +1,7 @@ -templates: - - template: enchantment.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEEnchantment.java" - -localizationkeys: - - key: enchantment.@modid.@registryname +templates: + - template: enchantment.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEEnchantment.java" + +localizationkeys: + - key: enchantment.@modid.@registryname mapto: name \ No newline at end of file diff --git a/src/fabric-1.16.1/food.definition.yaml b/src/fabric-1.16.2/food.definition.yaml similarity index 97% rename from src/fabric-1.16.1/food.definition.yaml rename to src/fabric-1.16.2/food.definition.yaml index f0db17f3..a150f961 100644 --- a/src/fabric-1.16.1/food.definition.yaml +++ b/src/fabric-1.16.2/food.definition.yaml @@ -1,15 +1,15 @@ -templates: - - template: food.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEItem.java" - - template: json/item.json.ftl - writer: json - condition: "renderType #= 0" - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/item_cmodel.json.ftl - writer: json - condition: "renderType #= 1" - name: "@MODASSETSROOT/models/item/@registryname.json" - -localizationkeys: - - key: item.@modid.@registryname +templates: + - template: food.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEItem.java" + - template: json/item.json.ftl + writer: json + condition: "renderType #= 0" + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/item_cmodel.json.ftl + writer: json + condition: "renderType #= 1" + name: "@MODASSETSROOT/models/item/@registryname.json" + +localizationkeys: + - key: item.@modid.@registryname mapto: name \ No newline at end of file diff --git a/src/fabric-1.16.1/fuel.definition.yaml b/src/fabric-1.16.2/fuel.definition.yaml similarity index 97% rename from src/fabric-1.16.1/fuel.definition.yaml rename to src/fabric-1.16.2/fuel.definition.yaml index f37badaf..fbfae765 100644 --- a/src/fabric-1.16.1/fuel.definition.yaml +++ b/src/fabric-1.16.2/fuel.definition.yaml @@ -1,3 +1,3 @@ -templates: - - template: fuel.java.ftl +templates: + - template: fuel.java.ftl name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEFuel.java" \ No newline at end of file diff --git a/src/fabric-1.16.1/function.definition.yaml b/src/fabric-1.16.2/function.definition.yaml similarity index 100% rename from src/fabric-1.16.1/function.definition.yaml rename to src/fabric-1.16.2/function.definition.yaml diff --git a/src/fabric-1.16.1/generator.yaml b/src/fabric-1.16.2/generator.yaml similarity index 96% rename from src/fabric-1.16.1/generator.yaml rename to src/fabric-1.16.2/generator.yaml index d8fa127e..b736f7f0 100644 --- a/src/fabric-1.16.1/generator.yaml +++ b/src/fabric-1.16.2/generator.yaml @@ -1,7 +1,7 @@ -name: Minecraft Fabric for 1.16.1 (@buildfileversion) +name: Minecraft Fabric for 1.16.2 (@buildfileversion) basefeatures: [model_json] status: dev -buildfileversion: 1.0.0-alpha2 +buildfileversion: 1.0.0-alpha3 gradle: setup_task: tasks diff --git a/src/fabric-1.16.1/item.definition.yaml b/src/fabric-1.16.2/item.definition.yaml similarity index 100% rename from src/fabric-1.16.1/item.definition.yaml rename to src/fabric-1.16.2/item.definition.yaml diff --git a/src/fabric-1.16.1/jsontriggers/_mcitemblock.json.ftl b/src/fabric-1.16.2/jsontriggers/_mcitemblock.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/_mcitemblock.json.ftl rename to src/fabric-1.16.2/jsontriggers/_mcitemblock.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/biome_entered.json.ftl b/src/fabric-1.16.2/jsontriggers/biome_entered.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/biome_entered.json.ftl rename to src/fabric-1.16.2/jsontriggers/biome_entered.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/block_placed.json.ftl b/src/fabric-1.16.2/jsontriggers/block_placed.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/block_placed.json.ftl rename to src/fabric-1.16.2/jsontriggers/block_placed.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/custom_trigger.json.ftl b/src/fabric-1.16.2/jsontriggers/custom_trigger.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/custom_trigger.json.ftl rename to src/fabric-1.16.2/jsontriggers/custom_trigger.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/dimension_entered.json.ftl b/src/fabric-1.16.2/jsontriggers/dimension_entered.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/dimension_entered.json.ftl rename to src/fabric-1.16.2/jsontriggers/dimension_entered.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/dimension_left.json.ftl b/src/fabric-1.16.2/jsontriggers/dimension_left.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/dimension_left.json.ftl rename to src/fabric-1.16.2/jsontriggers/dimension_left.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/item_consumed.json.ftl b/src/fabric-1.16.2/jsontriggers/item_consumed.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/item_consumed.json.ftl rename to src/fabric-1.16.2/jsontriggers/item_consumed.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/item_damaged.json.ftl b/src/fabric-1.16.2/jsontriggers/item_damaged.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/item_damaged.json.ftl rename to src/fabric-1.16.2/jsontriggers/item_damaged.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/item_in_inventory.json.ftl b/src/fabric-1.16.2/jsontriggers/item_in_inventory.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/item_in_inventory.json.ftl rename to src/fabric-1.16.2/jsontriggers/item_in_inventory.json.ftl diff --git a/src/fabric-1.16.1/jsontriggers/tick.json.ftl b/src/fabric-1.16.2/jsontriggers/tick.json.ftl similarity index 100% rename from src/fabric-1.16.1/jsontriggers/tick.json.ftl rename to src/fabric-1.16.2/jsontriggers/tick.json.ftl diff --git a/src/fabric-1.16.1/keybind.definition.yaml b/src/fabric-1.16.2/keybind.definition.yaml similarity index 96% rename from src/fabric-1.16.1/keybind.definition.yaml rename to src/fabric-1.16.2/keybind.definition.yaml index 5991b72c..0ad899fd 100644 --- a/src/fabric-1.16.1/keybind.definition.yaml +++ b/src/fabric-1.16.2/keybind.definition.yaml @@ -1,7 +1,7 @@ -templates: - - template: keybind.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/client/@NAMEKeyBinding.java" - -localizationkeys: - - key: key.mcreator.@registryname +templates: + - template: keybind.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/client/@NAMEKeyBinding.java" + +localizationkeys: + - key: key.mcreator.@registryname mapto: keyBindingName \ No newline at end of file diff --git a/src/fabric-1.16.1/loottable.definition.yaml b/src/fabric-1.16.2/loottable.definition.yaml similarity index 100% rename from src/fabric-1.16.1/loottable.definition.yaml rename to src/fabric-1.16.2/loottable.definition.yaml diff --git a/src/fabric-1.16.1/mappings/achievements.yaml b/src/fabric-1.16.2/mappings/achievements.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/achievements.yaml rename to src/fabric-1.16.2/mappings/achievements.yaml diff --git a/src/fabric-1.16.1/mappings/biomedictionarytypes.yaml b/src/fabric-1.16.2/mappings/biomedictionarytypes.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/biomedictionarytypes.yaml rename to src/fabric-1.16.2/mappings/biomedictionarytypes.yaml diff --git a/src/fabric-1.16.1/mappings/biomes.yaml b/src/fabric-1.16.2/mappings/biomes.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/biomes.yaml rename to src/fabric-1.16.2/mappings/biomes.yaml diff --git a/src/fabric-1.16.1/mappings/blocksitems.yaml b/src/fabric-1.16.2/mappings/blocksitems.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/blocksitems.yaml rename to src/fabric-1.16.2/mappings/blocksitems.yaml diff --git a/src/fabric-1.16.1/mappings/damagesources.yaml b/src/fabric-1.16.2/mappings/damagesources.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/damagesources.yaml rename to src/fabric-1.16.2/mappings/damagesources.yaml diff --git a/src/fabric-1.16.1/mappings/directions.yaml b/src/fabric-1.16.2/mappings/directions.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/directions.yaml rename to src/fabric-1.16.2/mappings/directions.yaml diff --git a/src/fabric-1.16.1/mappings/enchantmenttypes.yaml b/src/fabric-1.16.2/mappings/enchantmenttypes.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/enchantmenttypes.yaml rename to src/fabric-1.16.2/mappings/enchantmenttypes.yaml diff --git a/src/fabric-1.16.1/mappings/enhancements.yaml b/src/fabric-1.16.2/mappings/enhancements.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/enhancements.yaml rename to src/fabric-1.16.2/mappings/enhancements.yaml diff --git a/src/fabric-1.16.1/mappings/entities.yaml b/src/fabric-1.16.2/mappings/entities.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/entities.yaml rename to src/fabric-1.16.2/mappings/entities.yaml diff --git a/src/fabric-1.16.1/mappings/gamemodes.yaml b/src/fabric-1.16.2/mappings/gamemodes.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/gamemodes.yaml rename to src/fabric-1.16.2/mappings/gamemodes.yaml diff --git a/src/fabric-1.16.1/mappings/keybuttons.yaml b/src/fabric-1.16.2/mappings/keybuttons.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/keybuttons.yaml rename to src/fabric-1.16.2/mappings/keybuttons.yaml diff --git a/src/fabric-1.16.1/mappings/mapcolors.yaml b/src/fabric-1.16.2/mappings/mapcolors.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/mapcolors.yaml rename to src/fabric-1.16.2/mappings/mapcolors.yaml diff --git a/src/fabric-1.16.1/mappings/materials.yaml b/src/fabric-1.16.2/mappings/materials.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/materials.yaml rename to src/fabric-1.16.2/mappings/materials.yaml diff --git a/src/fabric-1.16.1/mappings/mobspawntypes.yaml b/src/fabric-1.16.2/mappings/mobspawntypes.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/mobspawntypes.yaml rename to src/fabric-1.16.2/mappings/mobspawntypes.yaml diff --git a/src/fabric-1.16.1/mappings/particles.yaml b/src/fabric-1.16.2/mappings/particles.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/particles.yaml rename to src/fabric-1.16.2/mappings/particles.yaml diff --git a/src/fabric-1.16.1/mappings/potions.yaml b/src/fabric-1.16.2/mappings/potions.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/potions.yaml rename to src/fabric-1.16.2/mappings/potions.yaml diff --git a/src/fabric-1.16.1/mappings/sounds.yaml b/src/fabric-1.16.2/mappings/sounds.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/sounds.yaml rename to src/fabric-1.16.2/mappings/sounds.yaml diff --git a/src/fabric-1.16.1/mappings/stepsounds.yaml b/src/fabric-1.16.2/mappings/stepsounds.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/stepsounds.yaml rename to src/fabric-1.16.2/mappings/stepsounds.yaml diff --git a/src/fabric-1.16.1/mappings/tabs.yaml b/src/fabric-1.16.2/mappings/tabs.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/tabs.yaml rename to src/fabric-1.16.2/mappings/tabs.yaml diff --git a/src/fabric-1.16.1/mappings/types.yaml b/src/fabric-1.16.2/mappings/types.yaml similarity index 100% rename from src/fabric-1.16.1/mappings/types.yaml rename to src/fabric-1.16.2/mappings/types.yaml diff --git a/src/fabric-1.16.1/musicdisc.definition.yaml b/src/fabric-1.16.2/musicdisc.definition.yaml similarity index 100% rename from src/fabric-1.16.1/musicdisc.definition.yaml rename to src/fabric-1.16.2/musicdisc.definition.yaml diff --git a/src/fabric-1.16.1/overlay.definition.yaml b/src/fabric-1.16.2/overlay.definition.yaml similarity index 98% rename from src/fabric-1.16.1/overlay.definition.yaml rename to src/fabric-1.16.2/overlay.definition.yaml index e5e34737..db3fba9c 100644 --- a/src/fabric-1.16.1/overlay.definition.yaml +++ b/src/fabric-1.16.2/overlay.definition.yaml @@ -1,3 +1,3 @@ -templates: - - template: overlay.java.ftl +templates: + - template: overlay.java.ftl name: "@SRCROOT/@BASEPACKAGEPATH/client/@NAMEOverlay.java" \ No newline at end of file diff --git a/src/fabric-1.16.1/procedure.definition.yaml b/src/fabric-1.16.2/procedure.definition.yaml similarity index 100% rename from src/fabric-1.16.1/procedure.definition.yaml rename to src/fabric-1.16.2/procedure.definition.yaml diff --git a/src/fabric-1.16.1/procedures/_call_procedure.java.ftl b/src/fabric-1.16.2/procedures/_call_procedure.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/_call_procedure.java.ftl rename to src/fabric-1.16.2/procedures/_call_procedure.java.ftl diff --git a/src/fabric-1.16.1/procedures/_call_procedure_at.java.ftl b/src/fabric-1.16.2/procedures/_call_procedure_at.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/_call_procedure_at.java.ftl rename to src/fabric-1.16.2/procedures/_call_procedure_at.java.ftl diff --git a/src/fabric-1.16.1/procedures/_procedure_retval.java.ftl b/src/fabric-1.16.2/procedures/_procedure_retval.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/_procedure_retval.java.ftl rename to src/fabric-1.16.2/procedures/_procedure_retval.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_add.java.ftl b/src/fabric-1.16.2/procedures/block_add.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_add.java.ftl rename to src/fabric-1.16.2/procedures/block_add.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_nbt_num_get.java.ftl b/src/fabric-1.16.2/procedures/block_nbt_num_get.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_nbt_num_get.java.ftl rename to src/fabric-1.16.2/procedures/block_nbt_num_get.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_nbt_num_set.java.ftl b/src/fabric-1.16.2/procedures/block_nbt_num_set.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_nbt_num_set.java.ftl rename to src/fabric-1.16.2/procedures/block_nbt_num_set.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_nbt_text_get.java.ftl b/src/fabric-1.16.2/procedures/block_nbt_text_get.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_nbt_text_get.java.ftl rename to src/fabric-1.16.2/procedures/block_nbt_text_get.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_nbt_text_set.java.ftl b/src/fabric-1.16.2/procedures/block_nbt_text_set.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_nbt_text_set.java.ftl rename to src/fabric-1.16.2/procedures/block_nbt_text_set.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_notify.java.ftl b/src/fabric-1.16.2/procedures/block_notify.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_notify.java.ftl rename to src/fabric-1.16.2/procedures/block_notify.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_remove.java.ftl b/src/fabric-1.16.2/procedures/block_remove.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_remove.java.ftl rename to src/fabric-1.16.2/procedures/block_remove.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_remove_drop.java.ftl b/src/fabric-1.16.2/procedures/block_remove_drop.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_remove_drop.java.ftl rename to src/fabric-1.16.2/procedures/block_remove_drop.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_remove_with_particles.java.ftl b/src/fabric-1.16.2/procedures/block_remove_with_particles.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_remove_with_particles.java.ftl rename to src/fabric-1.16.2/procedures/block_remove_with_particles.java.ftl diff --git a/src/fabric-1.16.1/procedures/block_replace.java.ftl b/src/fabric-1.16.2/procedures/block_replace.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/block_replace.java.ftl rename to src/fabric-1.16.2/procedures/block_replace.java.ftl diff --git a/src/fabric-1.16.1/procedures/compare_directions.java.ftl b/src/fabric-1.16.2/procedures/compare_directions.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/compare_directions.java.ftl rename to src/fabric-1.16.2/procedures/compare_directions.java.ftl diff --git a/src/fabric-1.16.1/procedures/compare_mcblock_material.java.ftl b/src/fabric-1.16.2/procedures/compare_mcblock_material.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/compare_mcblock_material.java.ftl rename to src/fabric-1.16.2/procedures/compare_mcblock_material.java.ftl diff --git a/src/fabric-1.16.1/procedures/compare_mcblocks_exact.java.ftl b/src/fabric-1.16.2/procedures/compare_mcblocks_exact.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/compare_mcblocks_exact.java.ftl rename to src/fabric-1.16.2/procedures/compare_mcblocks_exact.java.ftl diff --git a/src/fabric-1.16.1/procedures/copy_mcitem.java.ftl b/src/fabric-1.16.2/procedures/copy_mcitem.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/copy_mcitem.java.ftl rename to src/fabric-1.16.2/procedures/copy_mcitem.java.ftl diff --git a/src/fabric-1.16.1/procedures/deal_damage.java.ftl b/src/fabric-1.16.2/procedures/deal_damage.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/deal_damage.java.ftl rename to src/fabric-1.16.2/procedures/deal_damage.java.ftl index 2fe20319..c09bbcf9 100644 --- a/src/fabric-1.16.1/procedures/deal_damage.java.ftl +++ b/src/fabric-1.16.2/procedures/deal_damage.java.ftl @@ -1,5 +1,5 @@ -<#if field$damagesource?has_content> - ${input$entity}.damage(DamageSource.${generator.map(field$damagesource, "damagesources")},(float)${input$amount}F); -<#else> - ${input$entity}.damage(DamageSource.GENERIC,(float)${input$amount}); +<#if field$damagesource?has_content> + ${input$entity}.damage(DamageSource.${generator.map(field$damagesource, "damagesources")},(float)${input$amount}F); +<#else> + ${input$entity}.damage(DamageSource.GENERIC,(float)${input$amount}); \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/direction_opposite.java.ftl b/src/fabric-1.16.2/procedures/direction_opposite.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/direction_opposite.java.ftl rename to src/fabric-1.16.2/procedures/direction_opposite.java.ftl diff --git a/src/fabric-1.16.1/procedures/empty_itemstack.java.ftl b/src/fabric-1.16.2/procedures/empty_itemstack.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/empty_itemstack.java.ftl rename to src/fabric-1.16.2/procedures/empty_itemstack.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_add_achievement.java.ftl b/src/fabric-1.16.2/procedures/entity_add_achievement.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_add_achievement.java.ftl rename to src/fabric-1.16.2/procedures/entity_add_achievement.java.ftl index c8def4c3..557e8a9e 100644 --- a/src/fabric-1.16.1/procedures/entity_add_achievement.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_add_achievement.java.ftl @@ -1,12 +1,12 @@ -if(${input$entity} instanceof ServerPlayerEntity) { - Advancement _adv = ((MinecraftServer)((ServerPlayerEntity)${input$entity}).server).getAdvancementLoader() - .get(new Identifier("${generator.map(field$achievement, "achievements")}")); - AdvancementProgress _ap = ((ServerPlayerEntity) ${input$entity}).getAdvancementTracker().getProgress(_adv); - if (!_ap.isDone()) { - Iterator _iterator = _ap.getUnobtainedCriteria().iterator(); - while(_iterator.hasNext()) { - String _criterion = (String)_iterator.next(); - ((ServerPlayerEntity) ${input$entity}).getAdvancementTracker().grantCriterion(_adv, _criterion); - } - } +if(${input$entity} instanceof ServerPlayerEntity) { + Advancement _adv = ((MinecraftServer)((ServerPlayerEntity)${input$entity}).server).getAdvancementLoader() + .get(new Identifier("${generator.map(field$achievement, "achievements")}")); + AdvancementProgress _ap = ((ServerPlayerEntity) ${input$entity}).getAdvancementTracker().getProgress(_adv); + if (!_ap.isDone()) { + Iterator _iterator = _ap.getUnobtainedCriteria().iterator(); + while(_iterator.hasNext()) { + String _criterion = (String)_iterator.next(); + ((ServerPlayerEntity) ${input$entity}).getAdvancementTracker().grantCriterion(_adv, _criterion); + } + } } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_add_item.java.ftl b/src/fabric-1.16.2/procedures/entity_add_item.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_add_item.java.ftl rename to src/fabric-1.16.2/procedures/entity_add_item.java.ftl index 6824daf5..2a2378b9 100644 --- a/src/fabric-1.16.1/procedures/entity_add_item.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_add_item.java.ftl @@ -1,11 +1,11 @@ -<#include "mcitems.ftl"> -if(${input$entity} instanceof PlayerEntity) { - ItemStack _setstack = ${mappedMCItemToItemStackCode(input$item, 1)}; - _setstack.setCount((int) ${input$amount}); - if(${input$entity}.world.isClient()) { - if(${input$entity}.inventory.getEmptySlot() != -1) { - ${input$entity}.inventory.main.add(${input$entity}.inventory.getEmptySlot(), _setstack); - ${input$entity}.inventory.markDirty(); - } - } -} \ No newline at end of file +<#include "mcitems.ftl"> +if(${input$entity} instanceof PlayerEntity) { + ItemStack _setstack = ${mappedMCItemToItemStackCode(input$item, 1)}; + _setstack.setCount((int) ${input$amount}); + if(${input$entity}.world.isClient()) { + if(${input$entity}.inventory.getEmptySlot() != -1) { + ${input$entity}.inventory.main.add(${input$entity}.inventory.getEmptySlot(), _setstack); + ${input$entity}.inventory.markDirty(); + } + } +} diff --git a/src/fabric-1.16.1/procedures/entity_add_xp.java.ftl b/src/fabric-1.16.2/procedures/entity_add_xp.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_add_xp.java.ftl rename to src/fabric-1.16.2/procedures/entity_add_xp.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_add_xp_level.java.ftl b/src/fabric-1.16.2/procedures/entity_add_xp_level.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_add_xp_level.java.ftl rename to src/fabric-1.16.2/procedures/entity_add_xp_level.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_allow_building.java.ftl b/src/fabric-1.16.2/procedures/entity_allow_building.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_allow_building.java.ftl rename to src/fabric-1.16.2/procedures/entity_allow_building.java.ftl index 26ffbfe2..e32c63e8 100644 --- a/src/fabric-1.16.1/procedures/entity_allow_building.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_allow_building.java.ftl @@ -1,4 +1,4 @@ -if(${input$entity} instanceof PlayerEntity) { - ((PlayerEntity)${input$entity}).abilities.allowModifyWorld = ${input$condition}; - ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); +if(${input$entity} instanceof PlayerEntity) { + ((PlayerEntity)${input$entity}).abilities.allowModifyWorld = ${input$condition}; + ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_allow_flying.java.ftl b/src/fabric-1.16.2/procedures/entity_allow_flying.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_allow_flying.java.ftl rename to src/fabric-1.16.2/procedures/entity_allow_flying.java.ftl index d179cc1b..a0ba70ff 100644 --- a/src/fabric-1.16.1/procedures/entity_allow_flying.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_allow_flying.java.ftl @@ -1,4 +1,4 @@ -if(${input$entity} instanceof PlayerEntity) { - ((PlayerEntity)${input$entity}).abilities.allowFlying = ${input$condition}; - ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); +if(${input$entity} instanceof PlayerEntity) { + ((PlayerEntity)${input$entity}).abilities.allowFlying = ${input$condition}; + ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_armor_value.java.ftl b/src/fabric-1.16.2/procedures/entity_armor_value.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_armor_value.java.ftl rename to src/fabric-1.16.2/procedures/entity_armor_value.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_canusecommand.java.ftl b/src/fabric-1.16.2/procedures/entity_canusecommand.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_canusecommand.java.ftl rename to src/fabric-1.16.2/procedures/entity_canusecommand.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_clear_inventory.java.ftl b/src/fabric-1.16.2/procedures/entity_clear_inventory.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_clear_inventory.java.ftl rename to src/fabric-1.16.2/procedures/entity_clear_inventory.java.ftl index 1b770aa2..8dcbdc48 100644 --- a/src/fabric-1.16.1/procedures/entity_clear_inventory.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_clear_inventory.java.ftl @@ -1,2 +1,2 @@ -if(${input$entity} instanceof PlayerEntity) +if(${input$entity} instanceof PlayerEntity) ((PlayerEntity)${input$entity}).inventory.clear(); \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_clearpotions.java.ftl b/src/fabric-1.16.2/procedures/entity_clearpotions.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_clearpotions.java.ftl rename to src/fabric-1.16.2/procedures/entity_clearpotions.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_close_gui.java.ftl b/src/fabric-1.16.2/procedures/entity_close_gui.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_close_gui.java.ftl rename to src/fabric-1.16.2/procedures/entity_close_gui.java.ftl index 069b95c8..bb164861 100644 --- a/src/fabric-1.16.1/procedures/entity_close_gui.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_close_gui.java.ftl @@ -1,3 +1,3 @@ -if(${input$entity} instanceof PlayerEntity){ - ((PlayerEntity) ${input$entity}).closeHandledScreen(); -} +if(${input$entity} instanceof PlayerEntity){ + ((PlayerEntity) ${input$entity}).closeHandledScreen(); +} diff --git a/src/fabric-1.16.1/procedures/entity_despawn.java.ftl b/src/fabric-1.16.2/procedures/entity_despawn.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_despawn.java.ftl rename to src/fabric-1.16.2/procedures/entity_despawn.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_direction.java.ftl b/src/fabric-1.16.2/procedures/entity_direction.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_direction.java.ftl rename to src/fabric-1.16.2/procedures/entity_direction.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_direction_value.java.ftl b/src/fabric-1.16.2/procedures/entity_direction_value.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_direction_value.java.ftl rename to src/fabric-1.16.2/procedures/entity_direction_value.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_disable_damage.java.ftl b/src/fabric-1.16.2/procedures/entity_disable_damage.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_disable_damage.java.ftl rename to src/fabric-1.16.2/procedures/entity_disable_damage.java.ftl index 21c9debc..ed2cacc5 100644 --- a/src/fabric-1.16.1/procedures/entity_disable_damage.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_disable_damage.java.ftl @@ -1,4 +1,4 @@ -if(${input$entity} instanceof PlayerEntity) { - ((PlayerEntity)${input$entity}).abilities.invulnerable = ${input$condition}; - ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); -} +if(${input$entity} instanceof PlayerEntity) { + ((PlayerEntity)${input$entity}).abilities.invulnerable = ${input$condition}; + ((PlayerEntity)${input$entity}).sendAbilitiesUpdate(); +} diff --git a/src/fabric-1.16.1/procedures/entity_execute_command.java.ftl b/src/fabric-1.16.2/procedures/entity_execute_command.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_execute_command.java.ftl rename to src/fabric-1.16.2/procedures/entity_execute_command.java.ftl index fb0ff14b..f036c42b 100644 --- a/src/fabric-1.16.1/procedures/entity_execute_command.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_execute_command.java.ftl @@ -1,7 +1,7 @@ -{ - Entity _ent = ${input$entity}; - if(!_ent.world.isClient()) { - _ent.world.getServer().getCommandManager().execute(_ent.getCommandSource() - .withSilent().withLevel(4), ${input$command}); - } +{ + Entity _ent = ${input$entity}; + if(!_ent.world.isClient()) { + _ent.world.getServer().getCommandManager().execute(_ent.getCommandSource() + .withSilent().withLevel(4), ${input$command}); + } } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_extinguish.java.ftl b/src/fabric-1.16.2/procedures/entity_extinguish.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_extinguish.java.ftl rename to src/fabric-1.16.2/procedures/entity_extinguish.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_foodlevel.java.ftl b/src/fabric-1.16.2/procedures/entity_foodlevel.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_foodlevel.java.ftl rename to src/fabric-1.16.2/procedures/entity_foodlevel.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_has_achievement.java.ftl b/src/fabric-1.16.2/procedures/entity_has_achievement.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_has_achievement.java.ftl rename to src/fabric-1.16.2/procedures/entity_has_achievement.java.ftl index 64c5d0a7..c26cea89 100644 --- a/src/fabric-1.16.1/procedures/entity_has_achievement.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_has_achievement.java.ftl @@ -1,2 +1,2 @@ -(((${input$entity} instanceof ServerPlayerEntity)&&(${input$entity}.world instanceof ServerWorld))?((ServerPlayerEntity)${input$entity}).getAdvancementTracker() +(((${input$entity} instanceof ServerPlayerEntity)&&(${input$entity}.world instanceof ServerWorld))?((ServerPlayerEntity)${input$entity}).getAdvancementTracker() .getProgress(((MinecraftServer)((ServerPlayerEntity)${input$entity}).server).getAdvancementLoader().get(new Identifier("${generator.map(field$achievement, "achievements")}"))).isDone():false) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_has_item_inventory.java.ftl b/src/fabric-1.16.2/procedures/entity_has_item_inventory.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_has_item_inventory.java.ftl rename to src/fabric-1.16.2/procedures/entity_has_item_inventory.java.ftl index 9933b5dc..40faa1db 100644 --- a/src/fabric-1.16.1/procedures/entity_has_item_inventory.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_has_item_inventory.java.ftl @@ -1,2 +1,2 @@ -<#include "mcitems.ftl"> +<#include "mcitems.ftl"> ((${input$entity} instanceof PlayerEntity)?((PlayerEntity)${input$entity}).inventory.contains(${mappedMCItemToItemStackCode(input$item, 1)}):false) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_haspotioneffect.java.ftl b/src/fabric-1.16.2/procedures/entity_haspotioneffect.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_haspotioneffect.java.ftl rename to src/fabric-1.16.2/procedures/entity_haspotioneffect.java.ftl index 3aa484d2..b3383311 100644 --- a/src/fabric-1.16.1/procedures/entity_haspotioneffect.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_haspotioneffect.java.ftl @@ -1,10 +1,10 @@ -(new Object(){boolean check(){ - if(${input$entity} instanceof LivingEntity){ - Collection effects=((LivingEntity)${input$entity}).getActivePotionEffects(); - for(StatusEffectInstance effect:effects){ - if(effect.getEffectType()== ${generator.map(field$potion, "potions")}) return true; - } - } - return false; - } +(new Object(){boolean check(){ + if(${input$entity} instanceof LivingEntity){ + Collection effects=((LivingEntity)${input$entity}).getActivePotionEffects(); + for(StatusEffectInstance effect:effects){ + if(effect.getEffectType()== ${generator.map(field$potion, "potions")}) return true; + } + } + return false; + } }.check()) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_health.java.ftl b/src/fabric-1.16.2/procedures/entity_health.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_health.java.ftl rename to src/fabric-1.16.2/procedures/entity_health.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_health_max.java.ftl b/src/fabric-1.16.2/procedures/entity_health_max.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_health_max.java.ftl rename to src/fabric-1.16.2/procedures/entity_health_max.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_isbeingridden.java.ftl b/src/fabric-1.16.2/procedures/entity_isbeingridden.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_isbeingridden.java.ftl rename to src/fabric-1.16.2/procedures/entity_isbeingridden.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_isburning.java.ftl b/src/fabric-1.16.2/procedures/entity_isburning.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_isburning.java.ftl rename to src/fabric-1.16.2/procedures/entity_isburning.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_iscreative.java.ftl b/src/fabric-1.16.2/procedures/entity_iscreative.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_iscreative.java.ftl rename to src/fabric-1.16.2/procedures/entity_iscreative.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_isriding.java.ftl b/src/fabric-1.16.2/procedures/entity_isriding.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_isriding.java.ftl rename to src/fabric-1.16.2/procedures/entity_isriding.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_issneaking.java.ftl b/src/fabric-1.16.2/procedures/entity_issneaking.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_issneaking.java.ftl rename to src/fabric-1.16.2/procedures/entity_issneaking.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_issprinting.java.ftl b/src/fabric-1.16.2/procedures/entity_issprinting.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_issprinting.java.ftl rename to src/fabric-1.16.2/procedures/entity_issprinting.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_iteminhand.java.ftl b/src/fabric-1.16.2/procedures/entity_iteminhand.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_iteminhand.java.ftl rename to src/fabric-1.16.2/procedures/entity_iteminhand.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_iteminoffhand.java.ftl b/src/fabric-1.16.2/procedures/entity_iteminoffhand.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_iteminoffhand.java.ftl rename to src/fabric-1.16.2/procedures/entity_iteminoffhand.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_lookpos_x.java.ftl b/src/fabric-1.16.2/procedures/entity_lookpos_x.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_lookpos_x.java.ftl rename to src/fabric-1.16.2/procedures/entity_lookpos_x.java.ftl index 2b412e90..bbee7a47 100644 --- a/src/fabric-1.16.1/procedures/entity_lookpos_x.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_lookpos_x.java.ftl @@ -1,3 +1,3 @@ -(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) - .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), +(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) + .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), RayTraceContext.ShapeType.OUTLINE, RayTraceContext.FluidHandling.NONE, ${input$entity})).getPos().getX()) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_lookpos_y.java.ftl b/src/fabric-1.16.2/procedures/entity_lookpos_y.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_lookpos_y.java.ftl rename to src/fabric-1.16.2/procedures/entity_lookpos_y.java.ftl index 52c50027..49e34b11 100644 --- a/src/fabric-1.16.1/procedures/entity_lookpos_y.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_lookpos_y.java.ftl @@ -1,3 +1,3 @@ -(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) - .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), +(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) + .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), RayTraceContext.ShapeType.OUTLINE, RayTraceContext.FluidHandling.NONE, ${input$entity})).getPos().getY()) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_lookpos_z.java.ftl b/src/fabric-1.16.2/procedures/entity_lookpos_z.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_lookpos_z.java.ftl rename to src/fabric-1.16.2/procedures/entity_lookpos_z.java.ftl index fb8a4148..1c488ee9 100644 --- a/src/fabric-1.16.1/procedures/entity_lookpos_z.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_lookpos_z.java.ftl @@ -1,3 +1,3 @@ -(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) - .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), +(${input$entity}.world.rayTrace(new RayTraceContext(${input$entity}.getCameraPosVec(1f), ${input$entity}.getCameraPosVec(1f) + .add(${input$entity}.getRotationVec(1f).x * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).y * ${input$maxdistance}, ${input$entity}.getRotationVec(1f).z * ${input$maxdistance}), RayTraceContext.ShapeType.OUTLINE, RayTraceContext.FluidHandling.NONE, ${input$entity})).getPos().getZ()) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_name.java.ftl b/src/fabric-1.16.2/procedures/entity_name.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_name.java.ftl rename to src/fabric-1.16.2/procedures/entity_name.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_override_fall.java.ftl b/src/fabric-1.16.2/procedures/entity_override_fall.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_override_fall.java.ftl rename to src/fabric-1.16.2/procedures/entity_override_fall.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_pitch.java.ftl b/src/fabric-1.16.2/procedures/entity_pitch.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_pitch.java.ftl rename to src/fabric-1.16.2/procedures/entity_pitch.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_pos_x.java.ftl b/src/fabric-1.16.2/procedures/entity_pos_x.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_pos_x.java.ftl rename to src/fabric-1.16.2/procedures/entity_pos_x.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_pos_y.java.ftl b/src/fabric-1.16.2/procedures/entity_pos_y.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_pos_y.java.ftl rename to src/fabric-1.16.2/procedures/entity_pos_y.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_pos_z.java.ftl b/src/fabric-1.16.2/procedures/entity_pos_z.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_pos_z.java.ftl rename to src/fabric-1.16.2/procedures/entity_pos_z.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_set_armor_slot_item.java.ftl b/src/fabric-1.16.2/procedures/entity_set_armor_slot_item.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/entity_set_armor_slot_item.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_armor_slot_item.java.ftl index 7de31e15..99826dd3 100644 --- a/src/fabric-1.16.1/procedures/entity_set_armor_slot_item.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_set_armor_slot_item.java.ftl @@ -1,8 +1,8 @@ -<#include "mcitems.ftl"> -if(${input$entity} instanceof PlayerEntity) { - ((PlayerEntity)${input$entity}).inventory.armor.set(${input$slotid}, ${mappedMCItemToItemStackCode(input$item, 1)}); - if(${input$entity} instanceof ServerPlayerEntity) - ((ServerPlayerEntity)${input$entity}).inventory.markDirty(); -} - +<#include "mcitems.ftl"> +if(${input$entity} instanceof PlayerEntity) { + ((PlayerEntity)${input$entity}).inventory.armor.set(${input$slotid}, ${mappedMCItemToItemStackCode(input$item, 1)}); + if(${input$entity} instanceof ServerPlayerEntity) + ((ServerPlayerEntity)${input$entity}).inventory.markDirty(); +} + /*@ItemStack*/ \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_set_display_name.java.ftl b/src/fabric-1.16.2/procedures/entity_set_display_name.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_set_display_name.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_display_name.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_set_fire.java.ftl b/src/fabric-1.16.2/procedures/entity_set_fire.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_set_fire.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_fire.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_set_gamemode.java.ftl b/src/fabric-1.16.2/procedures/entity_set_gamemode.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/entity_set_gamemode.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_gamemode.java.ftl index ff2a4931..c07bc920 100644 --- a/src/fabric-1.16.1/procedures/entity_set_gamemode.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_set_gamemode.java.ftl @@ -1,2 +1,2 @@ -if(${input$entity} instanceof PlayerEntity) +if(${input$entity} instanceof PlayerEntity) ((PlayerEntity)${input$entity}).setGameMode(GameMode.${generator.map(field$gamemode, "gamemodes")}); \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_set_health.java.ftl b/src/fabric-1.16.2/procedures/entity_set_health.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_set_health.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_health.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_set_movement.java.ftl b/src/fabric-1.16.2/procedures/entity_set_movement.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_set_movement.java.ftl rename to src/fabric-1.16.2/procedures/entity_set_movement.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_swing_mainhand.java.ftl b/src/fabric-1.16.2/procedures/entity_swing_mainhand.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_swing_mainhand.java.ftl rename to src/fabric-1.16.2/procedures/entity_swing_mainhand.java.ftl index 10bd765e..a95afa19 100644 --- a/src/fabric-1.16.1/procedures/entity_swing_mainhand.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_swing_mainhand.java.ftl @@ -1,3 +1,3 @@ -if(${input$entity} instanceof LivingEntity){ - ((LivingEntity)${input$entity}).swingHand(Hand.MAIN_HAND); +if(${input$entity} instanceof LivingEntity){ + ((LivingEntity)${input$entity}).swingHand(Hand.MAIN_HAND); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_swing_offhand.java.ftl b/src/fabric-1.16.2/procedures/entity_swing_offhand.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/entity_swing_offhand.java.ftl rename to src/fabric-1.16.2/procedures/entity_swing_offhand.java.ftl index 71e008cf..07e0abdf 100644 --- a/src/fabric-1.16.1/procedures/entity_swing_offhand.java.ftl +++ b/src/fabric-1.16.2/procedures/entity_swing_offhand.java.ftl @@ -1,3 +1,3 @@ -if(${input$entity} instanceof LivingEntity){ - ((LivingEntity)${input$entity}).swingHand(Hand.OFF_HAND); +if(${input$entity} instanceof LivingEntity){ + ((LivingEntity)${input$entity}).swingHand(Hand.OFF_HAND); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/entity_vel_x.java.ftl b/src/fabric-1.16.2/procedures/entity_vel_x.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_vel_x.java.ftl rename to src/fabric-1.16.2/procedures/entity_vel_x.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_vel_y.java.ftl b/src/fabric-1.16.2/procedures/entity_vel_y.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_vel_y.java.ftl rename to src/fabric-1.16.2/procedures/entity_vel_y.java.ftl diff --git a/src/fabric-1.16.1/procedures/entity_vel_z.java.ftl b/src/fabric-1.16.2/procedures/entity_vel_z.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/entity_vel_z.java.ftl rename to src/fabric-1.16.2/procedures/entity_vel_z.java.ftl diff --git a/src/fabric-1.16.1/procedures/execute_command.java.ftl b/src/fabric-1.16.2/procedures/execute_command.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/execute_command.java.ftl rename to src/fabric-1.16.2/procedures/execute_command.java.ftl diff --git a/src/fabric-1.16.1/procedures/explode.java.ftl b/src/fabric-1.16.2/procedures/explode.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/explode.java.ftl rename to src/fabric-1.16.2/procedures/explode.java.ftl diff --git a/src/fabric-1.16.1/procedures/get_command_parameters.java.ftl b/src/fabric-1.16.2/procedures/get_command_parameters.java.ftl similarity index 95% rename from src/fabric-1.16.1/procedures/get_command_parameters.java.ftl rename to src/fabric-1.16.2/procedures/get_command_parameters.java.ftl index dafb9f5b..0613bfe8 100644 --- a/src/fabric-1.16.1/procedures/get_command_parameters.java.ftl +++ b/src/fabric-1.16.2/procedures/get_command_parameters.java.ftl @@ -1,9 +1,9 @@ -(new Object(){ - public String getText(){ - String param=(String)cmdparams.get("${field$paramid}"); - if(param != null){ - return param; - } - return""; - } +(new Object(){ + public String getText(){ + String param=(String)cmdparams.get("${field$paramid}"); + if(param != null){ + return param; + } + return""; + } }.getText()) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/get_dimensionid.java.ftl b/src/fabric-1.16.2/procedures/get_dimensionid.java.ftl similarity index 95% rename from src/fabric-1.16.1/procedures/get_dimensionid.java.ftl rename to src/fabric-1.16.2/procedures/get_dimensionid.java.ftl index 817e2ff5..4441633d 100644 --- a/src/fabric-1.16.1/procedures/get_dimensionid.java.ftl +++ b/src/fabric-1.16.2/procedures/get_dimensionid.java.ftl @@ -1,7 +1,7 @@ -<#if field$dimension=="Surface"> - (0) -<#elseif field$dimension=="Nether"> - (-1) -<#elseif field$dimension=="End"> - (1) +<#if field$dimension=="Surface"> + (0) +<#elseif field$dimension=="Nether"> + (-1) +<#elseif field$dimension=="End"> + (1) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/gui_clear_slot.java.ftl b/src/fabric-1.16.2/procedures/gui_clear_slot.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/gui_clear_slot.java.ftl rename to src/fabric-1.16.2/procedures/gui_clear_slot.java.ftl index eebfd161..1f0ccb85 100644 --- a/src/fabric-1.16.1/procedures/gui_clear_slot.java.ftl +++ b/src/fabric-1.16.2/procedures/gui_clear_slot.java.ftl @@ -1,10 +1,10 @@ -if(${input$entity} instanceof ServerPlayerEntity) { - ScreenHandler _current = ((ServerPlayerEntity) ${input$entity}).currentScreenHandler; - if(_current instanceof Supplier) { - Object invobj = ((Supplier) _current).get(); - if(invobj instanceof Map) { - ((Slot) ((Map) invobj).get((int) (${input$slotid}))).setStack(ItemStack.EMPTY); - _current.sendContentUpdates(); - } - } +if(${input$entity} instanceof ServerPlayerEntity) { + ScreenHandler _current = ((ServerPlayerEntity) ${input$entity}).currentScreenHandler; + if(_current instanceof Supplier) { + Object invobj = ((Supplier) _current).get(); + if(invobj instanceof Map) { + ((Slot) ((Map) invobj).get((int) (${input$slotid}))).setStack(ItemStack.EMPTY); + _current.sendContentUpdates(); + } + } } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/item_add_enhancement.java.ftl b/src/fabric-1.16.2/procedures/item_add_enhancement.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/item_add_enhancement.java.ftl rename to src/fabric-1.16.2/procedures/item_add_enhancement.java.ftl index e10075f6..b4dfa6f4 100644 --- a/src/fabric-1.16.1/procedures/item_add_enhancement.java.ftl +++ b/src/fabric-1.16.2/procedures/item_add_enhancement.java.ftl @@ -1,2 +1,2 @@ -<#include "mcitems.ftl"> +<#include "mcitems.ftl"> new ItemStack(${mappedMCItemToItemStackCode(input$item, 1), 1}).addEnchantment(${generator.map(field$enhancement, "enchantments")},(int) ${input$level}); \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/item_can_harvest.java.ftl b/src/fabric-1.16.2/procedures/item_can_harvest.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/item_can_harvest.java.ftl rename to src/fabric-1.16.2/procedures/item_can_harvest.java.ftl index 2ab8256c..0fab1639 100644 --- a/src/fabric-1.16.1/procedures/item_can_harvest.java.ftl +++ b/src/fabric-1.16.2/procedures/item_can_harvest.java.ftl @@ -1,2 +1,2 @@ -<#include "mcitems.ftl"> +<#include "mcitems.ftl"> new ItemStack((${mappedMCItemToItemStackCode(input$item, 1)}).getItem().isEffectiveOn(${mappedBlockToBlockStateCode(input$block)})) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/set_global_spawn.java.ftl b/src/fabric-1.16.2/procedures/set_global_spawn.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/set_global_spawn.java.ftl rename to src/fabric-1.16.2/procedures/set_global_spawn.java.ftl diff --git a/src/fabric-1.16.1/procedures/set_time.java.ftl b/src/fabric-1.16.2/procedures/set_time.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/set_time.java.ftl rename to src/fabric-1.16.2/procedures/set_time.java.ftl diff --git a/src/fabric-1.16.1/procedures/spawn_gem.java.ftl b/src/fabric-1.16.2/procedures/spawn_gem.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/spawn_gem.java.ftl rename to src/fabric-1.16.2/procedures/spawn_gem.java.ftl index e8c9d865..2d6e99f6 100644 --- a/src/fabric-1.16.1/procedures/spawn_gem.java.ftl +++ b/src/fabric-1.16.2/procedures/spawn_gem.java.ftl @@ -1,6 +1,6 @@ -<#include "mcitems.ftl"> -if(!world.getWorld().isClient()) { - ItemEntity entityToSpawn=new ItemEntity(world.getWorld(), ${input$x}, ${input$y}, ${input$z}, new ItemStack(${mappedMCItemToItemStackCode(input$block, 1)}, 1)); - entityToSpawn.setPickupDelay(10); - world.addEntity(entityToSpawn); -} +<#include "mcitems.ftl"> +if(!world.getWorld().isClient()) { + ItemEntity entityToSpawn=new ItemEntity(world.getWorld(), ${input$x}, ${input$y}, ${input$z}, new ItemStack(${mappedMCItemToItemStackCode(input$block, 1)}, 1)); + entityToSpawn.setPickupDelay(10); + world.addEntity(entityToSpawn); +} diff --git a/src/fabric-1.16.1/procedures/spawn_particle.java.ftl b/src/fabric-1.16.2/procedures/spawn_particle.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/spawn_particle.java.ftl rename to src/fabric-1.16.2/procedures/spawn_particle.java.ftl diff --git a/src/fabric-1.16.1/procedures/spawn_particle_multi.java.ftl b/src/fabric-1.16.2/procedures/spawn_particle_multi.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/spawn_particle_multi.java.ftl rename to src/fabric-1.16.2/procedures/spawn_particle_multi.java.ftl index 2324641e..683039ed 100644 --- a/src/fabric-1.16.1/procedures/spawn_particle_multi.java.ftl +++ b/src/fabric-1.16.2/procedures/spawn_particle_multi.java.ftl @@ -1,4 +1,4 @@ -if(world instanceof ServerWorld) { - ((ServerWorld)world).spawnParticles(ParticleTypes.${generator.map(field$particle, "particles")}, ${input$x}, ${input$y}, ${input$z}, - (int)${input$count}, ${input$dx}, ${input$dy}, ${input$dz}, ${input$speed}); +if(world instanceof ServerWorld) { + ((ServerWorld)world).spawnParticles(ParticleTypes.${generator.map(field$particle, "particles")}, ${input$x}, ${input$y}, ${input$z}, + (int)${input$count}, ${input$dx}, ${input$dy}, ${input$dz}, ${input$speed}); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/spawn_xporb.java.ftl b/src/fabric-1.16.2/procedures/spawn_xporb.java.ftl similarity index 98% rename from src/fabric-1.16.1/procedures/spawn_xporb.java.ftl rename to src/fabric-1.16.2/procedures/spawn_xporb.java.ftl index 7b7651f4..01e35233 100644 --- a/src/fabric-1.16.1/procedures/spawn_xporb.java.ftl +++ b/src/fabric-1.16.2/procedures/spawn_xporb.java.ftl @@ -1,3 +1,3 @@ -if(world instanceof World && !world.getWorld().isClient()) { - world.getWorld().spawnEntity(new ExperienceOrbEntity(world.getWorld(), ${input$x}, ${input$y}, ${input$z},(int)${input$xpamount})); +if(world instanceof World && !world.getWorld().isClient()) { + world.getWorld().spawnEntity(new ExperienceOrbEntity(world.getWorld(), ${input$x}, ${input$y}, ${input$z},(int)${input$xpamount})); } \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/world_data_biomeat.java.ftl b/src/fabric-1.16.2/procedures/world_data_biomeat.java.ftl similarity index 99% rename from src/fabric-1.16.1/procedures/world_data_biomeat.java.ftl rename to src/fabric-1.16.2/procedures/world_data_biomeat.java.ftl index 639ce3c8..bbdea276 100644 --- a/src/fabric-1.16.1/procedures/world_data_biomeat.java.ftl +++ b/src/fabric-1.16.2/procedures/world_data_biomeat.java.ftl @@ -1,2 +1,2 @@ -(Registry.BIOME.get(world.getBiome(new BlockPos((int)${input$x},(int)${input$y},(int)${input$z}))) +(Registry.BIOME.get(world.getBiome(new BlockPos((int)${input$x},(int)${input$y},(int)${input$z}))) .equals(new Identifier("${generator.map(field$biome, "biomes")}"))) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/world_data_block_direction_at.java.ftl b/src/fabric-1.16.2/procedures/world_data_block_direction_at.java.ftl similarity index 97% rename from src/fabric-1.16.1/procedures/world_data_block_direction_at.java.ftl rename to src/fabric-1.16.2/procedures/world_data_block_direction_at.java.ftl index 4dfb359e..50c59f41 100644 --- a/src/fabric-1.16.1/procedures/world_data_block_direction_at.java.ftl +++ b/src/fabric-1.16.2/procedures/world_data_block_direction_at.java.ftl @@ -1,10 +1,10 @@ -(new Object() { - public Direction getDirection(BlockPos pos){ - try { - BlockState _bs = world.getBlockState(pos); - DirectionProperty property = (DirectionProperty) _bs.getBlock().getStateManager().getProperty("facing"); - return _bs.get(property); - } catch (Exception e) { - return Direction.NORTH; - } +(new Object() { + public Direction getDirection(BlockPos pos){ + try { + BlockState _bs = world.getBlockState(pos); + DirectionProperty property = (DirectionProperty) _bs.getBlock().getStateManager().getProperty("facing"); + return _bs.get(property); + } catch (Exception e) { + return Direction.NORTH; + } }}.getDirection(new BlockPos((int)${input$x},(int)${input$y},(int)${input$z}))) \ No newline at end of file diff --git a/src/fabric-1.16.1/procedures/world_data_blockat.java.ftl b/src/fabric-1.16.2/procedures/world_data_blockat.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_blockat.java.ftl rename to src/fabric-1.16.2/procedures/world_data_blockat.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_canseesky.java.ftl b/src/fabric-1.16.2/procedures/world_data_canseesky.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_canseesky.java.ftl rename to src/fabric-1.16.2/procedures/world_data_canseesky.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_checkdifficulty.java.ftl b/src/fabric-1.16.2/procedures/world_data_checkdifficulty.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_checkdifficulty.java.ftl rename to src/fabric-1.16.2/procedures/world_data_checkdifficulty.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_current_time.java.ftl b/src/fabric-1.16.2/procedures/world_data_current_time.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_current_time.java.ftl rename to src/fabric-1.16.2/procedures/world_data_current_time.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_get_indirect_power.java.ftl b/src/fabric-1.16.2/procedures/world_data_get_indirect_power.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_get_indirect_power.java.ftl rename to src/fabric-1.16.2/procedures/world_data_get_indirect_power.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_get_redstone_power.java.ftl b/src/fabric-1.16.2/procedures/world_data_get_redstone_power.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_get_redstone_power.java.ftl rename to src/fabric-1.16.2/procedures/world_data_get_redstone_power.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_is_block_powered.java.ftl b/src/fabric-1.16.2/procedures/world_data_is_block_powered.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_is_block_powered.java.ftl rename to src/fabric-1.16.2/procedures/world_data_is_block_powered.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_isair.java.ftl b/src/fabric-1.16.2/procedures/world_data_isair.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_isair.java.ftl rename to src/fabric-1.16.2/procedures/world_data_isair.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_isday.java.ftl b/src/fabric-1.16.2/procedures/world_data_isday.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_isday.java.ftl rename to src/fabric-1.16.2/procedures/world_data_isday.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_israining.java.ftl b/src/fabric-1.16.2/procedures/world_data_israining.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_israining.java.ftl rename to src/fabric-1.16.2/procedures/world_data_israining.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_isremote.java.ftl b/src/fabric-1.16.2/procedures/world_data_isremote.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_isremote.java.ftl rename to src/fabric-1.16.2/procedures/world_data_isremote.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_isthundering.java.ftl b/src/fabric-1.16.2/procedures/world_data_isthundering.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_isthundering.java.ftl rename to src/fabric-1.16.2/procedures/world_data_isthundering.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_light_level.java.ftl b/src/fabric-1.16.2/procedures/world_data_light_level.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_light_level.java.ftl rename to src/fabric-1.16.2/procedures/world_data_light_level.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_moon_phase.java.ftl b/src/fabric-1.16.2/procedures/world_data_moon_phase.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_moon_phase.java.ftl rename to src/fabric-1.16.2/procedures/world_data_moon_phase.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_spawn_x.java.ftl b/src/fabric-1.16.2/procedures/world_data_spawn_x.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_spawn_x.java.ftl rename to src/fabric-1.16.2/procedures/world_data_spawn_x.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_spawn_y.java.ftl b/src/fabric-1.16.2/procedures/world_data_spawn_y.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_spawn_y.java.ftl rename to src/fabric-1.16.2/procedures/world_data_spawn_y.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_spawn_z.java.ftl b/src/fabric-1.16.2/procedures/world_data_spawn_z.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_spawn_z.java.ftl rename to src/fabric-1.16.2/procedures/world_data_spawn_z.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_data_temperature.java.ftl b/src/fabric-1.16.2/procedures/world_data_temperature.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_data_temperature.java.ftl rename to src/fabric-1.16.2/procedures/world_data_temperature.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_send_chat.java.ftl b/src/fabric-1.16.2/procedures/world_send_chat.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_send_chat.java.ftl rename to src/fabric-1.16.2/procedures/world_send_chat.java.ftl diff --git a/src/fabric-1.16.1/procedures/world_set_downfall.java.ftl b/src/fabric-1.16.2/procedures/world_set_downfall.java.ftl similarity index 100% rename from src/fabric-1.16.1/procedures/world_set_downfall.java.ftl rename to src/fabric-1.16.2/procedures/world_set_downfall.java.ftl diff --git a/src/fabric-1.16.1/recipe.definition.yaml b/src/fabric-1.16.2/recipe.definition.yaml similarity index 100% rename from src/fabric-1.16.1/recipe.definition.yaml rename to src/fabric-1.16.2/recipe.definition.yaml diff --git a/src/fabric-1.16.1/tab.definition.yaml b/src/fabric-1.16.2/tab.definition.yaml similarity index 96% rename from src/fabric-1.16.1/tab.definition.yaml rename to src/fabric-1.16.2/tab.definition.yaml index f36d4f33..c47d46a5 100644 --- a/src/fabric-1.16.1/tab.definition.yaml +++ b/src/fabric-1.16.2/tab.definition.yaml @@ -1,7 +1,7 @@ -templates: - - template: itemgroup.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEItemGroup.java" - -localizationkeys: - - key: itemGroup.@modid.@registryname +templates: + - template: itemgroup.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEItemGroup.java" + +localizationkeys: + - key: itemGroup.@modid.@registryname mapto: name \ No newline at end of file diff --git a/src/fabric-1.16.1/tag.definition.yaml b/src/fabric-1.16.2/tag.definition.yaml similarity index 100% rename from src/fabric-1.16.1/tag.definition.yaml rename to src/fabric-1.16.2/tag.definition.yaml diff --git a/src/fabric-1.16.1/templates/armor.java.ftl b/src/fabric-1.16.2/templates/armor.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/armor.java.ftl rename to src/fabric-1.16.2/templates/armor.java.ftl diff --git a/src/fabric-1.16.1/templates/block.java.ftl b/src/fabric-1.16.2/templates/block.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/block.java.ftl rename to src/fabric-1.16.2/templates/block.java.ftl diff --git a/src/fabric-1.16.1/templates/code.java.ftl b/src/fabric-1.16.2/templates/code.java.ftl similarity index 96% rename from src/fabric-1.16.1/templates/code.java.ftl rename to src/fabric-1.16.2/templates/code.java.ftl index f40451b6..151b1488 100644 --- a/src/fabric-1.16.1/templates/code.java.ftl +++ b/src/fabric-1.16.2/templates/code.java.ftl @@ -1,43 +1,43 @@ -<#-- @formatter:off --> - -package ${package}; - -/* - * This mod element is always locked. Enter your code below. - * Do not remove any of the following methods. Doing so will cause - * compilation to fail. - * - * The easiest way to do something here is by making an inner class - * and registering it in one of the following methods. If you - * want to make a plain independent class, create it using - * Project Browser - New... and make sure to create the class - * outside the ${package} package as it is managed by MCreator. - * - * If you change workspace package, modid or prefix, you will need - * to manually adapt this file to these changes or remake it. -*/ -public class ${name}CustomCode { - - /* - * This method will run at mod initialization on both the client and server - */ - public static void initialize() { - - } - - /* - * This method will run at mod initialization only on the client - */ - public static void initializeClient() { - - } - - /* - * This method will run at mod initialization only on the dedicated server - */ - public void initializeServer() { - - } - -} +<#-- @formatter:off --> + +package ${package}; + +/* + * This mod element is always locked. Enter your code below. + * Do not remove any of the following methods. Doing so will cause + * compilation to fail. + * + * The easiest way to do something here is by making an inner class + * and registering it in one of the following methods. If you + * want to make a plain independent class, create it using + * Project Browser - New... and make sure to create the class + * outside the ${package} package as it is managed by MCreator. + * + * If you change workspace package, modid or prefix, you will need + * to manually adapt this file to these changes or remake it. +*/ +public class ${name}CustomCode { + + /* + * This method will run at mod initialization on both the client and server + */ + public static void initialize() { + + } + + /* + * This method will run at mod initialization only on the client + */ + public static void initializeClient() { + + } + + /* + * This method will run at mod initialization only on the dedicated server + */ + public void initializeServer() { + + } + +} <#-- @formatter:on --> \ No newline at end of file diff --git a/src/fabric-1.16.1/templates/command.java.ftl b/src/fabric-1.16.2/templates/command.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/command.java.ftl rename to src/fabric-1.16.2/templates/command.java.ftl diff --git a/src/fabric-1.16.1/templates/enchantment.java.ftl b/src/fabric-1.16.2/templates/enchantment.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/enchantment.java.ftl rename to src/fabric-1.16.2/templates/enchantment.java.ftl diff --git a/src/fabric-1.16.1/templates/food.java.ftl b/src/fabric-1.16.2/templates/food.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/food.java.ftl rename to src/fabric-1.16.2/templates/food.java.ftl diff --git a/src/fabric-1.16.1/templates/fuel.java.ftl b/src/fabric-1.16.2/templates/fuel.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/fuel.java.ftl rename to src/fabric-1.16.2/templates/fuel.java.ftl diff --git a/src/fabric-1.16.1/templates/function.mcfunction.ftl b/src/fabric-1.16.2/templates/function.mcfunction.ftl similarity index 100% rename from src/fabric-1.16.1/templates/function.mcfunction.ftl rename to src/fabric-1.16.2/templates/function.mcfunction.ftl diff --git a/src/fabric-1.16.1/templates/item.java.ftl b/src/fabric-1.16.2/templates/item.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/item.java.ftl rename to src/fabric-1.16.2/templates/item.java.ftl diff --git a/src/fabric-1.16.1/templates/itemgroup.java.ftl b/src/fabric-1.16.2/templates/itemgroup.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/itemgroup.java.ftl rename to src/fabric-1.16.2/templates/itemgroup.java.ftl diff --git a/src/fabric-1.16.1/templates/json/achievement.json.ftl b/src/fabric-1.16.2/templates/json/achievement.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/achievement.json.ftl rename to src/fabric-1.16.2/templates/json/achievement.json.ftl diff --git a/src/fabric-1.16.1/templates/json/axes.json.ftl b/src/fabric-1.16.2/templates/json/axes.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/axes.json.ftl rename to src/fabric-1.16.2/templates/json/axes.json.ftl diff --git a/src/fabric-1.16.1/templates/json/blasting.json.ftl b/src/fabric-1.16.2/templates/json/blasting.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/blasting.json.ftl rename to src/fabric-1.16.2/templates/json/blasting.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block.json.ftl b/src/fabric-1.16.2/templates/json/block.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block.json.ftl rename to src/fabric-1.16.2/templates/json/block.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_all_fixed.json.ftl b/src/fabric-1.16.2/templates/json/block_all_fixed.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_all_fixed.json.ftl rename to src/fabric-1.16.2/templates/json/block_all_fixed.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_cmodel.json.ftl b/src/fabric-1.16.2/templates/json/block_cmodel.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_cmodel.json.ftl rename to src/fabric-1.16.2/templates/json/block_cmodel.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_cmodel_obj.json.ftl b/src/fabric-1.16.2/templates/json/block_cmodel_obj.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_cmodel_obj.json.ftl rename to src/fabric-1.16.2/templates/json/block_cmodel_obj.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_item.json.ftl b/src/fabric-1.16.2/templates/json/block_item.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_item.json.ftl rename to src/fabric-1.16.2/templates/json/block_item.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_item_cmodel.json.ftl b/src/fabric-1.16.2/templates/json/block_item_cmodel.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_item_cmodel.json.ftl rename to src/fabric-1.16.2/templates/json/block_item_cmodel.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_model_tbs.json.ftl b/src/fabric-1.16.2/templates/json/block_model_tbs.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_model_tbs.json.ftl rename to src/fabric-1.16.2/templates/json/block_model_tbs.json.ftl diff --git a/src/fabric-1.16.1/templates/json/block_states.json.ftl b/src/fabric-1.16.2/templates/json/block_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/block_states.json.ftl rename to src/fabric-1.16.2/templates/json/block_states.json.ftl diff --git a/src/fabric-1.16.1/templates/json/campfire_cooking.json.ftl b/src/fabric-1.16.2/templates/json/campfire_cooking.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/campfire_cooking.json.ftl rename to src/fabric-1.16.2/templates/json/campfire_cooking.json.ftl diff --git a/src/fabric-1.16.1/templates/json/crafting.json.ftl b/src/fabric-1.16.2/templates/json/crafting.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/crafting.json.ftl rename to src/fabric-1.16.2/templates/json/crafting.json.ftl diff --git a/src/fabric-1.16.1/templates/json/hoes.json.ftl b/src/fabric-1.16.2/templates/json/hoes.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/hoes.json.ftl rename to src/fabric-1.16.2/templates/json/hoes.json.ftl diff --git a/src/fabric-1.16.1/templates/json/item.json.ftl b/src/fabric-1.16.2/templates/json/item.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/item.json.ftl rename to src/fabric-1.16.2/templates/json/item.json.ftl diff --git a/src/fabric-1.16.1/templates/json/item_cmodel.json.ftl b/src/fabric-1.16.2/templates/json/item_cmodel.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/item_cmodel.json.ftl rename to src/fabric-1.16.2/templates/json/item_cmodel.json.ftl diff --git a/src/fabric-1.16.1/templates/json/loottable.json.ftl b/src/fabric-1.16.2/templates/json/loottable.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/loottable.json.ftl rename to src/fabric-1.16.2/templates/json/loottable.json.ftl diff --git a/src/fabric-1.16.1/templates/json/pickaxes.json.ftl b/src/fabric-1.16.2/templates/json/pickaxes.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/pickaxes.json.ftl rename to src/fabric-1.16.2/templates/json/pickaxes.json.ftl diff --git a/src/fabric-1.16.1/templates/json/plant_item.json.ftl b/src/fabric-1.16.2/templates/json/plant_item.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/plant_item.json.ftl rename to src/fabric-1.16.2/templates/json/plant_item.json.ftl diff --git a/src/fabric-1.16.1/templates/json/shovels.json.ftl b/src/fabric-1.16.2/templates/json/shovels.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/shovels.json.ftl rename to src/fabric-1.16.2/templates/json/shovels.json.ftl diff --git a/src/fabric-1.16.1/templates/json/smelting.json.ftl b/src/fabric-1.16.2/templates/json/smelting.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/smelting.json.ftl rename to src/fabric-1.16.2/templates/json/smelting.json.ftl diff --git a/src/fabric-1.16.1/templates/json/smoking.json.ftl b/src/fabric-1.16.2/templates/json/smoking.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/smoking.json.ftl rename to src/fabric-1.16.2/templates/json/smoking.json.ftl diff --git a/src/fabric-1.16.1/templates/json/stonecutting.json.ftl b/src/fabric-1.16.2/templates/json/stonecutting.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/stonecutting.json.ftl rename to src/fabric-1.16.2/templates/json/stonecutting.json.ftl diff --git a/src/fabric-1.16.1/templates/json/swords.json.ftl b/src/fabric-1.16.2/templates/json/swords.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/swords.json.ftl rename to src/fabric-1.16.2/templates/json/swords.json.ftl diff --git a/src/fabric-1.16.1/templates/json/tag.json.ftl b/src/fabric-1.16.2/templates/json/tag.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/tag.json.ftl rename to src/fabric-1.16.2/templates/json/tag.json.ftl diff --git a/src/fabric-1.16.1/templates/json/tool.json.ftl b/src/fabric-1.16.2/templates/json/tool.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/tool.json.ftl rename to src/fabric-1.16.2/templates/json/tool.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/fence_block_item.json.ftl b/src/fabric-1.16.2/templates/json/txblock/fence_block_item.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/fence_block_item.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/fence_block_item.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/fence_states.json.ftl b/src/fabric-1.16.2/templates/json/txblock/fence_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/fence_states.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/fence_states.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/slab_states.json.ftl b/src/fabric-1.16.2/templates/json/txblock/slab_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/slab_states.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/slab_states.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/stairs_states.json.ftl b/src/fabric-1.16.2/templates/json/txblock/stairs_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/stairs_states.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/stairs_states.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/trapdoor_states.json.ftl b/src/fabric-1.16.2/templates/json/txblock/trapdoor_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/trapdoor_states.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/trapdoor_states.json.ftl diff --git a/src/fabric-1.16.1/templates/json/txblock/wall_states.json.ftl b/src/fabric-1.16.2/templates/json/txblock/wall_states.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/json/txblock/wall_states.json.ftl rename to src/fabric-1.16.2/templates/json/txblock/wall_states.json.ftl diff --git a/src/fabric-1.16.1/templates/keybind.java.ftl b/src/fabric-1.16.2/templates/keybind.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/keybind.java.ftl rename to src/fabric-1.16.2/templates/keybind.java.ftl diff --git a/src/fabric-1.16.1/templates/modbase/client.java.ftl b/src/fabric-1.16.2/templates/modbase/client.java.ftl similarity index 97% rename from src/fabric-1.16.1/templates/modbase/client.java.ftl rename to src/fabric-1.16.2/templates/modbase/client.java.ftl index c1671f7b..1f59221c 100644 --- a/src/fabric-1.16.1/templates/modbase/client.java.ftl +++ b/src/fabric-1.16.2/templates/modbase/client.java.ftl @@ -1,63 +1,63 @@ -<#-- @formatter:off --> -/* -* MCreator note: -* -* If you lock base mod element files, you can edit this file and the proxy files -* and they won't get overwritten. If you change your mod package or modid, you -* need to apply these changes to this file MANUALLY. -* -* -* If you do not lock base mod element files in Workspace settings, this file -* will be REGENERATED on each build. -* -*/ - -package ${package}; - -import net.fabricmc.fabric.api.blockrenderlayer.v1.*; -import net.fabricmc.api.ClientModInitializer; -import ${package}.client; -import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; - -public class ClientInit implements ClientModInitializer{ - - <#list w.getElementsOfType("KEYBIND") as keybind> - public static final KeyBinding ${keybind}_KEY = KeyBindingHelper.registerKeyBinding(new ${keybind}KeyBinding()); - - - @Override - public void onInitializeClient(){ - <#list w.getElementsOfType("BLOCK") as block> - <#assign ge = block.getGeneratableElement()> - <#if ge.transparencyType == "CUTOUT"> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutout()); - <#elseif ge.transparencyType == "CUTOUT_MIPPED"> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutoutMipped()); - <#elseif ge.transparencyType == "TRANSLUCENT"> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getTranslucent()); - - - <#list w.getElementsOfType("CODE") as code> - ${code}CustomCode.initializeClient(); - - - HudRenderCallback.EVENT.register((matrices, tickDelta) -> { - <#list w.getElementsOfType("OVERLAY") as overlay> - ${overlay}Overlay.render(matrices, tickDelta); - - }); - - ClientTickEvents.END_CLIENT_TICK.register((client) -> { - <#list w.getElementsOfType("KEYBIND") as keybind> - if(${keybind}_KEY.isPressed() && !${keybind}_KEY.wasPressed()){ - ${keybind}_KEY.keyPressed(client.player); - } - if(!${keybind}_KEY.isPressed() && ${keybind}_KEY.wasPressed()){ - ${keybind}_KEY.keyReleased(client.player); - }; - - }); - } -} - -<#-- @formatter:on --> +<#-- @formatter:off --> +/* +* MCreator note: +* +* If you lock base mod element files, you can edit this file and the proxy files +* and they won't get overwritten. If you change your mod package or modid, you +* need to apply these changes to this file MANUALLY. +* +* +* If you do not lock base mod element files in Workspace settings, this file +* will be REGENERATED on each build. +* +*/ + +package ${package}; + +import net.fabricmc.fabric.api.blockrenderlayer.v1.*; +import net.fabricmc.api.ClientModInitializer; +import ${package}.client; +import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; + +public class ClientInit implements ClientModInitializer{ + + <#list w.getElementsOfType("KEYBIND") as keybind> + public static final KeyBinding ${keybind}_KEY = KeyBindingHelper.registerKeyBinding(new ${keybind}KeyBinding()); + + + @Override + public void onInitializeClient(){ + <#list w.getElementsOfType("BLOCK") as block> + <#assign ge = block.getGeneratableElement()> + <#if ge.transparencyType == "CUTOUT"> + BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutout()); + <#elseif ge.transparencyType == "CUTOUT_MIPPED"> + BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutoutMipped()); + <#elseif ge.transparencyType == "TRANSLUCENT"> + BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getTranslucent()); + + + <#list w.getElementsOfType("CODE") as code> + ${code}CustomCode.initializeClient(); + + + HudRenderCallback.EVENT.register((matrices, tickDelta) -> { + <#list w.getElementsOfType("OVERLAY") as overlay> + ${overlay}Overlay.render(matrices, tickDelta); + + }); + + ClientTickEvents.END_CLIENT_TICK.register((client) -> { + <#list w.getElementsOfType("KEYBIND") as keybind> + if(${keybind}_KEY.isPressed() && !${keybind}_KEY.wasPressed()){ + ${keybind}_KEY.keyPressed(client.player); + } + if(!${keybind}_KEY.isPressed() && ${keybind}_KEY.wasPressed()){ + ${keybind}_KEY.keyReleased(client.player); + }; + + }); + } +} + +<#-- @formatter:on --> diff --git a/src/fabric-1.16.1/templates/modbase/fabric.mod.json.ftl b/src/fabric-1.16.2/templates/modbase/fabric.mod.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/modbase/fabric.mod.json.ftl rename to src/fabric-1.16.2/templates/modbase/fabric.mod.json.ftl diff --git a/src/fabric-1.16.1/templates/modbase/listener.java.ftl b/src/fabric-1.16.2/templates/modbase/listener.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/modbase/listener.java.ftl rename to src/fabric-1.16.2/templates/modbase/listener.java.ftl diff --git a/src/fabric-1.16.1/templates/modbase/mod.java.ftl b/src/fabric-1.16.2/templates/modbase/mod.java.ftl similarity index 97% rename from src/fabric-1.16.1/templates/modbase/mod.java.ftl rename to src/fabric-1.16.2/templates/modbase/mod.java.ftl index d6b25a7a..f24acfda 100644 --- a/src/fabric-1.16.1/templates/modbase/mod.java.ftl +++ b/src/fabric-1.16.2/templates/modbase/mod.java.ftl @@ -1,138 +1,138 @@ -<#-- @formatter:off --> -/* - * MCreator note: - * - * If you lock base mod element files, you can edit this file and the proxy files - * and they won't get overwritten. If you change your mod package or modid, you - * need to apply these changes to this file MANUALLY. - * - * - * If you do not lock base mod element files in Workspace settings, this file - * will be REGENERATED on each build. - * - */ - -package ${package}; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -import net.fabricmc.fabric.api.event.world.WorldTickCallback; -import net.fabricmc.fabric.api.event.player.*; -import net.fabricmc.api.ModInitializer; - -import ${package}.procedures.*; -import ${package}.item.*; -import ${package}.block.*; -import ${package}.server.*; - -public class ${JavaModName} implements ModInitializer { - - public static final Logger LOGGER = LogManager.getLogger(); - -<#list sounds as sound> - public static final Identifier ${sound}_ID = id("${sound}"); - public static final SoundEvent ${sound}Event = new SoundEvent(${sound}_ID); - - -<#list w.getElementsOfType("ENCHANTMENT") as ench> - public static final Enchantment ${ench}_ENCH = Registry.register(Registry.ENCHANTMENT, id("${ench.getRegistryName()}"), new ${ench}Enchantment()); - - -<#list w.getElementsOfType("ITEM") as item> - public static final Item ${item}_ITEM = Registry.register(Registry.ITEM, id("${item.getRegistryName()}"), new ${item}Item()); - - -<#list w.getElementsOfType("MUSICDISC") as disc> - public static final Item ${disc}_DISC = Registry.register(Registry.ITEM, id("${disc.getRegistryName()}"), new ${disc}MusicDisc()); - - -<#list w.getElementsOfType("TAB") as group> - public static final ItemGroup ${group} = ${group}ItemGroup.get(); - - -<#list w.getElementsOfType("BLOCK") as block> - <#assign ge = block.getGeneratableElement()> - public static final Block ${block}_BLOCK = Registry.register(Registry.BLOCK, id("${block.getRegistryName()}"), new ${block}Block()); - public static final BlockItem ${block}_ITEM = Registry.register(Registry.ITEM, id("${block.getRegistryName()}"), new BlockItem(${block}_BLOCK, new Item.Settings().group(${ge.creativeTab}))); - - -<#list w.getElementsOfType("ARMOR") as armor> - <#assign ge = armor.getGeneratableElement()> - <#if ge.enableHelmet> - public static final Item ${armor}_HELMET = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.HEAD, (new Item.Settings().group(${ge.creativeTab})))); - - <#if ge.enableBody> - public static final Item ${armor}_CHESTPLATE = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.CHEST, (new Item.Settings().group(${ge.creativeTab})))); - - <#if ge.enableLeggings> - public static final Item ${armor}_LEGGINGS = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.LEGS, (new Item.Settings().group(${ge.creativeTab})))); - - <#if ge.enableBoots> - public static final Item ${armor}_BOOTS = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.FEET, (new Item.Settings().group(${ge.creativeTab})))); - - - -<#list w.getElementsOfType("TOOL") as tool> - public static final Item ${tool}_TOOL = Registry.register(Registry.ITEM, id("${tool.getRegistryName()}"), ${tool}Tool.INSTANCE); - - - public void onInitialize() { - LOGGER.info("[${JavaModName}] Initializing"); - <#list w.getElementsOfType("FUEL") as fuel> - ${fuel}Fuel.initialize(); - -<#-- Registry.BIOME.forEach((biome) -> {--> -<#-- <#list w.getElementsOfType("BLOCK") as block>--> -<#-- ${block}_BLOCK.genBlock(biome);--> -<#-- --> -<#-- });--> -<#-- RegistryEntryAddedCallback.event(Registry.BIOME).register((i, identifier, biome) -> {--> -<#-- <#list w.getElementsOfType("BLOCK") as block>--> -<#-- ${block}_BLOCK.genBlock(biome);--> -<#-- --> -<#-- });--> - WorldTickCallback.EVENT.register((world) -> { - <#list w.getElementsOfType("PROCEDURE") as procedure> - new ${procedure}Procedure().worldTick(world); - - }); - UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> { - <#list w.getElementsOfType("PROCEDURE") as procedure> - new ${procedure}Procedure().useOnBlock(player, world, hand, hitResult); - - return ActionResult.PASS; - }); - UseEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> { - <#list w.getElementsOfType("PROCEDURE") as procedure> - new ${procedure}Procedure().useOnEntity(player, world, hand, entity, hitResult); - - return ActionResult.PASS; - }); - UseItemCallback.EVENT.register((player, world, hand) -> { - <#list w.getElementsOfType("PROCEDURE") as procedure> - new ${procedure}Procedure().useItem(player, world, hand); - - return TypedActionResult.pass(player.getStackInHand(hand)); - }); - - <#list w.getElementsOfType("CODE") as code> - ${code}CustomCode.initialize(); - - - <#list sounds as sound> - Registry.register(Registry.SOUND_EVENT, ${JavaModName}.${sound}_ID, ${JavaModName}.${sound}Event); - - - CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> { - <#list w.getElementsOfType("COMMAND") as command> - ${command}Command.register(dispatcher); - - }); - } - - public static final Identifier id(String s) { - return new Identifier("${modid}", s); - } -} -<#-- @formatter:on --> +<#-- @formatter:off --> +/* + * MCreator note: + * + * If you lock base mod element files, you can edit this file and the proxy files + * and they won't get overwritten. If you change your mod package or modid, you + * need to apply these changes to this file MANUALLY. + * + * + * If you do not lock base mod element files in Workspace settings, this file + * will be REGENERATED on each build. + * + */ + +package ${package}; + +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; + +import net.fabricmc.fabric.api.event.world.WorldTickCallback; +import net.fabricmc.fabric.api.event.player.*; +import net.fabricmc.api.ModInitializer; + +import ${package}.procedures.*; +import ${package}.item.*; +import ${package}.block.*; +import ${package}.server.*; + +public class ${JavaModName} implements ModInitializer { + + public static final Logger LOGGER = LogManager.getLogger(); + +<#list sounds as sound> + public static final Identifier ${sound}_ID = id("${sound}"); + public static final SoundEvent ${sound}Event = new SoundEvent(${sound}_ID); + + +<#list w.getElementsOfType("ENCHANTMENT") as ench> + public static final Enchantment ${ench}_ENCH = Registry.register(Registry.ENCHANTMENT, id("${ench.getRegistryName()}"), new ${ench}Enchantment()); + + +<#list w.getElementsOfType("ITEM") as item> + public static final Item ${item}_ITEM = Registry.register(Registry.ITEM, id("${item.getRegistryName()}"), new ${item}Item()); + + +<#list w.getElementsOfType("MUSICDISC") as disc> + public static final Item ${disc}_DISC = Registry.register(Registry.ITEM, id("${disc.getRegistryName()}"), new ${disc}MusicDisc()); + + +<#list w.getElementsOfType("TAB") as group> + public static final ItemGroup ${group} = ${group}ItemGroup.get(); + + +<#list w.getElementsOfType("BLOCK") as block> + <#assign ge = block.getGeneratableElement()> + public static final Block ${block}_BLOCK = Registry.register(Registry.BLOCK, id("${block.getRegistryName()}"), new ${block}Block()); + public static final BlockItem ${block}_ITEM = Registry.register(Registry.ITEM, id("${block.getRegistryName()}"), new BlockItem(${block}_BLOCK, new Item.Settings().group(${ge.creativeTab}))); + + +<#list w.getElementsOfType("ARMOR") as armor> + <#assign ge = armor.getGeneratableElement()> + <#if ge.enableHelmet> + public static final Item ${armor}_HELMET = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.HEAD, (new Item.Settings().group(${ge.creativeTab})))); + + <#if ge.enableBody> + public static final Item ${armor}_CHESTPLATE = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.CHEST, (new Item.Settings().group(${ge.creativeTab})))); + + <#if ge.enableLeggings> + public static final Item ${armor}_LEGGINGS = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.LEGS, (new Item.Settings().group(${ge.creativeTab})))); + + <#if ge.enableBoots> + public static final Item ${armor}_BOOTS = Registry.register(Registry.ITEM, id("${armor.getRegistryName()}"), new ArmorItem(${armor}ArmorMaterial.${armor?upper_case}, EquipmentSlot.FEET, (new Item.Settings().group(${ge.creativeTab})))); + + + +<#list w.getElementsOfType("TOOL") as tool> + public static final Item ${tool}_TOOL = Registry.register(Registry.ITEM, id("${tool.getRegistryName()}"), ${tool}Tool.INSTANCE); + + + public void onInitialize() { + LOGGER.info("[${JavaModName}] Initializing"); + <#list w.getElementsOfType("FUEL") as fuel> + ${fuel}Fuel.initialize(); + +<#-- Registry.BIOME.forEach((biome) -> {--> +<#-- <#list w.getElementsOfType("BLOCK") as block>--> +<#-- ${block}_BLOCK.genBlock(biome);--> +<#-- --> +<#-- });--> +<#-- RegistryEntryAddedCallback.event(Registry.BIOME).register((i, identifier, biome) -> {--> +<#-- <#list w.getElementsOfType("BLOCK") as block>--> +<#-- ${block}_BLOCK.genBlock(biome);--> +<#-- --> +<#-- });--> + WorldTickCallback.EVENT.register((world) -> { + <#list w.getElementsOfType("PROCEDURE") as procedure> + new ${procedure}Procedure().worldTick(world); + + }); + UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> { + <#list w.getElementsOfType("PROCEDURE") as procedure> + new ${procedure}Procedure().useOnBlock(player, world, hand, hitResult); + + return ActionResult.PASS; + }); + UseEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> { + <#list w.getElementsOfType("PROCEDURE") as procedure> + new ${procedure}Procedure().useOnEntity(player, world, hand, entity, hitResult); + + return ActionResult.PASS; + }); + UseItemCallback.EVENT.register((player, world, hand) -> { + <#list w.getElementsOfType("PROCEDURE") as procedure> + new ${procedure}Procedure().useItem(player, world, hand); + + return TypedActionResult.pass(player.getStackInHand(hand)); + }); + + <#list w.getElementsOfType("CODE") as code> + ${code}CustomCode.initialize(); + + + <#list sounds as sound> + Registry.register(Registry.SOUND_EVENT, ${JavaModName}.${sound}_ID, ${JavaModName}.${sound}Event); + + + CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> { + <#list w.getElementsOfType("COMMAND") as command> + ${command}Command.register(dispatcher); + + }); + } + + public static final Identifier id(String s) { + return new Identifier("${modid}", s); + } +} +<#-- @formatter:on --> diff --git a/src/fabric-1.16.1/templates/modbase/pack.mcmeta.ftl b/src/fabric-1.16.2/templates/modbase/pack.mcmeta.ftl similarity index 100% rename from src/fabric-1.16.1/templates/modbase/pack.mcmeta.ftl rename to src/fabric-1.16.2/templates/modbase/pack.mcmeta.ftl diff --git a/src/fabric-1.16.1/templates/modbase/server.java.ftl b/src/fabric-1.16.2/templates/modbase/server.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/modbase/server.java.ftl rename to src/fabric-1.16.2/templates/modbase/server.java.ftl diff --git a/src/fabric-1.16.1/templates/modbase/sounds.json.ftl b/src/fabric-1.16.2/templates/modbase/sounds.json.ftl similarity index 100% rename from src/fabric-1.16.1/templates/modbase/sounds.json.ftl rename to src/fabric-1.16.2/templates/modbase/sounds.json.ftl diff --git a/src/fabric-1.16.1/templates/musicdisc.java.ftl b/src/fabric-1.16.2/templates/musicdisc.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/musicdisc.java.ftl rename to src/fabric-1.16.2/templates/musicdisc.java.ftl diff --git a/src/fabric-1.16.1/templates/overlay.java.ftl b/src/fabric-1.16.2/templates/overlay.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/overlay.java.ftl rename to src/fabric-1.16.2/templates/overlay.java.ftl diff --git a/src/fabric-1.16.1/templates/procedure.java.ftl b/src/fabric-1.16.2/templates/procedure.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/procedure.java.ftl rename to src/fabric-1.16.2/templates/procedure.java.ftl diff --git a/src/fabric-1.16.1/templates/tool.java.ftl b/src/fabric-1.16.2/templates/tool.java.ftl similarity index 100% rename from src/fabric-1.16.1/templates/tool.java.ftl rename to src/fabric-1.16.2/templates/tool.java.ftl diff --git a/src/fabric-1.16.1/tool.definition.yaml b/src/fabric-1.16.2/tool.definition.yaml similarity index 96% rename from src/fabric-1.16.1/tool.definition.yaml rename to src/fabric-1.16.2/tool.definition.yaml index 90d7f768..a8ee91ee 100644 --- a/src/fabric-1.16.1/tool.definition.yaml +++ b/src/fabric-1.16.2/tool.definition.yaml @@ -1,15 +1,15 @@ -templates: - - template: tool.java.ftl - name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMETool.java" - - template: json/tool.json.ftl - writer: json - condition: "renderType #= 0" - name: "@MODASSETSROOT/models/item/@registryname.json" - - template: json/item_cmodel.json.ftl - writer: json - condition: "renderType #= 1" - name: "@MODASSETSROOT/models/item/@registryname.json" - -localizationkeys: - - key: item.@modid.@registryname - mapto: name +templates: + - template: tool.java.ftl + name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMETool.java" + - template: json/tool.json.ftl + writer: json + condition: "renderType #= 0" + name: "@MODASSETSROOT/models/item/@registryname.json" + - template: json/item_cmodel.json.ftl + writer: json + condition: "renderType #= 1" + name: "@MODASSETSROOT/models/item/@registryname.json" + +localizationkeys: + - key: item.@modid.@registryname + mapto: name diff --git a/src/fabric-1.16.1/triggers/player_right_click_block.java.ftl b/src/fabric-1.16.2/triggers/player_right_click_block.java.ftl similarity index 97% rename from src/fabric-1.16.1/triggers/player_right_click_block.java.ftl rename to src/fabric-1.16.2/triggers/player_right_click_block.java.ftl index 42d2f374..dc2ad886 100644 --- a/src/fabric-1.16.1/triggers/player_right_click_block.java.ftl +++ b/src/fabric-1.16.2/triggers/player_right_click_block.java.ftl @@ -1,13 +1,13 @@ -@Override -public void useOnBlock(PlayerEntity player, World world, Hand hand, BlockHitResult hitResult){ - Map dependencies = new HashMap<>(); - int i=player.getX(); - int j=player.getY(); - int k=player.getZ(); - dependencies.put("world",world); - dependencies.put("entity" ,player); - dependencies.put("x" ,i); - dependencies.put("y" ,j); - dependencies.put("z" ,k); - executeProcedure(dependencies); -} +@Override +public void useOnBlock(PlayerEntity player, World world, Hand hand, BlockHitResult hitResult){ + Map dependencies = new HashMap<>(); + int i=player.getX(); + int j=player.getY(); + int k=player.getZ(); + dependencies.put("world",world); + dependencies.put("entity" ,player); + dependencies.put("x" ,i); + dependencies.put("y" ,j); + dependencies.put("z" ,k); + executeProcedure(dependencies); +} diff --git a/src/fabric-1.16.1/triggers/player_right_click_entity.java.ftl b/src/fabric-1.16.2/triggers/player_right_click_entity.java.ftl similarity index 97% rename from src/fabric-1.16.1/triggers/player_right_click_entity.java.ftl rename to src/fabric-1.16.2/triggers/player_right_click_entity.java.ftl index 42a69601..23483358 100644 --- a/src/fabric-1.16.1/triggers/player_right_click_entity.java.ftl +++ b/src/fabric-1.16.2/triggers/player_right_click_entity.java.ftl @@ -1,14 +1,14 @@ -@Override -public void useOnEntity(PlayerEntity player, World world, Hand hand, Entity entity, /* Nullable */ EntityHitResult hitResult){ - Map dependencies = new HashMap<>(); - int i=player.getX(); - int j=player.getY(); - int k=player.getZ(); - dependencies.put("world",world); - dependencies.put("sourceentity" ,player); - dependencies.put("entity", entity); - dependencies.put("x" ,i); - dependencies.put("y" ,j); - dependencies.put("z" ,k); - executeProcedure(dependencies); +@Override +public void useOnEntity(PlayerEntity player, World world, Hand hand, Entity entity, /* Nullable */ EntityHitResult hitResult){ + Map dependencies = new HashMap<>(); + int i=player.getX(); + int j=player.getY(); + int k=player.getZ(); + dependencies.put("world",world); + dependencies.put("sourceentity" ,player); + dependencies.put("entity", entity); + dependencies.put("x" ,i); + dependencies.put("y" ,j); + dependencies.put("z" ,k); + executeProcedure(dependencies); } \ No newline at end of file diff --git a/src/fabric-1.16.1/triggers/player_right_click_item.java.ftl b/src/fabric-1.16.2/triggers/player_right_click_item.java.ftl similarity index 96% rename from src/fabric-1.16.1/triggers/player_right_click_item.java.ftl rename to src/fabric-1.16.2/triggers/player_right_click_item.java.ftl index 9ed8c878..67fd95d0 100644 --- a/src/fabric-1.16.1/triggers/player_right_click_item.java.ftl +++ b/src/fabric-1.16.2/triggers/player_right_click_item.java.ftl @@ -1,13 +1,13 @@ -@Override -public void useItem(PlayerEntity player, World world, Hand hand) { - Map dependencies = new HashMap<>(); - int i=player.getX(); - int j=player.getY(); - int k=player.getZ(); - dependencies.put("world",world); - dependencies.put("entity" ,player); - dependencies.put("x" ,i); - dependencies.put("y" ,j); - dependencies.put("z" ,k); - executeProcedure(dependencies); -} +@Override +public void useItem(PlayerEntity player, World world, Hand hand) { + Map dependencies = new HashMap<>(); + int i=player.getX(); + int j=player.getY(); + int k=player.getZ(); + dependencies.put("world",world); + dependencies.put("entity" ,player); + dependencies.put("x" ,i); + dependencies.put("y" ,j); + dependencies.put("z" ,k); + executeProcedure(dependencies); +} diff --git a/src/fabric-1.16.1/triggers/world_ticks.java.ftl b/src/fabric-1.16.2/triggers/world_ticks.java.ftl similarity index 100% rename from src/fabric-1.16.1/triggers/world_ticks.java.ftl rename to src/fabric-1.16.2/triggers/world_ticks.java.ftl diff --git a/src/fabric-1.16.1/utils/mcitems.ftl b/src/fabric-1.16.2/utils/mcitems.ftl similarity index 100% rename from src/fabric-1.16.1/utils/mcitems.ftl rename to src/fabric-1.16.2/utils/mcitems.ftl diff --git a/src/fabric-1.16.1/utils/procedures.java.ftl b/src/fabric-1.16.2/utils/procedures.java.ftl similarity index 100% rename from src/fabric-1.16.1/utils/procedures.java.ftl rename to src/fabric-1.16.2/utils/procedures.java.ftl diff --git a/src/fabric-1.16.1/utils/tokens.ftl b/src/fabric-1.16.2/utils/tokens.ftl similarity index 100% rename from src/fabric-1.16.1/utils/tokens.ftl rename to src/fabric-1.16.2/utils/tokens.ftl diff --git a/src/fabric-1.16.1/workspace.gitignore b/src/fabric-1.16.2/workspace.gitignore similarity index 100% rename from src/fabric-1.16.1/workspace.gitignore rename to src/fabric-1.16.2/workspace.gitignore diff --git a/src/fabric-1.16.1/workspacebase/build.gradle b/src/fabric-1.16.2/workspacebase/build.gradle similarity index 70% rename from src/fabric-1.16.1/workspacebase/build.gradle rename to src/fabric-1.16.2/workspacebase/build.gradle index 92e163db..fe27fc3d 100644 --- a/src/fabric-1.16.1/workspacebase/build.gradle +++ b/src/fabric-1.16.2/workspacebase/build.gradle @@ -10,15 +10,15 @@ version = '1.0.0' group = 'com.yourname.modid' dependencies { - minecraft("com.mojang:minecraft:1.16.1") - mappings("net.fabricmc:yarn:1.16.1+build.21:v2") - modImplementation("net.fabricmc:fabric-loader:0.9.0+build.204") + minecraft("com.mojang:minecraft:1.16.2") + mappings("net.fabricmc:yarn:1.16.2+build.1:v2") + modImplementation("net.fabricmc:fabric-loader:0.9.1+build.205") //Fabric api - modImplementation "net.fabricmc.fabric-api:fabric-api:0.16.2+build.385-1.16.1" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.17.1+build.394-1.16" //Mod Menu - modApi("io.github.prospector:modmenu:1.14.5+build.30") + modApi("io.github.prospector:modmenu:1.14.6+build.31") } processResources { diff --git a/src/fabric-1.16.1/workspacebase/gradle/wrapper/gradle-wrapper.jar b/src/fabric-1.16.2/workspacebase/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/fabric-1.16.1/workspacebase/gradle/wrapper/gradle-wrapper.jar rename to src/fabric-1.16.2/workspacebase/gradle/wrapper/gradle-wrapper.jar diff --git a/src/fabric-1.16.1/workspacebase/gradle/wrapper/gradle-wrapper.properties b/src/fabric-1.16.2/workspacebase/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/fabric-1.16.1/workspacebase/gradle/wrapper/gradle-wrapper.properties rename to src/fabric-1.16.2/workspacebase/gradle/wrapper/gradle-wrapper.properties diff --git a/src/fabric-1.16.1/workspacebase/gradlew b/src/fabric-1.16.2/workspacebase/gradlew similarity index 100% rename from src/fabric-1.16.1/workspacebase/gradlew rename to src/fabric-1.16.2/workspacebase/gradlew diff --git a/src/fabric-1.16.1/workspacebase/gradlew.bat b/src/fabric-1.16.2/workspacebase/gradlew.bat similarity index 100% rename from src/fabric-1.16.1/workspacebase/gradlew.bat rename to src/fabric-1.16.2/workspacebase/gradlew.bat diff --git a/src/fabric-1.16.1/workspacebase/run/options.txt b/src/fabric-1.16.2/workspacebase/run/options.txt similarity index 100% rename from src/fabric-1.16.1/workspacebase/run/options.txt rename to src/fabric-1.16.2/workspacebase/run/options.txt diff --git a/src/fabric-1.16.1/workspacebase/run/server.properties b/src/fabric-1.16.2/workspacebase/run/server.properties similarity index 100% rename from src/fabric-1.16.1/workspacebase/run/server.properties rename to src/fabric-1.16.2/workspacebase/run/server.properties diff --git a/src/fabric-1.16.1/workspacebase/run/servers.dat b/src/fabric-1.16.2/workspacebase/run/servers.dat similarity index 100% rename from src/fabric-1.16.1/workspacebase/run/servers.dat rename to src/fabric-1.16.2/workspacebase/run/servers.dat diff --git a/src/fabric-1.16.1/workspacebase/settings.gradle b/src/fabric-1.16.2/workspacebase/settings.gradle similarity index 100% rename from src/fabric-1.16.1/workspacebase/settings.gradle rename to src/fabric-1.16.2/workspacebase/settings.gradle diff --git a/src/plugin.json b/src/plugin.json index 761fd96d..d393e909 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -1,9 +1,9 @@ { - "id": "generator-fabric-1.16.1", + "id": "generator-fabric-1.16.2", "minversion": 202000400000, "info": { - "name": "Minecraft Fabric 1.16.1 Generator", - "version": "1.0.0+alpha.2", + "name": "Minecraft Fabric 1.16.2 Generator", + "version": "1.0.0+alpha.3", "description": "A Fabric Generator", "author": "Goldorion with the help of CrispyChips and BoogieMonster1O1" }