ZombieStriker / QualityArmoryVehicles2

Rewrite of QualityArmoryVehicles
GNU General Public License v3.0
14 stars 13 forks source link

Legacy Material Support loads up during first vehicle collision #310

Closed B3airsoft closed 1 month ago

B3airsoft commented 1 month ago

Each time, when the car is colliding with a block, the server has to initialise legacy material support. This has to happen once, after every restart and takes around 10 seconds - during that time the server is unresponsive.

QAV Version: 2.3.9 Server: Purpur 1.21.1-2296-568a028 (MC: 1.21.1) (problem persists for a few versions, since the LMS is not loading during startup)

[00:57:55] [Server thread/WARN]: [org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug! [00:58:05] [Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - 1.21.1-2296-568a028 (MC: 1.21.1) --- [00:58:05] [Watchdog Thread/ERROR]: The server has not responded for 10 seconds! Creating thread dump

[00:58:05] [Watchdog Thread/ERROR]: Server thread dump (Look for plugins here before reporting to Purpur!):

[00:58:05] [Watchdog Thread/ERROR]: Current Thread: Server thread [00:58:05] [Watchdog Thread/ERROR]: PID: 67 | Suspended: false | Native: false | State: RUNNABLE

[00:58:05] [Watchdog Thread/ERROR]: java.base@21.0.4/java.util.function.Function$$Lambda/0x00007fbd38e7c770.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: java.base@21.0.4/java.util.function.Function$$Lambda/0x00007fbd38e7c770.apply(Unknown Source) [00:58:05] [Watchdog Thread/ERROR]: com.mojang.datafixers.FunctionType$$Lambda/0x00007fbd3b809e50.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: com.mojang.datafixers.functions.Comp$$Lambda/0x00007fbd39a4f260.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: com.mojang.datafixers.functions.Fold$$Lambda/0x00007fbd3b805940.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: com.mojang.datafixers.functions.Comp$$Lambda/0x00007fbd39a4f260.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: com.mojang.datafixers.types.Type$$Lambda/0x00007fbd39a4ede0.apply(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: net.minecraft.server.MinecraftServer$$Lambda/0x00007fbd38d374b0.run(Unknown Source)

[00:58:05] [Watchdog Thread/ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---

[00:58:07] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 12127ms or 242 ticks behind` config.yml: USE_1_13_MODEL_SYSTEM: false enable_VehicleLimiter: false enable_PickupVehicles: true enable_UnlockableVehicles: false enable_GarageCallback: false enable_RequirePermsToDriveType: false enable_SetOwnerOnVehicleSpawn: true enable_VehicleDamage: true enable_Debug_RemoveFuelChecks: false enable_SetOwnerOfVehicleIfUnowned: false Enable_Creation_Of_Default_Files: false enable_RemoveVehiclesOnDismount: false enable_RemoveVehiclesOnPlayerQuit: true enable_DestroyVehiclesOnPlayerQuit: false enable_DestroyVehiclesOnWater: true enable_StopCreativeDuplication: false enable_VehiclePlayerCollision: false enable_SwapEndermiteWithCheckenForLowRider: false enable_FuelCarsWhenSpawnedFromGarage: true enable_UseHeadsForGUI: true ENABLE_DEBUG: false override_debug_withCommand: false enable_AntiCheatHook: true freezeOnDestroy: false bypassCoalInCreative: true sendActionBarOnMove: true enableShopCooldown: false makeVehiclesPublic: false unsafe: useDamageInsteadOfCustomModelData: false separateModelAndDriver: false modernPlaneMovements: true enable_RequirePermToBuyVehicle: false enable_VehiclesHaveTrunks: true blockAccelerationReduction: BLOCK_NAME: 1.0 enable_RemoveVehiclesOnEmpty: false BlacklistedWorlds:

Probably it is caused by the the GetMaterial function used in qav.util.BlockCollisionUtil (org.bukkit.Material)- as all usage of MaterialData is deprecated and subject to removal. Use [BlockData] in this case probably - org.bukkit.block.data