2

Minecraft 1.13 screwed up my commandblocks, need help!

romowodajo's Avatar romowodajo11/29/18 6:02 pm
12/4/2018 11:32 am
AstaZora's Avatar AstaZora
Hi guys,

I have a little trouble fixing a command block.

Basically i set up an economy system on my server using command blocks. The idea is that you can sell and buy items at a central bank location. for currency i am using named and differently coloured firework charges.

here is an example of what this looked like:


For selling stuff and thus aquiring coins i used two command blocks with these codes:

/clear @p minecraft_sugar 0 5

/give @p minecraft:firework_charge 0 1 {display:{name:''5p'',Lore:[genuine]}}

this takes 5 sugar from the player and provides them with a 5 pence coin (im using GBP as currency). i have added the lore 'Genuine' to it, so it would be harder to forge.



for buying something i used two commandblocks with these codes:

/clear @p minecraft:firework_charge 0 1 {display:{name:''5p'',Lore:[genuine]}}

/ give @p minecraft:sugar 5 0

this buying point takes a 5p coin and provides the player with 5 sugar.



i know it might not be the most foolproof way of doing it, but i am not very good with codes.
And it worked just fine, until the 1.13 update, when minecraft decided to mess around with the way commandblocks accept codes.

I am now completely at a loss as to how to fix this.
Does anyone know how i can fix this system and what codes i need to use?

Cheers!

Posted by romowodajo's Avatar
romowodajo
Level 36 : Artisan Architect
58

Create an account or sign in to comment.

19

2
12/01/2018 1:01 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
/clear @p minecraft_sugar 0 5

this needs to be

/clear @p minecraft:sugar 0 your count is the 0

firework charges changed names I believe

firework_charge is now

firework_star




Your solution

For selling to gain money
first command block facing into a chain
your impulse
/clear @p minecraft:sugar 5
the second is a chain conditional
/give @p minecraft:firework_star{display:{Name:"\"5p\"",Lore:[Genuine]}} 1





your buying
an impulse facing into a chain
/clear @p minecraft:firework_star{display:{Name:"\"5p\"",Lore:[Genuine]}} 1
your chainblock ofc conditional
/give @p minecraft:sugar 5
2
12/01/2018 2:10 pm
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
Thanks, i'll try it!
1
12/01/2018 1:06 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
I've actually come to like this idea for an economic value...

Permission to use this in my map?
2
12/01/2018 2:09 pm
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
Yes ofcourse, go ahead!
1
12/01/2018 2:58 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
as a note, make sure each chain block is CONDITIONAL

if left at unconditional it'll give items away for free, without checking if the first command went through
2
12/03/2018 4:13 pm
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
how do i make a commandblock conditional? i understand how it would work, but not how i can set the block to conditional
1
12/01/2018 10:14 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
has this worked for you?
1
12/03/2018 4:15 pm
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
Yes, it worked, in combination with what ShelLuser replied. Thanks!



do you perhaps also know how i can set the firework charges to a specific colour? so that i can make green 10p coins, and blue 20p coins, etc?
1
12/03/2018 2:01 am
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
I just realized how awesome this design is, I mean scoreboard saves 0 command blocks here, so... custom items are now tons easier!!
2
11/30/2018 10:57 amhistory
Level 57 : Grandmaster Engineer
ShelLuser
ShelLuser's Avatar
First of all: an upvote from me because I already admire your drive to use command blocks to set up an economy system. Nothing wrong with mods, but command blocks can also be fun, and some players sometimes tend to forget that ;)

Now... I have no access to 1.13 at the time due to a recent PC crash (long story) but...

/clear @p minecraft_sugar 0 5/give @p minecraft:firework_charge 0 1 {display:{name:''5p'',Lore:[genuine]}}
That last command is easy: attach the NBT code right after the item: /give @p minecraft:firework_charge{display:{name:''\"5p\"'',Lore:[genuine]}}.

The double quotes are needed because Minecraft now also expects "strict JSON" formatting for names. This is actually good news because it allows you to add color & formatting codes to the name if you'd like (makes your items look more special).

To my knowledge (literally; from mind) the first command should also work on 1.13.

Hope this can help, I normally would verify my comments myself but right now I can't.
1
12/04/2018 11:32 am
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
1.13 changed a lot of commands, names and etc. this mostly works, but some names and commands have slight changes
1
12/04/2018 11:32 am
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
gladly, json is the same *phew*
1
12/01/2018 9:20 am
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
awesome, this works! thank you very much!

might you perhaps also know how to change the colour of the firework charge? the normal firework charges are just blank, but i had this iea of using differently coloured charges as different kind of coins. i have never been able to find out how to give them a specific colour using command blocks...
1
11/30/2018 5:06 am
Level 26 : Expert Princess
star_weaver
star_weaver's Avatar
from what i saw when trying to give player heads, pre 1.13 was @p, 1.13 and newer is now @s, that might be a starting point, if im wrong with anything leme know
2
11/30/2018 10:52 am
Level 57 : Grandmaster Engineer
ShelLuser
ShelLuser's Avatar
That's incorrect. @s already existed on 1.12 as well and its use hasn't changed.
1
11/29/2018 8:20 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
I will take a look at this when I am next to my computer again, but it might be a big issue around the tagging? Your system sounds foolproof, so I don't see how 1.13 messed that up. I have not had need to use clear, but I use commands for /scoreboard for economy. It's definitely easier to do that, and there are many tutorials.
But if you persist to have a unique setup, like so. Then I'll work hard to find a solution since no one else has yet to supply you one.
Cheers, hope to help
1
11/29/2018 8:56 pm
Level 36 : Artisan Architect
romowodajo
romowodajo's Avatar
Thanks! looking forward to hearing what you can make of it!
1
12/01/2018 12:48 pm
Level 16 : Journeyman Engineer
AstaZora
AstaZora's Avatar
I just got back home, starting testing and diagnosis. sorry for the long wait
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome