• 0

    posted a message on Setting score for mobs without a score

    Is there an easy way to set a score only for mobs that do not have that score initialized yet?

    Say I wanted to give every mob of some type a score of 20 for "Points", but to only set it if the mob hasn't had it set yet.

    Since I can't use @e[score_Points=0] as the target selector (the score "Points" doesn't exist for the uninitialized mobs), I was hoping something like @e[score_Points=null] existed for these situations.

    Thoughts?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Title/Subtitle Command

    Is there a way to manipulate the title or subtitle command to display text at or close to the bottom of the screen as opposed to where it shows up at the middle-top?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Summon Mob With Slowness Effect

    I'm trying to summon a silverfish with a 10 second slowness effect, but I just can't seem to get it working:


    /summon Silverfish ~ ~1 ~ {ActiveEffects:[{Id:2,Amplifier:100,Duration:200}]}


    I've been able to apply slowness to them with the effect command once they're already spawned:


    /effect @e[type=Silverfish] minecraft:slowness 10 100


    but I just can't seem to get them to spawn with the effect. Is there something simple I'm missing?



    EDIT:

    Nevermind; I did a little searching on Mojang's bug tracker, apparently this works as intended due to how the game handles active effects modifying a mobs attributes.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Prevent a player from moving horizontally when levitating

    Wow, that worked great! Thanks!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Increase/Decrease Bow Drawback Speed (Fire Rate)

    Is there any way to manipulate the drawback speed (bow fire rate) for a player and/or other mob? I couldn't find any enchantments that specifically dealt with this, and effects on the player/mob like speed or strength didn't have any effect.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Best way to track a mob's health via scoreboard

    What I don't understand is why health is stored as a float at all, when everything else indicates damage in increments of half hearts (1 point per half heart). It's almost like Mojang was setting up for players/mobs to have smaller health increments, but didn't follow through (quarter hearts would have been neat... but consistency would have been too)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Best way to track a mob's health via scoreboard

    I was hoping to keep this vanilla...


    I've seen people use systems like this for mob health bars, but most of the examples I found were from 2013... the key difference being the data type for {health} was declared as "s" not "f" (short, I guess?).


    On a side note, I might have found a partial solution, critical hits increase damage by exactly 50%, so I should be able to handle this by incrementing the health value in the commands by 0.5 instead of 1.0. This would mean twice as many command blocks, but at least its an option. Not sure how Minecraft calculates damage for enchanted weapons or potion buffs, though...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Best way to track a mob's health via scoreboard

    I was hoping to use the scoreboard system to track the health of various mobs like so:

    scoreboard players set @e[type=!Player] Health 0   <this one is kinda unnecessary, but it's useful for testing>
    scoreboard players set @e[type=!Player] Health 1 {Health:1f}
    scoreboard players set @e[type=!Player] Health 2 {Health:2f}
    scoreboard players set @e[type=!Player] Health 3 {Health:3f}
    etc...

    This works some of the time, but I find I'm running into problems.

    For example, standing still and hitting with an empty hand (or block) will deal 1 damage (1/2 heart) and an iron sword will deal 6 damage (3 hearts). But a critical hit by jumping, or if a player has bonus strength from a potion, or an enchanted weapon, the value resets to 0 and doesn't track any further.

    In these cases, I think what's happening is a non-integer damage amount is being dealt. I'm assuming that the 'f' in {Health:1f} represents a 'float' type number, which means I would need to specify a range for each command to track, like 1.0f-1.99f, 2.0f-2.99f, etc.

    Is something like this possible, or is there a commonly used work around?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Problems with creeper "bomb"

    Ah, so they are! Silly oversight. Thanks!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Problems with creeper "bomb"

    So for a map, I want to drop bombs on a player without damaging the landscape. My idea was to use pre-ignited invisible creepers (so they'll explode no matter what) and to disable mob griefing (to prevent landscape damage). To make the bombs visible, I had the idea of adding armorstands (holding banners) as passengers to the creeper "bomb", but the problem is the creeper's explosion isn't destroying the armorstands:

    /summon Creeper ~ ~10 ~ {ignited:1,ExplosionRadius:5,Fuse:18,Invulnerable:1,NoAI:1,Silent:1,ActiveEffects:[{Id:14,Amplifier:0,Duration:19980,ShowParticles:0b}],Passengers:[{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,0f,180f]},DisabledSlots:2039583},{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,60f,180f]},DisabledSlots:2039583},{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,120f,180f]},DisabledSlots:2039583},{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,180f,180f]},DisabledSlots:2039583},{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,240f,180f]},DisabledSlots:2039583},{id:ArmorStand,Invisible:1b,ArmorItems:[{},{},{},{id:banner,Count:1,tag:{BlockEntityTag:{Base:7,Patterns:[{Pattern:gru,Color:8},{Pattern:gra,Color:15},{Pattern:bri,Color:8},{Pattern:bri,Color:7},{Pattern:ts,Color:1}]}}}],Pose:{Head:[0f,300f,180f]},DisabledSlots:2039583}]}


    Any idea why?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Disable creeper fear of ocelots

    No worries, my description was pretty bare-bones.


    The basic idea is a bunch of ufos are chasing the players, trying to abduct them. The "ufos" are a stack of invisible creepers (with armorstands holding banners to make the ufo at the top). The creepers are changed to charged creepers when abducting (because the charged effect sans-creeper looks kinda like a tractor beam).


    The problem I'm having is that the ufos (really, the bottom-most creeper carying each stack) tend to bunch up, and are causing problems for each other with the other commands that control the tractor beams and other various effects. Ive tried using teleport commands to keep them apart if they get too close, but that tends to break their stacks, hence why I was hoping to use the creepers' natural aversion to ocelots to repel each other. Problem with this is they go nuts trying to flee the ocelot on their own heads, so I was hoping for a work around or alternative idea.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Disable creeper fear of ocelots

    I'm not sure I understand your reply; I think you're suggesting to add the ocelot as a passenger to the creeper via the entitydata command, which you cant do (passengers cannot be adde to existing mobs).

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Disable creeper fear of ocelots

    I'm attempting to creatively use creeper's natural fear of ocelots as part of a mini-game. I wanted to force creepers to not bunch up when chasing someone by having invisible ocelots riding them:

    /summon Creeper ~ ~1 ~ {Passengers:[{id:ArmorStand,Marker:1b,Invisible:1b,Passengers:[{id:Ozelot,Silent:1b,ActiveEffects:[{Id:14,Amplifier:0,Duration:19980,ShowParticles:0b}]}]}]}


    (Note: you have to use an armorstand as a buffer, otherwise the ocelot AI overrides the creeper's AI).


    The problem is the creeper never stops trying to run from the Ocelot on its own head. I had hoped to maybe get around this by putting each pair of creeper/ocelot on an individual team, but that didn't seem to work either:

    /summon Creeper ~ ~1 ~ {Team:team1,Passengers:[{id:ArmorStand,Marker:1b,Invisible:1b,Passengers:[{id:Ozelot,Team:team1,Silent:1b,ActiveEffects:[{Id:14,Amplifier:0,Duration:19980,ShowParticles:0b}]}]}]}


    Any suggestions?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Prevent a player from moving horizontally when levitating

    So I'm looking for a better way to prevent a player from moving horizontally (strafe) while levitating them upward.


    My current method is to summon an invisible armorstand at the player's location, apply a levitation effect to both the player and armorstand, then constantly teleport the player to the armorstand. Giving levitation to the player makes sure they rise smoothly, and teleporting them to the armorstand prevents them from moving horizontally, but the down side is the player can't look around - their view is locked to the direction the armorstand is facing.


    Anyone have a better suggestion?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Summon giant with block on head

    So I already suspect the answer is 'no' from my brief testing, but is there a way to summon a giant with a block in its helmet slot? I know they can wear regular armor, but if I wanted to have one with say, a gold block, the command:

    /summon Giant ~ ~1 ~ {ArmorItems:[{},{},{},{id:gold_block,Count:1}]}

    just seems to summon a vanilla giant...

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