xiewuzhiying / VS-Addition

Apache License 2.0
27 stars 6 forks source link

pocket computer ticking entity error #43

Closed awesomebossdj7 closed 1 month ago

awesomebossdj7 commented 2 months ago

This issue occurs when only Valkyrien Skies and addons are installed and no other mods

Minecraft Version

1.20.1

Mod Loader

Forge

Issue description

if you use any pocket computer and drop it, or just not have it on a player, it will create a ticking entity because "computer" is null

also the checkbox is a lie but i have to check it to submit this issue, i did only test it with vs2, vs additions, clockwork, create and cc tho

Issue reproduction

create a pocket computer (make sure its on) drop it ticking entity is created

Logs

neruina provided this to me:

java.lang.NullPointerException: Cannot invoke "dan200.computercraft.shared.pocket.core.PocketServerComputer.getLevel()" because "computer" is null at TRANSFORMER/computercraft@1.113.0/dan200.computercraft.shared.pocket.items.PocketComputerItem.wrapMethod$bpn000$vs_addition$addAPI(PocketComputerItem.java:522) at TRANSFORMER/computercraft@1.113.0/dan200.computercraft.shared.pocket.items.PocketComputerItem.getServerComputer(PocketComputerItem.java) at TRANSFORMER/computercraft@1.113.0/dan200.computercraft.shared.pocket.items.PocketComputerItem.onEntityItemUpdate(PocketComputerItem.java:154) at TRANSFORMER/forge@47.3.6/net.minecraftforge.common.extensions.IForgeItemStack.onEntityItemUpdate(IForgeItemStack.java:280) at TRANSFORMER/minecraft@1.20.1/net.minecraft.world.entity.item.ItemEntity.m8119(ItemEntity.java:103) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.level.ServerLevel.m8647(ServerLevel.java:693) at TRANSFORMER/minecraft@1.20.1/net.minecraft.world.level.Level.mixinextras$bridge$accept$176(Level.java) at TRANSFORMER/neruina@2.1.1/com.bawnorton.neruina.handler.TickHandler.safelyTickEntities(TickHandler.java:92) at TRANSFORMER/minecraft@1.20.1/net.minecraft.world.level.Level.wrapOperation$zng000$catchTickingEntities$notTheCauseOfTickLag(Level.java:9040) at TRANSFORMER/minecraft@1.20.1/net.minecraft.world.level.Level.m46653(Level.java:479) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.level.ServerLevel.m184063(ServerLevel.java:343) at TRANSFORMER/minecraft@1.20.1/net.minecraft.world.level.entity.EntityTickList.m156910(EntityTickList.java:54) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.level.ServerLevel.m8793(ServerLevel.java:323) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.MinecraftServer.m5703(MinecraftServer.java:893) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.dedicated.DedicatedServer.m5703(DedicatedServer.java:283) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.MinecraftServer.m5705(MinecraftServer.java:814) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:661) at TRANSFORMER/minecraft@1.20.1/net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:251) at java.base/java.lang.Thread.run(Thread.java:1583)

heres a actual crash report without neruina: ---- Minecraft Crash Report ---- // You're mean.

Time: 2024-09-23 16:09:03 Description: Ticking entity

java.lang.NullPointerException: Cannot invoke "dan200.computercraft.shared.pocket.core.PocketServerComputer.getLevel()" because "computer" is null at dan200.computercraft.shared.pocket.items.PocketComputerItem.wrapMethod$zkh000$vs_addition$addAPI(PocketComputerItem.java:522) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at dan200.computercraft.shared.pocket.items.PocketComputerItem.getServerComputer(PocketComputerItem.java) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at dan200.computercraft.shared.pocket.items.PocketComputerItem.onEntityItemUpdate(PocketComputerItem.java:154) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at net.minecraftforge.common.extensions.IForgeItemStack.onEntityItemUpdate(IForgeItemStack.java:280) ~[forge-1.20.1-47.3.0-universal.jar%23175!/:?] {re:computing_frames,re:classloading} at net.minecraft.world.entity.item.ItemEntity.m8119(ItemEntity.java:103) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:classloading,re:mixin} at net.minecraft.server.level.ServerLevel.m8647(ServerLevel.java:693) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.world.level.Level.m46653(Level.java:479) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.level.ServerLevel.m184063(ServerLevel.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.world.level.entity.EntityTickList.m156910(EntityTickList.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:classloading} at net.minecraft.server.level.ServerLevel.m8793(ServerLevel.java:323) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.server.MinecraftServer.m5703(MinecraftServer.java:893) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m5705(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.client.server.IntegratedServer.m5705(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at java.lang.Thread.run(Thread.java:842) ~[?:?] {}

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

-- Head -- Thread: Render thread Suspected Mods: CC: Tweaked (computercraft), Version: 1.113.0 Issue tracker URL: https://github.com/cc-tweaked/CC-Tweaked/issues at TRANSFORMER/computercraft@1.113.0/dan200.computercraft.shared.pocket.items.PocketComputerItem.wrapMethod$zkh000$vs_addition$addAPI(PocketComputerItem.java:522)

VS Addition (vs_addition), Version: 1.20.1-forge-0.0.6e+93b9fab0d6
    Issue tracker URL: https://github.com/xiewuzhiying/VS-Addition/issues
    Mixin class: io.github.xiewuzhiying.vs_addition.mixin.computercraft.MixinPocketComputerItem
    Target: dan200.computercraft.shared.pocket.items.PocketComputerItem
    at TRANSFORMER/computercraft@1.113.0/dan200.computercraft.shared.pocket.items.PocketComputerItem.wrapMethod$zkh000$vs_addition$addAPI(PocketComputerItem.java:522)

Stacktrace: at dan200.computercraft.shared.pocket.items.PocketComputerItem.wrapMethod$zkh000$vs_addition$addAPI(PocketComputerItem.java:522) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at dan200.computercraft.shared.pocket.items.PocketComputerItem.getServerComputer(PocketComputerItem.java) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at dan200.computercraft.shared.pocket.items.PocketComputerItem.onEntityItemUpdate(PocketComputerItem.java:154) ~[cc-tweaked-1.20.1-forge-1.113.0.jar%23164!/:1.113.0] {re:mixin,re:classloading,pl:mixin:APP:vs_addition-common.mixins.json:computercraft.MixinPocketComputerItem,pl:mixin:A} at net.minecraftforge.common.extensions.IForgeItemStack.onEntityItemUpdate(IForgeItemStack.java:280) ~[forge-1.20.1-47.3.0-universal.jar%23175!/:?] {re:computing_frames,re:classloading} at net.minecraft.world.entity.item.ItemEntity.m8119(ItemEntity.java:103) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:classloading,re:mixin} at net.minecraft.server.level.ServerLevel.m8647(ServerLevel.java:693) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.world.level.Level.m46653(Level.java:479) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.level.ServerLevel.m184063(ServerLevel.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.world.level.entity.EntityTickList.m156910(EntityTickList.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:classloading} at net.minecraft.server.level.ServerLevel.m8793(ServerLevel.java:323) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} -- Entity being ticked -- Details: Entity Type: minecraft:item (net.minecraft.world.entity.item.ItemEntity) Entity ID: 145 Entity Name: Advanced Pocket Computer Entity's Exact location: 0.31, -60.00, 14.56 Entity's Block location: World: (0,-60,14), Section: (at 0,4,14 in 0,-4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: null Stacktrace: at net.minecraft.world.level.Level.m46653(Level.java:479) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.level.ServerLevel.m184063(ServerLevel.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.world.level.entity.EntityTickList.m156910(EntityTickList.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:classloading} at net.minecraft.server.level.ServerLevel.m8793(ServerLevel.java:323) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:valkyrienskies-common.mixins.json:feature.shipyard_entities.MixinServerLevel,pl:mixin:APP:valkyrienskies-common.mixins.json:server.world.MixinServerLevel,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:A} at net.minecraft.server.MinecraftServer.m5703(MinecraftServer.java:893) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m5705(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.client.server.IntegratedServer.m5705(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at java.lang.Thread.run(Thread.java:842) ~[?:?] {}

-- Affected level -- Details: All players: 1 total; [ServerPlayer['awesomehome7_dj'/17, l='ServerLevel[sigma testtttt]', x=0.32, y=-60.00, z=13.01]] Chunk stats: 2809 Level dimension: minecraft:overworld Level spawn location: World: (0,-60,0), Section: (at 0,4,0 in 0,-4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511) Level time: 303 game time, 303 day time Level name: sigma testtttt Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Level weather: Rain time: 137345 (now: false), thunder time: 103150 (now: false) Known server brands: forge Removed feature flags: Level was modded: true Level storage version: 0x04ABD - Anvil Stacktrace: at net.minecraft.server.MinecraftServer.m5703(MinecraftServer.java:893) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m5705(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.client.server.IntegratedServer.m5705(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23170!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A} at java.lang.Thread.run(Thread.java:842) ~[?:?] {}

xiewuzhiying commented 1 month ago

Do not use CC: Tweaked 1.113+ for now. Many addon mods are incompatible with it.

xiewuzhiying commented 1 month ago

Will be fixed in next release.