[::] Spectral arrows that place torches

๐ŸŽ™๏ธ tryashtar ยท 189 points ยท Posted at 03:10:54 on May 23, 2015 ยท (Permalink)


GleefulPaleCurlew

๐ŸŽ™๏ธ tryashtar ยท 21 points ยท Posted at 03:14:27 on May 23, 2015 ยท (Permalink)

When Dinnerbone posted that new image for 1.9, a lot of people were speculating that the spectral arrows could possibly place torches. I created that effect in vanilla minecraft with "one command," which can be found here:

http://pastebin.com/FpGVFCfT

Throw a stack of glowstone dust on a stack of arrows and get a stack of spectral arrows (renaming arrows to "Spectral Arrow" won't work). Shooting them with a bow will cause torches to be placed.

If you have both normal and spectral arrows in your inventory, the game will do what it normally does and choose whichever is first in your inventory.

BiscuitMiscuit ยท 7 points ยท Posted at 16:42:26 on May 23, 2015 ยท (Permalink)
๐ŸŽ™๏ธ tryashtar ยท 6 points ยท Posted at 18:00:32 on May 23, 2015 ยท (Permalink)

To be honest, I really dislike the "THAMCRAFT WITH ONLY ONE COMMAND" type stuff, because it just seems dishonest.
...But I can't think of anything else to call it!

yay899 ยท 5 points ยท Posted at 20:07:39 on May 23, 2015 ยท (Permalink)

Compound command?

The8BitMonkey ยท 1 points ยท Posted at 02:50:16 on May 24, 2015 ยท (Permalink)

That's why 1-Click is a better name for it, you put the command into a command block and it takes one click of a button....or even One Command Block is another possible name.

[deleted] ยท 5 points ยท Posted at 04:41:04 on May 23, 2015 ยท (Permalink)

This would be the best utility addition since the reimplementation of sponges if this feature is added to the game. This just makes me even more exited for 1.9

KrunktheDrunk ยท 7 points ยท Posted at 13:58:38 on May 23, 2015 ยท (Permalink)

I want gunpowder + arrows for explosive arrows.

CelioHogane ยท 1 points ยท Posted at 00:10:32 on May 24, 2015 ยท (Permalink)

That is like a cheap TNT.

Yirggzmb ยท 2 points ยท Posted at 00:13:11 on May 24, 2015 ยท (Permalink)

Not if it's a weaker explosion

Techn03712 ยท 9 points ยท Posted at 12:44:27 on May 23, 2015 ยท (Permalink)

How about if flame I bows just shot fire arrows that already gave off light? That would also be interesting.

JontanD ยท 8 points ยท Posted at 14:14:44 on May 23, 2015 ยท (Permalink)

Oh lawd the lighting updates.

BrettBusiness ยท 3 points ยท Posted at 18:43:13 on May 23, 2015 ยท (Permalink)

For any of the infuriated ones that were unable to read the text,

"<tryashtar> it always fires the arrow first found in the inventory <3"

Sento_Fernner ยท 2 points ยท Posted at 16:30:04 on May 23, 2015 ยท (Permalink)

I like this, good work. One question though, why do they seem to drop torches when the arrow lands?

๐ŸŽ™๏ธ tryashtar ยท 3 points ยท Posted at 18:01:56 on May 23, 2015 ยท (Permalink)

Because I used /fill replace instead of /setblock keep. I'll fix that momentarily.

soccerboy13542 ยท 2 points ยท Posted at 20:09:24 on May 23, 2015 ยท (Permalink)

I shot it at a zombie and the game crashed. I think it has something to do with hitting the block underneath a monster?

Marcono1234 ยท 2 points ยท Posted at 20:17:58 on May 23, 2015 ยท (Permalink)

What exactly was the reason for the crash?

soccerboy13542 ยท 1 points ยท Posted at 20:25:14 on May 23, 2015 ยท (Permalink)

This is copied and pasted from the crash report:

---- Minecraft Crash Report ---- // Who set us up the TNT?

Time: 5/23/15 1:23 PM Description: Ticking entity

java.lang.IllegalArgumentException: bound must be positive at java.util.Random.nextInt(Unknown Source) at wr.t_(SourceFile:271) at adn.a(SourceFile:1408) at lf.a(SourceFile:600) at adn.g(SourceFile:1386) at adn.i(SourceFile:1279) at lf.i(SourceFile:478) at net.minecraft.server.MinecraftServer.A(SourceFile:605) at net.minecraft.server.MinecraftServer.z(SourceFile:533) at bpp.z(SourceFile:152) at net.minecraft.server.MinecraftServer.run(SourceFile:449) at java.lang.Thread.run(Unknown Source)

๐ŸŽ™๏ธ tryashtar ยท 2 points ยท Posted at 20:23:49 on May 23, 2015 ยท (Permalink)

It only tries to place a torch when it hits a block, and the arrow is removed whether it succeeds in placing one or not.

The only possible reason I could think of is that the game doesn't like that I set spectral arrow damage to -10, but it works fine for me.

Marcono1234 ยท 1 points ยท Posted at 12:20:51 on May 24, 2015 ยท (Permalink)*

Yes that's the reason, the damage value may only be positive (the second time I hit a zombie with an arrow, it crashes), you should consider changing that, and a little suggestion:

It seems like you test for every slot if the player, you do this instead (based on /u/Sethbling's Splash-Potion Arrows in Minecraft):

Setup:

  • /scoreboard objectives add arrowCount dummy
  • /scoreboard objectives add arrowDiff dummy

Clock:

  1. /stats entity @a set AffectedItems @p arrowCount
  2. /scoreboard players add @a arrowCount 0
  3. /scoreboard players add @a arrowDiff 0
  4. /execute @a ~ ~ ~ /clear @p arrow 0 0 {display:{Name:Spectral Arrow}}
  5. /execute @a ~ ~ ~ /scoreboard players operation @p arrowDiff -= @p arrowCount
  6. /stats entity @a set AffectedItems @p arrowDiff
  7. /execute @a ~ ~ ~ /clear @p arrow 0 0 {display:{Name:Spectral Arrow}}
  8. /execute @a[score_arrowDiff_min=1,score_arrowDiff=1] ~ ~ ~ /say Used one arrow

Note: You maybe want to make sure that the player also used the bow (stat.useItem.minecraft.bow), so he doesn't only dropped the arrow

However your method also works in creative mode which is pretty cool!

๐ŸŽ™๏ธ tryashtar ยท 2 points ยท Posted at 15:58:29 on May 24, 2015 ยท (Permalink)*

I just watched his video, and that's definitely a better way to do it--there wouldn't be any infinity bow cheatiness and I could easily add more arrow types later. Thanks!

thnlsn ยท 2 points ยท Posted at 20:48:19 on May 23, 2015 ยท (Permalink)

You should do this for more arrow effects like explosion, bonemeal, fire, enderpearl, lightning etc.

Gaff3r ยท 1 points ยท Posted at 15:51:50 on May 23, 2015 ยท (Permalink)

I want this so badly.