1.20.2-pre2

This commit is contained in:
LexManos committed 2023-09-11 12:47:19 -07:00
1 parent 9291b865c7
commit 4786fa6f89
15 files changed
+91 -87

No files matched your search

+2 -2
View File
@@ -43,10 +43,10 @@ ext {
]
}
MAPPING_CHANNEL = 'official'
MC_VERSION = '1.20.2-pre1'
MC_VERSION = '1.20.2-pre2'
MAPPING_VERSION = MC_VERSION
MC_NEXT_VERSION = '1.21'
MCP_VERSION = '20230906.154413'
MCP_VERSION = '20230911.115402'
SNAPSHOT = false
SPI_VERSION = '7.0.1'
@@ -130,7 +130,7 @@
return new FullTextSearchTree<>((p_210797_) -> {
return p_210797_.m_41651_((Player)null, TooltipFlag.Default.f_256752_.m_257777_()).stream().map((p_231455_) -> {
return ChatFormatting.m_126649_(p_231455_.getString()).trim();
@@ -813,14 +_,18 @@
@@ -813,7 +_,8 @@
return Stream.of(BuiltInRegistries.f_257033_.m_7981_(p_91317_.m_41720_()));
}, p_231451_);
});
@@ -140,6 +140,9 @@
return new IdSearchTree<>((p_231353_) -> {
return p_231353_.m_204131_().map(TagKey::f_203868_);
}, p_231430_);
@@ -833,9 +_,12 @@
});
}, p_301514_);
});
- CreativeModeTabs.m_258007_().m_257882_((p_255439_) -> {
- this.m_231374_(SearchRegistry.f_119941_, p_255439_);
@@ -153,7 +156,7 @@
});
}
@@ -1003,10 +_,6 @@
@@ -1018,10 +_,6 @@
f_90982_.error("setScreen called from non-game thread");
}
@@ -164,7 +167,7 @@
if (p_91153_ == null && this.f_91073_ == null) {
p_91153_ = new TitleScreen();
} else if (p_91153_ == null && this.f_91074_.m_21224_()) {
@@ -1017,6 +_,19 @@
@@ -1032,6 +_,19 @@
}
}
@@ -184,7 +187,7 @@
this.f_91080_ = p_91153_;
if (this.f_91080_ != null) {
this.f_91080_.m_274333_();
@@ -1163,9 +_,12 @@
@@ -1178,9 +_,12 @@
RenderSystem.enableCull();
this.f_91026_.m_7238_();
if (!this.f_91079_) {
@@ -197,7 +200,7 @@
}
if (this.f_91056_ != null) {
@@ -1286,10 +_,12 @@
@@ -1301,10 +_,12 @@
this.f_90990_.m_85378_((double)i);
if (this.f_91080_ != null) {
this.f_91080_.m_6574_(this, this.f_90990_.m_85445_(), this.f_90990_.m_85446_());
@@ -210,7 +213,7 @@
this.f_91063_.m_109097_(this.f_90990_.m_85441_(), this.f_90990_.m_85442_());
this.f_91067_.m_91599_();
}
@@ -1563,6 +_,7 @@
@@ -1578,6 +_,7 @@
}
public void m_91395_() {
@@ -218,7 +221,7 @@
this.f_91019_ = false;
}
@@ -1592,10 +_,18 @@
@@ -1607,10 +_,18 @@
if (p_91387_ && this.f_91077_ != null && this.f_91077_.m_6662_() == HitResult.Type.BLOCK) {
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
BlockPos blockpos = blockhitresult.m_82425_();
@@ -240,7 +243,7 @@
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
}
}
@@ -1624,6 +_,8 @@
@@ -1639,6 +_,8 @@
return false;
} else {
boolean flag = false;
@@ -249,7 +252,7 @@
switch (this.f_91077_.m_6662_()) {
case ENTITY:
this.f_91072_.m_105223_(this.f_91074_, ((EntityHitResult)this.f_91077_).m_82443_());
@@ -1631,7 +_,7 @@
@@ -1646,7 +_,7 @@
case BLOCK:
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
BlockPos blockpos = blockhitresult.m_82425_();
@@ -258,7 +261,7 @@
this.f_91072_.m_105269_(blockpos, blockhitresult.m_82434_());
if (this.f_91073_.m_8055_(blockpos).m_60795_()) {
flag = true;
@@ -1644,8 +_,10 @@
@@ -1659,8 +_,10 @@
}
this.f_91074_.m_36334_();
@@ -269,7 +272,7 @@
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
return flag;
}
@@ -1661,6 +_,11 @@
@@ -1676,6 +_,11 @@
}
for(InteractionHand interactionhand : InteractionHand.values()) {
@@ -281,7 +284,7 @@
ItemStack itemstack = this.f_91074_.m_21120_(interactionhand);
if (!itemstack.m_246617_(this.f_91073_.m_246046_())) {
return;
@@ -1681,7 +_,7 @@
@@ -1696,7 +_,7 @@
}
if (interactionresult.m_19077_()) {
@@ -290,7 +293,7 @@
this.f_91074_.m_6674_(interactionhand);
}
@@ -1693,7 +_,7 @@
@@ -1708,7 +_,7 @@
int i = itemstack.m_41613_();
InteractionResult interactionresult1 = this.f_91072_.m_233732_(this.f_91074_, interactionhand, blockhitresult);
if (interactionresult1.m_19077_()) {
@@ -299,7 +302,7 @@
this.f_91074_.m_6674_(interactionhand);
if (!itemstack.m_41619_() && (itemstack.m_41613_() != i || this.f_91072_.m_105290_())) {
this.f_91063_.f_109055_.m_109320_(interactionhand);
@@ -1709,6 +_,9 @@
@@ -1724,6 +_,9 @@
}
}
@@ -309,7 +312,7 @@
if (!itemstack.m_41619_()) {
InteractionResult interactionresult2 = this.f_91072_.m_233721_(this.f_91074_, interactionhand);
if (interactionresult2.m_19077_()) {
@@ -1735,6 +_,8 @@
@@ -1750,6 +_,8 @@
--this.f_91011_;
}
@@ -318,7 +321,7 @@
this.f_91026_.m_6180_("gui");
this.f_240378_.m_240688_();
this.f_91065_.m_193832_(this.f_91012_);
@@ -1823,6 +_,7 @@
@@ -1838,6 +_,7 @@
this.f_91005_.m_120596_();
@@ -326,7 +329,7 @@
try {
this.f_91073_.m_104726_(() -> {
return true;
@@ -1838,6 +_,7 @@
@@ -1853,6 +_,7 @@
throw new ReportedException(crashreport);
}
@@ -334,7 +337,7 @@
}
this.f_91026_.m_6182_("animateTick");
@@ -1857,6 +_,8 @@
@@ -1872,6 +_,8 @@
this.f_91026_.m_6182_("keyboard");
this.f_91068_.m_90931_();
this.f_91026_.m_7238_();
@@ -343,7 +346,7 @@
}
private boolean m_91278_() {
@@ -2053,6 +_,7 @@
@@ -2068,6 +_,7 @@
}
public void m_91156_(ClientLevel p_91157_) {
@@ -351,7 +354,7 @@
ProgressScreen progressscreen = new ProgressScreen(true);
progressscreen.m_6309_(Component.m_237115_("connect.joining"));
this.m_91362_(progressscreen);
@@ -2086,10 +_,12 @@
@@ -2101,10 +_,12 @@
IntegratedServer integratedserver = this.f_91007_;
this.f_91007_ = null;
this.f_91063_.m_109150_();
@@ -364,7 +367,7 @@
if (integratedserver != null) {
this.f_91026_.m_6180_("waitForServer");
@@ -2103,6 +_,7 @@
@@ -2118,6 +_,7 @@
this.f_243981_.m_246151_();
this.f_91065_.m_93089_();
this.f_91010_ = false;
@@ -372,7 +375,7 @@
}
this.f_91073_ = null;
@@ -2227,6 +_,7 @@
@@ -2242,6 +_,7 @@
private void m_91280_() {
if (this.f_91077_ != null && this.f_91077_.m_6662_() != HitResult.Type.MISS) {
@@ -380,7 +383,7 @@
boolean flag = this.f_91074_.m_150110_().f_35937_;
BlockEntity blockentity = null;
HitResult.Type hitresult$type = this.f_91077_.m_6662_();
@@ -2239,10 +_,7 @@
@@ -2254,10 +_,7 @@
}
Block block = blockstate.m_60734_();
@@ -392,7 +395,7 @@
if (flag && Screen.m_96637_() && blockstate.m_155947_()) {
blockentity = this.f_91073_.m_7702_(blockpos);
@@ -2253,7 +_,7 @@
@@ -2268,7 +_,7 @@
}
Entity entity = ((EntityHitResult)this.f_91077_).m_82443_();
@@ -401,7 +404,7 @@
if (itemstack == null) {
return;
}
@@ -2788,6 +_,19 @@
@@ -2804,6 +_,19 @@
public void m_91312_(int p_91313_) {
this.f_91051_.m_119410_(p_91313_);
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screens/ChatScreen.java
+++ b/net/minecraft/client/gui/screens/ChatScreen.java
@@ -224,7 +_,7 @@
@@ -225,7 +_,7 @@
this.f_96541_.f_91074_.f_108617_.m_246175_(p_242400_);
}
@@ -58,7 +58,7 @@
private void m_169380_(long p_169381_, boolean p_169382_) {
this.f_169377_ = Util.m_137550_() + p_169381_;
if (p_169382_) {
@@ -628,5 +_,13 @@
@@ -632,5 +_,13 @@
this.f_169421_ = p_169425_;
this.f_169422_ = p_169426_;
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
+++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
@@ -106,7 +_,7 @@
@@ -107,7 +_,7 @@
this.m_5674_();
this.f_100279_.clear();
@@ -9,7 +9,7 @@
this.f_100279_.add(new RecipeBookTabButton(recipebookcategories));
}
@@ -309,7 +_,7 @@
@@ -296,7 +_,7 @@
}
if (itemstack != null && this.f_100272_.f_91080_ != null) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java
+++ b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java
@@ -141,6 +_,7 @@
@@ -156,6 +_,7 @@
public void m_7026_(Component p_104543_) {
if (this.f_243717_ != null && this.f_243717_.m_295074_()) {
this.f_104519_.m_91152_(new DisconnectedRealmsScreen(this.f_104520_, CommonComponents.f_130661_, p_104543_));
@@ -8,7 +8,7 @@
} else {
this.f_104519_.m_91152_(new DisconnectedScreen(this.f_104520_, CommonComponents.f_130661_, p_104543_));
}
@@ -163,6 +_,7 @@
@@ -178,6 +_,7 @@
}
public void m_7254_(ClientboundCustomQueryPacket p_104545_) {
@@ -33,18 +33,18 @@
p_104640_.m_8119_();
this.m_46473_().m_7238_();
@@ -328,8 +_,10 @@
@@ -320,8 +_,10 @@
}
private void m_104739_(int p_104740_, Entity p_104741_) {
public void m_104739_(Entity p_104741_) {
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityJoinLevelEvent(p_104741_, this))) return;
this.m_171642_(p_104740_, Entity.RemovalReason.DISCARDED);
this.m_171642_(p_104741_.m_19879_(), Entity.RemovalReason.DISCARDED);
this.f_171631_.m_157653_(p_104741_);
+ p_104741_.onAddedToWorld();
}
public void m_171642_(int p_171643_, Entity.RemovalReason p_171644_) {
@@ -456,6 +_,12 @@
@@ -448,6 +_,12 @@
}
public void m_262808_(@Nullable Player p_263381_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_) {
@@ -57,7 +57,7 @@
if (p_263381_ == this.f_104565_.f_91074_) {
this.m_233602_(p_263372_, p_263404_, p_263365_, p_263335_.m_203334_(), p_263417_, p_263416_, p_263349_, false, p_263408_);
}
@@ -463,6 +_,12 @@
@@ -455,6 +_,12 @@
}
public void m_213890_(@Nullable Player p_263514_, Entity p_263536_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_) {
@@ -70,7 +70,7 @@
if (p_263514_ == this.f_104565_.f_91074_) {
this.f_104565_.m_91106_().m_120367_(new EntityBoundSoundInstance(p_263518_.m_203334_(), p_263487_, p_263538_, p_263524_, p_263536_, p_263509_));
}
@@ -900,6 +_,7 @@
@@ -892,6 +_,7 @@
}
public void m_104851_(Difficulty p_104852_) {
@@ -78,7 +78,7 @@
this.f_104840_ = p_104852_;
}
@@ -937,14 +_,46 @@
@@ -929,14 +_,46 @@
ClientLevel.this.f_104566_.add((AbstractClientPlayer)p_171712_);
}
@@ -5,20 +5,20 @@
this.f_291812_.f_91064_.m_113434_();
this.f_291812_.f_91074_.m_172530_();
+ net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(this.f_291812_.f_91072_, this.f_291812_.f_91074_, this.f_291812_.m_91403_().f_290549_);
int i = p_105030_.f_132360_();
this.f_291812_.f_91074_.m_20234_(i);
this.f_104889_.m_104630_(i, this.f_291812_.f_91074_);
@@ -1026,7 +_,9 @@
this.f_291812_.f_91074_.m_20234_(p_105030_.f_132360_());
this.f_104889_.m_104739_(this.f_291812_.f_91074_);
this.f_291812_.f_91074_.f_108618_ = new KeyboardInput(this.f_291812_.f_91066_);
@@ -1017,7 +_,9 @@
localplayer1.m_21204_().m_22159_(localplayer.m_21204_());
}
+ localplayer1.updateSyncFields(localplayer); // Forge: fix MC-10657
localplayer1.m_172530_();
+ net.minecraftforge.client.ForgeHooksClient.firePlayerRespawn(this.f_291812_.f_91072_, localplayer, localplayer1, localplayer1.f_108617_.f_290549_);
this.f_104889_.m_104630_(i, localplayer1);
this.f_104889_.m_104739_(localplayer1);
localplayer1.m_146922_(-180.0F);
localplayer1.f_108618_ = new KeyboardInput(this.f_291812_.f_91066_);
@@ -1135,10 +_,7 @@
@@ -1126,10 +_,7 @@
PacketUtils.m_131363_(p_104976_, this, this.f_291812_);
BlockPos blockpos = p_104976_.m_131704_();
this.f_291812_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_205557_) -> {
@@ -30,7 +30,7 @@
if (p_205557_ instanceof CommandBlockEntity && this.f_291812_.f_91080_ instanceof CommandBlockEditScreen) {
((CommandBlockEditScreen)this.f_291812_.f_91080_).m_98398_();
@@ -1286,7 +_,9 @@
@@ -1277,7 +_,9 @@
public void m_7443_(ClientboundCommandsPacket p_104990_) {
PacketUtils.m_131363_(p_104990_, this, this.f_291812_);
@@ -41,15 +41,15 @@
}
public void m_7183_(ClientboundStopSoundPacket p_105116_) {
@@ -1304,6 +_,7 @@
this.f_104900_.m_44024_(p_105132_.m_133644_());
@@ -1296,6 +_,7 @@
ClientRecipeBook clientrecipebook = this.f_291812_.f_91074_.m_108631_();
clientrecipebook.m_266394_(this.f_104900_.m_44051_(), this.f_291812_.f_91073_.m_9598_());
this.f_291812_.m_231374_(SearchRegistry.f_301428_, clientrecipebook.m_90639_());
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(this.f_104900_);
}
public void m_7244_(ClientboundPlayerLookAtPacket p_105054_) {
@@ -1402,7 +_,8 @@
@@ -1394,7 +_,8 @@
Blocks.m_50758_();
}
@@ -59,7 +59,7 @@
}
public void m_142234_(ClientboundPlayerCombatEndPacket p_171771_) {
@@ -2095,6 +_,8 @@
@@ -2087,6 +_,8 @@
}
public void m_246175_(String p_249888_) {
@@ -68,7 +68,7 @@
Instant instant = Instant.now();
long i = Crypt.SaltSupplier.m_216113_();
LastSeenMessagesTracker.Update lastseenmessagestracker$update = this.f_244346_.m_246442_();
@@ -2103,6 +_,7 @@
@@ -2095,6 +_,7 @@
}
public void m_246623_(String p_250092_) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/player/RemotePlayer.java
+++ b/net/minecraft/client/player/RemotePlayer.java
@@ -31,6 +_,7 @@
@@ -32,6 +_,7 @@
}
public boolean m_6469_(DamageSource p_108772_, float p_108773_) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/data/Main.java
+++ b/net/minecraft/data/Main.java
@@ -67,8 +_,15 @@
@@ -68,8 +_,15 @@
OptionSpec<Void> optionspec6 = optionparser.accepts("all", "Include all generators");
OptionSpec<String> optionspec7 = optionparser.accepts("output", "Output folder").withRequiredArg().defaultsTo("generated");
OptionSpec<String> optionspec8 = optionparser.accepts("input", "Input folder").withRequiredArg();
@@ -17,7 +17,7 @@
Path path = Paths.get(optionspec7.value(optionset));
boolean flag = optionset.has(optionspec6);
boolean flag1 = flag || optionset.has(optionspec2);
@@ -76,10 +_,14 @@
@@ -77,10 +_,14 @@
boolean flag3 = flag || optionset.has(optionspec3);
boolean flag4 = flag || optionset.has(optionspec4);
boolean flag5 = flag || optionset.has(optionspec5);
@@ -1,11 +1,11 @@
--- a/net/minecraft/network/ConnectionProtocol.java
+++ b/net/minecraft/network/ConnectionProtocol.java
@@ -212,11 +_,232 @@
@@ -211,11 +_,231 @@
import org.slf4j.Logger;
public enum ConnectionProtocol {
- HANDSHAKING("handshake", m_129600_().m_129625_(PacketFlow.CLIENTBOUND, new ConnectionProtocol.PacketSet()).m_129625_(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<ServerHandshakePacketListener>()).m_178330_(ClientIntentionPacket.class, ClientIntentionPacket::new))),
- PLAY("play", m_129600_().m_129625_(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientGamePacketListener>()).m_264543_(ClientboundBundlePacket.class, ClientboundBundlePacket::new).m_178330_(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new).m_178330_(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new).m_178330_(ClientboundAddPlayerPacket.class, ClientboundAddPlayerPacket::new).m_178330_(ClientboundAnimatePacket.class, ClientboundAnimatePacket::new).m_178330_(ClientboundAwardStatsPacket.class, ClientboundAwardStatsPacket::new).m_178330_(ClientboundBlockChangedAckPacket.class, ClientboundBlockChangedAckPacket::new).m_178330_(ClientboundBlockDestructionPacket.class, ClientboundBlockDestructionPacket::new).m_178330_(ClientboundBlockEntityDataPacket.class, ClientboundBlockEntityDataPacket::new).m_178330_(ClientboundBlockEventPacket.class, ClientboundBlockEventPacket::new).m_178330_(ClientboundBlockUpdatePacket.class, ClientboundBlockUpdatePacket::new).m_178330_(ClientboundBossEventPacket.class, ClientboundBossEventPacket::new).m_178330_(ClientboundChangeDifficultyPacket.class, ClientboundChangeDifficultyPacket::new).m_178330_(ClientboundChunkBatchFinishedPacket.class, ClientboundChunkBatchFinishedPacket::new).m_178330_(ClientboundChunkBatchStartPacket.class, ClientboundChunkBatchStartPacket::new).m_178330_(ClientboundChunksBiomesPacket.class, ClientboundChunksBiomesPacket::new).m_178330_(ClientboundClearTitlesPacket.class, ClientboundClearTitlesPacket::new).m_178330_(ClientboundCommandSuggestionsPacket.class, ClientboundCommandSuggestionsPacket::new).m_178330_(ClientboundCommandsPacket.class, ClientboundCommandsPacket::new).m_178330_(ClientboundContainerClosePacket.class, ClientboundContainerClosePacket::new).m_178330_(ClientboundContainerSetContentPacket.class, ClientboundContainerSetContentPacket::new).m_178330_(ClientboundContainerSetDataPacket.class, ClientboundContainerSetDataPacket::new).m_178330_(ClientboundContainerSetSlotPacket.class, ClientboundContainerSetSlotPacket::new).m_178330_(ClientboundCooldownPacket.class, ClientboundCooldownPacket::new).m_178330_(ClientboundCustomChatCompletionsPacket.class, ClientboundCustomChatCompletionsPacket::new).m_178330_(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).m_178330_(ClientboundDamageEventPacket.class, ClientboundDamageEventPacket::new).m_178330_(ClientboundDeleteChatPacket.class, ClientboundDeleteChatPacket::new).m_178330_(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).m_178330_(ClientboundDisguisedChatPacket.class, ClientboundDisguisedChatPacket::new).m_178330_(ClientboundEntityEventPacket.class, ClientboundEntityEventPacket::new).m_178330_(ClientboundExplodePacket.class, ClientboundExplodePacket::new).m_178330_(ClientboundForgetLevelChunkPacket.class, ClientboundForgetLevelChunkPacket::new).m_178330_(ClientboundGameEventPacket.class, ClientboundGameEventPacket::new).m_178330_(ClientboundHorseScreenOpenPacket.class, ClientboundHorseScreenOpenPacket::new).m_178330_(ClientboundHurtAnimationPacket.class, ClientboundHurtAnimationPacket::new).m_178330_(ClientboundInitializeBorderPacket.class, ClientboundInitializeBorderPacket::new).m_178330_(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).m_178330_(ClientboundLevelChunkWithLightPacket.class, ClientboundLevelChunkWithLightPacket::new).m_178330_(ClientboundLevelEventPacket.class, ClientboundLevelEventPacket::new).m_178330_(ClientboundLevelParticlesPacket.class, ClientboundLevelParticlesPacket::new).m_178330_(ClientboundLightUpdatePacket.class, ClientboundLightUpdatePacket::new).m_178330_(ClientboundLoginPacket.class, ClientboundLoginPacket::new).m_178330_(ClientboundMapItemDataPacket.class, ClientboundMapItemDataPacket::new).m_178330_(ClientboundMerchantOffersPacket.class, ClientboundMerchantOffersPacket::new).m_178330_(ClientboundMoveEntityPacket.Pos.class, ClientboundMoveEntityPacket.Pos::m_179000_).m_178330_(ClientboundMoveEntityPacket.PosRot.class, ClientboundMoveEntityPacket.PosRot::m_179002_).m_178330_(ClientboundMoveEntityPacket.Rot.class, ClientboundMoveEntityPacket.Rot::m_179004_).m_178330_(ClientboundMoveVehiclePacket.class, ClientboundMoveVehiclePacket::new).m_178330_(ClientboundOpenBookPacket.class, ClientboundOpenBookPacket::new).m_178330_(ClientboundOpenScreenPacket.class, ClientboundOpenScreenPacket::new).m_178330_(ClientboundOpenSignEditorPacket.class, ClientboundOpenSignEditorPacket::new).m_178330_(ClientboundPingPacket.class, ClientboundPingPacket::new).m_178330_(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new).m_178330_(ClientboundPlaceGhostRecipePacket.class, ClientboundPlaceGhostRecipePacket::new).m_178330_(ClientboundPlayerAbilitiesPacket.class, ClientboundPlayerAbilitiesPacket::new).m_178330_(ClientboundPlayerChatPacket.class, ClientboundPlayerChatPacket::new).m_178330_(ClientboundPlayerCombatEndPacket.class, ClientboundPlayerCombatEndPa Line truncated
- PLAY("play", m_129600_().m_129625_(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientGamePacketListener>()).m_264543_(ClientboundBundlePacket.class, ClientboundBundlePacket::new).m_178330_(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new).m_178330_(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new).m_178330_(ClientboundAnimatePacket.class, ClientboundAnimatePacket::new).m_178330_(ClientboundAwardStatsPacket.class, ClientboundAwardStatsPacket::new).m_178330_(ClientboundBlockChangedAckPacket.class, ClientboundBlockChangedAckPacket::new).m_178330_(ClientboundBlockDestructionPacket.class, ClientboundBlockDestructionPacket::new).m_178330_(ClientboundBlockEntityDataPacket.class, ClientboundBlockEntityDataPacket::new).m_178330_(ClientboundBlockEventPacket.class, ClientboundBlockEventPacket::new).m_178330_(ClientboundBlockUpdatePacket.class, ClientboundBlockUpdatePacket::new).m_178330_(ClientboundBossEventPacket.class, ClientboundBossEventPacket::new).m_178330_(ClientboundChangeDifficultyPacket.class, ClientboundChangeDifficultyPacket::new).m_178330_(ClientboundChunkBatchFinishedPacket.class, ClientboundChunkBatchFinishedPacket::new).m_178330_(ClientboundChunkBatchStartPacket.class, ClientboundChunkBatchStartPacket::new).m_178330_(ClientboundChunksBiomesPacket.class, ClientboundChunksBiomesPacket::new).m_178330_(ClientboundClearTitlesPacket.class, ClientboundClearTitlesPacket::new).m_178330_(ClientboundCommandSuggestionsPacket.class, ClientboundCommandSuggestionsPacket::new).m_178330_(ClientboundCommandsPacket.class, ClientboundCommandsPacket::new).m_178330_(ClientboundContainerClosePacket.class, ClientboundContainerClosePacket::new).m_178330_(ClientboundContainerSetContentPacket.class, ClientboundContainerSetContentPacket::new).m_178330_(ClientboundContainerSetDataPacket.class, ClientboundContainerSetDataPacket::new).m_178330_(ClientboundContainerSetSlotPacket.class, ClientboundContainerSetSlotPacket::new).m_178330_(ClientboundCooldownPacket.class, ClientboundCooldownPacket::new).m_178330_(ClientboundCustomChatCompletionsPacket.class, ClientboundCustomChatCompletionsPacket::new).m_178330_(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).m_178330_(ClientboundDamageEventPacket.class, ClientboundDamageEventPacket::new).m_178330_(ClientboundDeleteChatPacket.class, ClientboundDeleteChatPacket::new).m_178330_(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).m_178330_(ClientboundDisguisedChatPacket.class, ClientboundDisguisedChatPacket::new).m_178330_(ClientboundEntityEventPacket.class, ClientboundEntityEventPacket::new).m_178330_(ClientboundExplodePacket.class, ClientboundExplodePacket::new).m_178330_(ClientboundForgetLevelChunkPacket.class, ClientboundForgetLevelChunkPacket::new).m_178330_(ClientboundGameEventPacket.class, ClientboundGameEventPacket::new).m_178330_(ClientboundHorseScreenOpenPacket.class, ClientboundHorseScreenOpenPacket::new).m_178330_(ClientboundHurtAnimationPacket.class, ClientboundHurtAnimationPacket::new).m_178330_(ClientboundInitializeBorderPacket.class, ClientboundInitializeBorderPacket::new).m_178330_(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).m_178330_(ClientboundLevelChunkWithLightPacket.class, ClientboundLevelChunkWithLightPacket::new).m_178330_(ClientboundLevelEventPacket.class, ClientboundLevelEventPacket::new).m_178330_(ClientboundLevelParticlesPacket.class, ClientboundLevelParticlesPacket::new).m_178330_(ClientboundLightUpdatePacket.class, ClientboundLightUpdatePacket::new).m_178330_(ClientboundLoginPacket.class, ClientboundLoginPacket::new).m_178330_(ClientboundMapItemDataPacket.class, ClientboundMapItemDataPacket::new).m_178330_(ClientboundMerchantOffersPacket.class, ClientboundMerchantOffersPacket::new).m_178330_(ClientboundMoveEntityPacket.Pos.class, ClientboundMoveEntityPacket.Pos::m_179000_).m_178330_(ClientboundMoveEntityPacket.PosRot.class, ClientboundMoveEntityPacket.PosRot::m_179002_).m_178330_(ClientboundMoveEntityPacket.Rot.class, ClientboundMoveEntityPacket.Rot::m_179004_).m_178330_(ClientboundMoveVehiclePacket.class, ClientboundMoveVehiclePacket::new).m_178330_(ClientboundOpenBookPacket.class, ClientboundOpenBookPacket::new).m_178330_(ClientboundOpenScreenPacket.class, ClientboundOpenScreenPacket::new).m_178330_(ClientboundOpenSignEditorPacket.class, ClientboundOpenSignEditorPacket::new).m_178330_(ClientboundPingPacket.class, ClientboundPingPacket::new).m_178330_(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new).m_178330_(ClientboundPlaceGhostRecipePacket.class, ClientboundPlaceGhostRecipePacket::new).m_178330_(ClientboundPlayerAbilitiesPacket.class, ClientboundPlayerAbilitiesPacket::new).m_178330_(ClientboundPlayerChatPacket.class, ClientboundPlayerChatPacket::new).m_178330_(ClientboundPlayerCombatEndPacket.class, ClientboundPlayerCombatEndPacket::new).m_178330_(ClientboundPlayerCombatEnterPacket.class, ClientboundPla Line truncated
- STATUS("status", m_129600_().m_129625_(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<ServerStatusPacketListener>()).m_178330_(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new).m_178330_(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new)).m_129625_(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientStatusPacketListener>()).m_178330_(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new).m_178330_(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new))),
- LOGIN("login", m_129600_().m_129625_(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientLoginPacketListener>()).m_178330_(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new).m_178330_(ClientboundHelloPacket.class, ClientboundHelloPacket::new).m_178330_(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new).m_178330_(ClientboundLoginCompressionPacket.class, ClientboundLoginCompressionPacket::new).m_178330_(ClientboundCustomQueryPacket.class, ClientboundCustomQueryPacket::new)).m_129625_(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<ServerLoginPacketListener>()).m_178330_(ServerboundHelloPacket.class, ServerboundHelloPacket::new).m_178330_(ServerboundKeyPacket.class, ServerboundKeyPacket::new).m_178330_(ServerboundCustomQueryAnswerPacket.class, ServerboundCustomQueryAnswerPacket::m_294367_).m_178330_(ServerboundLoginAcknowledgedPacket.class, ServerboundLoginAcknowledgedPacket::new))),
- CONFIGURATION("configuration", m_129600_().m_129625_(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<net.minecraft.network.protocol.configuration.ClientConfigurationPacketListener>()).m_178330_(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new).m_178330_(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new).m_178330_(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new).m_178330_(ClientboundKeepAlivePacket.class, ClientboundKeepAlivePacket::new).m_178330_(ClientboundPingPacket.class, ClientboundPingPacket::new).m_178330_(ClientboundRegistryDataPacket.class, ClientboundRegistryDataPacket::new).m_178330_(ClientboundResourcePackPacket.class, ClientboundResourcePackPacket::new).m_178330_(ClientboundUpdateEnabledFeaturesPacket.class, ClientboundUpdateEnabledFeaturesPacket::new).m_178330_(ClientboundUpdateTagsPacket.class, ClientboundUpdateTagsPacket::new)).m_129625_(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener>()).m_178330_(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new).m_178330_(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new).m_178330_(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new).m_178330_(ServerboundKeepAlivePacket.class, ServerboundKeepAlivePacket::new).m_178330_(ServerboundPongPacket.class, ServerboundPongPacket::new).m_178330_(ServerboundResourcePackPacket.class, ServerboundResourcePackPacket::new)));
@@ -20,7 +20,6 @@
+ .m_264543_(ClientboundBundlePacket.class, ClientboundBundlePacket::new)
+ .m_178330_(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new)
+ .m_178330_(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new)
+ .m_178330_(ClientboundAddPlayerPacket.class, ClientboundAddPlayerPacket::new)
+ .m_178330_(ClientboundAnimatePacket.class, ClientboundAnimatePacket::new)
+ .m_178330_(ClientboundAwardStatsPacket.class, ClientboundAwardStatsPacket::new)
+ .m_178330_(ClientboundBlockChangedAckPacket.class, ClientboundBlockChangedAckPacket::new)
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -149,7 +_,7 @@
@@ -147,7 +_,7 @@
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
import org.slf4j.Logger;
@@ -9,7 +9,7 @@
private static final Logger f_8907_ = LogUtils.getLogger();
private static final int f_143381_ = 32;
private static final int f_143382_ = 10;
@@ -571,6 +_,7 @@
@@ -569,6 +_,7 @@
public void m_6667_(DamageSource p_9035_) {
this.m_146850_(GameEvent.f_223707_);
@@ -17,7 +17,7 @@
boolean flag = this.m_9236_().m_46469_().m_46207_(GameRules.f_46142_);
if (flag) {
Component component = this.m_21231_().m_19293_();
@@ -717,11 +_,13 @@
@@ -715,11 +_,13 @@
}
@Nullable
@@ -33,7 +33,7 @@
this.m_19877_();
this.m_284548_().m_143261_(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.f_8944_) {
@@ -738,13 +_,14 @@
@@ -736,13 +_,14 @@
PlayerList playerlist = this.f_8924_.m_6846_();
playerlist.m_11289_(this);
serverlevel.m_143261_(this, Entity.RemovalReason.CHANGED_DIMENSION);
@@ -51,7 +51,7 @@
this.m_9006_(p_9180_, BlockPos.m_274446_(portalinfo.f_77676_));
}
@@ -756,6 +_,9 @@
@@ -754,6 +_,9 @@
p_9180_.m_8817_(this);
serverlevel.m_46473_().m_7238_();
this.m_9209_(serverlevel);
@@ -61,7 +61,7 @@
this.f_8906_.m_141995_(new ClientboundPlayerAbilitiesPacket(this.m_150110_()));
playerlist.m_11229_(this, p_9180_);
playerlist.m_11292_(this);
@@ -764,10 +_,12 @@
@@ -762,10 +_,12 @@
this.f_8906_.m_141995_(new ClientboundUpdateMobEffectPacket(this.m_19879_(), mobeffectinstance));
}
@@ -74,7 +74,7 @@
}
return this;
@@ -831,6 +_,9 @@
@@ -829,6 +_,9 @@
}
public Either<Player.BedSleepingProblem, Unit> m_7720_(BlockPos p_9115_) {
@@ -84,7 +84,7 @@
Direction direction = this.m_9236_().m_8055_(p_9115_).m_61143_(HorizontalDirectionalBlock.f_54117_);
if (!this.m_5803_() && this.m_6084_()) {
if (!this.m_9236_().m_6042_().f_63858_()) {
@@ -841,7 +_,7 @@
@@ -839,7 +_,7 @@
return Either.left(Player.BedSleepingProblem.OBSTRUCTED);
} else {
this.m_9158_(this.m_9236_().m_46472_(), p_9115_, this.m_146908_(), false, true);
@@ -93,7 +93,7 @@
return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
} else {
if (!this.m_7500_()) {
@@ -879,6 +_,7 @@
@@ -877,6 +_,7 @@
}
private boolean m_9116_(BlockPos p_9117_, Direction p_9118_) {
@@ -101,7 +101,7 @@
return this.m_9222_(p_9117_) || this.m_9222_(p_9117_.m_121945_(p_9118_.m_122424_()));
}
@@ -960,6 +_,7 @@
@@ -958,6 +_,7 @@
this.f_8906_.m_141995_(new ClientboundOpenScreenPacket(abstractcontainermenu.f_38840_, abstractcontainermenu.m_6772_(), p_9033_.m_5446_()));
this.m_143399_(abstractcontainermenu);
this.f_36096_ = abstractcontainermenu;
@@ -109,7 +109,7 @@
return OptionalInt.of(this.f_8940_);
}
}
@@ -978,6 +_,7 @@
@@ -976,6 +_,7 @@
this.f_8906_.m_141995_(new ClientboundHorseScreenOpenPacket(this.f_8940_, p_9060_.m_6643_(), p_9059_.m_19879_()));
this.f_36096_ = new HorseInventoryMenu(this.f_8940_, this.m_150109_(), p_9060_, p_9059_);
this.m_143399_(this.f_36096_);
@@ -117,7 +117,7 @@
}
public void m_6986_(ItemStack p_9082_, InteractionHand p_9083_) {
@@ -1003,6 +_,7 @@
@@ -1001,6 +_,7 @@
public void m_9230_() {
this.f_36096_.m_6877_(this);
this.f_36095_.m_150414_(this.f_36096_);
@@ -125,7 +125,7 @@
this.f_36096_ = this.f_36095_;
}
@@ -1136,6 +_,15 @@
@@ -1134,6 +_,15 @@
this.m_36362_(p_9016_.m_36331_());
this.m_36364_(p_9016_.m_36332_());
this.m_219749_(p_9016_.m_219759_());
@@ -141,7 +141,7 @@
}
protected void m_142540_(MobEffectInstance p_143393_, @Nullable Entity p_143394_) {
@@ -1216,6 +_,7 @@
@@ -1214,6 +_,7 @@
}
public boolean m_143403_(GameType p_143404_) {
@@ -149,7 +149,7 @@
if (!this.f_8941_.m_143473_(p_143404_)) {
return false;
} else {
@@ -1350,6 +_,8 @@
@@ -1348,6 +_,8 @@
public void m_9213_(@Nullable Entity p_9214_) {
Entity entity = this.m_8954_();
this.f_8926_ = (Entity)(p_9214_ == null ? this : p_9214_);
@@ -158,7 +158,7 @@
if (entity != this.f_8926_) {
Level level = this.f_8926_.m_9236_();
if (level instanceof ServerLevel) {
@@ -1389,7 +_,11 @@
@@ -1387,7 +_,11 @@
@Nullable
public Component m_8957_() {
@@ -171,7 +171,7 @@
}
public void m_6674_(InteractionHand p_9031_) {
@@ -1414,21 +_,23 @@
@@ -1412,21 +_,23 @@
this.m_8127_();
if (p_9000_ == this.m_9236_()) {
this.f_8906_.m_9774_(p_9001_, p_9002_, p_9003_, p_9004_, p_9005_);
@@ -197,7 +197,7 @@
}
}
@@ -1451,6 +_,8 @@
@@ -1449,6 +_,8 @@
}
public void m_9158_(ResourceKey<Level> p_9159_, @Nullable BlockPos p_9160_, float p_9161_, boolean p_9162_, boolean p_9163_) {
@@ -206,7 +206,7 @@
if (p_9160_ != null) {
boolean flag = p_9160_.equals(this.f_8936_) && p_9159_.equals(this.f_8935_);
if (p_9163_ && !flag) {
@@ -1499,6 +_,9 @@
@@ -1493,6 +_,9 @@
if (itementity == null) {
return null;
} else {
@@ -216,7 +216,7 @@
this.m_9236_().m_7967_(itementity);
ItemStack itemstack = itementity.m_32055_();
if (p_9087_) {
@@ -1513,6 +_,75 @@
@@ -1507,6 +_,75 @@
}
}
@@ -292,7 +292,7 @@
public TextFilter m_8967_() {
return this.f_8939_;
}
@@ -1572,11 +_,14 @@
@@ -1566,11 +_,14 @@
public boolean m_182294_(boolean p_182295_) {
Inventory inventory = this.m_150109_();
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
@@ -46,6 +_,8 @@
@@ -45,6 +_,8 @@
if (entity instanceof ServerPlayer) {
ServerPlayer serverplayer = (ServerPlayer)entity;
if (serverplayer.f_8906_.m_6198_() && serverplayer.m_9236_() == this.m_9236_() && !serverplayer.m_5803_()) {
@@ -9,7 +9,7 @@
if (this.f_19796_.m_188501_() < 0.05F && this.m_9236_().m_46469_().m_46207_(GameRules.f_46134_)) {
Endermite endermite = EntityType.f_20567_.m_20615_(this.m_9236_());
if (endermite != null) {
@@ -60,8 +_,10 @@
@@ -59,8 +_,10 @@
entity.m_6021_(this.m_20185_(), this.m_20186_(), this.m_20189_());
}
@@ -21,7 +21,7 @@
}
} else if (entity != null) {
entity.m_6021_(this.m_20185_(), this.m_20186_(), this.m_20189_());
@@ -84,12 +_,12 @@
@@ -83,12 +_,12 @@
}
@Nullable
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/storage/LevelStorageSource.java
+++ b/net/minecraft/world/level/storage/LevelStorageSource.java
@@ -450,6 +_,19 @@
@@ -467,6 +_,19 @@
return LevelStorageSource.this.m_230817_(this.f_230867_, LevelStorageSource.m_245503_(p_248747_, p_251873_, p_249187_, p_249736_));
}
@@ -20,7 +20,7 @@
@Nullable
public WorldDataConfiguration m_247706_() {
this.m_78313_();
@@ -466,6 +_,8 @@
@@ -483,6 +_,8 @@
CompoundTag compoundtag1 = new CompoundTag();
compoundtag1.m_128365_("Data", compoundtag);
@@ -29,7 +29,7 @@
try {
File file2 = File.createTempFile("level", ".dat", file1);
NbtIo.m_128944_(compoundtag1, file2);
@@ -480,6 +_,10 @@
@@ -497,6 +_,10 @@
public Optional<Path> m_182514_() {
return !this.f_78270_.m_13639_() ? Optional.empty() : Optional.of(this.f_230867_.m_230860_());
@@ -21,7 +21,6 @@ import net.minecraft.world.phys.Vec3;
import net.minecraftforge.common.util.LogicalSidedProvider;
import net.minecraftforge.entity.IEntityAdditionalSpawnData;
import net.minecraftforge.event.network.CustomPayloadEvent;
import net.minecraftforge.event.network.CustomPayloadEvent.Context;
/**
* Used to spawn a custom entity without the same restrictions as
@@ -41,6 +40,7 @@ public class SpawnEntity {
private final int velX, velY, velZ;
private final FriendlyByteBuf buf;
@SuppressWarnings("deprecation")
SpawnEntity(Entity e) {
this.entity = e;
this.typeId = BuiltInRegistries.ENTITY_TYPE.getId(e.getType()); //TODO: Codecs
@@ -125,6 +125,7 @@ public class SpawnEntity {
public static void handle(SpawnEntity msg, CustomPayloadEvent.Context ctx) {
ctx.enqueueWork(() -> {
try {
@SuppressWarnings("deprecation")
EntityType<?> type = BuiltInRegistries.ENTITY_TYPE.byId(msg.typeId);
Optional<Level> world = LogicalSidedProvider.CLIENTWORLD.get(ctx.getDirection().getReceptionSide());
Entity e = world.map(w -> type.customClientSpawn(msg, w)).orElse(null);
@@ -142,7 +143,8 @@ public class SpawnEntity {
e.setId(msg.entityId);
e.setUUID(msg.uuid);
world.filter(ClientLevel.class::isInstance).ifPresent(w -> ((ClientLevel) w).putNonPlayerEntity(msg.entityId, e));
if (world.orElse(null) instanceof ClientLevel cworld)
cworld.addEntity(e);
e.lerpMotion(msg.velX / 8000.0, msg.velY / 8000.0, msg.velZ / 8000.0);
if (e instanceof IEntityAdditionalSpawnData entityAdditionalSpawnData)
entityAdditionalSpawnData.readSpawnData(msg.buf);