All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 2

    posted a message on How to Use the /execute Replacement Commands for 1.13+

    Note: 1.13 snapshots have not been released as of the current time. And the syntax has changed again. Who knows how many times it will. This is an informational page only.

    In a recent Reddit post, Dinnerbone announced several changes to commands for 1.13, among them the possible removal of the /execute command in favor of more powerful alternatives. The syntax is very volatile at the moment, so this thread may not be up to date at all times. This thread is a second description of how the new commands relate to /execute, and a sequel to my previous thread: How to Use the /execute Command.

    The New Commands

    The current syntax of the /execute command is:

    /execute <selector> <x> <y> <z> <command>
    /execute <selector> <x> <y> <z> detect <x> <y> <z> <block> <data> <command>



    This will be refactored as follows:

    /execute as 
    /execute at 
    /execute at 
    /execute if|unless block 

    /execute if|unless blocks all|masked

    /execute if|unless entity


    These commands are actually subcommands, which means you can leave off the /execute label when chaining them. The final command is signified by the keyword then.


    Who's executing?

    /execute as <selector> <command>



    This runs the specified command with the specified entity(s) as command senders. However, the position the command runs from remains unchanged. For example, running the following from a command block:

    /execute as @e[type=creeper,name=Bob] then give @p stone



    will give stone to the single player nearest the command block, one block for each creeper named Bob. Use /as for commands where the sender is important, such as the below. A good rule of thumb is to use /as if you plan to use @s later in the command, and to otherwise use /at.

    /execute as @e then say @s //each entity says their name
    /execute as @a[score_importance_min=5] then function importance:do_things_to_important_person //does important things to each matched player



    Now...where to execute?

    /execute at 
    /execute offset 

    The /at command is similar to /as, but runs the command from the position of the entity(s) and not using the entity(s) as command senders. For example, the intended use of the previous command targeting creepers named Bob is this.

    /execute at @e[type=creeper,name=Bob] then give @p stone



    This command will give stone to the player(s) nearest to any creeper named Bob. Use /at for when the sender is not important. When both the sender and the position are important, use both.

    /execute as @e[type=creeper] at @s then tell @p Ssssss... //each creeper creeps out the nearest player
    /execute at @p then teleport @e[tag=special] ~ ~-5 ~ //teleports the special entity five blocks below the nearest player



    The /offset command may be used as a direct correspondence to the portion of the original /execute command, to be used in the same circumstances. I don't really have much to say about this one other than to use it when you put anything other than "~ ~ ~" as the coordinates to the old /execute.

    Conditionals

    /execute if|unless block <x y z> <block> <command>
    /execute if|unless blocks <src begin> <src end> <dest> all|masked <command>
    /execute if|unless entity <selector> <command>


    The conditional commands are the new and improved /execute ... detect command syntax. For example, this command, which kills arrows that hit tripwire:

    /execute @e[type=arrow] ~ ~ ~ detect ~ ~ ~ tripwire -1 kill @s

    is rewritten as this:

    /execute as @e[type=arrow] at @s if block ~ ~ ~ tripwire then kill @s


    /if block is the new version of /testforblock, while /if blocks is the new version of /testforblocks and /if entity is the new version of /testfor

    /execute if block ~ ~5 ~ red_wool then function mymap:do_red_wool_things
    /execute if entity @e[score_awesome_min=1] then setblock ~ ~5 ~ redstone_block


    When to use /as or /at?

    Each command provides half the functionality of /execute. Which one to use depends on what functionality you need.

    • Use /as when you need a specific entity or entities to run the command
    • Use /as when you use @s later in the command (including functions)
    • Use /at when you need the command run at an entity's position
    • Use /if entity when you are testing for the existence of an entity
    • Use both when you need the functionality of both
    • Remember: /as @s makes no sense!

    Removal of common commands

    In the process of overhauling /execute, several common commands were removed in favor of the new /execute. Migrating these commands is as follows.

    /testfor <entity>
    /execute if entity <entity>
     
    /testforblock <x y z> <block>
    /execute if block <x y z>
     
    /testforblocks <src begin> <src end> <dest> all|masked
    /execute if blocks <src begin> <src end> <dest> all|masked
     
    /tp <selector> <~x ~y ~z>
    /execute as <selector> at @s then teleport @s <~x ~y ~z>


    Examples

    For writing commands, I recommend the order listed in this thread (/as, /at, /if) as this will reduce bugs caused by incorrect positions or entities. That is, set the command sender, set the position, test conditions.

    /execute @e[type=creeper,name=Bob] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 14 give @p[r=3] stone
    /execute at @e[type=creeper,name=Bob] if block ~ ~-1 ~ minecraft:red_wool[color=#000000] then give @p[distance=..3] stone
     
    /execute @e[tag=destroyable] ~ ~ ~ execute @p ~ ~ ~ playsound portal:destroy player @s ~ ~ ~ 1 1
    /execute at @p if entity @e[tag=destroyable] then playsound portal:destroy player @p ~ ~ ~ 1 1
     
    /execute @p ~ ~ ~ detect ~ ~ ~ tripwire -1 function portal:destroy_portals
    /execute at @p if block ~ ~ ~ tripwire then function portal:destroy_portals
     
    /execute @e[tag=portal] ~ ~-1 ~ scoreboard players set @p[dy=1] cooldown 1
    /execute at @e[tag=portal] at ~ ~-1 ~ then scoreboard players set @p[dy=1] cooldown 1
     
    /execute @e[name=BluePortal] ~ ~-1 ~ execute @p[dy=1] ~ ~ ~ function portal:teleport_b2o
    /execute at @e[name=BluePortal] offset ~ ~-1 ~ as @p[dy=1] then function portal:teleport_b2o[/color]

    Posted in: Recent Updates and Snapshots
  • 1

    posted a message on Making Lightmaps - An MCPatcher Tutorial


    It's not the world0 isn't it's two squares




    I did I don't know what is going on. This was a vanilla light map. Apparently this is in a different format then vanilla's. I wouldn't know how to convert it then




    Mcp patcher wiki is pretty clear this is an entirely new format where do I read up on vanilla lightmaps? Specifically 1.2.5 since that was different lightmap then beta / alpha. According to the wiki they changed it alot.




    Well is there a way on how to change a sky color with the method of replacing the rgb only during the day so stars come out at night. I tried sky0.png but, it took the color out of my resource pack and it didn't look like the color I put in it same with my indev resource packs that I needed preciseness that color.


    There is no vanilla lightmap. They have never existed. The lightmap file in old minecraft jars has always been unused.
    Posted in: Resource Pack Discussion
  • 4

    posted a message on Texture Artists' Union

    Better glass in 1.12 thanks to CTM and block model magic.

    Posted in: Resource Pack Discussion
  • 9

    posted a message on How To Use The /execute Command

    Pre-note: For 1.13+, see here.

    Note: This is to clarify the /execute command's syntax and abilities. It is NOT a place to ask for help with /summon, /scoreboard, selector arguments, or data tags.
    The syntax for the /execute command is

     /execute {selector} {x} {y} {z} {command}

    but what does it mean? At first, I couldn't figure it out. In fact, I almost posted on the bug tracker. But after some thought, this paradoxical command started to make sense.

    Who's Executing?
    First, this part selects the entity:

    /execute {selector}

    The can be @p, @r, @a, or @e with all the parameters. For example,

    /execute @e[0,70,0,5,type=Creeper,name=Bob]

    will select all Creepers within a radius of 5 blocks of coordinates (0,70,0) named "Bob".

    Now...Where To Execute?
    This next part may seem redundant, but it has a use.

    {x} {y} {z}

    determines the coordinates where the command will be executed. For the previous example,

    /execute @e[0,70,0,5,type=Creeper,name=Bob] ~ ~5 ~

    Will now execute the command not at the Creeper's position, but five blocks above the Creeper. Just imagine that you first find a Creeper at (0,70,0), then the Creeper executes a command at (0,75,0).

    Now, using fixed coordinates for this is completely redundant. This is used for when an entity may be moving; the command will always be executed in the same position relative to the entity.

    Finally...What To Do
    And now, the actual command:

    {command}

    This is a full command with all the arguments, including player selectors. So this,

    /execute @e[0,70,0,5,type=Creeper,name=Bob] ~ ~5 ~ give @p[r=3] stone

    will make all Creepers named Bob at most five blocks from (0,70,0) give the nearest player within three blocks of the block(s) five blocks above said Creepers stone...right.

    Anyways, the command can even be the /execute command itself, which can lead to some interesting scenarios. As a last example,

     /execute @e[type=Chicken] ~ ~ ~ execute @p ~ ~ ~ give @p stone

    will have all Chickens force the nearest player to give themselves stone.

    Execute Detect
    The execute command has an alternate syntax:

    /execute {selector} {x} {y} {z} detect {x} {y} {z} {block} {data} {command}

    This part allows for the command to test for a block at a certain position.

    detect {x} {y} {z} {block} {data}

    The coordinates may be relative or absolute, allowing for the command to test if a certain block is around an entity. Using the example command:

    /execute @e[0,70,0,5,type=Creeper,name=Bob] ~ ~5 ~ detect ~ ~-1 ~ minecraft:wool 14 give @p[r=3] stone

    This will give said players stone only if the detected Creepers have red wool one block below them. In full sentence structure: "Execute five blocks above all Creepers named Bob within five blocks of the coordinates (0,70,0) with the block red wool one block below them, a command that gives the nearest player within three blocks stone."

    The damage value of the block is required, however it can be set to -1 to test for any damage value. This can be used to test for any type of stone brick, or for any color of wool.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Check if custom shears extend from ItemShears

    You have the comparison backwards. Use

    ItemShears.class.isAssignableFrom(itemstack.getItem().getClass())
    //or, use the better suited isInstance() method
    ItemShears.class.isInstance(itemstack.getItem())

    This is superfluous however, since you know the class you can simply use instanceof.

    itemstack.getItem() instanceof ItemShears

    Posted in: Modification Development
  • 1

    posted a message on Killing People Standing on Grass?

    /kill @p[m=2,r=0]

    Posted in: Discussion
  • 13

    posted a message on Argon 32x -- 1.11 Compatibility Update [Update 2017.04.29]

    Argon 32x v3.1.0 (MC1.11)

    Resource Pack Downloads:

    Argon 32x for MC1.11: Download Resource Pack

    Argon 32x for MC1.9: Download Resource Pack

    Argon 32x for MC1.8: Download Resource Pack


    Version 1.10.0 (1.7.10): Download Resource Pack

    Version 3.1.0:
    +Textured grass path
    +Textured raw cod
    +Textured cooked cod
    +Textured jungle boat
    +Textured acacia boat
    +Textured structure void
    +Textured structure block
    *Textured nether brick fence
    *Textured dark oak fence/gate
    *Changed file structure to all lowercase

    Features:

    • Block, item, and entity textures
    • Support for all potion levels and enchantment levels from 0-128
    • Custom models for many blocks including rails, doors, and fences
    • Over 700 custom splashes

    Some screenshots to feast your lenses on:

    The goal:
    This pack is about the same style as the default, but is not a default edit or an upscaling. The goal of this pack is to create a smooth look without bucket-filling, and to keep an all-around look that can fit many styles.

    Please post any constructive criticism in the comments section below. I can't always judge the textures myself, right?

    As a user of this resource pack, you have agreed to:
    • Refrain from redistributing the entirety or part of the pack
    • Refrain from linking to the direct download
    • Refrain from making money from the pack
    Feature videos are allowed. Derivative redistribution is not. Attribution is required.

    These terms apply to the version of the pack in which they are contained and may be subject to change.

    Help spread the word by pasting into your signature:

    <a href="http://www.minecraftforum.net/topic/1786860-"><img src='http://i.imgur.com/7G9IdCl.png' /></a>



    Do not distribute. Duh. All non-default textures were created by kwerti.

    Posted in: Resource Packs
  • 1

    posted a message on [Solved] Getting Custom Entity Texture

    Register in preInit(...).

    Posted in: Modification Development
  • 1

    posted a message on [Solved] Getting Custom Entity Texture

    You have the modid written twice in the texture resource location. Also you can have the EntityAlbinoBat class simply extend EntityBat, instead of copying.

    Posted in: Modification Development
  • 1

    posted a message on Retexturing the new beds

    Beds are now a tile entity. The texture would be stored in textures/entity rather than textures/block.

    Posted in: Recent Updates and Snapshots
  • To post a comment, please or register a new account.