mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
Fixed villager profession not being set correctly on the client, and fixed custom village texture rendering. Closes #2766.
This commit is contained in:
1 parent
4538062e70
commit
e98cd386e0
2 files changed
+37
-11
No files matched your search
@@ -1,11 +1,25 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
|
||||
@@ -44,7 +44,7 @@
|
||||
case 4:
|
||||
return field_110906_m;
|
||||
default:
|
||||
@@ -31,21 +31,7 @@
|
||||
|
||||
protected ResourceLocation func_110775_a(EntityVillager p_110775_1_)
|
||||
{
|
||||
- switch (p_110775_1_.func_70946_n())
|
||||
- {
|
||||
- case 0:
|
||||
- return field_110904_g;
|
||||
- case 1:
|
||||
- return field_110908_h;
|
||||
- case 2:
|
||||
- return field_110907_k;
|
||||
- case 3:
|
||||
- return field_110905_l;
|
||||
- case 4:
|
||||
- return field_110906_m;
|
||||
- default:
|
||||
- return field_110903_f;
|
||||
+ return p_110775_1_.getProfessionForge().getSkin();
|
||||
}
|
||||
- }
|
||||
+ return p_110775_1_.getProfessionForge().getSkin();
|
||||
}
|
||||
|
||||
protected void func_77041_b(EntityVillager p_77041_1_, float p_77041_2_)
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
public int func_70946_n()
|
||||
@@ -334,6 +347,27 @@
|
||||
@@ -334,6 +347,39 @@
|
||||
return Math.max(((Integer)this.field_70180_af.func_187225_a(field_184752_bw)).intValue() % 5, 0);
|
||||
}
|
||||
|
||||
@@ -87,11 +87,23 @@
|
||||
+ }
|
||||
+ return this.prof;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void func_184206_a(DataParameter<?> key)
|
||||
+ {
|
||||
+ super.func_184206_a(key);
|
||||
+ if(key == PROFESSION_STR)
|
||||
+ {
|
||||
+ String p = this.field_70180_af.func_187225_a(PROFESSION_STR);
|
||||
+ net.minecraft.util.ResourceLocation res = new net.minecraft.util.ResourceLocation(p == null ? "minecraft:farmer" : p);
|
||||
+ this.prof = net.minecraftforge.fml.common.registry.VillagerRegistry.instance().getRegistry().getValue(res);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public boolean func_70941_o()
|
||||
{
|
||||
return this.field_70952_f;
|
||||
@@ -533,15 +567,13 @@
|
||||
@@ -533,15 +579,13 @@
|
||||
|
||||
private void func_175554_cu()
|
||||
{
|
||||
@@ -108,7 +120,7 @@
|
||||
this.field_175562_bw = 1;
|
||||
}
|
||||
|
||||
@@ -552,7 +584,7 @@
|
||||
@@ -552,7 +596,7 @@
|
||||
|
||||
int i = this.field_175563_bv - 1;
|
||||
int j = this.field_175562_bw - 1;
|
||||
@@ -117,7 +129,7 @@
|
||||
|
||||
if (j >= 0 && j < aentityvillager$itradelist1.length)
|
||||
{
|
||||
@@ -647,9 +679,14 @@
|
||||
@@ -647,9 +691,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +145,7 @@
|
||||
textcomponenttranslation.func_150256_b().func_150209_a(this.func_174823_aP());
|
||||
textcomponenttranslation.func_150256_b().func_179989_a(this.func_110124_au().toString());
|
||||
|
||||
@@ -708,7 +745,7 @@
|
||||
@@ -708,7 +757,7 @@
|
||||
public IEntityLivingData func_180482_a(DifficultyInstance p_180482_1_, IEntityLivingData p_180482_2_)
|
||||
{
|
||||
p_180482_2_ = super.func_180482_a(p_180482_1_, p_180482_2_);
|
||||
|
||||
Reference in new issue
Block a user