One way to do this could be having each new XP orb summon an XP orb with twice the XP value at its location, and then having the original XP orb randomly kill exactly one entity at its position. This would give 1/2 probability of leaving the original orb, and 1/2 of leaving the newer increased value orb.
On a clock, for XP orbs with a value of 1:
/execute @e[type=XPOrb,score_XP=1,score_XP_min=1,tag=!MRXPIncreasedOrb] ~ ~ ~ /summon XPOrb ~ ~ ~ {Tags:["MRXPIncreasedOrb"],Value:2s}
/execute @e[type=XPOrb,score_XP=1,score_XP_min=1,tag=!MRXPIncreasedOrb] ~ ~ ~ /kill @r[type=XPOrb,r=0]
Repeat for all orb values you want to work. For example, for 3:
/execute @e[type=XPOrb,score_XP=3,score_XP_min=3,tag=!MRXPIncreasedOrb] ~ ~ ~ /summon XPOrb ~ ~ ~ {Tags:["MRXPIncreasedOrb"],Value:6s}
/execute @e[type=XPOrb,score_XP=3,score_XP_min=3,tag=!MRXPIncreasedOrb] ~ ~ ~ /kill @r[type=XPOrb,r=0]
I'm not sure how it's set up at the moment, but if you're not already doing so you should remove the XP orb's XP score after they get processed, so they aren't processed again:
/scoreboard players reset @e[type=XPOrb,score_XP_min=0] XP
For 1/3 chance rather than 1/2, have another XP orb summoned but with the same value rather than twice the value, and add c=2
to the @r
selector so 2 of the orbs are killed.
It may be a possible glitch. If it's not then it may be possible that you might have not filled the proper criteria for slime as they should be able to be spawnedin the right criteria. Try spawning them in a light level less than 7 and between height 40 and 70. If it is not a swampland, you will need to rely on chance to find particular chunks that can actually spawn slimes. Else, it may be a bug.
Actually, you can find out the location of the slime chunks but it is very hard and will need heavy math.
Here are the code functions you can play with to find these slime chunks:
Random rnd = new Random(seed +
(long) (xPosition * xPosition * 0x4c1906) +
(long) (xPosition * 0x5ac0db) +
(long) (zPosition * zPosition) * 0x4307a7L +
(long) (zPosition * 0x5f24f) ^ 0x3ad8025f);
return rnd.nextInt(10) == 0;
I hope this answer helps you!
Best Answer
There is no
Data
tag. Additionally,Value
is not a string, and therefore should not be quoted. As seen on the wiki, it is a short (a small whole-number type) and is written with ans
after the number.