1

Trouble with Items and Teams

Umbreo2000's Avatar Umbreo20008/5/15 5:01 pm
1 emeralds 175 1
8/6/2015 12:15 am
Jmal116's Avatar Jmal116
I'm making a series of one-command-block creations that will (hopefully) culminate in a complex system of spellcasting. I've already created the eight mobs that drop the first eight spells, but now I'm having trouble with the second machine, which enables those first eight spells to be cast.

Here's the general concept:
  • - A spell (a dye of a certain color with a specific name and lore) is dropped on the ground.
  • - When this happens, command blocks identify the spell and give it a certain score, elemSpell. To reduce lag, they only check items that aren't on any team. The values for this score range from 1 to 8, based on which spell it is.
  • - All items on no team with a score elemSpell 1 or greater are added to the elemSpells team.
  • - This process is also applied to sticks named "New Wand", which are given a score, elemWand, and added to the team elemWand
  • - If a stick named "New Wand" is on a crafting table, with four spells around it in a specific arrangement, four command blocks work together to "craft" them into a wand. This uses /execute, detect, /scoreboard players, /entitydata, and /kill.
  • - A player holding the wand gets a score called elemCaster. This score is constantly subtracted from to be sure the player is still holding the wand.
  • - Two execute commands target all players with elemCaster 1 or greater; then target nearby spells on the team elemSpells, giving them a PickupDelay of 32767 and adding to their elemCasting score.
  • - Any spell with elemCasting between 1 and 45 gives the nearest player with elemCaster slowness and a particle effect.
  • - Once a member of the elemSpells team reaches elemCasting 60, it is added to the team elemSpellsGo.
  • - When a spell on elemSpellsGo team gets to a certain elemCasting score (varies based on which spell it is), the corresponding spell is used. These effects vary from flinging entities into the air, to buffing the player with strength and resistance.
  • - All spells with elemCasting 90 are killed.

The part that seems to be broken is the set of command blocks which identify the items. When I drop one of the spells (or any item, for that matter) on the ground, nothing happens. No entities get any elemSpell score, and when I check the command blocks, they haven't even activated for several minutes. Here are my theories of what could be going wrong:
  • - Is the @e[type=Item,team=] unable to work because the items aren't recognized as being on no team? This hypothesis is supported by the fact that when I tried to /kill @e[type=!Player,team=!elemSpawners], it killed all the mobs, as expected, but none of the items or XP orbs. However, one of my other creations uses a similar method to check for a slimeball on the ground.
  • - Are the items being added to a team somehow? This seems unlikely, because every time I use /scoreboard teams list, it says that all teams are empty, aside from when I have eight armor stands on the elemSpawners team. However, perhaps items aren't shown on teams by that command?
  • - Are the command blocks somehow not being triggered for some reason? I don't think so, because when I change the command to /say hi, I get spammed by {@}: hi. Could there be something else going on with the command blocks?
  • - Maybe I've just got too many other command blocks in the same world. None of them are running, except for the /weather clear clock, but perhaps their presence is messing things up?

I'm pretty lost, but I really want to get this creation to work. I haven't seen many spellcasting systems that use command blocks, and I want to fill that gap.
Posted by Umbreo2000's Avatar
Umbreo2000
Level 3 : Apprentice Crafter
1

Create an account or sign in to comment.

1

Jmal116
08/06/2015 12:15 am
Level 33 : Artisan Engineer
Jmal116's Avatar
The selector @e[type=Item,team=] should work, and I don't think that any of the other explanations are likely. I'm assuming you're using data tags with the scoreboard to detect your items, something like this?:scoreboard players set @e[type=Item,team=] elemSpell 1 {data stuff that I'm to lazy to type right now here}
If so, would you mind pasting the data you're using? It's very possible that this is the part that's messing up, not the selector itself.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome