Sitting doesnt work
LadyCailinBot opened this issue · 18 comments
CRAFTBOOK-2630 - Reported by Богдан.Шкляренко
http://cs416922.vk.me/v416922094/5d3e/wUeTxNQ3KDg.jpg
Using latest ver. from dev.bukkit
Comment by me4502
That is due to using a version of ProtocolLib that doesn't support your mc version. If you have 1.6.2, there is currently no version of ProtocolLib that works on it. This is not an issue with CraftBook.
Comment by me4502
Actually, just as I write that.. A 1.6.2 version pops up, http://assets.comphenix.net/jenkins/job/ProtocolLib/lastSuccessfulBuild/artifact/ProtocolLib/target/ProtocolLib-2.4.8-SNAPSHOT.jar
Comment by Богдан.Шкляренко
Doesn`t Works. Really. Using latest Protocollib from Jenkins and latest Craftbook from dev.bukkit
Comment by me4502
I have just gone through all of CraftBooks chair code to verify this, the code in CraftBook is perfect. This is an issue with protocollib.
Comment by Богдан.Шкляренко
:c It`s Bad. I need to report protocollib Developer?
Comment by Comphenix
This doesn't appear to be a ProtocolLib issue. I extracted the method responsible for sending the "sitting" packet from mech/Chair and tried it out on 1.6.2:
public class ExampleMod extends JavaPlugin {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
PacketContainer entitymeta = ProtocolLibrary.getProtocolManager().createPacket(40);
Player player = (Player) sender;
int flag = 0x04;
entitymeta.getSpecificModifier(int.class).write(0, player.getEntityId());
WrappedDataWatcher watcher = new WrappedDataWatcher();
watcher.setObject(0, (byte) flag);
entitymeta.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects());
for (Player play : getServer().getOnlinePlayers()) {
try {
ProtocolLibrary.getProtocolManager().sendServerPacket(play, entitymeta);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
return true;
}
}```
This doesn't work, as expected. But if you change the flag from 0x04 (sitting) to 0x2 (sneaking), it does in fact cause the player to sneak.
So, the problem is clearly that 0x04 has been depreciated/removed. I believe it has been replaced by [http://wiki.vg/Protocol#Attach_Entity_.280x27.29 ATTACH_ENTITY].
To work around this, I'd suggest looking into creating a fake invisible entity (flag 0x20) and attaching the player to it.
Comment by me4502
Okay, I've implemented it using that method.. And with an Arrow. Using a 0x20 invisible flag does not work for arrows however, but it isn't too obtrusive.
Comment by Comphenix
Nicely done.
You could do this with a bat instead, as they can be made invisible. Perhaps as an optional method if ProtocolLib is present? Or you can use reflection and send the packets manually.
But, it might not be worth it if the arrow is difficult to spot.
Comment by me4502
Mobs are a very bad idea.. They can move, make noise and die.
Comment by Comphenix
Not if they are only spawned on the client through Packet24MobSpawn.
Comment by Богдан.Шкляренко
Now i can sit. But:
I can sit away 2 blocks and not sit.
Or
I can sit normally, but when i click SHIFT - MC client crash. U can test It on 212.2.130.94 (using latest Spigot and Craftbook(from Jenkins))
Comment by me4502
So trying to get up causes you to crash? I'll try and kill the arrow after a delay instead of straight away
Comment by Богдан.Шкляренко
Client> 2013-07-15 03:19:48 [CLIENT] [INFO] [CHAT] You are now sitting!
Client> Error in class 'LibraryLWJGLOpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> Error in class 'SourceLWJGL OpenAL'
Client> Invalid enumerated parameter value.
Client> 2013-07-15 03:19:48 [CLIENT] [SEVERE] Reached end of stream for /192.168.1.100
Client> java.lang.ArithmeticException: / by zero
Client> at bfi.a(SourceFile:491)
Client> at bfb.a(SourceFile:836)
Client> at bfb.b(SourceFile:693)
Client> at ats.S(SourceFile:686)
Client> at ats.d(SourceFile:619)
Client> at net.minecraft.client.main.Main.main(SourceFile:101)
Client> ---- Minecraft Crash Report ----
Client> // This doesn't make any sense!
Client>
Client> Time: 15.07.13 3:19
Client> Description: Unexpected error
Client>
Client> java.lang.ArithmeticException: / by zero
Client> at bfi.a(SourceFile:491)
Client> at bfb.a(SourceFile:836)
Client> at bfb.b(SourceFile:693)
Client> at ats.S(SourceFile:686)
Client> at ats.d(SourceFile:619)
Client> at net.minecraft.client.main.Main.main(SourceFile:101)
Client>
Client>
Client> A detailed walkthrough of the error, its code path and all known details is as follows:
Client> ---------------------------------------------------------------------------------------
Client>
Client> -- Head --
Client> Stacktrace:
Client> at bfi.a(SourceFile:491)
Client> at bfb.a(SourceFile:836)
Client>
Client> -- Affected level --
Client> Details:
Client> Level name: MpServer
Client> All players: 9 total; [bdf['Bodyash'/10923, l='MpServer', x=-287,50, y=NaN, z=266,50], bev['sp0rt1k'/4050, l='MpServer', x=-265,50, y=65,50, z=267,91], bev['Маг Холода'/92116, l='MpServer', x=-260,53, y=70,00, z=271,28], bev['Зельевар'/92614, l='MpServer', x=-264,50, y=70,00, z=271,56], bev['Стрелок'/13787, l='MpServer', x=-267,66, y=70,50, z=264,66], bev['Артилерия'/13405, l='MpServer', x=-257,50, y=70,50, z=264,28], bev['Лучник'/8561, l='MpServer', x=-267,56, y=70,50, z=274,41], bev['Снайпер'/11455, l='MpServer', x=-257,59, y=70,50, z=274,44], bev['Hybrid_Cheetah'/138590, l='MpServer', x=-287,68, y=69,13, z=269,03]]
Client> Chunk stats: MultiplayerChunkCache: 441
Client> Level seed: 0
Client> Level generator: ID 00 - default, ver 1. Features enabled: false
Client> Level generator options:
Client> Level spawn location: World: (-263,66,269), Chunk: (at 9,4,13 in -17,16; contains blocks -272,0,256 to -257,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Client> Level time: 304320481 game time, 338207819 day time
Client> Level dimension: 0
Client> Level storage version: 0x00000 - Unknown?
Client> Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Client> Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Client> Forced entities: 109 total; [rr['Лошадь-скелет'/14093, l='MpServer', x=-320,97, y=55,00, z=240,03], bdf['Bodyash'/10923, l='MpServer', x=-287,50, y=NaN, z=266,50], bev['Hybrid_Cheetah'/56215, l='MpServer', x=-275,65, y=70,03, z=269,16], rr['Лошадь-зомби'/44, l='MpServer', x=-331,19, y=55,00, z=245,94], bev['Зельевар'/92614, l='MpServer', x=-264,50, y=70,00, z=271,56], tv['Зомби'/138649, l='MpServer', x=-291,38, y=89,00, z=310,28], bev['Торговец Едой'/127706, l='MpServer', x=-324,56, y=69,00, z=269,44], rx['Свинья'/107, l='MpServer', x=-314,19, y=68,00, z=228,50], bev['Hybrid_Cheetah'/134116, l='MpServer', x=-262,56, y=66,00, z=269,09], rr['Лошадь-скелет'/16385, l='MpServer', x=-301,00, y=55,00, z=236,84], bev['Hybrid_Cheetah'/138590, l='MpServer', x=-287,68, y=69,13, z=269,03], te['Крипер'/138605, l='MpServer', x=-328,50, y=69,00, z=307,50], oc['entity.ItemFrame.name'/186, l='MpServer', x=-305,06, y=66,50, z=290,50], oc['entity.ItemFrame.name'/187, l='MpServer', x=-305,06, y=66,50, z=291,50], oc['entity.ItemFrame.name'/184, l='MpServer', x=-305,06, y=66,50, z=287,50], oc['entity.ItemFrame.name'/185, l='MpServer', x=-305,06, y=66,50, z=289,50], rx['Свинья'/91182, l='MpServer', x=-303,03, y=64,00, z=235,88], oc['entity.ItemFrame.name'/191, l='MpServer', x=-315,50, y=66,50, z=294,94], oc['entity.ItemFrame.name'/188, l='MpServer', x=-314,50, y=66,50, z=294,94], oc['entity.ItemFrame.name'/189, l='MpServer', x=-316,50, y=66,50, z=294,94], rr['Лошадь-зомби'/176, l='MpServer', x=-326,81, y=55,00, z=225,72], oc['entity.ItemFrame.name'/183, l='MpServer', x=-305,06, y=66,50, z=286,50], oc['entity.ItemFrame.name'/205, l='MpServer', x=-297,06, y=57,50, z=262,50], bev['Лучник'/8561, l='MpServer', x=-267,56, y=70,50, z=274,41], oc['entity.ItemFrame.name'/204, l='MpServer', x=-297,06, y=57,50, z=260,50], bev['Стрелок'/13787, l='MpServer', x=-267,66, y=70,50, z=264,66], oc['entity.ItemFrame.name'/207, l='MpServer', x=-297,06, y=57,50, z=266,50], oc['entity.ItemFrame.name'/206, l='MpServer', x=-297,06, y=57,50, z=264,50], oc['entity.ItemFrame.name'/201, l='MpServer', x=-297,06, y=57,50, z=254,50], oc['entity.ItemFrame.name'/200, l='MpServer', x=-297,06, y=57,50, z=252,50], oc['entity.ItemFrame.name'/203, l='MpServer', x=-297,06, y=57,50, z=258,50], oc['entity.ItemFrame.name'/202, l='MpServer', x=-297,06, y=57,50, z=256,50], rr['Лошадь-скелет'/196, l='MpServer', x=-322,00, y=55,00, z=259,09], rr['Лошадь-зомби'/199, l='MpServer', x=-293,34, y=20,00, z=242,00], oc['entity.ItemFrame.name'/193, l='MpServer', x=-313,50, y=66,50, z=294,94], tv['Зомби'/138501, l='MpServer', x=-293,50, y=64,00, z=314,50], oc['entity.ItemFrame.name'/195, l='MpServer', x=-312,94, y=66,50, z=295,50], rr['Лошадь-скелет'/130278, l='MpServer', x=-321,63, y=55,00, z=224,16], bev['thematrix02'/127206, l='MpServer', x=-297,25, y=64,00, z=270,22], oc['entity.ItemFrame.name'/212, l='MpServer', x=-297,50, y=66,50, z=266,06], oc['entity.ItemFrame.name'/213, l='MpServer', x=-298,50, y=66,50, z=266,06], rr['Лошадь-зомби'/214, l='MpServer', x=-291,53, y=99,00, z=266,75], oc['entity.ItemFrame.name'/215, l='MpServer', x=-294,50, y=67,50, z=272,94], oc['entity.ItemFrame.name'/208, l='MpServer', x=-301,50, y=66,50, z=266,06], oc['entity.ItemFrame.name'/209, l='MpServer', x=-299,50, y=66,50, z=266,06], oc['entity.ItemFrame.name'/210, l='MpServer', x=-295,50, y=66,50, z=266,06], oc['entity.ItemFrame.name'/211, l='MpServer', x=-294,50, y=66,50, z=266,06], oc['entity.ItemFrame.name'/239, l='MpServer', x=-278,94, y=3,50, z=298,50], oc['entity.ItemFrame.name'/238, l='MpServer', x=-277,50, y=3,50, z=299,94], oc['entity.ItemFrame.name'/237, l='MpServer', x=-278,94, y=3,50, z=288,50], oc['entity.ItemFrame.name'/236, l='MpServer', x=-272,94, y=64,50, z=272,50], oc['entity.ItemFrame.name'/235, l='MpServer', x=-283,50, y=48,50, z=277,06], oc['entity.ItemFrame.name'/234, l='MpServer', x=-284,50, y=48,50, z=277,06], oc['entity.ItemFrame.name'/233, l='MpServer', x=-285,50, y=48,50, z=277,06], oc['entity.ItemFrame.name'/232, l='MpServer', x=-286,50, y=48,50, z=277,06], oc['entity.ItemFrame.name'/231, l='MpServer', x=-277,50, y=3,50, z=287,06], oc['entity.ItemFrame.name'/230, l='MpServer', x=-272,94, y=64,50, z=266,50], oc['entity.ItemFrame.name'/254, l='MpServer', x=-266,50, y=3,50, z=299,94], st['entity.MinecartChest.name'/255, l='MpServer', x=-248,53, y=87,34, z=313,50], oc['entity.ItemFrame.name'/252, l='MpServer', x=-265,06, y=3,50, z=288,50], oc['entity.ItemFrame.name'/253, l='MpServer', x=-265,06, y=3,50, z=298,50], oc['entity.ItemFrame.name'/250, l='MpServer', x=-261,50, y=67,50, z=272,06], oc['entity.ItemFrame.name'/251, l='MpServer', x=-263,50, y=67,50, z=272,06], oc['entity.ItemFrame.name'/248, l='MpServer', x=-256,50, y=65,50, z=258,06], oc['entity.ItemFrame.name'/249, l='MpServer', x=-266,50, y=3,50, z=287,06], oc['entity.ItemFrame.name'/246, l='MpServer', x=-261,50, y=69,50, z=270,94], oc['entity.ItemFrame.name'/247, l='MpServer', x=-268,50, y=65,50, z=258,06], oc['entity.ItemFrame.name'/244, l='MpServer', x=-261,50, y=67,50, z=270,94], oc['entity.ItemFrame.name'/245, l='MpServer', x=-263,50, y=69,50, z=270,94], oc['entity.ItemFrame.name'/242, l='MpServer', x=-258,50, y=65,50, z=258,06], oc['entity.ItemFrame.name'/243, l='MpServer', x=-266,50, y=65,50, z=258,06], oc['entity.ItemFrame.name'/241, l='MpServer', x=-263,50, y=67,50, z=270,94], bev['Боб'/134114, l='MpServer', x=-281,97, y=64,00, z=272,47], tv['Зомби'/138485, l='MpServer', x=-306,22, y=55,00, z=276,16], bev['Зельевар'/92614, l='MpServer', x=-264,50, y=70,00, z=271,56], bev['thematrix02'/127206, l='MpServer', x=-263,31, y=66,00, z=268,91], bev['ordenkarla'/124146, l='MpServer', x=-262,56, y=66,00, z=269,09], bev['Hybrid_Cheetah'/56215, l='MpServer', x=-271,69, y=70,03, z=269,41], bev['Снайпер'/11455, l='MpServer', x=-257,59, y=70,50, z=274,44], bev['Лучник'/8561, l='MpServer', x=-267,56, y=70,50, z=274,41], bev['sp0rt1k'/127448, l='MpServer', x=-262,56, y=66,00, z=269,09], rr['Лошадь-зомби'/15746, l='MpServer', x=-290,03, y=98,00, z=262,00], bev['Снайпер'/11455, l='MpServer', x=-257,59, y=70,50, z=274,44], bev['ordenkarla'/124146, l='MpServer', x=-259,47, y=66,00, z=272,47], bev['Hybrid_Cheetah'/56215, l='MpServer', x=-273,10, y=66,91, z=269,59], bev['sp0rt1k'/133883, l='MpServer', x=-262,56, y=66,00, z=269,09], bev['sp0rt1k'/4050, l='MpServer', x=-265,50, y=65,50, z=267,91], bev['Боб'/134114, l='MpServer', x=-281,09, y=64,00, z=272,94], bev['Снайпер'/11455, l='MpServer', x=-257,59, y=70,50, z=274,44], bev['Лучник'/8561, l='MpServer', x=-267,56, y=70,50, z=274,41], bev['Артилерия'/13405, l='MpServer', x=-257,50, y=70,50, z=264,28], bev['Стрелок'/13787, l='MpServer', x=-267,66, y=70,50, z=264,66], bev['Зельевар'/92614, l='MpServer', x=-264,50, y=70,00, z=271,56], bev['Маг Холода'/92116, l='MpServer', x=-260,53, y=70,00, z=271,28], bev['Артилерия'/13405, l='MpServer', x=-257,50, y=70,50, z=264,28], bev['Стрелок'/13787, l='MpServer', x=-267,66, y=70,50, z=264,66], bev['Снайпер'/11455, l='MpServer', x=-257,59, y=70,50, z=274,44], bev['Зельевар'/92614, l='MpServer', x=-264,50, y=70,00, z=271,56], bev['Маг Холода'/92116, l='MpServer', x=-260,84, y=70,00, z=271,28], bev['Артилерия'/13405, l='MpServer', x=-257,50, y=70,50, z=264,28], bev['Стрелок'/13787, l='MpServer', x=-267,66, y=70,50, z=264,66], bev['Лучник'/8561, l='MpServer', x=-267,56, y=70,50, z=274,41], bev['sp0rt1k'/4050, l='MpServer', x=-397,06, y=53,00, z=3295,31], ug['стрела'/138918, l='MpServer', x=-287,50, y=65,00, z=266,50], bev['Hybrid_Cheetah'/138590, l='MpServer', x=-287,68, y=69,13, z=269,03], bev['Маг Холода'/92116, l='MpServer', x=-260,53, y=70,00, z=271,28], bev['Маг Холода'/92116, l='MpServer', x=-260,53, y=70,00, z=271,28], bev['Артилерия'/13405, l='MpServer', x=-257,50, y=70,50, z=264,28], bev['Hybrid_Cheetah'/56215, l='MpServer', x=-272,76, y=70,67, z=269,58]]
Client> Retry entities: 0 total; []
Client> Server brand: craftbukkit
Client> Server type: Non-integrated multiplayer server
Client> Stacktrace:
Client> at bda.a(SourceFile:284)
Client> at ats.b(SourceFile:1761)
Client> at ats.d(SourceFile:633)
Client> at net.minecraft.client.main.Main.main(SourceFile:101)
Client>
Client> -- System Details --
Client> Details:
Client> Minecraft Version: 1.6.2
Client> Operating System: Windows 7 (amd64) version 6.1
Client> Java Version: 1.7.0_25, Oracle Corporation
Client> Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Client> Memory: 79929000 bytes (76 MB) / 507314176 bytes (483 MB) up to 954466304 bytes (910 MB)
Client> JVM Flags: 1 total; -Xmx1G
Client> AABB Pool Size: 1346 (75376 bytes; 0 MB) allocated, 332 (18592 bytes; 0 MB) used
Client> Suspicious classes: No suspicious classes found.
Client> IntCache: cache: 0, tcache: 0, allocated: 3, tallocated: 63
Client> Launched Version: 1.6.2
Client> LWJGL: 2.9.0
Client> OpenGL: GeForce GTX 670/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation
Client> Is Modded: Probably not. Jar signature remains and client brand is untouched.
Client> Type: Client (map_client.txt)
Client> Resource Pack: RUS-1-6-1.zip
Client> Current Language: Русский (Россия)
Client> Profiler Position: N/A (disabled)
Client> Vec3 Pool Size: 17397 (974232 bytes; 0 MB) allocated, 17397 (974232 bytes; 0 MB) used
Client> #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\123\AppData\Roaming.minecraft\crash-reports\crash-2013-07-15_03.19.49-client.txt
Client> AL lib: (EE) alc_cleanup: 1 device not closed
Game ended with bad state (exit code -1)
Crash report detected, opening: C:\Users\123\AppData\Roaming.minecraft\crash-reports\crash-2013-07-15_03.19.49-client.txt
Deleting C:\Users\123\AppData\Roaming.minecraft\versions\1.6.2\1.6.2-natives-295730268267562
Couldn't delete C:\Users\123\AppData\Roaming.minecraft\versions\1.6.2\1.6.2-natives-295730268267562 - scheduling for deletion upon exit
Reported crash to Mojang (ID 360582)
Deleting C:\Users\123\AppData\Roaming.minecraft\versions\1.6.2\1.6.2-natives-295730268267562
Comment by me4502
Please try the latest build, I have delayed the removal of the arrow.
Comment by Богдан.Шкляренко
Instant crash :D
Try it (Stairs on spawn) 212.2.130.94 - Server IP. 1.6.2