CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Nanobot disconnect when applying Attributes #271

Closed riddle closed 10 years ago

riddle commented 10 years ago
09:12:07 [WARN] Failed to handle packet for staticline-31-183-96-88.toya.net.pl/31.183.96.88:5209
net.minecraft.server.v1_7_R4.ReportedException: Ticking player
        at net.minecraft.server.v1_7_R4.EntityPlayer.i(EntityPlayer.java:316) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:357) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PacketPlayInFlying.a(SourceFile:137) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PacketPlayInFlying.handle(SourceFile:8) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
Caused by: java.lang.IllegalArgumentException: Modifier name cannot be empty
        at net.minecraft.util.org.apache.commons.lang3.Validate.notEmpty(Validate.java:398) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.AttributeModifier.<init>(SourceFile:29) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.GenericAttributes.a(GenericAttributes.java:105) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ItemStack.D(ItemStack.java:636) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.EntityLiving.h(EntityLiving.java:1396) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.EntityHuman.h(EntityHuman.java:164) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.EntityPlayer.i(EntityPlayer.java:258) ~[spigot-1.7.10-dev.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        ... 10 more

NBT:

display:
  compound:
    Name: "&aStrength"
    Lore:
    - "&2Applies Strength to nearby players."
    - "&2Increases melee damage by 130%"
    - "&7Fuel needed: Iron Ingots"
    - "&8[Click to Select the Effect]"
AttributeModifiers:
- compound:
    AttributeNam­e: "generic.attackDamage"
    Modifiers:
      compound:
        Operation: "0"
        UUIDLe­ast: "1"
        UUIDMost: "1"
        Amount: "100"
        Name: Attack

The broken part is attribute section for sure, without it it’s all OK.

riddle commented 10 years ago

I finally came up with

AttributeModifiers:
  compound:
    AttributeNam­e: "generic.attackDamage"
    Name: "Nullify attack"
    Amount:
      double: 1000
    Operation:
      int: 0
    UUIDLe­ast:
      long: 10000
    UUIDMost:
      long: 10000

Which stopped internal errors.

But it didn’t do anything. I am not sure our server accepts those attributes, will need to do more tests.