Create Fabric

Create Fabric

10M Downloads

Deployer retaining damage attribute after item was taken off Deployer's hand

ezraisw opened this issue ยท 1 comments

commented

Description

This should be fairly simple to replicate.

Steps:

  1. Place down deployer and connect to power.
  2. Change the Deployer's mode to punch mode.
  3. Give the deployer an item that has damage attribute modifier (Like swords/axes).
  4. Take back the item.
  5. The deployer should now retain it's previous item's damage attribute.

Here's a video demonstrating the bug:
https://youtu.be/NHwYWIDAci8?si=p0L6_CI0FG72pohM

Expected behavior:
After sword/axe is taken from hand, it should revert back to normal punching damage (half heart).

Bugged behavior:
After sword/axe is taken from hand, it retained the damage from the previous item.

Technical:

  • Only the item's damage modifier is retained. Enchantment extra damage isn't retained.
  • Internally, the item is properly removed from the fake player but the attribute (from getAttributeValue(Attributes.ATTACK_DAMAGE)) of the fake player is not reverted properly.
  • If you put the sword while the hand is retracting and quickly pull it off before it fully extends, the bug will not happen. This is because DeployerHandler.activate() has not been called yet to modify the attributes.

Game Log

https://mclo.gs/xpFkas0

Debug Information

Client Info
Create:
	Mod Version: 0.5.1-j-build.1624+mc1.20.1
	Fabric API Version: 0.92.2+1.20.1
	Minecraft Version: 1.20.1

Graphics:
	Flywheel Version: 0.6.11-4
	Flywheel Backend: INSTANCING
	OpenGL Renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
	OpenGL Version: 3.2.0 NVIDIA 566.14
	Graphics Mode: options.graphics.fancy

System Information:
	Operating System: Windows 11 (amd64) version 10.0
	Java Version: 17.0.8, Microsoft
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx16G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Memory: 1853657216 bytes (1767 MiB) / 3355443200 bytes (3200 MiB) up to 17179869184 bytes (16384 MiB)
	Total Memory: 31354503168 bytes (29889 MiB) / 68306771968 bytes (65116 MiB)
	CPU: AMD Ryzen 9 7950X3D 16-Core Processor @ 4.20 GHz; 16 cores / 32 threads on 1 socket(s)
	Graphics card #0: Parsec Virtual Display Adapter (Parsec Cloud, Inc.); 0.00 MB of VRAM
	Graphics card #1: NVIDIA GeForce RTX 4090 (NVIDIA (0x10de)); 4095.00 MB of VRAM

