2

An Exp Shop is a button that, when pressed, will give you items in exchange for a set amount of exp. You build one by placing a button on a wall, and putting two repeaters and command blocks behind it. Here is a diagram:

 b  = button
[ ] = wall
 r  = repeater
[c] = command block

 b [ ] r [c] r [c]

In the first command block, you give the player the item if they have enough xp: give @p[lm={XP}] {ITEM ID} {QUANTITY}. In the second command block, you take xp from them: xp -{XP}L @p[lm={XP}]

The problem is that when single player commands are installed, it will take xp from the player but it won't give them the item. If single player commands are not installed, it works perfectly.

Is there a way to make it work both with and without single player commands?

3
  • 4
    Just a guess, but it's possible that SPC replaces the vanilla commands' code in such a way that the item-giving code isn't valid anymore, so it fails to run. (If so, that would be a bug in SPC.) Jan 6, 2013 at 23:26
  • Thanks for clarifying the question! Aside from that, is there a reason this needs the [minecraft-redstone] tag? That tag is normally used when asking about wiring design, which doesn't seem relevant to this problem. Jan 8, 2013 at 3:00
  • An exp shop uses redstone to work, but I see your point so I'll remove the [minecraft-redstone] tag.
    – Ruby
    Jan 8, 2013 at 21:08

1 Answer 1

2

As pointed out by SevenSidedDie, SPC overrides a few of the default commands, one of them most likely being /give. Do /help give to view about the command.

Yeah, a lot of Adventure maps say "Don't use SPC, it stuffs up our command blocks…" I'm not sure why the SPC devs decided to edit vanilla commands.

1
  • The /xp command isn't the problem, it's that the /give command can't be used the the same as in vanilla Minecraft. In vanilla the format is: /give <player> <item id>, but with spc you can't include the player name.
    – Ruby
    Jan 20, 2013 at 5:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .