forked from GTNewHorizons/Hodgepodge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow getDownloadImageSkin() fixes (such as GTNewHorizons#237) to apply to Witchery's Mirror content (demon reflections, player camouflage and sleeping bodies). This wasn't fixed before due to Witchery's decision to copy and paste that vanilla class rather than reference it.
- Loading branch information
1 parent
a79c638
commit e9b6c64
Showing
4 changed files
with
58 additions
and
0 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/mitchej123/hodgepodge/mixins/late/witchery/MixinEntityReflection.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,26 @@ | ||
package com.mitchej123.hodgepodge.mixins.late.witchery; | ||
|
||
import static net.minecraft.client.entity.AbstractClientPlayer.getDownloadImageSkin; | ||
|
||
import net.minecraft.client.renderer.ThreadDownloadImageData; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import com.emoniph.witchery.entity.EntityReflection; | ||
|
||
@Mixin(EntityReflection.class) | ||
public class MixinEntityReflection { | ||
|
||
@Redirect( | ||
method = "setupCustomSkin", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/emoniph/witchery/entity/EntityReflection;getDownloadImageSkin(Lnet/minecraft/util/ResourceLocation;Ljava/lang/String;)Lnet/minecraft/client/renderer/ThreadDownloadImageData;"), | ||
remap = false) | ||
private ThreadDownloadImageData hodgepodge$getDownloadImageSkin(ResourceLocation location, String name) { | ||
return getDownloadImageSkin(location, name); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/mitchej123/hodgepodge/mixins/late/witchery/MixinExtendedPlayer.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,26 @@ | ||
package com.mitchej123.hodgepodge.mixins.late.witchery; | ||
|
||
import static net.minecraft.client.entity.AbstractClientPlayer.getDownloadImageSkin; | ||
|
||
import net.minecraft.client.renderer.ThreadDownloadImageData; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import com.emoniph.witchery.common.ExtendedPlayer; | ||
|
||
@Mixin(ExtendedPlayer.class) | ||
public class MixinExtendedPlayer { | ||
|
||
@Redirect( | ||
method = "setupCustomSkin", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/emoniph/witchery/common/ExtendedPlayer;getDownloadImageSkin(Lnet/minecraft/util/ResourceLocation;Ljava/lang/String;)Lnet/minecraft/client/renderer/ThreadDownloadImageData;"), | ||
remap = false) | ||
private ThreadDownloadImageData hodgepodge$getDownloadImageSkin(ResourceLocation location, String name) { | ||
return getDownloadImageSkin(location, name); | ||
} | ||
} |