Other Mods:
	core: 3.6.6
	toml: 3.6.6
	jsr305: 3.0.2
	Dripstone Fluid Lib: 3.0.2
	Fabric API Base: 0.4.31+1802ada577
	Fabric API Lookup API (v1): 1.6.36+1802ada577
	Fabric Biome API (v1): 13.0.13+1802ada577
	Fabric Block API (v1): 1.0.11+1802ada577
	Fabric BlockView API (v2): 1.0.1+1802ada577
	Fabric BlockRenderLayer Registration (v1): 1.1.41+1802ada577
	Fabric Client Tags: 1.1.2+1802ada577
	Fabric Command API (v1): 1.2.34+f71b366f77
	Fabric Command API (v2): 2.2.13+1802ada577
	Fabric Commands (v0): 0.2.51+df3654b377
	Fabric Containers (v0): 0.1.64+df3654b377
	Fabric Content Registries (v0): 4.0.11+1802ada577
	Fabric Convention Tags: 1.5.5+1802ada577
	Fabric Crash Report Info (v1): 0.2.19+1802ada577
	Fabric Data Attachment API (v1): 1.0.0+de0fd6d177
	Fabric Data Generation API (v1): 12.3.4+1802ada577
	Fabric Dimensions API (v1): 2.1.54+1802ada577
	Fabric Entity Events (v1): 1.6.0+1c78457f77
	Fabric Events Interaction (v0): 0.6.2+1802ada577
	Fabric Events Lifecycle (v0): 0.2.63+df3654b377
	Fabric Game Rule API (v1): 1.0.40+1802ada577
	Fabric Item API (v1): 2.1.28+1802ada577
	Fabric Item Group API (v1): 4.0.12+1802ada577
	Fabric Key Binding API (v1): 1.0.37+1802ada577
	Fabric Key Bindings (v0): 0.2.35+df3654b377
	Fabric Lifecycle Events (v1): 2.2.22+1802ada577
	Fabric Loot API (v2): 1.2.1+1802ada577
	Fabric Loot Tables (v1): 1.1.45+9e7660c677
	Fabric Message API (v1): 5.1.9+1802ada577
	Fabric Mining Level API (v1): 2.1.50+1802ada577
	Fabric Model Loading API (v1): 1.0.3+1802ada577
	Fabric Models (v0): 0.4.2+9386d8a777
	Fabric Networking API (v1): 1.3.11+1802ada577
	Fabric Networking (v0): 0.3.51+df3654b377
	Fabric Object Builder API (v1): 11.1.3+1802ada577
	Fabric Particles (v1): 1.1.2+1802ada577
	Fabric Recipe API (v1): 1.0.21+1802ada577
	Fabric Registry Sync (v0): 2.3.3+1802ada577
	Fabric Renderer API (v1): 3.2.1+1802ada577
	Fabric Renderer - Indigo: 1.5.2+85287f9f77
	Fabric Renderer Registries (v1): 3.2.46+df3654b377
	Fabric Rendering Data Attachment (v1): 0.3.37+92a0d36777
	Fabric Rendering Fluids (v1): 3.0.28+1802ada577
	Fabric Rendering (v0): 1.1.49+df3654b377
	Fabric Rendering (v1): 3.0.8+1802ada577
	Fabric Resource Conditions API (v1): 2.3.8+1802ada577
	Fabric Resource Loader (v0): 0.11.10+1802ada577
	Fabric Screen API (v1): 2.0.8+1802ada577
	Fabric Screen Handler API (v1): 1.3.30+1802ada577
	Fabric Sound API (v1): 1.0.13+1802ada577
	Fabric Transfer API (v1): 3.3.5+8dd72ea377
	Fabric Transitive Access Wideners (v1): 4.3.1+1802ada577
	Fabric Loader: 0.16.9
	Forge Config API Port: 8.0.0
	OpenJDK 64-Bit Server VM: 17
	Milk Lib: 1.2.60
	MixinExtras: 0.4.1
	Porting Lib Accessors: 2.3.8+1.20.1
	Porting Lib Attributes: 2.3.8+1.20.1
	Porting Lib Base: 2.3.8+1.20.1
	Porting Lib Brewing: 2.3.8+1.20.1
	Porting Lib Client Events: 2.3.8+1.20.1
	Porting Lib Common: 2.3.8+1.20.1
	Porting Lib Config: 2.3.8+1.20.1
	Porting Lib Core: 2.3.8+1.20.1
	Porting Lib Data: 2.1.1090+1.20
	Porting Lib Entity: 2.3.8+1.20.1
	Porting Lib Extensions: 2.3.8+1.20.1
	Porting Lib Fluids: 2.3.8+1.20.1
	Porting Lib GameTest: 2.1.1090+1.20
	Porting Lib Gui Utils: 2.3.8+1.20.1
	Porting Lib Lazy Register: 2.3.8+1.20.1
	Porting Lib Mixin Extensions: 2.3.8+1.20.1
	Porting Lib Model Generators: 2.1.1090+1.20
	Porting Lib Model Loader: 2.3.8+1.20.1
	Porting Lib Model Materials: 2.1.1090+1.20
	Porting Lib Models: 2.3.8+1.20.1
	Porting Lib Networking: 2.3.8+1.20.1
	Porting Lib Obj Loader: 2.3.8+1.20.1
	Porting Lib Tags: 3.0
	Porting Lib Tool Actions: 2.3.8+1.20.1
	Porting Lib Transfer: 2.3.8+1.20.1
	Porting Lib Utility: 2.3.8+1.20.1
	Reach Entity Attributes: 2.4.0
	Registrate for Fabric: 1.3.79-MC1.20.1
Server Info
Create:
	Mod Version: 0.5.1-j-build.1624+mc1.20.1
	Fabric API Version: 0.92.2+1.20.1
	Minecraft Version: 1.20.1

System Information:
	Operating System: Windows 11 (amd64) version 10.0
	Java Version: 17.0.8, Microsoft
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx16G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Memory: 1853657216 bytes (1767 MiB) / 3355443200 bytes (3200 MiB) up to 17179869184 bytes (16384 MiB)
	Total Memory: 31354503168 bytes (29889 MiB) / 68306771968 bytes (65116 MiB)
	CPU: AMD Ryzen 9 7950X3D 16-Core Processor @ 4.20 GHz; 16 cores / 32 threads on 1 socket(s)
	Graphics card #0: Parsec Virtual Display Adapter (Parsec Cloud, Inc.); 0.00 MB of VRAM
	Graphics card #1: NVIDIA GeForce RTX 4090 (NVIDIA (0x10de)); 4095.00 MB of VRAM

