mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
57 lines
2.8 KiB
Diff
57 lines
2.8 KiB
Diff
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
|
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
|
@@ -134,6 +134,7 @@
|
|
}
|
|
|
|
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
|
+ net.minecraftforge.common.ForgeHooks.onPlayerAttack(this, p_70097_1_, p_70097_2_);
|
|
return false;
|
|
}
|
|
|
|
@@ -457,6 +458,11 @@
|
|
}
|
|
|
|
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
|
|
+ net.minecraftforge.event.entity.PlaySoundAtEntityEvent event = net.minecraftforge.event.ForgeEventFactory.onPlaySoundAtEntity(this, p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_);
|
|
+ if (event.isCanceled() || event.getSound() == null) return;
|
|
+ p_184185_1_ = event.getSound();
|
|
+ p_184185_2_ = event.getVolume();
|
|
+ p_184185_3_ = event.getPitch();
|
|
this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
|
|
}
|
|
|
|
@@ -595,6 +601,7 @@
|
|
boolean flag2 = this.func_223110_ee();
|
|
this.field_239203_ch_ = !this.field_71075_bZ.field_75100_b && !this.func_203007_ba() && this.func_213298_c(Pose.CROUCHING) && (this.func_225608_bj_() || !this.func_70608_bn() && !this.func_213298_c(Pose.STANDING));
|
|
this.field_71158_b.func_225607_a_(this.func_228354_I_());
|
|
+ net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b);
|
|
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
|
|
if (this.func_184587_cr() && !this.func_184218_aH()) {
|
|
this.field_71158_b.field_78902_a *= 0.2F;
|
|
@@ -667,7 +674,7 @@
|
|
|
|
if (this.field_71158_b.field_78901_c && !flag7 && !flag && !this.field_71075_bZ.field_75100_b && !this.func_184218_aH() && !this.func_70617_f_()) {
|
|
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
|
- if (itemstack.func_77973_b() == Items.field_185160_cR && ElytraItem.func_185069_d(itemstack) && this.func_226566_ei_()) {
|
|
+ if (itemstack.canElytraFly(this) && this.func_226566_ei_()) {
|
|
this.field_71174_a.func_147297_a(new CEntityActionPacket(this, CEntityActionPacket.Action.START_FALL_FLYING));
|
|
}
|
|
}
|
|
@@ -975,4 +982,16 @@
|
|
return super.func_241843_o(p_241843_1_);
|
|
}
|
|
}
|
|
+
|
|
+ public void updateSyncFields(ClientPlayerEntity old) {
|
|
+ this.field_175172_bI = old.field_175172_bI;
|
|
+ this.field_175166_bJ = old.field_175166_bJ;
|
|
+ this.field_175167_bK = old.field_175167_bK;
|
|
+ this.field_175164_bL = old.field_175164_bL;
|
|
+ this.field_175165_bM = old.field_175165_bM;
|
|
+ this.field_184841_cd = old.field_184841_cd;
|
|
+ this.field_228351_cj_ = old.field_228351_cj_;
|
|
+ this.field_175171_bO = old.field_175171_bO;
|
|
+ this.field_175168_bP = old.field_175168_bP;
|
|
+ }
|
|
}
|