-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Sponge): Fixed Sponge_SkinHandler for versions below 1.18
- Loading branch information
1 parent
bb15107
commit 87bfd7f
Showing
5 changed files
with
112 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
sponge/src/main/java/com/georgev22/skinoverlay/mixin/sponge/SynchedEntityData_Mixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.georgev22.skinoverlay.mixin.sponge; | ||
|
||
import net.minecraft.network.syncher.EntityDataAccessor; | ||
import net.minecraft.network.syncher.SynchedEntityData; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(SynchedEntityData.class) | ||
public abstract class SynchedEntityData_Mixin { | ||
|
||
@Shadow | ||
private boolean isDirty; | ||
|
||
@Shadow | ||
protected abstract <T> SynchedEntityData.DataItem<T> getItem(EntityDataAccessor<T> dataWatcherObject); | ||
|
||
public <T> void markDirty(EntityDataAccessor<T> dataWatcherObject) { | ||
getItem(dataWatcherObject).setDirty(true); | ||
isDirty = true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8.3", | ||
"package": "com.georgev22.skinoverlay.mixin.sponge", | ||
"refmap": "mixins.skinoverlay.refmap.json", | ||
"target": "@env(DEFAULT)", | ||
"compatibilityLevel": "JAVA_11", | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"mixins": [ | ||
"SynchedEntityData_Mixin" | ||
] | ||
} |