Other Mods:
	core: 3.6.6
	toml: 3.6.6
	jsr305: 3.0.2
	Dripstone Fluid Lib: 3.0.2
	Fabric API Base: 0.4.31+1802ada577
	Fabric API Lookup API (v1): 1.6.36+1802ada577
	Fabric Biome API (v1): 13.0.13+1802ada577
	Fabric Block API (v1): 1.0.11+1802ada577
	Fabric BlockView API (v2): 1.0.1+1802ada577
	Fabric BlockRenderLayer Registration (v1): 1.1.41+1802ada577
	Fabric Client Tags: 1.1.2+1802ada577
	Fabric Command API (v1): 1.2.34+f71b366f77
	Fabric Command API (v2): 2.2.13+1802ada577
	Fabric Commands (v0): 0.2.51+df3654b377
	Fabric Containers (v0): 0.1.64+df3654b377
	Fabric Content Registries (v0): 4.0.11+1802ada577
	Fabric Convention Tags: 1.5.5+1802ada577
	Fabric Crash Report Info (v1): 0.2.19+1802ada577
	Fabric Data Attachment API (v1): 1.0.0+de0fd6d177
	Fabric Data Generation API (v1): 12.3.4+1802ada577
	Fabric Dimensions API (v1): 2.1.54+1802ada577
	Fabric Entity Events (v1): 1.6.0+1c78457f77
	Fabric Events Interaction (v0): 0.6.2+1802ada577
	Fabric Events Lifecycle (v0): 0.2.63+df3654b377
	Fabric Game Rule API (v1): 1.0.40+1802ada577
	Fabric Item API (v1): 2.1.28+1802ada577
	Fabric Item Group API (v1): 4.0.12+1802ada577
	Fabric Key Binding API (v1): 1.0.37+1802ada577
	Fabric Key Bindings (v0): 0.2.35+df3654b377
	Fabric Lifecycle Events (v1): 2.2.22+1802ada577
	Fabric Loot API (v2): 1.2.1+1802ada577
	Fabric Loot Tables (v1): 1.1.45+9e7660c677
	Fabric Message API (v1): 5.1.9+1802ada577
	Fabric Mining Level API (v1): 2.1.50+1802ada577
	Fabric Model Loading API (v1): 1.0.3+1802ada577
	Fabric Models (v0): 0.4.2+9386d8a777
	Fabric Networking API (v1): 1.3.11+1802ada577
	Fabric Networking (v0): 0.3.51+df3654b377
	Fabric Object Builder API (v1): 11.1.3+1802ada577
	Fabric Particles (v1): 1.1.2+1802ada577
	Fabric Recipe API (v1): 1.0.21+1802ada577
	Fabric Registry Sync (v0): 2.3.3+1802ada577
	Fabric Renderer API (v1): 3.2.1+1802ada577
	Fabric Renderer - Indigo: 1.5.2+85287f9f77
	Fabric Renderer Registries (v1): 3.2.46+df3654b377
	Fabric Rendering Data Attachment (v1): 0.3.37+92a0d36777
	Fabric Rendering Fluids (v1): 3.0.28+1802ada577
	Fabric Rendering (v0): 1.1.49+df3654b377
	Fabric Rendering (v1): 3.0.8+1802ada577
	Fabric Resource Conditions API (v1): 2.3.8+1802ada577
	Fabric Resource Loader (v0): 0.11.10+1802ada577
	Fabric Screen API (v1): 2.0.8+1802ada577
	Fabric Screen Handler API (v1): 1.3.30+1802ada577
	Fabric Sound API (v1): 1.0.13+1802ada577
	Fabric Transfer API (v1): 3.3.5+8dd72ea377
	Fabric Transitive Access Wideners (v1): 4.3.1+1802ada577
	Fabric Loader: 0.16.9
	Forge Config API Port: 8.0.0
	OpenJDK 64-Bit Server VM: 17
	Milk Lib: 1.2.60
	MixinExtras: 0.4.1
	Porting Lib Accessors: 2.3.8+1.20.1
	Porting Lib Attributes: 2.3.8+1.20.1
	Porting Lib Base: 2.3.8+1.20.1
	Porting Lib Brewing: 2.3.8+1.20.1
	Porting Lib Client Events: 2.3.8+1.20.1
	Porting Lib Common: 2.3.8+1.20.1
	Porting Lib Config: 2.3.8+1.20.1
	Porting Lib Core: 2.3.8+1.20.1
	Porting Lib Data: 2.1.1090+1.20
	Porting Lib Entity: 2.3.8+1.20.1
	Porting Lib Extensions: 2.3.8+1.20.1
	Porting Lib Fluids: 2.3.8+1.20.1
	Porting Lib GameTest: 2.1.1090+1.20
	Porting Lib Gui Utils: 2.3.8+1.20.1
	Porting Lib Lazy Register: 2.3.8+1.20.1
	Porting Lib Mixin Extensions: 2.3.8+1.20.1
	Porting Lib Model Generators: 2.1.1090+1.20
	Porting Lib Model Loader: 2.3.8+1.20.1
	Porting Lib Model Materials: 2.1.1090+1.20
	Porting Lib Models: 2.3.8+1.20.1
	Porting Lib Networking: 2.3.8+1.20.1
	Porting Lib Obj Loader: 2.3.8+1.20.1
	Porting Lib Tags: 3.0
	Porting Lib Tool Actions: 2.3.8+1.20.1
	Porting Lib Transfer: 2.3.8+1.20.1
	Porting Lib Utility: 2.3.8+1.20.1
	Reach Entity Attributes: 2.4.0
	Registrate for Fabric: 1.3.79-MC1.20.1
commented