• 0

    posted a message on How can I execute a command at an item with a specific tag/category?

    Alright, well that is unfortunate. Thank you though for commenting! Looks like I am going to have to do the copy-paste the same command for each item...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How can I execute a command at an item with a specific tag/category?

    I was wanting to execute a command at all item frames with the specific tag "minecraft:boats". This is primarily used for clearing your inventory and you can specify tag/category. However, I tried to copy this over to a /execute command, but it does not work. Here is the command:

    /execute as @e[type=minecraft:item_frame,distance=..3,nbt={Item:{id:"#minecraft:boats"}}] run say hi

    If you replace the id with "minecraft:oak_boat," it would work, however, I want to make this work with all types of boats.

    I know that I can copy and paste this command so it does it for each boat, but I was wanting to put the command into a written book and have it be one single command, without using functions.

    Is there a way to do this?


    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Anyway to make a texture layer visible for a tool in your inventory, but not visible when being held?

    For more clarity, I want to make a resourcepack / datapack combo that lets you customize the appearance of your tools, including adding a little banner icon to whatever items of your choosing. For example, here is a diamond pickaxe with a little blue banner.



    As you can see, the blue banner is on the diamond pickaxe. This is how the .json file of the model looks:

    {
        "parent": "item/handheld",
        "textures": {
            "layer0": "item/blue_banner",
            "layer1": "item/diamond_pickaxe"
        }
    }

    Note that I used the CustomModelData to make every diamond pickaxe with the id of 1 to have the banner.


    However, the only problem is that the banner also appears when you are holding the pickaxe in your hand:


    Is there anyway to make the blue banner to only appear in the player's inventory, and not when you're holding the tool in your hands?

    Posted in: Resource Pack Help
  • 0

    posted a message on Enchantments and Scoreboards - Interconnecting Them [1.13.X]

    I've been using something similar except only with Item Frames. You can simply replace Items[] with Item, and it should work out perfectly.

    For example, I set whatever item in an Invulnerable Item Frame's CustomModelData to 1. Here is the command:

    /data modify entity @e[type=minecraft:item_frame,limit=1,sort=nearest,distance=..3,nbt={Invulnerable:1b}] Item.tag.CustomModelData set value 1


    Once I have done this, because you can't remove an Invulnerable Item Frame's contents in survival, I copy the frame's data to a barrel above it, then purge the Item Frame's contents (the carets are really helpful in this scenario). Here are my commands:

    -Copy Item Frame data to Barrel above frame:


    /execute as @e[type=minecraft:item_frame,nbt={Invulnerable:1b},distance=..3] at @s run data modify block ^ ^1 ^-1 Items[{Slot:13b}] merge from entity @s Item


    -Erase Item Frame's item:


    /execute as @e[type=minecraft:item_frame,nbt={Invulnerable:1b},distance=..3] at @s run data merge entity @s {Item:{id:""}}

    While I would've liked this to be done via the player's inventory, this still works quite well. I felt like I didn't understand the /data command when I tried to modify player data as I felt like I was doing something wrong, but now that I can actually use the command, I feel like I am really understanding how it works.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Enchantments and Scoreboards - Interconnecting Them [1.13.X]

    I see, that's really unfortunate. Alright, well my original plans for what I was wanting to do are out now, but I do have a different idea of doing something similar with /data that involves other entities and containers. Thanks for notifying, I didn't realize that they made this change. I see that if I try to use /data on myself to modify my data, it says that I cannot modify player data, while for this, it only displayed the score value and not the error.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Base Bow Custom Model Data Not Working (Solved)

    Alright I did this, as well as reformatting how my models and textures are referenced. This fixed it!

    Posted in: Resource Pack Help
  • 0

    posted a message on Custom Model Data Crossbows

    I followed all the steps like you did, but however my base, non-pulled back texture does't appear at all.

    "overrides": [
     { "predicate": { "custom_model_data": 1}, "model": "item/iron_bow" },


    I feel like these two lines are what's giving me the problem, but the json is valid and I don't see what could be wrong with it. I have tried everything and still the regular custom texture just refuses to appear. Any ideas on how to fix this?

    Nevermind I fixed this. Seems that reformating this did the trick.

    Posted in: Resource Pack Help
  • 0

    posted a message on Base Bow Custom Model Data Not Working (Solved)

    I wanted to make an alternative bow that has a unique texture. This was fairly easy by following along with this forum. However, all of the pulling back textures work, but the normal standard custom bow texture does not appear. Here is the .json of the bow.json file:


    {
        "parent": "item/generated",
        "textures": {
            "layer0": "item/bow"
        },
        "display": {
            "thirdperson_righthand": {
                "rotation": [ -80, 260, -40 ],
                "translation": [ -1, -2, 2.5 ],
                "scale": [ 0.9, 0.9, 0.9 ]
            },
            "thirdperson_lefthand": {
                "rotation": [ -80, -280, 40 ],
                "translation": [ -1, -2, 2.5 ],
                "scale": [ 0.9, 0.9, 0.9 ]
            },
            "firstperson_righthand": {
                "rotation": [ 0, -90, 25 ],
                "translation": [ 1.13, 3.2, 1.13],
                "scale": [ 0.68, 0.68, 0.68 ]
            },
            "firstperson_lefthand": {
                "rotation": [ 0, 90, -25 ],
                "translation": [ 1.13, 3.2, 1.13],
                "scale": [ 0.68, 0.68, 0.68 ]
            }
        },
        "overrides": [
    			{ "predicate": { "custom_model_data": 1}, "model": "item/iron_bow" },
            {
                "predicate": {
                    "pulling": 1
                },
                "model": "item/bow_pulling_0"
            },
            {
                "predicate": {
                    "pulling": 1,
                    "pull": 0.65
                },
                "model": "item/bow_pulling_1"
            },
            {
                "predicate": {
                    "pulling": 1,
                    "pull": 0.9
                },
                "model": "item/bow_pulling_2"
            },
    		{
                "predicate": {
                    "pulling": 1,
    				"custom_model_data": 1
                },
                "model": "item/iron_bow_pulling_0"
            },
    		{
                "predicate": {
                    "pulling": 1,
                    "pull": 0.65,
    				"custom_model_data": 1
                },
                "model": "item/iron_bow_pulling_1"
            },
            {
                "predicate": {
                    "pulling": 1,
                    "pull": 0.9,
    				"custom_model_data": 1
                },
                "model": "item/iron_bow_pulling_2"
            }
        ]
    }




    Everything else works, but it seems like this part right here is not grabbing the texture at all.

     "overrides": [
     { "predicate": { "custom_model_data": 1}, "model": "item/iron_bow" },

    I followed the forum I linked exactly, but no matter what I do the normal non-pulling back texture will not appear, only a uv error. What can I do to fix this?

    Posted in: Resource Pack Help
  • 0

    posted a message on Chain Instead Of Single Iron Bar

    Really late reply, which I apologize for, but I essentially added a few new textures to replace parts of the iron bars. Here's a quick screenshot of what I kind of did with them:



    The "iron_bars_post" is the singular iron bar, while the rest are for when iron bars are connected. To change the textures used, I had to change what texture the resourcepack pulls from in each .json file for iron bars. This file is "iron_bars_side."



    For this and "iron_bars_side_alt," I had to add a couple extra "down" and "up"s. Now for "iron_bars_cap" and "iron_bars_cap_alt", I set the #bars to use a new seperate texture.



    Hopefully this helps. If you need to, I did publish this titled "Pre-1.16 chain block" for 1.15 and 1.14. You can download that and modify the textures and the .json files.

    Posted in: Resource Pack Discussion
  • 0

    posted a message on Enchantments and Scoreboards - Interconnecting Them [1.13.X]
    Quote from YMbrothers»


    I never rly try to do this, cuz I don't think it's ever necessary (I don't know your objective exactly, but ain't gonna question it).


    Let's assume the pickaxe:

    1) is custom (i.e. not by mining diamonds, crafting one and enchanted)

    2) always have Efficiency as the 1st enchantment

    3) will only be executed if the player holds it

    4) MUST have that enchantment, even with 0 lvl


    Then, congratulations, your dream of using using scoreboard score as a tag variable comes true!

    I tested this:

    /execute as @a store result entity @s SelectedItem.tag.Enchantments[0].lvl short 1 run scoreboard players get @s <scoreboard>


    And it worked!




    I copied this command, but no matter what it will not apply the enchantment level to the item.


    Instead of applying the enchantment level to the item, it displays a chat message saying that the player has # for <scoreboard>.


    This, for some reason, does work if I do block instead of entity and pick a chest, but I would prefer it to be for the player's SelectedItem like how you did. This does not display the chat message like the last one. I do not know why though.
    /execute store result block <x> <y> <z> Items[0].tag.Enchantments[0].lvl short 1 run scoreboard players get @s <scoreboard>


    Any way to make it so SelectedItem works?

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Pre-1.16 Chain Blocks - Perfect for Lanterns!
    NOTE: This resourcepack was made prior to the announcement of the Chain Block in 1.16 and is made for 1.14 and 1.15. This was made to fulfill my want for having lanterns hung by chains, as seen in one of my previous posts here. This texture may be slightly inaccurate to the chain block that is in 1.16.


    About
    This resourcepack is designed for 1.15 and 1.14, and turns iron bars into a chain block. Simply place down an iron bar that is not connected to anything, and it will turn into a chain!

    There are two versions: the Regular Version, which only replaces non-connected iron bars, or the Chain Fence Version, which changes all of the textures of the iron bars. Please note that the Regular Versions iron bars are missing the post end piece to make the chain look nice!

    Regular Version (placing one standalone iron bar turns into a chain)

    Chain Fence Version (completely changes the textures of iron bars)

    Downloads:



    Although not designed for, this resourcepack should work for 1.16 as well.
    If you have any suggestions, please feel free to leave them in the comments!
    Posted in: Resource Packs
  • 0

    posted a message on [Solved] How could I set a block underneath a specific entity if its facing a specfic direction?
    Quote from SilverBolt9804»

    After reading your code log, I did some tests to see what the problem was...

    First I summoned four armor stands and modified their "Rotation" tag;


    South: /summon armor_stand ~ ~2 ~ {Rotation:[0.0f],NoGravity:1b,CustomNameVisible:1b,CustomName:"{\"text\":\"South\"}"}

    North: /summon armor_stand ~ ~2 ~ {Rotation:[-180.0f],NoGravity:1b,CustomNameVisible:1b,CustomName:"{\"text\":\"North\"}"}

    East: /summon armor_stand ~ ~2 ~ {Rotation:[-90.0f],NoGravity:1b,CustomNameVisible:1b,CustomName:"{\"text\":\"East\"}"}

    West: /summon armor_stand ~ ~2 ~ {Rotation:[90.0f],NoGravity:1b,CustomNameVisible:1b,CustomName:"{\"text\":\"West\"}"}


    I then slightly modified your original command to this:

    execute as @e[type=minecraft:armor_stand,y_rotation=0..90] run execute at @s run setblock ~ ~3 ~ minecraft:stone


    After executing said command, the armor stands named South and West placed their respective stone blocks


    Again I repeated this but altering the y_rotation argument:

    execute as @e[type=minecraft:armor_stand,y_rotation=90..180] run execute at @s run setblock ~ ~3 ~ minecraft:stone


    This time the armor stand named West and North placed the stone block above them.

    So my question is, are your armor stands being summoned by changing their "Rotation" tag? Or are you attempting to place the armor stands by hand?

    Because if it is the latter, any armor stands summoned without modifying this tag are defaulted to have {Rotation:[0.0f]}, resulting in them always facing south. Which from what I understand, would explain why the stone block is constantly placed even if it seems the armor stand isn't facing south.


    Sidenote: If you want to know what direction your armor stand is facing press F3 + B, and then of course F3 to show direction you the player are facing.


    I changed what you had because I want this to affect all armor stands. For every armor stand, it will be rotated randomly and will place a specific block based on its rotation. I tweaked the code a bit and here is what I came up with:

    execute as @e[type=armor_stand,y_rotation=0..90] at @s run setblock ~ ~-1 ~ minecraft:stone

    Since this was my first time with the execute command, I didn't know the difference between at and as very well. This execute command makes sure that this will place a stone block under every armor stand that is facing north, indicated by hitting F3 + B.


    Now adapting this a bit, here is the full command for what I was working on:


    execute as @e[type=armor_stand,y_rotation=0..90,tag=!noPlace,scores={randomizedType=7}] at @s store success score @s structureSuccess run setblock ~ ~-2 ~ minecraft:structure_block{name: "debris1", mode: "LOAD", rotation: "COUNTERCLOCKWISE_90"}

    This will place a structure block facing north if the armor stand follows the above tag and score.
    Thanks so much for the help!

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Chain Instead Of Single Iron Bar

    This might be a coincidence, but this what I have done recently. I'll help you and show you what I've done.

    This first thing you want to do is to make a texture that is specifically the chain of the lantern. What I did was copy a single segment of the chain and paste it in a new file. While making a single strand of a chain will work, its best to split it to make it look more like the lantern's chain (like below).

    Afterwards, save this as a new seperate file, like "iron_bars_post." This texture will be exclusively used for a single, stand-alone iron bar. Note that for this texture, I had to make each chain a pixel taller to fit in the 16 pixel height.


    Now lets go to the json file of "iron_bars_post.json" found in the models/block.

    Here is what I have for the file:

    {
        "ambientocclusion": false,
        "textures": {
            "particle": "block/iron_bars",
            "bars": "block/iron_bars_post"
        },
        "elements": [
            {   "from": [ 8, 0, 6.5 ],
                "to": [ 8, 16, 9.5 ],
    	    "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45},
    	    "shade": false,
                "faces": {
                    "west": { "uv": [ 5, 0, 8, 16 ], "texture": "#bars" },
                    "east": { "uv": [ 5, 0, 8, 16 ], "texture": "#bars" }
                }
            },
            {   "from": [ 6.5, 0, 8 ],
                "to": [ 9.5, 16, 8 ],
    	    "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45},
    	    "shade": false,
                "faces": {
                    "north": { "uv": [ 9, 0, 12, 16 ], "texture": "#bars" },
                    "south": { "uv": [ 9, 0, 12, 16 ], "texture": "#bars" }
                }
            }
        ]
    }

    Note "rotation," "shade," "from" and "to," "bars" (at the top), and "'uv': [ #, #, #, #]." I will list what to do with them.

    • For rotation, I simply copied it from the lantern's json model file and pasted it here.
    • You are essentially copying the string below and pasting it right after " 'to':". This rotates the iron bar to match up with the chain, and be at a 45 degree angle.

      "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45},


    • For the shade, I also copied it from the lantern's model file so the iron bars won't look offcolored to the lantern. Heres what you copy and paste:
    • "shade": false,


    • For "uv," this is where it gets a bit tricky. They are like coordinates so the file knows where the texture begins and ends (x1, y1, x2, y2).
    • For the uv under East and West, it will be the left chain of the texture. To get the uv for that side, I did from this red pixel (x1 = 5, y1 = 0) to the blue pixel (x2 = 8, y2 = 16) in the picture below. The final string I would plug in for this would be "[ 5, 0, 8, 16 ]"

      The North and South uv is going to be other, right chain. You will do the same thing just with this other chain. The uv I got from it was (x1 = 9, y1 = 0) to (x2 = 12, y2 = 16). The final string for this one would be "[ 9, 0, 12, 16 ]"

      This one might have you play around with it a bit and do some trial and error, so be warned!

    • Now, for "bars." Close to the top of the file, you will see a list of textures like "particle" and the one we're changing, "bars." This basically tells the model what file it is going to use. Normally, it would just use the default iron bars, so thats a no go for us. You want to change this from "blocks/iron_bars" to "blocks/iron_bars_post" or whatever else you called your chain texture.
    • Last is "from" and "to." If you left this unchanged, the chain will be squished together and not match up with the lantern's chain. You basically just want to copy the from and to just above rotation in the lantern's model and paste it in our own file. There are two sets. Here is the first one that is above West/East:
    • "from": [ 8, 0, 6.5 ],
      "to": [ 8, 16, 9.5 ],

      And here is the one for North/South:

      "from": [ 6.5, 0, 8 ],
      "to": [ 9.5, 16, 8 ],

      This will stretch out the iron bars' chain to match up.



    Now you can finally save the file and move onto one last model file. This is optional but it will cause your chain to have a "cap" above and below every chain. This, unfortunately affects the regular iron bars and I am not sure how to change it so it only affects the chain.

    The file you want to go to is called iron_bars_post_ends.json .
    In this, you are only changing two things. For both "from"s and "to"s, you are changing each number in the "[]"s to be '0'. Heres what the file should look like below:

    {
        "ambientocclusion": false,
        "textures": {
            "particle": "block/iron_bars",
            "edge": "block/iron_bars"
        },
        "elements": [
            {   "from": [ 0, 0, 0 ],
                "to": [ 0, 0, 0 ],
                "faces": {
                    "down":  { "uv": [  7, 7,  9,  9 ], "texture": "#edge" },
                    "up":    { "uv": [  7, 7,  9,  9 ], "texture": "#edge" }
                }
            },
            {   "from": [ 0, 0, 0 ],
                "to": [ 0, 0, 0 ],
                "faces": {
                    "down":  { "uv": [  7, 7,  9,  9 ], "texture": "#edge" },
                    "up":    { "uv": [  7, 7,  9,  9 ], "texture": "#edge" }
                }
            }
        ]
    }

    Now you can save this file. Be warned that the pole ends will be gone from the regular iron bars as I'm pretty sure they are hardcoded. I could be wrong however, and I don't know if anyone knows how to change this so it only affects the chain.


    That should be the last part done. Now you could create your own iron bars texture to look more like a chainlink fence as I've done, but you could leave the iron bars how they are. If you need any help just tell me and I'll be happy to resolve any as quick as possible. Hope this helps!


    Here should be the final look! Note that I went ahead and changed the regular iron bars to match, making it look more like chains.

    A lantern connected to a long strand of chainsA single chain (left) and an iron fence (right)

    Posted in: Resource Pack Discussion
  • 0

    posted a message on [Solved] How could I set a block underneath a specific entity if its facing a specfic direction?
    Quote from eglaios»

    You use "at @e []", which means the command runs only as the one who ran it.

    Simply use "as @e [] at @s" so it will execute as each armor stand for itself



    So I updated the /execute command and ended up what I think is what you imagine

    /execute as @e[type=minecraft:armor_stand] at @s if entity @s[y_rotation=0..90] run setblock ~ ~-1 ~ stone


    The problem is that it woun't place the stone block underneath the armor stand even if the stand is facing the right direction.

    If I try to flip the command (like below), it also won't work, as it will place stone blocks under all the armor stands if one of them follows the if statement.

    /execute at @e[type=minecraft:armor_stand] as @s if entity @s[y_rotation=0..90] run setblock ~ ~-1 ~ stone


    Also, doing this also doesn't seem to work.

    /execute as @e[type=minecraft:armor_stand,y_rotation=0..90] at @s run setblock ~ ~-1 ~ stone

    Am I doing something wrong? Adapting the command from what you said didn't seem to work...

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please or register a new account.