Update mappings

This commit is contained in:
Matthew Messinger 2016-11-22 16:13:24 -05:00
parent bd597bbf1b
commit 945996cfa4
7 changed files with 42 additions and 24 deletions

4
.gitignore vendored
View file

@ -8,4 +8,6 @@ run/
*.launch
/.apt_generated/
.factorypath
logs/
logs/
.idea/
classes/

View file

@ -31,7 +31,8 @@ description = 'Mine Little Pony'
minecraft {
version = "1.11"
mappings = 'snapshot_20161116'
// first snapshot for 1.11. Change to stable when possible.
mappings = 'snapshot_20161120'
runDir = 'run'
replace '@VERSION@',project.version
}

View file

@ -57,7 +57,7 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
this.layerRenderers.clear();
this.addLayer(new LayerPonyArmor(this));
this.addLayer(new LayerHeldPonyItem(this));
this.addLayer(new LayerHeldPonyItem<AbstractClientPlayer>(this));
this.addLayer(new LayerArrow(this));
this.addLayer(new LayerPonyCape(this));
this.addLayer(new LayerPonySkull(this));
@ -95,7 +95,7 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
}
@Inject(
method = "renderLivingAt",
method = "renderLivingAt(Lnet/minecraft/client/entity/AbstractClientPlayer;DDD)V",
at = @At("RETURN"))
private void setupPlayerScale(AbstractClientPlayer player, double xPosition, double yPosition, double zPosition, CallbackInfo ci) {
@ -169,16 +169,17 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
}
@Inject(
method = "rotateCorpse(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V",
method = "applyRotations(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/renderer/entity/RenderLivingBase;"
+ "rotateCorpse(Lnet/minecraft/entity/EntityLivingBase;FFF)V",
+ "applyRotations(Lnet/minecraft/entity/EntityLivingBase;FFF)V",
ordinal = 1,
shift = Shift.AFTER))
private void onRotateCorpse(AbstractClientPlayer player, float yaw, float pitch, float ticks, CallbackInfo ci) {
if (this.mainModel instanceof ModelPlayerPony) {
// require arms to be stretched out (sorry mud ponies, no flight skills for you)
// require arms to be stretched out (sorry mud ponies, no flight
// skills for you)
if (!((ModelPlayerPony) this.mainModel).rainboom) {
this.playerModel.getModel().motionPitch = 0;
return;
@ -212,7 +213,7 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
}
@Redirect(
method = "rotateCorpse(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V",
method = "applyRotations(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/renderer/GlStateManager;rotate(FFFF)V",

View file

@ -27,7 +27,7 @@ public class RenderPonyVex extends RenderBiped<EntityVex> {
@Override
protected ResourceLocation getEntityTexture(EntityVex entity) {
return entity.func_190647_dj() ? VEX_CHARGING : VEX;
return entity.isCharging() ? VEX_CHARGING : VEX;
}
}

View file

@ -3,6 +3,7 @@ package com.minelittlepony.renderer;
import com.minelittlepony.MineLittlePony;
import com.minelittlepony.model.PMAPI;
import com.minelittlepony.model.pony.ModelVillagerPony;
import com.minelittlepony.util.Villagers;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderManager;
@ -45,17 +46,17 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
private ResourceLocation getTextureForVillager(EntityVillager villager) {
switch (villager.getProfession()) {
case 0:
case Villagers.FARMER:
return FARMER;
case 1:
case Villagers.LIBRARIAN:
return LIBRARIAN;
case 2:
case Villagers.PRIEST:
return PRIEST;
case 3:
case Villagers.BLACKSMITH:
return SMITH;
case 4:
case Villagers.BUTCHER:
return BUTCHER;
case 5:
case Villagers.GENERIC:
default:
return GENERIC;
}

View file

@ -1,6 +1,7 @@
package com.minelittlepony.renderer;
import com.minelittlepony.model.PMAPI;
import com.minelittlepony.util.Villagers;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.monster.EntityZombieVillager;
@ -25,29 +26,29 @@ public class RenderPonyZombieVillager extends RenderPonyMob<EntityZombieVillager
}
private ResourceLocation getTextureForVillager(EntityZombieVillager villager) {
switch (villager.func_190736_dl()) {
case 0:
switch (villager.getProfession()) { // getProfession
case Villagers.FARMER:
return FARMER; // applejack
case 1:
case Villagers.LIBRARIAN:
return LIBRARIAN; // twilight sparkle
case 2:
case Villagers.PRIEST:
return PRIEST; // fluttershy
case 3:
case Villagers.BLACKSMITH:
return SMITH; // rarity
case 4:
case Villagers.BUTCHER:
return BUTCHER; // rainbow dash
case 5:
case Villagers.GENERIC:
default:
return GENERIC; // pinkie pie
}
}
@Override
protected void rotateCorpse(EntityZombieVillager villager, float p_77043_2_, float p_77043_3_, float partialTicks) {
protected void applyRotations(EntityZombieVillager villager, float p_77043_2_, float p_77043_3_, float partialTicks) {
if (villager.isConverting()) {
p_77043_3_ += (float) (Math.cos(villager.ticksExisted * 3.25D) * Math.PI * 0.25D);
}
super.rotateCorpse(villager, p_77043_2_, p_77043_3_, partialTicks);
super.applyRotations(villager, p_77043_2_, p_77043_3_, partialTicks);
}
}

View file

@ -0,0 +1,12 @@
package com.minelittlepony.util;
public interface Villagers {
int FARMER = 0;
int LIBRARIAN = 1;
int PRIEST = 2;
int BLACKSMITH = 3;
int BUTCHER = 4;
int GENERIC = 5;
}