In Control!

In Control!

74M Downloads

Couldn't process command: ctrlloadspawn

HurtsAsHell opened this issue · 14 comments

commented

Spawn.json

[
  {
    "mob": "Zombie",
    "result": "default",
    "nbt": {
      "Attributes": [
        {
          "Base": 40.0,
          "Name": "generic.maxHealth"
        },
        {
          "Base": 0.23,
          "Modifiers": [
            {
              "Operation": 2,
              "Amount": -0.5,
              "Name": "effect.moveSlowdown 0"
            }
          ],
          "Name": "generic.movementSpeed"
        }
      ]
    }
  }
]

Copied from your wiki

Console

Couldn't process command: ctrlloadspawn
java.lang.ArrayIndexOutOfBoundsException: 0
	at mcjty.incontrol.CmdLoadSpawn.func_184881_a(CmdLoadSpawn.java:24)
	at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119)
	at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:91)
	at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:960)
	at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:939)
	at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37)
	at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9)
	at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at net.minecraft.util.Util.func_181617_a(SourceFile:46)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:745)

I used the /ctrlloadspawn command

Do I need to add anything else to the json?

commented

You need to add a parameter to /ctrlloadspawn (name of file to read). Like /ctrlloadspawn spawn.json

commented

I would just like to increase the max life of all the mobs so technically I should do this :

This is an Example

[
  {
    "mob": ["Zombie","Creeper"],
    "result": "default",
    "nbt": {
      "Attributes": [
        {
          "Base": 40.0,
          "Name": "generic.maxHealth"
        }
      ]
    }
  }
]

Is it correct?

commented

But is this code correct?

[
  {
    "mob": ["Zombie","Creeper"],
    "result": "default",
    "nbt": {
      "Attributes": [
        {
          "Base": 40.0,
          "Name": "generic.maxHealth"
        }
      ]
    }
  }
]
commented

because even if I do reload the zombies are always 20 hp

commented

That looks ok. Try /ctrldebug to see if that rule is actually being used

commented

enough that I look at the console after or do I have to go to a specific folder?

commented

15:52:33 | incontrol | Server thread | info | Rule 0: DEFAULT entity: Zombie y: 63.0 biome: Beach
-- | -- | -- | -- | --
15:52:35 | incontrol | Server thread | info | Rule 0: DEFAULT entity: Zombie y: 15.0 biome: Deep Ocean
15:52:35 | incontrol | Server thread | info | Rule 0: DEFAULT entity: Zombie y: 15.0 biome: Deep Ocean
15:53:31 | incontrol | Server thread | info | Rule 0: DEFAULT entity: Zombie y: 22.0 biome: Deep Ocean
15:53:31 | incontrol | Server thread | info | Rule 0: DEFAULT entity: Zombie y: 22.0 biome: Deep Ocean

is the rule active?

commented

yes but it appears your nbt isn't working. Anyway why aren't you using the healthmultiply and healthadd actions instead?

commented

I was trying to follow your tutorial

commented

okay, i'm using the healtadd and now it work

commented

thanks

commented

okay, i has tested but I received that :

15:02:45 | STDOUT | Server thread | info | [mcjty.incontrol.rules.RulesManager:readCustomSpawn:44]: file = spawn.json
-- | -- | -- | -- | --
15:02:45 | incontrol | Server thread | warn | Error reading file 'spawn.json'!
15:02:45 | net.minecraft.client.gui.GuiNewChat | Client thread | info | [CHAT] §cError reading file 'spawn.json'!

commented

I do not know if it can be useful but I am from 1.12.2

commented

Just use the /ctrlreload command. That reloads all rules without extra parameter. That will be more useful