-
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.
Push commit with a (broken) mixin so CI stops complaining
Will you please stop blowing up my freaking emails GitHub?
- Loading branch information
1 parent
8ef48cd
commit e88e515
Showing
6 changed files
with
116 additions
and
2 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
16 changes: 16 additions & 0 deletions
16
src/main/java/roadhog360/simpleskinbackport/ClientProxy.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 |
---|---|---|
@@ -1,8 +1,24 @@ | ||
package roadhog360.simpleskinbackport; | ||
|
||
import com.mojang.authlib.minecraft.MinecraftSessionService; | ||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.renderer.texture.TextureManager; | ||
|
||
import java.io.File; | ||
|
||
public class ClientProxy extends CommonProxy { | ||
|
||
// Override CommonProxy methods here, if you want a different behaviour on the client (e.g. registering renders). | ||
// Don't forget to call the super methods as well. | ||
|
||
@Override | ||
public void init(FMLInitializationEvent event) { | ||
super.init(event); | ||
|
||
// TextureManager texManager = Minecraft.getMinecraft().renderEngine; | ||
// File skinFolder = new File(Minecraft.getMinecraft().fileAssets, "skins"); | ||
// MinecraftSessionService sessionService = Minecraft.getMinecraft().func_152347_ac(); // getSessionService | ||
// Minecraft.getMinecraft().field_152350_aA/*skinManager*/ = new NewSkinManager(Minecraft.getMinecraft().func_152342_ad()/*getSkinManager*/, texManager, skinFolder, sessionService); | ||
} | ||
} |
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
85 changes: 85 additions & 0 deletions
85
src/main/java/roadhog360/simpleskinbackport/mixins/early/MixinModelBiped.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,85 @@ | ||
package roadhog360.simpleskinbackport.mixins.early; | ||
|
||
import net.minecraft.client.model.ModelBase; | ||
import net.minecraft.client.model.ModelBiped; | ||
import net.minecraft.client.model.ModelRenderer; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import roadhog360.simpleskinbackport.SimpleSkinBackport; | ||
|
||
@Mixin(ModelBiped.class) | ||
public abstract class MixinModelBiped extends ModelBase { | ||
|
||
@Shadow public ModelRenderer bipedHead; | ||
@Shadow public ModelRenderer bipedHeadwear; | ||
@Shadow public ModelRenderer bipedBody; | ||
@Shadow public ModelRenderer bipedRightArm; | ||
@Shadow public ModelRenderer bipedLeftArm; | ||
@Shadow public ModelRenderer bipedRightLeg; | ||
@Shadow public ModelRenderer bipedLeftLeg; | ||
@Shadow public ModelRenderer bipedEars; | ||
@Shadow public ModelRenderer bipedCloak; | ||
|
||
//new stuff | ||
public ModelRenderer bipedLeftArmwear; | ||
public ModelRenderer bipedRightArmwear; | ||
public ModelRenderer bipedLeftLegwear; | ||
public ModelRenderer bipedRightLegwear; | ||
public ModelRenderer bipedBodyWear; | ||
public boolean smallArms = true; | ||
|
||
@Inject(method = "<init>(FFII)V", at = @At("TAIL")) | ||
private void injectNewLimbs(float z, float p_i1149_2_, int texWidth, int texHeight, CallbackInfo ci) { | ||
|
||
if (smallArms) { //thin arms, set to true for now | ||
bipedLeftArm = new ModelRenderer(this, 32, 48); | ||
bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, z); | ||
bipedLeftArm.setRotationPoint(5.0F, 2.5F, 0.0F); | ||
|
||
bipedRightArm = new ModelRenderer(this, 40, 16); | ||
bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, z); | ||
bipedRightArm.setRotationPoint(-5.0F, 2.5F, 0.0F); | ||
|
||
bipedLeftArmwear = new ModelRenderer(this, 48, 48); | ||
bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, z + 0.25F); | ||
bipedLeftArm.addChild(bipedLeftArmwear); | ||
|
||
bipedRightArmwear = new ModelRenderer(this, 40, 32); | ||
bipedRightArmwear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, z + 0.25F); | ||
bipedRightArm.addChild(bipedRightArmwear); | ||
} else { | ||
bipedLeftArm = new ModelRenderer(this, 32, 48); | ||
bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, z); | ||
bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F); | ||
|
||
bipedLeftArmwear = new ModelRenderer(this, 48, 48); | ||
bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, z + 0.25F); | ||
bipedLeftArm.addChild(bipedLeftArmwear); | ||
|
||
bipedRightArmwear = new ModelRenderer(this, 40, 32); | ||
bipedRightArmwear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, z + 0.25F); | ||
bipedRightArm.addChild(bipedRightArmwear); | ||
} | ||
|
||
bipedLeftLeg = new ModelRenderer(this, 16, 48); | ||
bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, z); | ||
bipedLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F); | ||
|
||
bipedLeftLegwear = new ModelRenderer(this, 0, 48); | ||
bipedLeftLegwear.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, z + 0.25F); | ||
bipedLeftLeg.addChild(bipedLeftLegwear); | ||
|
||
bipedRightLegwear = new ModelRenderer(this, 0, 32); | ||
bipedRightLegwear.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, z + 0.25F); | ||
bipedRightLeg.addChild(bipedRightLegwear); | ||
|
||
bipedBodyWear = new ModelRenderer(this, 16, 32); | ||
bipedBodyWear.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, z + 0.25F); | ||
bipedBody.addChild(bipedBodyWear); | ||
} | ||
} |
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,2 @@ | ||
public net.minecraft.client.Minecraft field_110446_Y #fileAssets | ||
public net.minecraft.client.Minecraft field_152350_aA |
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,11 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8.5-GTNH", | ||
"package": "roadhog360.simpleskinbackport.mixins.early", | ||
"refmap": "mixins.ssb.refmap.json", | ||
"target": "@env(DEFAULT)", | ||
"compatibilityLevel": "JAVA_8", | ||
"overwrites": { | ||
"conformVisibility": true | ||
} | ||
} |