Блок респавн

Версия Minecraft
1.7.10
103
5
Сделал блок если на который наступить, то он должен сделать точку возрождения на этом блоке. Но при попытке встать на него происходит краш. Прилагаю скриншоты всех используемых классов.Ругается на строчку с info.setRespawnPoint1584521363627.png1584521292444.png1584521330137.png1584521320489.png1584521335692.png
 
Краш-лог
---- Minecraft Crash Report ----
// There are four lights!

Time: 17.03.20 7:09
Description: Colliding entity with block

java.lang.NullPointerException: Colliding entity with block
at com.metro.prodnik.blocks.BlockRespawn.onEntityCollidedWithBlock(BlockRespawn.java:53)
at net.minecraft.entity.Entity.func_145775_I(Entity.java:962)
at net.minecraft.entity.Entity.moveEntity(Entity.java:895)
at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680)
at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1862)
at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023)
at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:612)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327)
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at com.metro.prodnik.blocks.BlockRespawn.onEntityCollidedWithBlock(BlockRespawn.java:53)

-- Block being collided with --
Details:
Block type: ID #167 (tile.block_respawn // com.metro.prodnik.blocks.BlockRespawn)
Block data value: 0 / 0x0 / 0b0000
Block location: World: (-532,4,-1781), Chunk: (at 12,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
Stacktrace:
at net.minecraft.entity.Entity.func_145775_I(Entity.java:962)

-- Entity being checked for collision --
Details:
Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
Entity ID: 168
Entity Name: Player998
Entity's Exact location: -530,82, 4,00, -1780,88
Entity's Block location: World: (-531,4,-1781), Chunk: (at 13,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
Entity's Momentum: 0,00, 0,00, 0,00
Stacktrace:
at net.minecraft.entity.Entity.moveEntity(Entity.java:895)
at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680)
at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1862)
at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023)
at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:612)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327)

-- Player being ticked --
Details:
Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
Entity ID: 168
Entity Name: Player998
Entity's Exact location: -530,82, 4,00, -1780,88
Entity's Block location: World: (-531,4,-1781), Chunk: (at 13,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
Entity's Momentum: 0,00, 0,00, 0,00
Stacktrace:
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@4ef8a6c5
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_241, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 780662504 bytes (744 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCHIJAAAA prodnikmod{2754} [patayprodnik] (bin)
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Player998'/168, l='New World', x=-530,82, y=4,00, z=-1780,88]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
Краш-лог:
---- Minecraft Crash Report ----
// There are four lights!

Time: 17.03.20 7:09
Description: Colliding entity with block

java.lang.NullPointerException: Colliding entity with block
	at com.metro.prodnik.blocks.BlockRespawn.onEntityCollidedWithBlock(BlockRespawn.java:53)
	at net.minecraft.entity.Entity.func_145775_I(Entity.java:962)
	at net.minecraft.entity.Entity.moveEntity(Entity.java:895)
	at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680)
	at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1862)
	at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023)
	at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:612)
	at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
	at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327)
	at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
	at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
	at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
	at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
	at com.metro.prodnik.blocks.BlockRespawn.onEntityCollidedWithBlock(BlockRespawn.java:53)

-- Block being collided with --
Details:
	Block type: ID #167 (tile.block_respawn // com.metro.prodnik.blocks.BlockRespawn)
	Block data value: 0 / 0x0 / 0b0000
	Block location: World: (-532,4,-1781), Chunk: (at 12,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
Stacktrace:
	at net.minecraft.entity.Entity.func_145775_I(Entity.java:962)

-- Entity being checked for collision --
Details:
	Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
	Entity ID: 168
	Entity Name: Player998
	Entity's Exact location: -530,82, 4,00, -1780,88
	Entity's Block location: World: (-531,4,-1781), Chunk: (at 13,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
	Entity's Momentum: 0,00, 0,00, 0,00
Stacktrace:
	at net.minecraft.entity.Entity.moveEntity(Entity.java:895)
	at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680)
	at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1862)
	at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023)
	at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:612)
	at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
	at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:327)

-- Player being ticked --
Details:
	Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
	Entity ID: 168
	Entity Name: Player998
	Entity's Exact location: -530,82, 4,00, -1780,88
	Entity's Block location: World: (-531,4,-1781), Chunk: (at 13,0,11 in -34,-112; contains blocks -544,0,-1792 to -529,255,-1777), Region: (-2,-4; contains chunks -64,-128 to -33,-97, blocks -1024,0,-2048 to -513,255,-1537)
	Entity's Momentum: 0,00, 0,00, 0,00
Stacktrace:
	at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:330)
	at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:329)
	at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
	at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:271)
	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@4ef8a6c5
Stacktrace:
	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
	Minecraft Version: 1.7.10
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_241, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 780662504 bytes (744 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
	UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
	UCHIJAAAA	prodnikmod{2754} [patayprodnik] (bin) 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
	Player Count: 1 / 8; [EntityPlayerMP['Player998'/168, l='New World', x=-530,82, y=4,00, z=-1780,88]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

tox1cozZ

aka Agravaine
8,456
598
2,893
Что за дичь ты мутишь? Зачем ты расширяешь PlayerCapabilities? Ты его когда получаешь у тебя вылетает естественно класскастэксепшн и возвращается нулл, а затем в блоке уже нулл вылетает.
Ты или IEEP сделай, или юзай метод установки спавпоинта и в игроке.
 
Сверху