diff --git a/resource_pack/raxen/assets/minecraft/font/default.json b/resource_pack/raxen/assets/minecraft/font/default.json new file mode 100644 index 0000000..2c6f3a9 --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/font/default.json @@ -0,0 +1,14 @@ +{ + "providers": [ + { + "chars": + [ + "ꀀ" + ], + "file": "minecraft:/recipe_showcase.png", + "ascent":40, + "height":164, + "type":"bitmap" + } + ] +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/models/item/compass.json b/resource_pack/raxen/assets/minecraft/models/item/compass.json new file mode 100644 index 0000000..59fd30e --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/item/compass.json @@ -0,0 +1,15 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "item/compass_16" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model": "raxen/item/device" + } + + ] +} diff --git a/resource_pack/raxen/assets/minecraft/models/item/diamond_axe.json b/resource_pack/raxen/assets/minecraft/models/item/diamond_axe.json new file mode 100644 index 0000000..a5ea6a9 --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/item/diamond_axe.json @@ -0,0 +1,20 @@ +{ + "parent":"item/handheld", + "textures": { + "layer0":"item/diamond_axe" + }, + "overrides": [ + { + "predicate": { + "custom_model_data":1 + }, + "model":"default/magical_axe" + }, + { + "predicate": { + "custom_model_data":2 + }, + "model":"default/battle_axe" + } + ] +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/models/item/diamond_shovel.json b/resource_pack/raxen/assets/minecraft/models/item/diamond_shovel.json new file mode 100644 index 0000000..f6cbdeb --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/item/diamond_shovel.json @@ -0,0 +1,25 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "minecraft:item/diamond_shovel" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model":"raxen/item/device" + }, + { + "predicate": { + "custom_model_data": 2 + }, + "model":"raxen/gui/lower_section" + },{ + "predicate": { + "custom_model_data": 3 + }, + "model":"raxen/gui/upper_section" + } + ] +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/models/raxen/gui/lower_section.json b/resource_pack/raxen/assets/minecraft/models/raxen/gui/lower_section.json new file mode 100644 index 0000000..b44bd7e --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/raxen/gui/lower_section.json @@ -0,0 +1,27 @@ +{ +"textures": { + "texture": "raxen/gui/lower_section" +}, +"elements": [ +{ + "from": [ -16, -16, 15.9375 ], + "to": [ 32, 32, 16 ], + "faces": { + "north": { "uv": [ 11, 16, 0, 5 ], "rotation": 180, "texture": "#texture" }, + "south": { "uv": [ 0, 5, 11, 16 ], "texture": "#texture" } + } +} +], +"display": { + "firstperson_lefthand": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0, 0, 0 ] + }, + "gui": { + "rotation": [ 0, 0, 0 ], + "translation": [ 72, -74, -80 ], + "scale": [ 3.66, 3.66, 3.66 ] + } +} +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/models/raxen/gui/upper_section.json b/resource_pack/raxen/assets/minecraft/models/raxen/gui/upper_section.json new file mode 100644 index 0000000..3abf8d3 --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/raxen/gui/upper_section.json @@ -0,0 +1,27 @@ +{ +"textures": { + "texture": "raxen/gui/upper_section" +}, +"elements": [ +{ + "from": [ -16, -16, 15.9375 ], + "to": [ 32, 32, 16 ], + "faces": { + "north": { "uv": [ 11, 16, 0, 5 ], "rotation": 180, "texture": "#texture" }, + "south": { "uv": [ 0, 5, 11, 16 ], "texture": "#texture" } + } +} +], +"display": { + "firstperson_lefthand": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0, 0, 0 ] + }, + "gui": { + "rotation": [ 0, 0, 0 ], + "translation": [ 72, 29, -80 ], + "scale": [ 3.66, 3.66, 3.66 ] + } +} +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/models/raxen/item/device.json b/resource_pack/raxen/assets/minecraft/models/raxen/item/device.json new file mode 100644 index 0000000..61c801b --- /dev/null +++ b/resource_pack/raxen/assets/minecraft/models/raxen/item/device.json @@ -0,0 +1,37 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "0": "raxen/item/device" + }, + "elements": [ + { + "from": [5, 4, 7], + "to": [12, 12, 9], + "faces": { + "north": {"uv": [7, 0, 14, 8], "texture": "#0"}, + "east": {"uv": [2, 8, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 7, 8], "texture": "#0"}, + "west": {"uv": [0, 8, 2, 16], "texture": "#0"}, + "up": {"uv": [11, 10, 4, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [11, 10, 4, 12], "rotation": 180, "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 4, 1] + }, + "firstperson_righthand": { + "rotation": [-12, -25, 0] + }, + "gui": { + "translation": [-0.75, 0, 0], + "scale": [1.5, 1.5, 1.5] + }, + "fixed": { + "rotation": [0, -180, 0], + "scale": [1.5, 1.5, 1.5] + } + } +} \ No newline at end of file diff --git a/resource_pack/raxen/assets/minecraft/textures/block/oak_planks.png b/resource_pack/raxen/assets/minecraft/textures/block/oak_planks.png new file mode 100644 index 0000000..05faf77 Binary files /dev/null and b/resource_pack/raxen/assets/minecraft/textures/block/oak_planks.png differ diff --git a/resource_pack/raxen/assets/minecraft/textures/raxen/gui/lower_section.png b/resource_pack/raxen/assets/minecraft/textures/raxen/gui/lower_section.png new file mode 100644 index 0000000..ae3ef13 Binary files /dev/null and b/resource_pack/raxen/assets/minecraft/textures/raxen/gui/lower_section.png differ diff --git a/resource_pack/raxen/assets/minecraft/textures/raxen/gui/upper_section.png b/resource_pack/raxen/assets/minecraft/textures/raxen/gui/upper_section.png new file mode 100644 index 0000000..5b86c80 Binary files /dev/null and b/resource_pack/raxen/assets/minecraft/textures/raxen/gui/upper_section.png differ diff --git a/resource_pack/raxen/assets/minecraft/textures/raxen/item/device.png b/resource_pack/raxen/assets/minecraft/textures/raxen/item/device.png new file mode 100644 index 0000000..6790fde Binary files /dev/null and b/resource_pack/raxen/assets/minecraft/textures/raxen/item/device.png differ diff --git a/resource_pack/raxen/pack.mcmeta b/resource_pack/raxen/pack.mcmeta new file mode 100644 index 0000000..d6c0b01 --- /dev/null +++ b/resource_pack/raxen/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 8, + "description": "§bRaxen - By §6unurled" + } +} \ No newline at end of file diff --git a/src/main/java/gq/unurled/raxen/commands/admin/CustomModelDataCommand.java b/src/main/java/gq/unurled/raxen/commands/admin/CustomModelDataCommand.java index 7f33f54..824dfe0 100644 --- a/src/main/java/gq/unurled/raxen/commands/admin/CustomModelDataCommand.java +++ b/src/main/java/gq/unurled/raxen/commands/admin/CustomModelDataCommand.java @@ -16,8 +16,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import static gq.unurled.raxen.utils.Items.customModelData; import static gq.unurled.raxen.utils.Utils.*; - public class CustomModelDataCommand implements TabExecutor { /** @@ -95,11 +95,4 @@ public class CustomModelDataCommand implements TabExecutor { } return completions; } - - private ItemStack customModelData(ItemStack it, Integer in) { - ItemMeta itm = it.getItemMeta(); - itm.setCustomModelData(in); - it.setItemMeta(itm); - return it; - } } diff --git a/src/main/java/gq/unurled/raxen/utils/Items.java b/src/main/java/gq/unurled/raxen/utils/Items.java index 0919a6a..0db358b 100644 --- a/src/main/java/gq/unurled/raxen/utils/Items.java +++ b/src/main/java/gq/unurled/raxen/utils/Items.java @@ -108,7 +108,7 @@ public class Items { public static @NotNull String itemStackSerialize(ItemStack it, @NotNull Integer slot) { String str = ""; str = itemTo64(it); - str = str + "@#SLOT#" + slot.toString(); + str = str + "@#SLOT#" + (slot-1); return str; } @@ -413,4 +413,11 @@ public class Items { it.setItemMeta(itm); return it; } + + public static ItemStack customModelData(ItemStack it, Integer in) { + ItemMeta itm = it.getItemMeta(); + itm.setCustomModelData(in); + it.setItemMeta(itm); + return it; + } }