mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
67 lines
2.8 KiB
Diff
67 lines
2.8 KiB
Diff
--- a/net/minecraft/client/player/LocalPlayer.java
|
|
+++ b/net/minecraft/client/player/LocalPlayer.java
|
|
@@ -139,6 +_,7 @@
|
|
}
|
|
|
|
public boolean m_6469_(DamageSource p_108662_, float p_108663_) {
|
|
+ net.minecraftforge.common.ForgeHooks.onPlayerAttack(this, p_108662_, p_108663_);
|
|
return false;
|
|
}
|
|
|
|
@@ -462,6 +_,11 @@
|
|
}
|
|
|
|
public void m_5496_(SoundEvent p_108651_, float p_108652_, float p_108653_) {
|
|
+ net.minecraftforge.event.entity.PlaySoundAtEntityEvent event = net.minecraftforge.event.ForgeEventFactory.onPlaySoundAtEntity(this, p_108651_, this.m_5720_(), p_108652_, p_108653_);
|
|
+ if (event.isCanceled() || event.getSound() == null) return;
|
|
+ p_108651_ = event.getSound();
|
|
+ p_108652_ = event.getVolume();
|
|
+ p_108653_ = event.getPitch();
|
|
this.f_19853_.m_7785_(this.m_20185_(), this.m_20186_(), this.m_20189_(), p_108651_, this.m_5720_(), p_108652_, p_108653_, false);
|
|
}
|
|
|
|
@@ -617,6 +_,7 @@
|
|
boolean flag2 = this.m_108733_();
|
|
this.f_108601_ = !this.m_150110_().f_35935_ && !this.m_6069_() && this.m_20175_(Pose.CROUCHING) && (this.m_6144_() || !this.m_5803_() && !this.m_20175_(Pose.STANDING));
|
|
this.f_108618_.m_7606_(this.m_108635_());
|
|
+ net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.f_108618_);
|
|
this.f_108619_.m_91301_().m_120586_(this.f_108618_);
|
|
if (this.m_6117_() && !this.m_20159_()) {
|
|
this.f_108618_.f_108566_ *= 0.2F;
|
|
@@ -689,7 +_,7 @@
|
|
|
|
if (this.f_108618_.f_108572_ && !flag7 && !flag && !this.m_150110_().f_35935_ && !this.m_20159_() && !this.m_6147_()) {
|
|
ItemStack itemstack = this.m_6844_(EquipmentSlot.CHEST);
|
|
- if (itemstack.m_150930_(Items.f_42741_) && ElytraItem.m_41140_(itemstack) && this.m_36319_()) {
|
|
+ if (itemstack.canElytraFly(this) && this.m_36319_()) {
|
|
this.f_108617_.m_104955_(new ServerboundPlayerCommandPacket(this, ServerboundPlayerCommandPacket.Action.START_FALL_FLYING));
|
|
}
|
|
}
|
|
@@ -807,6 +_,7 @@
|
|
|
|
public void m_6083_() {
|
|
super.m_6083_();
|
|
+ if (this.m_36342_() && this.m_20159_()) this.f_108618_.f_108573_ = false;
|
|
this.f_108611_ = false;
|
|
if (this.m_20202_() instanceof Boat) {
|
|
Boat boat = (Boat)this.m_20202_();
|
|
@@ -1004,6 +_,18 @@
|
|
} else {
|
|
return super.m_7398_(p_108758_);
|
|
}
|
|
+ }
|
|
+
|
|
+ public void updateSyncFields(LocalPlayer old) {
|
|
+ this.f_108595_ = old.f_108595_;
|
|
+ this.f_108596_ = old.f_108596_;
|
|
+ this.f_108597_ = old.f_108597_;
|
|
+ this.f_108598_ = old.f_108598_;
|
|
+ this.f_108599_ = old.f_108599_;
|
|
+ this.f_108600_ = old.f_108600_;
|
|
+ this.f_108602_ = old.f_108602_;
|
|
+ this.f_108603_ = old.f_108603_;
|
|
+ this.f_108604_ = old.f_108604_;
|
|
}
|
|
|
|
public void m_141945_(ItemStack p_172532_, ItemStack p_172533_, ClickAction p_172534_) {
|