Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired.

Fix up immediate problems.

bump to 28.
This commit is contained in:
cpw 2019-07-19 23:33:15 -04:00
parent eff42f6066
commit 27afdc8a27
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7
82 changed files with 454 additions and 665 deletions

View file

@ -49,8 +49,8 @@ ext {
} }
MAPPING_CHANNEL = 'snapshot' MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20190719-1.14.3' MAPPING_VERSION = '20190719-1.14.3'
MC_VERSION = '1.14.3' MC_VERSION = '1.14.4'
MCP_VERSION = '20190624.152911' MCP_VERSION = '20190719.173545'
} }
project(':mcp') { project(':mcp') {
@ -172,7 +172,7 @@ project(':forge') {
} }
ext { ext {
SPEC_VERSION = '27.0' // This is overwritten by git tag, but here so dev time doesnt explode SPEC_VERSION = '28.0' // This is overwritten by git tag, but here so dev time doesnt explode
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB> // The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// ForgeMC is a unique identifier for every MC version we have supported. // ForgeMC is a unique identifier for every MC version we have supported.
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique. // Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
@ -758,15 +758,6 @@ project(':forge') {
outputs: [ outputs: [
'{PATCHED}': '{PATCHED_SHA}' '{PATCHED}': '{PATCHED_SHA}'
] ]
], [
jar: INSTALLER_TOOLS,
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
args: [
'--task', 'DEOBF_REALMS',
'--map', '{MAPPINGS}',
'--mc', '{MINECRAFT_JAR}',
'--mcp', '{MCP_VERSION}'
]
] ]
] ]
] ]

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/DetectorRailBlock.java --- a/net/minecraft/block/DetectorRailBlock.java
+++ b/net/minecraft/block/DetectorRailBlock.java +++ b/net/minecraft/block/DetectorRailBlock.java
@@ -126,6 +126,8 @@ @@ -128,6 +128,8 @@
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) { public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
if (p_180641_1_.func_177229_b(field_176574_M)) { if (p_180641_1_.func_177229_b(field_176574_M)) {

View file

@ -4,7 +4,7 @@
public BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) { public BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
BlockPos blockpos = p_196448_2_.func_177977_b(); BlockPos blockpos = p_196448_2_.func_177977_b();
BlockState blockstate = p_196448_1_.func_180495_p(blockpos); BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) { - if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
+ if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) { + if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
BlockState blockstate1 = this.func_176223_P(); BlockState blockstate1 = this.func_176223_P();
@ -112,7 +112,7 @@
BlockPos blockpos = p_180655_3_.func_177977_b(); BlockPos blockpos = p_180655_3_.func_177977_b();
BlockState blockstate = p_180655_2_.func_180495_p(blockpos); BlockState blockstate = p_180655_2_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) { - if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_180655_2_, blockpos, Direction.UP)) {
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) { - if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) {
+ if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) { + if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
+ if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) { + if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) {

View file

@ -3,10 +3,10 @@
@@ -124,7 +124,7 @@ @@ -124,7 +124,7 @@
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1); BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1);
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) { if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) {
boolean flag = Block.func_220056_d(blockstate, p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ; boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
- if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) { - if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) {
+ if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) { + if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) {
if (func_208062_a(blockstate.func_196952_d(p_208074_1_, blockpos))) { if (blockstate.func_224756_o(p_208074_1_, blockpos)) {
return RedstoneSide.UP; return RedstoneSide.UP;
} }
@@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@

View file

@ -7,4 +7,4 @@
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading + if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) { if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) {
p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P()); p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P());
} else if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 4) { } else {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/GameSettings.java --- a/net/minecraft/client/GameSettings.java
+++ b/net/minecraft/client/GameSettings.java +++ b/net/minecraft/client/GameSettings.java
@@ -142,7 +142,7 @@ @@ -143,7 +143,7 @@
public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")}; public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")};
public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative"); public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative");
public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative"); public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative");
@ -9,7 +9,7 @@
protected Minecraft field_74317_L; protected Minecraft field_74317_L;
private final File field_74354_ai; private final File field_74354_ai;
public Difficulty field_74318_M = Difficulty.NORMAL; public Difficulty field_74318_M = Difficulty.NORMAL;
@@ -161,6 +161,7 @@ @@ -162,6 +162,7 @@
public String field_74363_ab = "en_us"; public String field_74363_ab = "en_us";
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) { public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
@ -17,7 +17,7 @@
this.field_74317_L = p_i46326_1_; this.field_74317_L = p_i46326_1_;
this.field_74354_ai = new File(p_i46326_2_, "options.txt"); this.field_74354_ai = new File(p_i46326_2_, "options.txt");
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) { if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
@@ -462,7 +463,11 @@ @@ -467,7 +468,11 @@
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
if (s1.equals("key_" + keybinding.func_151464_g())) { if (s1.equals("key_" + keybinding.func_151464_g())) {
@ -30,7 +30,7 @@
} }
} }
@@ -510,6 +515,7 @@ @@ -515,6 +520,7 @@
} }
public void func_74303_b() { public void func_74303_b() {
@ -38,7 +38,7 @@
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) { try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion()); printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this)); printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
@@ -583,7 +589,7 @@ @@ -589,7 +595,7 @@
printwriter.println("glDebugVerbosity:" + this.field_209231_W); printwriter.println("glDebugVerbosity:" + this.field_209231_W);
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
@ -47,7 +47,7 @@
} }
for(SoundCategory soundcategory : SoundCategory.values()) { for(SoundCategory soundcategory : SoundCategory.values()) {
@@ -680,6 +686,25 @@ @@ -686,6 +692,25 @@
} }
} }

View file

@ -51,7 +51,7 @@
this.field_184132_p = new DebugRenderer(this); this.field_184132_p = new DebugRenderer(this);
GLX.setGlfwErrorCallback(this::func_195545_a); GLX.setGlfwErrorCallback(this::func_195545_a);
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) { if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
@@ -542,7 +543,7 @@ @@ -543,7 +544,7 @@
if (SharedConstants.field_206244_b) { if (SharedConstants.field_206244_b) {
this.func_213256_aB(); this.func_213256_aB();
} }
@ -60,7 +60,7 @@
}, false)); }, false));
} }
@@ -557,7 +558,7 @@ @@ -558,7 +559,7 @@
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b())); return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
}); });
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> { SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
@ -69,7 +69,7 @@
}); });
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a(); NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
@@ -646,7 +647,7 @@ @@ -647,7 +648,7 @@
Bootstrap.func_179870_a(p_71377_1_.func_71502_e()); Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
if (p_71377_1_.func_71497_f() != null) { if (p_71377_1_.func_71497_f() != null) {
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f()); Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
@ -78,7 +78,7 @@
} else if (p_71377_1_.func_147149_a(file2)) { } else if (p_71377_1_.func_147149_a(file2)) {
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath()); Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
System.exit(-1); System.exit(-1);
@@ -661,6 +662,7 @@ @@ -662,6 +663,7 @@
return this.field_71474_y.field_211842_aO; return this.field_71474_y.field_211842_aO;
} }
@ -86,7 +86,7 @@
public CompletableFuture<Void> func_213237_g() { public CompletableFuture<Void> func_213237_g() {
if (this.field_213276_aV != null) { if (this.field_213276_aV != null) {
return this.field_213276_aV; return this.field_213276_aV;
@@ -740,16 +742,20 @@ @@ -741,16 +743,20 @@
} }
public void func_147108_a(@Nullable Screen p_147108_1_) { public void func_147108_a(@Nullable Screen p_147108_1_) {
@ -111,7 +111,7 @@
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) { if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
this.field_71474_y.field_74330_P = false; this.field_71474_y.field_74330_P = false;
this.field_71456_v.func_146158_b().func_146231_a(true); this.field_71456_v.func_146158_b().func_146231_a(true);
@@ -874,11 +880,13 @@ @@ -875,11 +881,13 @@
GlStateManager.enableTexture(); GlStateManager.enableTexture();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
if (!this.field_71454_w) { if (!this.field_71454_w) {
@ -125,7 +125,7 @@
} }
this.field_71424_I.func_219897_b(); this.field_71424_I.func_219897_b();
@@ -1146,10 +1154,10 @@ @@ -1147,10 +1155,10 @@
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) { if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
@ -138,7 +138,7 @@
this.field_71439_g.func_184609_a(Hand.MAIN_HAND); this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
} }
} }
@@ -1176,7 +1184,7 @@ @@ -1177,7 +1185,7 @@
case BLOCK: case BLOCK:
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
@ -147,7 +147,7 @@
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b()); this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
break; break;
} }
@@ -1186,6 +1194,7 @@ @@ -1187,6 +1195,7 @@
} }
this.field_71439_g.func_184821_cY(); this.field_71439_g.func_184821_cY();
@ -155,7 +155,7 @@
} }
this.field_71439_g.func_184609_a(Hand.MAIN_HAND); this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
@@ -1235,6 +1244,9 @@ @@ -1236,6 +1245,9 @@
} }
} }
@ -165,7 +165,7 @@
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) { if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) {
this.field_71460_t.field_78516_c.func_187460_a(hand); this.field_71460_t.field_78516_c.func_187460_a(hand);
return; return;
@@ -1254,6 +1266,8 @@ @@ -1255,6 +1267,8 @@
--this.field_71467_ac; --this.field_71467_ac;
} }
@ -174,7 +174,7 @@
this.field_71424_I.func_76320_a("gui"); this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n) { if (!this.field_71445_n) {
this.field_71456_v.func_73831_a(); this.field_71456_v.func_73831_a();
@@ -1372,6 +1386,8 @@ @@ -1373,6 +1387,8 @@
this.field_71424_I.func_219895_b("keyboard"); this.field_71424_I.func_219895_b("keyboard");
this.field_195559_v.func_204870_b(); this.field_195559_v.func_204870_b();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
@ -183,7 +183,7 @@
} }
private void func_184117_aA() { private void func_184117_aA() {
@@ -1526,6 +1542,12 @@ @@ -1527,6 +1543,12 @@
this.func_147108_a(worldloadprogressscreen); this.func_147108_a(worldloadprogressscreen);
while(!this.field_71437_Z.func_71200_ad()) { while(!this.field_71437_Z.func_71200_ad()) {
@ -196,7 +196,7 @@
worldloadprogressscreen.tick(); worldloadprogressscreen.tick();
this.func_195542_b(false); this.func_195542_b(false);
@@ -1546,11 +1568,17 @@ @@ -1547,11 +1569,17 @@
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> { networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> {
})); }));
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN)); networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
@ -215,7 +215,7 @@
WorkingScreen workingscreen = new WorkingScreen(); WorkingScreen workingscreen = new WorkingScreen();
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining")); workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
this.func_213241_c(workingscreen); this.func_213241_c(workingscreen);
@@ -1586,6 +1614,7 @@ @@ -1587,6 +1615,7 @@
NarratorChatListener.field_193643_a.func_193642_b(); NarratorChatListener.field_193643_a.func_193642_b();
this.func_213241_c(p_213231_1_); this.func_213241_c(p_213231_1_);
if (this.field_71441_e != null) { if (this.field_71441_e != null) {
@ -223,7 +223,7 @@
if (integratedserver != null) { if (integratedserver != null) {
while(!integratedserver.func_213201_w()) { while(!integratedserver.func_213201_w()) {
this.func_195542_b(false); this.func_195542_b(false);
@@ -1623,6 +1652,7 @@ @@ -1624,6 +1653,7 @@
} }
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_); TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
@ -231,7 +231,7 @@
} }
public final boolean func_71355_q() { public final boolean func_71355_q() {
@@ -1648,112 +1678,8 @@ @@ -1649,112 +1679,8 @@
private void func_147112_ai() { private void func_147112_ai() {
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) { if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
@ -346,7 +346,7 @@
} }
} }
@@ -1825,6 +1751,7 @@ @@ -1826,6 +1752,7 @@
return field_71432_P; return field_71432_P;
} }
@ -354,7 +354,7 @@
public CompletableFuture<Void> func_213245_w() { public CompletableFuture<Void> func_213245_w() {
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> { return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> {
return p_213240_0_; return p_213240_0_;
@@ -1968,6 +1895,8 @@ @@ -1972,6 +1899,8 @@
} }
public MusicTicker.MusicType func_147109_W() { public MusicTicker.MusicType func_147109_W() {
@ -363,7 +363,7 @@
if (this.field_71462_r instanceof WinGameScreen) { if (this.field_71462_r instanceof WinGameScreen) {
return MusicTicker.MusicType.CREDITS; return MusicTicker.MusicType.CREDITS;
} else if (this.field_71439_g == null) { } else if (this.field_71439_g == null) {
@@ -2124,4 +2053,12 @@ @@ -2128,4 +2057,12 @@
public LoadingGui func_213250_au() { public LoadingGui func_213250_au() {
return this.field_213279_p; return this.field_213279_p;
} }

View file

@ -1,24 +1,17 @@
--- a/net/minecraft/client/multiplayer/PlayerController.java --- a/net/minecraft/client/multiplayer/PlayerController.java
+++ b/net/minecraft/client/multiplayer/PlayerController.java +++ b/net/minecraft/client/multiplayer/PlayerController.java
@@ -104,6 +104,8 @@ @@ -103,7 +103,9 @@
} Block block = blockstate.func_177230_c();
} if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false;
- } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(world, p_187103_1_)) {
+ if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false; + if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false;
+ +
World world = this.field_78776_a.field_71441_e; return false;
BlockState blockstate = world.func_180495_p(p_187103_1_); } else {
if (!this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b().func_195938_a(blockstate, world, p_187103_1_, this.field_78776_a.field_71439_g)) { block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
@@ -112,7 +114,7 @@ @@ -187,13 +189,13 @@
Block block = blockstate.func_177230_c();
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false;
- } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(world, p_187103_1_)) {
return false;
} else {
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
@@ -209,13 +211,13 @@
return true; return true;
} else if (this.func_178893_a(p_180512_1_)) { } else if (this.func_178893_a(p_180512_1_)) {
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_); BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
@ -34,7 +27,7 @@
this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_)); this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
} }
@@ -239,7 +241,8 @@ @@ -217,7 +219,8 @@
} }
public float func_78757_d() { public float func_78757_d() {
@ -44,7 +37,7 @@
} }
public void func_78765_e() { public void func_78765_e() {
@@ -256,7 +259,7 @@ @@ -234,7 +237,7 @@
ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca(); ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca();
boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b(); boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b();
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) {
@ -53,7 +46,7 @@
} }
return p_178893_1_.equals(this.field_178895_c) && flag; return p_178893_1_.equals(this.field_178895_c) && flag;
@@ -320,11 +323,14 @@ @@ -298,11 +301,14 @@
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) { if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
return ActionResultType.PASS; return ActionResultType.PASS;
} else { } else {
@ -68,7 +61,7 @@
} }
return actionresult.func_188397_a(); return actionresult.func_188397_a();
@@ -349,6 +355,9 @@ @@ -327,6 +333,9 @@
public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) { public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) {
this.func_78750_j(); this.func_78750_j();
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_));
@ -78,7 +71,7 @@
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_); return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
} }
@@ -356,6 +365,9 @@ @@ -334,6 +343,9 @@
this.func_78750_j(); this.func_78750_j();
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.field_70165_t, p_187102_2_.field_70163_u, p_187102_2_.field_70161_v); Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.field_70165_t, p_187102_2_.field_70163_u, p_187102_2_.field_70161_v);
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d));

View file

@ -8,7 +8,7 @@
this.field_147393_d.func_150719_a(new ClientPlayNetHandler(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e)); this.field_147393_d.func_150719_a(new ClientPlayNetHandler(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
} }
@@ -122,6 +123,7 @@ @@ -126,6 +127,7 @@
} }
public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) { public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java --- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java +++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
@@ -711,7 +711,7 @@ @@ -714,7 +714,7 @@
BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z")); BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z"));
TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos); TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos);
if (tileentity != null) { if (tileentity != null) {
@ -9,7 +9,7 @@
} }
} }
@@ -783,7 +783,9 @@ @@ -790,7 +790,9 @@
public void func_147251_a(SChatPacket p_147251_1_) { public void func_147251_a(SChatPacket p_147251_1_) {
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f); PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
@ -20,7 +20,7 @@
} }
public void func_147279_a(SAnimateHandPacket p_147279_1_) { public void func_147279_a(SAnimateHandPacket p_147279_1_) {
@@ -955,6 +957,7 @@ @@ -962,6 +964,7 @@
this.field_147299_f.field_71439_g = clientplayerentity1; this.field_147299_f.field_71439_g = clientplayerentity1;
this.field_147299_f.field_175622_Z = clientplayerentity1; this.field_147299_f.field_175622_Z = clientplayerentity1;
clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c()); clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c());
@ -28,7 +28,7 @@
clientplayerentity1.func_70065_x(); clientplayerentity1.func_70065_x();
clientplayerentity1.func_175158_f(s); clientplayerentity1.func_175158_f(s);
this.field_147300_g.func_217408_a(i, clientplayerentity1); this.field_147300_g.func_217408_a(i, clientplayerentity1);
@@ -1077,6 +1080,12 @@ @@ -1084,6 +1087,12 @@
boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity; boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity;
if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity) { if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity) {
tileentity.func_145839_a(p_147273_1_.func_148857_g()); tileentity.func_145839_a(p_147273_1_.func_148857_g());
@ -41,7 +41,7 @@
} }
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) { if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
@@ -1246,6 +1255,7 @@ @@ -1253,6 +1262,7 @@
clientrecipebook.func_199644_c(); clientrecipebook.func_199644_c();
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a); clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
imutablesearchtree.func_194040_a(); imutablesearchtree.func_194040_a();
@ -49,7 +49,7 @@
} }
public void func_200232_a(SPlayerLookPacket p_200232_1_) { public void func_200232_a(SPlayerLookPacket p_200232_1_) {
@@ -1326,7 +1336,7 @@ @@ -1333,7 +1343,7 @@
PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f); PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f);
Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d()); Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d());
if (entity instanceof LivingEntity) { if (entity instanceof LivingEntity) {
@ -58,7 +58,7 @@
if (effect != null) { if (effect != null) {
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h()); EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
effectinstance.func_100012_b(p_147260_1_.func_149429_c()); effectinstance.func_100012_b(p_147260_1_.func_149429_c());
@@ -1759,10 +1769,12 @@ @@ -1766,10 +1776,12 @@
this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo); this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo);
} else { } else {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java --- a/net/minecraft/client/renderer/ActiveRenderInfo.java
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java +++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
@@ -174,4 +174,11 @@ @@ -172,4 +172,11 @@
this.field_216791_c = null; this.field_216791_c = null;
this.field_216789_a = false; this.field_216789_a = false;
} }

View file

@ -46,7 +46,7 @@
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen"); CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details"); CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
@@ -655,7 +662,7 @@ @@ -656,7 +663,7 @@
double d2 = activerenderinfo.func_216785_c().field_72449_c; double d2 = activerenderinfo.func_216785_c().field_72449_c;
icamera.func_78547_a(d0, d1, d2); icamera.func_78547_a(d0, d1, d2);
if (this.field_78531_r.field_71474_y.field_151451_c >= 4) { if (this.field_78531_r.field_71474_y.field_151451_c >= 4) {
@ -55,7 +55,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("sky"); this.field_78531_r.func_213239_aq().func_219895_b("sky");
GlStateManager.matrixMode(5889); GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity(); GlStateManager.loadIdentity();
@@ -668,14 +675,14 @@ @@ -669,14 +676,14 @@
GlStateManager.matrixMode(5888); GlStateManager.matrixMode(5888);
} }
@ -72,7 +72,7 @@
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b); this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
RenderHelper.func_74518_a(); RenderHelper.func_74518_a();
this.field_78531_r.func_213239_aq().func_219895_b("terrain_setup"); this.field_78531_r.func_213239_aq().func_219895_b("terrain_setup");
@@ -689,7 +696,9 @@ @@ -690,7 +697,9 @@
GlStateManager.disableAlphaTest(); GlStateManager.disableAlphaTest();
worldrenderer.func_215323_a(BlockRenderLayer.SOLID, activerenderinfo); worldrenderer.func_215323_a(BlockRenderLayer.SOLID, activerenderinfo);
GlStateManager.enableAlphaTest(); GlStateManager.enableAlphaTest();
@ -82,7 +82,7 @@
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, false); this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, false);
worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT, activerenderinfo); worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT, activerenderinfo);
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a(); this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
@@ -708,6 +717,7 @@ @@ -709,6 +718,7 @@
if (flag && this.field_78531_r.field_71476_x != null) { if (flag && this.field_78531_r.field_71476_x != null) {
GlStateManager.disableAlphaTest(); GlStateManager.disableAlphaTest();
this.field_78531_r.func_213239_aq().func_219895_b("outline"); this.field_78531_r.func_213239_aq().func_219895_b("outline");
@ -90,7 +90,7 @@
worldrenderer.func_215325_a(activerenderinfo, this.field_78531_r.field_71476_x, 0); worldrenderer.func_215325_a(activerenderinfo, this.field_78531_r.field_71476_x, 0);
GlStateManager.enableAlphaTest(); GlStateManager.enableAlphaTest();
} }
@@ -724,7 +734,7 @@ @@ -725,7 +735,7 @@
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a(); this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
GlStateManager.disableBlend(); GlStateManager.disableBlend();
this.func_180436_i(); this.func_180436_i();
@ -99,7 +99,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("particles"); this.field_78531_r.func_213239_aq().func_219895_b("particles");
particlemanager.func_215233_a(activerenderinfo, p_181560_1_); particlemanager.func_215233_a(activerenderinfo, p_181560_1_);
this.func_175072_h(); this.func_175072_h();
@@ -738,7 +748,7 @@ @@ -739,7 +749,7 @@
GlStateManager.enableCull(); GlStateManager.enableCull();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.alphaFunc(516, 0.1F); GlStateManager.alphaFunc(516, 0.1F);
@ -108,7 +108,7 @@
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.depthMask(false); GlStateManager.depthMask(false);
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b); this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
@@ -755,6 +765,9 @@ @@ -756,6 +766,9 @@
this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2); this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2);
} }
@ -118,7 +118,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("hand"); this.field_78531_r.func_213239_aq().func_219895_b("hand");
if (this.field_175074_C) { if (this.field_175074_C) {
GlStateManager.clear(256, Minecraft.field_142025_a); GlStateManager.clear(256, Minecraft.field_142025_a);
@@ -771,7 +784,7 @@ @@ -772,7 +785,7 @@
GlStateManager.multMatrix(Matrix4f.func_195876_a(this.func_215311_a(p_215313_1_, p_215313_3_, true), (float)this.field_78531_r.field_195558_d.func_198109_k() / (float)this.field_78531_r.field_195558_d.func_198091_l(), 0.05F, this.field_78530_s * 4.0F)); GlStateManager.multMatrix(Matrix4f.func_195876_a(this.func_215311_a(p_215313_1_, p_215313_3_, true), (float)this.field_78531_r.field_195558_d.func_198109_k() / (float)this.field_78531_r.field_195558_d.func_198091_l(), 0.05F, this.field_78530_s * 4.0F));
GlStateManager.matrixMode(5888); GlStateManager.matrixMode(5888);
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
@ -127,7 +127,7 @@
p_215313_2_.func_195466_a(p_215313_3_, p_215313_4_, p_215313_6_, p_215313_8_); p_215313_2_.func_195466_a(p_215313_3_, p_215313_4_, p_215313_6_, p_215313_8_);
GlStateManager.disableFog(); GlStateManager.disableFog();
GlStateManager.popMatrix(); GlStateManager.popMatrix();
@@ -857,6 +870,11 @@ @@ -858,6 +871,11 @@
} }
protected void func_78474_d(float p_78474_1_) { protected void func_78474_d(float p_78474_1_) {
@ -139,7 +139,7 @@
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_); float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (!(f <= 0.0F)) { if (!(f <= 0.0F)) {
this.func_180436_i(); this.func_180436_i();
@@ -1089,4 +1107,9 @@ @@ -1090,4 +1108,9 @@
public ActiveRenderInfo func_215316_n() { public ActiveRenderInfo func_215316_n() {
return this.field_215317_L; return this.field_215317_L;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/WorldRenderer.java --- a/net/minecraft/client/renderer/WorldRenderer.java
+++ b/net/minecraft/client/renderer/WorldRenderer.java +++ b/net/minecraft/client/renderer/WorldRenderer.java
@@ -589,10 +589,12 @@ @@ -592,10 +592,12 @@
this.field_72769_h.func_217381_Z().func_219895_b("blockentities"); this.field_72769_h.func_217381_Z().func_219895_b("blockentities");
RenderHelper.func_74519_b(); RenderHelper.func_74519_b();
@ -13,7 +13,7 @@
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, p_215326_3_, -1); TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, p_215326_3_, -1);
} }
} }
@@ -600,16 +602,18 @@ @@ -603,16 +605,18 @@
synchronized(this.field_181024_n) { synchronized(this.field_181024_n) {
for(TileEntity tileentity1 : this.field_181024_n) { for(TileEntity tileentity1 : this.field_181024_n) {
@ -33,7 +33,7 @@
TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos); TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos);
if (tileentity2 instanceof ChestTileEntity && blockstate.func_177229_b(ChestBlock.field_196314_b) == ChestType.LEFT) { if (tileentity2 instanceof ChestTileEntity && blockstate.func_177229_b(ChestBlock.field_196314_b) == ChestType.LEFT) {
blockpos = blockpos.func_177972_a(blockstate.func_177229_b(ChestBlock.field_176459_a).func_176746_e()); blockpos = blockpos.func_177972_a(blockstate.func_177229_b(ChestBlock.field_176459_a).func_176746_e());
@@ -730,7 +734,7 @@ @@ -733,7 +737,7 @@
for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) { for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) {
for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) { for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) {
ChunkRender chunkrender1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8)); ChunkRender chunkrender1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8));
@ -42,7 +42,7 @@
chunkrender1.func_178577_a(p_215320_3_); chunkrender1.func_178577_a(p_215320_3_);
queue.add(new WorldRenderer.LocalRenderInformationContainer(chunkrender1, (Direction)null, 0)); queue.add(new WorldRenderer.LocalRenderInformationContainer(chunkrender1, (Direction)null, 0));
} }
@@ -775,7 +779,7 @@ @@ -778,7 +782,7 @@
this.field_147595_R = true; this.field_147595_R = true;
BlockPos blockpos2 = chunkrender4.func_178568_j().func_177982_a(8, 8, 8); BlockPos blockpos2 = chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D; boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
@ -51,7 +51,7 @@
this.field_175009_l.add(chunkrender4); this.field_175009_l.add(chunkrender4);
} else { } else {
this.field_72777_q.func_213239_aq().func_76320_a("build near"); this.field_72777_q.func_213239_aq().func_76320_a("build near");
@@ -969,6 +973,11 @@ @@ -972,6 +976,11 @@
} }
public void func_195465_a(float p_195465_1_) { public void func_195465_a(float p_195465_1_) {
@ -63,7 +63,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.field_223229_c_) { if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.field_223229_c_) {
this.func_180448_r(); this.func_180448_r();
} else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { } else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
@@ -1113,6 +1122,7 @@ @@ -1116,6 +1125,7 @@
} }
public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) { public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) {
@ -71,7 +71,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
float f = 12.0F; float f = 12.0F;
float f1 = 4.0F; float f1 = 4.0F;
@@ -1488,7 +1498,11 @@ @@ -1491,7 +1501,11 @@
DestroyBlockProgress destroyblockprogress = iterator.next(); DestroyBlockProgress destroyblockprogress = iterator.next();
BlockPos blockpos = destroyblockprogress.func_180246_b(); BlockPos blockpos = destroyblockprogress.func_180246_b();
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c(); Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
@ -84,7 +84,7 @@
double d3 = (double)blockpos.func_177958_n() - d0; double d3 = (double)blockpos.func_177958_n() - d0;
double d4 = (double)blockpos.func_177956_o() - d1; double d4 = (double)blockpos.func_177956_o() - d1;
double d5 = (double)blockpos.func_177952_p() - d2; double d5 = (double)blockpos.func_177952_p() - d2;
@@ -1496,7 +1510,7 @@ @@ -1499,7 +1513,7 @@
iterator.remove(); iterator.remove();
} else { } else {
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos); BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
@ -93,7 +93,7 @@
int i = destroyblockprogress.func_73106_e(); int i = destroyblockprogress.func_73106_e();
TextureAtlasSprite textureatlassprite = this.field_94141_F[i]; TextureAtlasSprite textureatlassprite = this.field_94141_F[i];
BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab(); BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab();
@@ -1517,7 +1531,7 @@ @@ -1520,7 +1534,7 @@
if (p_215325_3_ == 0 && p_215325_2_.func_216346_c() == RayTraceResult.Type.BLOCK) { if (p_215325_3_ == 0 && p_215325_2_.func_216346_c() == RayTraceResult.Type.BLOCK) {
BlockPos blockpos = ((BlockRayTraceResult)p_215325_2_).func_216350_a(); BlockPos blockpos = ((BlockRayTraceResult)p_215325_2_).func_216350_a();
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos); BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
@ -102,7 +102,7 @@
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.lineWidth(Math.max(2.5F, (float)this.field_72777_q.field_195558_d.func_198109_k() / 1920.0F * 2.5F)); GlStateManager.lineWidth(Math.max(2.5F, (float)this.field_72777_q.field_195558_d.func_198109_k() / 1920.0F * 2.5F));
@@ -1984,7 +1998,7 @@ @@ -1994,7 +2008,7 @@
break; break;
case 2001: case 2001:
BlockState blockstate = Block.func_196257_b(p_180439_4_); BlockState blockstate = Block.func_196257_b(p_180439_4_);
@ -111,7 +111,7 @@
SoundType soundtype = blockstate.func_215695_r(); SoundType soundtype = blockstate.func_215695_r();
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false); this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
} }
@@ -2108,6 +2122,11 @@ @@ -2118,6 +2132,11 @@
} }
} }

View file

@ -1,16 +1,16 @@
--- a/net/minecraft/client/renderer/color/BlockColors.java --- a/net/minecraft/client/renderer/color/BlockColors.java
+++ b/net/minecraft/client/renderer/color/BlockColors.java +++ b/net/minecraft/client/renderer/color/BlockColors.java
@@ -22,7 +22,8 @@ @@ -27,7 +27,8 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class BlockColors { public class BlockColors {
- private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<>(32); - private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<>(32);
+ // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant + // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant
+ private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>(); + private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>();
private final Map<Block, Set<IProperty<?>>> field_225311_b = Maps.newHashMap();
public static BlockColors func_186723_a() { public static BlockColors func_186723_a() {
BlockColors blockcolors = new BlockColors(); @@ -72,11 +73,12 @@
@@ -63,11 +64,12 @@
blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> { blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> {
return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580; return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580;
}, Blocks.field_196651_dG); }, Blocks.field_196651_dG);
@ -24,7 +24,7 @@
if (iblockcolor != null) { if (iblockcolor != null) {
return iblockcolor.getColor(p_189991_1_, (IEnviromentBlockReader)null, (BlockPos)null, 0); return iblockcolor.getColor(p_189991_1_, (IEnviromentBlockReader)null, (BlockPos)null, 0);
} else { } else {
@@ -77,13 +79,13 @@ @@ -86,13 +88,13 @@
} }
public int func_216860_a(BlockState p_216860_1_, @Nullable IEnviromentBlockReader p_216860_2_, @Nullable BlockPos p_216860_3_, int p_216860_4_) { public int func_216860_a(BlockState p_216860_1_, @Nullable IEnviromentBlockReader p_216860_2_, @Nullable BlockPos p_216860_3_, int p_216860_4_) {

View file

@ -2,7 +2,7 @@
+++ b/net/minecraft/client/renderer/entity/PlayerRenderer.java +++ b/net/minecraft/client/renderer/entity/PlayerRenderer.java
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
public void func_76986_a(AbstractClientPlayerEntity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { public void func_76986_a(AbstractClientPlayerEntity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
if (!p_76986_1_.func_175144_cb() || this.field_76990_c.field_217783_c != null && this.field_76990_c.field_217783_c.func_216773_g() == p_76986_1_) { if (!p_76986_1_.func_175144_cb() || this.field_76990_c.field_217783_c.func_216773_g() == p_76986_1_) {
double d0 = p_76986_4_; double d0 = p_76986_4_;
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_76986_1_, this, p_76986_9_, p_76986_2_, p_76986_4_, p_76986_6_))) return; + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_76986_1_, this, p_76986_9_, p_76986_2_, p_76986_4_, p_76986_6_))) return;
if (p_76986_1_.func_213287_bg()) { if (p_76986_1_.func_213287_bg()) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/model/ModelBakery.java --- a/net/minecraft/client/renderer/model/ModelBakery.java
+++ b/net/minecraft/client/renderer/model/ModelBakery.java +++ b/net/minecraft/client/renderer/model/ModelBakery.java
@@ -87,7 +87,7 @@ @@ -97,7 +97,7 @@
private final Set<ResourceLocation> field_217848_D = Sets.newHashSet(); private final Set<ResourceLocation> field_217848_D = Sets.newHashSet();
private final BlockModelDefinition.ContainerHolder field_209610_F = new BlockModelDefinition.ContainerHolder(); private final BlockModelDefinition.ContainerHolder field_209610_F = new BlockModelDefinition.ContainerHolder();
private final Map<ResourceLocation, IUnbakedModel> field_217849_F = Maps.newHashMap(); private final Map<ResourceLocation, IUnbakedModel> field_217849_F = Maps.newHashMap();
@ -9,25 +9,16 @@
private final Map<ResourceLocation, IUnbakedModel> field_217851_H = Maps.newHashMap(); private final Map<ResourceLocation, IUnbakedModel> field_217851_H = Maps.newHashMap();
private final Map<ResourceLocation, IBakedModel> field_217852_I = Maps.newHashMap(); private final Map<ResourceLocation, IBakedModel> field_217852_I = Maps.newHashMap();
private final AtlasTexture.SheetData field_217853_J; private final AtlasTexture.SheetData field_217853_J;
@@ -269,7 +269,7 @@ @@ -288,7 +288,7 @@
flag = true; {
lvt_9_4_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> { lvt_13_5_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> {
try (InputStream inputstream = p_217839_1_.func_199027_b()) { try (InputStream inputstream = p_217839_1_.func_199027_b()) {
- Pair pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8))); - Pair pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
+ Pair pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_)); + Pair<String,BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
return pair1; return pair2;
} catch (Exception exception1) { } catch (Exception exception1) {
throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_217839_1_.func_199029_a(), p_217839_1_.func_199026_d(), exception1.getMessage())); throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_217839_1_.func_199029_a(), p_217839_1_.func_199026_d(), exception1.getMessage()));
@@ -326,7 +326,7 @@ @@ -404,7 +404,12 @@
while(true) {
if (!iterator.hasNext()) {
- ;
+ break; //Forge fix decompile error.
} else {
Entry<ModelResourceLocation, BlockState> entry = (Entry)iterator.next();
IUnbakedModel iunbakedmodel1 = map1.get(entry.getValue());
@@ -381,7 +381,12 @@
@Nullable @Nullable
public IBakedModel func_217845_a(ResourceLocation p_217845_1_, ISprite p_217845_2_) { public IBakedModel func_217845_a(ResourceLocation p_217845_1_, ISprite p_217845_2_) {
@ -41,7 +32,7 @@
if (this.field_217850_G.containsKey(triple)) { if (this.field_217850_G.containsKey(triple)) {
return this.field_217850_G.get(triple); return this.field_217850_G.get(triple);
} else { } else {
@@ -389,11 +394,11 @@ @@ -412,11 +417,11 @@
if (iunbakedmodel instanceof BlockModel) { if (iunbakedmodel instanceof BlockModel) {
BlockModel blockmodel = (BlockModel)iunbakedmodel; BlockModel blockmodel = (BlockModel)iunbakedmodel;
if (blockmodel.func_178310_f() == field_177606_o) { if (blockmodel.func_178310_f() == field_177606_o) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/model/ModelManager.java --- a/net/minecraft/client/renderer/model/ModelManager.java
+++ b/net/minecraft/client/renderer/model/ModelManager.java +++ b/net/minecraft/client/renderer/model/ModelManager.java
@@ -12,7 +12,7 @@ @@ -16,7 +16,7 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class ModelManager extends ReloadListener<ModelBakery> { public class ModelManager extends ReloadListener<ModelBakery> {
@ -8,29 +8,32 @@
+ private Map<ResourceLocation, IBakedModel> field_174958_a = new java.util.HashMap<>(); + private Map<ResourceLocation, IBakedModel> field_174958_a = new java.util.HashMap<>();
private final AtlasTexture field_174956_b; private final AtlasTexture field_174956_b;
private final BlockModelShapes field_174957_c; private final BlockModelShapes field_174957_c;
private IBakedModel field_174955_d; private final BlockColors field_224743_d;
@@ -34,9 +34,15 @@ @@ -43,7 +43,7 @@
return this.field_174957_c;
}
+ // TODO
+ //@Override
+ public net.minecraftforge.resource.IResourceType getResourceType() {
+ return net.minecraftforge.resource.VanillaResourceType.MODELS;
+ }
+
protected ModelBakery func_212854_a_(IResourceManager p_212854_1_, IProfiler p_212854_2_) { protected ModelBakery func_212854_a_(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
p_212854_2_.func_219894_a(); p_212854_2_.func_219894_a();
- ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, p_212854_2_); - ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, p_212854_2_); + net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
p_212854_2_.func_219897_b(); p_212854_2_.func_219897_b();
return modelbakery; return modelbakery;
} }
@@ -47,6 +53,7 @@ @@ -55,6 +55,7 @@
p_212853_1_.func_217844_a(p_212853_3_);
this.field_174958_a = p_212853_1_.func_217846_a(); this.field_174958_a = p_212853_1_.func_217846_a();
this.field_224744_f = p_212853_1_.func_225354_b();
this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a); this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a);
+ net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, (net.minecraftforge.client.model.ModelLoader) p_212853_1_); + net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, (net.minecraftforge.client.model.ModelLoader) p_212853_1_);
p_212853_3_.func_219895_b("cache"); p_212853_3_.func_219895_b("cache");
this.field_174957_c.func_178124_c(); this.field_174957_c.func_178124_c();
p_212853_3_.func_76319_b(); p_212853_3_.func_76319_b();
@@ -78,4 +79,10 @@
return true;
}
}
+
+ // TODO
+ //@Override
+ public net.minecraftforge.resource.IResourceType getResourceType() {
+ return net.minecraftforge.resource.VanillaResourceType.MODELS;
+ }
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/texture/AtlasTexture.java --- a/net/minecraft/client/renderer/texture/AtlasTexture.java
+++ b/net/minecraft/client/renderer/texture/AtlasTexture.java +++ b/net/minecraft/client/renderer/texture/AtlasTexture.java
@@ -79,6 +79,7 @@ @@ -80,6 +80,7 @@
} }
} }
@ -8,7 +8,7 @@
} }
public AtlasTexture.SheetData func_215254_a(IResourceManager p_215254_1_, Iterable<ResourceLocation> p_215254_2_, IProfiler p_215254_3_) { public AtlasTexture.SheetData func_215254_a(IResourceManager p_215254_1_, Iterable<ResourceLocation> p_215254_2_, IProfiler p_215254_3_) {
@@ -91,6 +92,7 @@ @@ -92,6 +93,7 @@
set.add(p_215253_1_); set.add(p_215253_1_);
} }
}); });
@ -16,7 +16,7 @@
int i = this.field_215265_o; int i = this.field_215265_o;
Stitcher stitcher = new Stitcher(i, i, this.field_147636_j); Stitcher stitcher = new Stitcher(i, i, this.field_147636_j);
int j = Integer.MAX_VALUE; int j = Integer.MAX_VALUE;
@@ -110,6 +112,7 @@ @@ -111,6 +113,7 @@
int i1 = Math.min(j, k); int i1 = Math.min(j, k);
int j1 = MathHelper.func_151239_c(i1); int j1 = MathHelper.func_151239_c(i1);
@ -24,7 +24,7 @@
if (j1 < this.field_147636_j) { if (j1 < this.field_147636_j) {
field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.field_94254_c, this.field_147636_j, j1, i1); field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.field_94254_c, this.field_147636_j, j1, i1);
this.field_147636_j = j1; this.field_147636_j = j1;
@@ -191,6 +194,7 @@ @@ -198,6 +201,7 @@
label62: { label62: {
boolean flag; boolean flag;
@ -32,7 +32,7 @@
try { try {
iresource = p_195422_1_.func_199002_a(resourcelocation); iresource = p_195422_1_.func_199002_a(resourcelocation);
p_195422_2_.func_195664_a(iresource, this.field_147636_j + 1); p_195422_2_.func_195664_a(iresource, this.field_147636_j + 1);
@@ -268,6 +272,93 @@ @@ -275,6 +279,93 @@
this.field_94258_i.clear(); this.field_94258_i.clear();
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/texture/Stitcher.java --- a/net/minecraft/client/renderer/texture/Stitcher.java
+++ b/net/minecraft/client/renderer/texture/Stitcher.java +++ b/net/minecraft/client/renderer/texture/Stitcher.java
@@ -13,6 +13,8 @@ @@ -14,6 +14,8 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class Stitcher { public class Stitcher {
@ -10,19 +10,19 @@
return -p_217793_0_.field_94201_d; return -p_217793_0_.field_94201_d;
}).thenComparing((p_217795_0_) -> { }).thenComparing((p_217795_0_) -> {
@@ -53,6 +55,12 @@ @@ -53,6 +55,12 @@
list.sort(field_217797_a);
for(Stitcher.Holder stitcher$holder : list) { for(Stitcher.Holder stitcher$holder : list) {
if (!this.func_94310_b(stitcher$holder)) {
+ LOGGER.info(new net.minecraftforge.fml.loading.AdvancedLogMessageAdapter(sb->{ + LOGGER.info(new net.minecraftforge.fml.loading.AdvancedLogMessageAdapter(sb->{
+ sb.append("Unable to fit: ").append(stitcher$holder.field_98151_a.func_195668_m()); + sb.append("Unable to fit: ").append(stitcher$holder.field_98151_a.func_195668_m());
+ sb.append(" - size: ").append(stitcher$holder.field_98151_a.func_94211_a()).append("x").append(stitcher$holder.field_98151_a.func_94216_b()); + sb.append(" - size: ").append(stitcher$holder.field_98151_a.func_94211_a()).append("x").append(stitcher$holder.field_98151_a.func_94216_b());
+ sb.append(" - Maybe try a lower resolution resourcepack?\n"); + sb.append(" - Maybe try a lower resolution resourcepack?\n");
+ list.forEach(h-> sb.append("\t").append(h).append("\n")); + list.forEach(h-> sb.append("\t").append(h).append("\n"));
+ })); + }));
throw new StitcherException(stitcher$holder.field_98151_a); if (!this.func_94310_b(stitcher$holder)) {
} throw new StitcherException(stitcher$holder.field_98151_a, list.stream().map((p_225334_0_) -> {
} return p_225334_0_.field_98151_a;
@@ -104,7 +112,7 @@ @@ -107,7 +115,7 @@
boolean flag4 = flag2 && j != l; boolean flag4 = flag2 && j != l;
boolean flag; boolean flag;
if (flag3 ^ flag4) { if (flag3 ^ flag4) {
@ -31,7 +31,7 @@
} else { } else {
flag = flag1 && i <= j; flag = flag1 && i <= j;
} }
@@ -141,7 +149,7 @@ @@ -144,7 +152,7 @@
} }
public String toString() { public String toString() {

View file

@ -9,7 +9,7 @@
private final ResourceLocation field_110984_i; private final ResourceLocation field_110984_i;
protected final int field_130223_c; protected final int field_130223_c;
protected final int field_130224_d; protected final int field_130224_d;
@@ -104,7 +104,10 @@ @@ -103,7 +103,10 @@
anativeimage[k1] = this.field_195670_c[k1]; anativeimage[k1] = this.field_195670_c[k1];
} else { } else {
NativeImage nativeimage1 = anativeimage[k1 - 1]; NativeImage nativeimage1 = anativeimage[k1 - 1];
@ -21,7 +21,7 @@
int k = nativeimage.func_195702_a(); int k = nativeimage.func_195702_a();
int l = nativeimage.func_195714_b(); int l = nativeimage.func_195714_b();
@@ -113,8 +116,11 @@ @@ -112,8 +115,11 @@
nativeimage.func_195700_a(i1, j1, func_195661_b(nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 1), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 1), flag)); nativeimage.func_195700_a(i1, j1, func_195661_b(nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 1), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 1), flag));
} }
} }
@ -34,7 +34,7 @@
} }
} }
@@ -196,6 +202,7 @@ @@ -209,6 +215,7 @@
private void func_195667_a(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_) { private void func_195667_a(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_) {
for(int i = 0; i < this.field_195670_c.length; ++i) { for(int i = 0; i < this.field_195670_c.length; ++i) {
@ -42,7 +42,7 @@
p_195667_3_[i].func_195706_a(i, this.field_110975_c >> i, this.field_110974_d >> i, p_195667_1_ >> i, p_195667_2_ >> i, this.field_130223_c >> i, this.field_130224_d >> i, this.field_195670_c.length > 1); p_195667_3_[i].func_195706_a(i, this.field_110975_c >> i, this.field_110974_d >> i, p_195667_1_ >> i, p_195667_2_ >> i, this.field_130223_c >> i, this.field_130224_d >> i, this.field_195670_c.length > 1);
} }
@@ -451,4 +458,10 @@ @@ -464,4 +471,10 @@
public void func_195663_q() { public void func_195663_q() {
this.func_195659_d(0); this.func_195659_d(0);
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/crash/CrashReport.java --- a/net/minecraft/crash/CrashReport.java
+++ b/net/minecraft/crash/CrashReport.java +++ b/net/minecraft/crash/CrashReport.java
@@ -65,6 +65,7 @@ @@ -69,6 +69,7 @@
List<String> list = Util.func_211565_f().collect(Collectors.toList()); List<String> list = Util.func_211565_f().collect(Collectors.toList());
return String.format("%d total; %s", list.size(), list.stream().collect(Collectors.joining(" "))); return String.format("%d total; %s", list.size(), list.stream().collect(Collectors.joining(" ")));
}); });
@ -8,7 +8,7 @@
} }
public String func_71501_a() { public String func_71501_a() {
@@ -117,23 +118,13 @@ @@ -121,23 +122,13 @@
throwable.setStackTrace(this.field_71511_b.getStackTrace()); throwable.setStackTrace(this.field_71511_b.getStackTrace());
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/crash/CrashReportCategory.java --- a/net/minecraft/crash/CrashReportCategory.java
+++ b/net/minecraft/crash/CrashReportCategory.java +++ b/net/minecraft/crash/CrashReportCategory.java
@@ -98,8 +98,10 @@ @@ -100,8 +100,10 @@
if (astacktraceelement.length <= 0) { if (astacktraceelement.length <= 0) {
return 0; return 0;
} else { } else {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/EntityType.java --- a/net/minecraft/entity/EntityType.java
+++ b/net/minecraft/entity/EntityType.java +++ b/net/minecraft/entity/EntityType.java
@@ -135,7 +135,7 @@ @@ -134,7 +134,7 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -9,8 +9,8 @@
private static final Logger field_200731_aJ = LogManager.getLogger(); private static final Logger field_200731_aJ = LogManager.getLogger();
public static final EntityType<AreaEffectCloudEntity> field_200788_b = func_200712_a("area_effect_cloud", EntityType.Builder.<AreaEffectCloudEntity>func_220322_a(AreaEffectCloudEntity::new, EntityClassification.MISC).func_220320_c().func_220321_a(6.0F, 0.5F)); public static final EntityType<AreaEffectCloudEntity> field_200788_b = func_200712_a("area_effect_cloud", EntityType.Builder.<AreaEffectCloudEntity>func_220322_a(AreaEffectCloudEntity::new, EntityClassification.MISC).func_220320_c().func_220321_a(6.0F, 0.5F));
public static final EntityType<ArmorStandEntity> field_200789_c = func_200712_a("armor_stand", EntityType.Builder.<ArmorStandEntity>func_220322_a(ArmorStandEntity::new, EntityClassification.MISC).func_220321_a(0.5F, 1.975F)); public static final EntityType<ArmorStandEntity> field_200789_c = func_200712_a("armor_stand", EntityType.Builder.<ArmorStandEntity>func_220322_a(ArmorStandEntity::new, EntityClassification.MISC).func_220321_a(0.5F, 1.975F));
@@ -254,6 +254,12 @@ @@ -252,6 +252,12 @@
private final Type<?> field_206832_aX; private ResourceLocation field_220358_bg;
private final EntitySize field_220359_bi; private final EntitySize field_220359_bi;
+ private final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier; + private final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier;
@ -22,19 +22,19 @@
private static <T extends Entity> EntityType<T> func_200712_a(String p_200712_0_, EntityType.Builder<T> p_200712_1_) { private static <T extends Entity> EntityType<T> func_200712_a(String p_200712_0_, EntityType.Builder<T> p_200712_1_) {
return Registry.func_218325_a(Registry.field_212629_r, p_200712_0_, p_200712_1_.func_206830_a(p_200712_0_)); return Registry.func_218325_a(Registry.field_212629_r, p_200712_0_, p_200712_1_.func_206830_a(p_200712_0_));
} }
@@ -266,7 +272,7 @@ @@ -264,7 +270,7 @@
return Registry.field_212629_r.func_218349_b(ResourceLocation.func_208304_a(p_220327_0_)); return Registry.field_212629_r.func_218349_b(ResourceLocation.func_208304_a(p_220327_0_));
} }
- public EntityType(EntityType.IFactory<T> p_i50385_1_, EntityClassification p_i50385_2_, boolean p_i50385_3_, boolean p_i50385_4_, boolean p_i50385_5_, @Nullable Type<?> p_i50385_6_, EntitySize p_i50385_7_) { - public EntityType(EntityType.IFactory<T> p_i51559_1_, EntityClassification p_i51559_2_, boolean p_i51559_3_, boolean p_i51559_4_, boolean p_i51559_5_, boolean p_i51559_6_, EntitySize p_i51559_7_) {
+ public EntityType(IFactory<T> p_i50385_1_, EntityClassification p_i50385_2_, boolean p_i50385_3_, boolean p_i50385_4_, boolean p_i50385_5_, @Nullable Type<?> p_i50385_6_, EntitySize p_i50385_7_, final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier, final java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier, final java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier, final java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory) { + public EntityType(EntityType.IFactory<T> p_i51559_1_, EntityClassification p_i51559_2_, boolean p_i51559_3_, boolean p_i51559_4_, boolean p_i51559_5_, boolean p_i51559_6_, EntitySize p_i51559_7_, final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier, final java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier, final java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier, final java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory) {
this.field_200732_aK = p_i50385_1_; this.field_200732_aK = p_i51559_1_;
this.field_220355_ba = p_i50385_2_; this.field_220355_ba = p_i51559_2_;
this.field_200733_aL = p_i50385_3_; this.field_225438_be = p_i51559_6_;
@@ -274,6 +280,10 @@ @@ -272,6 +278,10 @@
this.field_220357_bd = p_i50385_5_; this.field_200734_aM = p_i51559_4_;
this.field_206832_aX = p_i50385_6_; this.field_220357_bd = p_i51559_5_;
this.field_220359_bi = p_i50385_7_; this.field_220359_bi = p_i51559_7_;
+ this.velocityUpdateSupplier = velocityUpdateSupplier; + this.velocityUpdateSupplier = velocityUpdateSupplier;
+ this.trackingRangeSupplier = trackingRangeSupplier; + this.trackingRangeSupplier = trackingRangeSupplier;
+ this.updateIntervalSupplier = updateIntervalSupplier; + this.updateIntervalSupplier = updateIntervalSupplier;
@ -42,7 +42,7 @@
} }
@Nullable @Nullable
@@ -284,6 +294,7 @@ @@ -282,6 +292,7 @@
@Nullable @Nullable
public T func_220342_a(World p_220342_1_, @Nullable CompoundNBT p_220342_2_, @Nullable ITextComponent p_220342_3_, @Nullable PlayerEntity p_220342_4_, BlockPos p_220342_5_, SpawnReason p_220342_6_, boolean p_220342_7_, boolean p_220342_8_) { public T func_220342_a(World p_220342_1_, @Nullable CompoundNBT p_220342_2_, @Nullable ITextComponent p_220342_3_, @Nullable PlayerEntity p_220342_4_, BlockPos p_220342_5_, SpawnReason p_220342_6_, boolean p_220342_7_, boolean p_220342_8_) {
T t = this.func_220349_b(p_220342_1_, p_220342_2_, p_220342_3_, p_220342_4_, p_220342_5_, p_220342_6_, p_220342_7_, p_220342_8_); T t = this.func_220349_b(p_220342_1_, p_220342_2_, p_220342_3_, p_220342_4_, p_220342_5_, p_220342_6_, p_220342_7_, p_220342_8_);
@ -50,7 +50,7 @@
p_220342_1_.func_217376_c(t); p_220342_1_.func_217376_c(t);
return t; return t;
} }
@@ -462,6 +473,9 @@ @@ -464,6 +475,9 @@
} }
public int func_220345_k() { public int func_220345_k() {
@ -60,7 +60,7 @@
if (this == field_200729_aH) { if (this == field_200729_aH) {
return 32; return 32;
} else if (this == field_200801_o) { } else if (this == field_200801_o) {
@@ -474,6 +488,9 @@ @@ -476,6 +490,9 @@
} }
public int func_220332_l() { public int func_220332_l() {
@ -70,7 +70,7 @@
if (this != field_200729_aH && this != field_200805_s) { if (this != field_200729_aH && this != field_200805_s) {
if (this == field_200808_v) { if (this == field_200808_v) {
return 4; return 4;
@@ -494,6 +511,9 @@ @@ -496,6 +513,9 @@
} }
public boolean func_220340_m() { public boolean func_220340_m() {
@ -80,7 +80,7 @@
return this != field_200729_aH && this != field_200770_J && this != field_200760_az && this != field_200791_e && this != field_200766_F && this != field_200768_H && this != field_200782_V && this != field_200801_o && this != field_200805_s; return this != field_200729_aH && this != field_200770_J && this != field_200760_az && this != field_200791_e && this != field_200766_F && this != field_200768_H && this != field_200782_V && this != field_200801_o && this != field_200805_s;
} }
@@ -501,12 +521,30 @@ @@ -503,12 +523,30 @@
return p_220341_1_.func_199685_a_(this); return p_220341_1_.func_199685_a_(this);
} }
@ -108,10 +108,10 @@
+ private java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier = EntityType::defaultUpdateIntervalSupplier; + private java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier = EntityType::defaultUpdateIntervalSupplier;
+ private java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory; + private java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory;
+ +
private boolean field_225436_f;
private EntitySize field_220326_f = EntitySize.func_220314_b(0.6F, 1.8F); private EntitySize field_220326_f = EntitySize.func_220314_b(0.6F, 1.8F);
private Builder(EntityType.IFactory<T> p_i50479_1_, EntityClassification p_i50479_2_) { @@ -553,6 +591,26 @@
@@ -544,12 +582,32 @@
return this; return this;
} }
@ -136,21 +136,14 @@
+ } + }
+ +
public EntityType<T> func_206830_a(String p_206830_1_) { public EntityType<T> func_206830_a(String p_206830_1_) {
Type<?> type = null;
if (this.field_200710_b) { if (this.field_200710_b) {
try { try {
type = DataFixesManager.func_210901_a().getSchema(DataFixUtils.makeKey(SharedConstants.func_215069_a().getWorldVersion())).getChoiceType(TypeReferences.field_211298_n, p_206830_1_); @@ -566,7 +624,7 @@
- } catch (IllegalStateException illegalstateexception) {
+ } catch (IllegalArgumentException illegalstateexception) {
if (SharedConstants.field_206244_b) {
throw illegalstateexception;
}
@@ -558,7 +616,7 @@
} }
} }
- return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, type, this.field_220326_f); - return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, this.field_225436_f, this.field_220326_f);
+ return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, type, this.field_220326_f, velocityUpdateSupplier, trackingRangeSupplier, updateIntervalSupplier, customClientFactory); + return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, this.field_225436_f, this.field_220326_f, velocityUpdateSupplier, trackingRangeSupplier, updateIntervalSupplier, customClientFactory);
} }
} }

View file

@ -310,9 +310,9 @@
} }
@@ -2403,13 +2435,22 @@ @@ -2403,13 +2435,22 @@
protected void func_184608_ct() { private void func_184608_ct() {
if (this.func_184587_cr()) { if (this.func_184587_cr()) {
- if (this.func_184586_b(this.func_184600_cs()) == this.field_184627_bm) { - if (ItemStack.func_185132_d(this.func_184586_b(this.func_184600_cs()), this.field_184627_bm)) {
+ ItemStack itemstack = this.func_184586_b(this.func_184600_cs()); + ItemStack itemstack = this.func_184586_b(this.func_184600_cs());
+ if (net.minecraftforge.common.ForgeHooks.canContinueUsing(this.field_184627_bm, itemstack)) this.field_184627_bm = itemstack; + if (net.minecraftforge.common.ForgeHooks.canContinueUsing(this.field_184627_bm, itemstack)) this.field_184627_bm = itemstack;
+ if (itemstack == this.field_184627_bm) { + if (itemstack == this.field_184627_bm) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java --- a/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java
+++ b/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java +++ b/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java
@@ -17,7 +17,7 @@ @@ -18,7 +18,7 @@
import net.minecraft.util.math.IPosWrapper; import net.minecraft.util.math.IPosWrapper;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;

View file

@ -9,7 +9,7 @@
return false; return false;
} else if (p_212832_2_.func_213700_eh().func_221130_b() != VillagerProfession.field_221156_f) { } else if (p_212832_2_.func_213700_eh().func_221130_b() != VillagerProfession.field_221156_f) {
return false; return false;
@@ -130,6 +130,11 @@ @@ -136,6 +136,11 @@
} else if (itemstack.func_77973_b() == Items.field_185163_cU) { } else if (itemstack.func_77973_b() == Items.field_185163_cU) {
p_212833_1_.func_180501_a(this.field_220422_a, Blocks.field_185773_cZ.func_176223_P(), 3); p_212833_1_.func_180501_a(this.field_220422_a, Blocks.field_185773_cZ.func_176223_P(), 3);
flag = true; flag = true;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/ai/goal/BreakBlockGoal.java --- a/net/minecraft/entity/ai/goal/BreakBlockGoal.java
+++ b/net/minecraft/entity/ai/goal/BreakBlockGoal.java +++ b/net/minecraft/entity/ai/goal/BreakBlockGoal.java
@@ -30,7 +30,7 @@ @@ -32,7 +32,7 @@
} }
public boolean func_75250_a() { public boolean func_75250_a() {

View file

@ -15,14 +15,14 @@
} else { } else {
+ if (canPenalize) { + if (canPenalize) {
+ if (--this.field_75445_i <= 0) { + if (--this.field_75445_i <= 0) {
+ this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity); + this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity, 0);
+ this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7); + this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
+ return this.field_75438_g != null; + return this.field_75438_g != null;
+ } else { + } else {
+ return true; + return true;
+ } + }
+ } + }
this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity); this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity, 0);
if (this.field_75438_g != null) { if (this.field_75438_g != null) {
return true; return true;
@@ -92,6 +103,18 @@ @@ -92,6 +103,18 @@

View file

@ -6,7 +6,7 @@
ServerPlayerEntity serverplayerentity = (ServerPlayerEntity)livingentity; ServerPlayerEntity serverplayerentity = (ServerPlayerEntity)livingentity;
+ net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(serverplayerentity, this.field_70165_t, this.field_70163_u, this.field_70161_v, 5.0F); + net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(serverplayerentity, this.field_70165_t, this.field_70163_u, this.field_70161_v, 5.0F);
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) { // Don't indent to lower patch size + if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) { // Don't indent to lower patch size
if (serverplayerentity.field_71135_a.func_147362_b().func_150724_d() && serverplayerentity.field_70170_p == this.field_70170_p && !serverplayerentity.func_70608_bn()) { if (serverplayerentity.field_71135_a.func_147298_b().func_150724_d() && serverplayerentity.field_70170_p == this.field_70170_p && !serverplayerentity.func_70608_bn()) {
if (this.field_70146_Z.nextFloat() < 0.05F && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223601_d)) { if (this.field_70146_Z.nextFloat() < 0.05F && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223601_d)) {
EndermiteEntity endermiteentity = EntityType.field_200804_r.func_200721_a(this.field_70170_p); EndermiteEntity endermiteentity = EntityType.field_200804_r.func_200721_a(this.field_70170_p);
@@ -96,9 +98,10 @@ @@ -96,9 +98,10 @@

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/item/FallingBlockEntity.java --- a/net/minecraft/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/entity/item/FallingBlockEntity.java +++ b/net/minecraft/entity/item/FallingBlockEntity.java
@@ -153,7 +153,7 @@ @@ -155,7 +155,7 @@
((FallingBlock)block).func_176502_a_(this.field_70170_p, blockpos1, this.field_175132_d, blockstate); ((FallingBlock)block).func_176502_a_(this.field_70170_p, blockpos1, this.field_175132_d, blockstate);
} }

View file

@ -4,7 +4,7 @@
this.field_70165_t = (double)this.field_174861_a.func_177958_n() + 0.5D; this.field_70165_t = (double)this.field_174861_a.func_177958_n() + 0.5D;
this.field_70163_u = (double)this.field_174861_a.func_177956_o() + 0.5D; this.field_70163_u = (double)this.field_174861_a.func_177956_o() + 0.5D;
this.field_70161_v = (double)this.field_174861_a.func_177952_p() + 0.5D; this.field_70161_v = (double)this.field_174861_a.func_177952_p() + 0.5D;
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.ServerWorld) ((net.minecraft.world.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving. + if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
} }
public void func_174859_a(Direction p_174859_1_) { public void func_174859_a(Direction p_174859_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/merchant/villager/VillagerEntity.java --- a/net/minecraft/entity/merchant/villager/VillagerEntity.java
+++ b/net/minecraft/entity/merchant/villager/VillagerEntity.java +++ b/net/minecraft/entity/merchant/villager/VillagerEntity.java
@@ -227,7 +227,7 @@ @@ -230,7 +230,7 @@
if (flag) { if (flag) {
itemstack.func_111282_a(p_184645_1_, this, p_184645_2_); itemstack.func_111282_a(p_184645_1_, this, p_184645_2_);
return true; return true;

View file

@ -49,8 +49,8 @@
} }
private boolean func_220836_a(IWorldReader p_220836_1_, BlockPos p_220836_2_, BlockState p_220836_3_, BlockState p_220836_4_, BlockState p_220836_5_, BlockPos p_220836_6_) { private boolean func_220836_a(IWorldReader p_220836_1_, BlockPos p_220836_2_, BlockState p_220836_3_, BlockState p_220836_4_, BlockState p_220836_5_, BlockPos p_220836_6_) {
- return p_220836_4_.func_196958_f() && !p_220836_5_.func_196958_f() && Block.func_208062_a(p_220836_5_.func_196952_d(p_220836_1_, p_220836_6_)) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_); - return p_220836_4_.func_196958_f() && !p_220836_5_.func_196958_f() && p_220836_5_.func_224756_o(p_220836_1_, p_220836_6_) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
+ return p_220836_4_.isAir(p_220836_1_, p_220836_2_) && !p_220836_5_.isAir(p_220836_1_, p_220836_6_) && Block.func_208062_a(p_220836_5_.func_196952_d(p_220836_1_, p_220836_6_)) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_); + return p_220836_4_.isAir(p_220836_1_, p_220836_2_) && !p_220836_5_.isAir(p_220836_1_, p_220836_6_) && p_220836_5_.func_224756_o(p_220836_1_, p_220836_6_) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/EvokerEntity.java --- a/net/minecraft/entity/monster/EvokerEntity.java
+++ b/net/minecraft/entity/monster/EvokerEntity.java +++ b/net/minecraft/entity/monster/EvokerEntity.java
@@ -287,7 +287,7 @@ @@ -286,7 +286,7 @@
return false; return false;
} else if (EvokerEntity.this.field_70173_aa < this.field_193322_d) { } else if (EvokerEntity.this.field_70173_aa < this.field_193322_d) {
return false; return false;

View file

@ -4,7 +4,7 @@
this.field_70165_t = (double)blockpos.func_177958_n() + 0.5D; this.field_70165_t = (double)blockpos.func_177958_n() + 0.5D;
this.field_70163_u = (double)blockpos.func_177956_o(); this.field_70163_u = (double)blockpos.func_177956_o();
this.field_70161_v = (double)blockpos.func_177952_p() + 0.5D; this.field_70161_v = (double)blockpos.func_177952_p() + 0.5D;
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.ServerWorld) ((net.minecraft.world.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving. + if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
this.field_70169_q = this.field_70165_t; this.field_70169_q = this.field_70165_t;
this.field_70167_r = this.field_70163_u; this.field_70167_r = this.field_70163_u;
this.field_70166_s = this.field_70161_v; this.field_70166_s = this.field_70161_v;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/SilverfishEntity.java --- a/net/minecraft/entity/monster/SilverfishEntity.java
+++ b/net/minecraft/entity/monster/SilverfishEntity.java +++ b/net/minecraft/entity/monster/SilverfishEntity.java
@@ -138,7 +138,7 @@ @@ -136,7 +136,7 @@
return false; return false;
} else { } else {
Random random = this.field_75457_a.func_70681_au(); Random random = this.field_75457_a.func_70681_au();
@ -9,7 +9,7 @@
this.field_179483_b = Direction.func_176741_a(random); this.field_179483_b = Direction.func_176741_a(random);
BlockPos blockpos = (new BlockPos(this.field_75457_a.field_70165_t, this.field_75457_a.field_70163_u + 0.5D, this.field_75457_a.field_70161_v)).func_177972_a(this.field_179483_b); BlockPos blockpos = (new BlockPos(this.field_75457_a.field_70165_t, this.field_75457_a.field_70163_u + 0.5D, this.field_75457_a.field_70161_v)).func_177972_a(this.field_179483_b);
BlockState blockstate = this.field_75457_a.field_70170_p.func_180495_p(blockpos); BlockState blockstate = this.field_75457_a.field_70170_p.func_180495_p(blockpos);
@@ -207,7 +207,7 @@ @@ -205,7 +205,7 @@
BlockState blockstate = world.func_180495_p(blockpos1); BlockState blockstate = world.func_180495_p(blockpos1);
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
if (block instanceof SilverfishBlock) { if (block instanceof SilverfishBlock) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/ZombieEntity.java --- a/net/minecraft/entity/monster/ZombieEntity.java
+++ b/net/minecraft/entity/monster/ZombieEntity.java +++ b/net/minecraft/entity/monster/ZombieEntity.java
@@ -106,7 +106,7 @@ @@ -107,7 +107,7 @@
this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.23F); this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.23F);
this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(3.0D); this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(3.0D);
this.func_110148_a(SharedMonsterAttributes.field_188791_g).func_111128_a(2.0D); this.func_110148_a(SharedMonsterAttributes.field_188791_g).func_111128_a(2.0D);
@ -9,7 +9,7 @@
} }
protected void func_70088_a() { protected void func_70088_a() {
@@ -279,12 +279,16 @@ @@ -281,12 +281,16 @@
livingentity = (LivingEntity)p_70097_1_.func_76346_g(); livingentity = (LivingEntity)p_70097_1_.func_76346_g();
} }
@ -28,7 +28,7 @@
for(int l = 0; l < 50; ++l) { for(int l = 0; l < 50; ++l) {
int i1 = i + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); int i1 = i + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1);
int j1 = j + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1); int j1 = j + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1);
@@ -294,6 +298,7 @@ @@ -296,6 +300,7 @@
zombieentity.func_70107_b((double)i1, (double)j1, (double)k1); zombieentity.func_70107_b((double)i1, (double)j1, (double)k1);
if (!this.field_70170_p.func_217358_a((double)i1, (double)j1, (double)k1, 7.0D) && this.field_70170_p.func_217346_i(zombieentity) && this.field_70170_p.func_217345_j(zombieentity) && !this.field_70170_p.func_72953_d(zombieentity.func_174813_aQ())) { if (!this.field_70170_p.func_217358_a((double)i1, (double)j1, (double)k1, 7.0D) && this.field_70170_p.func_217346_i(zombieentity) && this.field_70170_p.func_217345_j(zombieentity) && !this.field_70170_p.func_72953_d(zombieentity.func_174813_aQ())) {
this.field_70170_p.func_217376_c(zombieentity); this.field_70170_p.func_217376_c(zombieentity);
@ -36,7 +36,7 @@
zombieentity.func_70624_b(livingentity); zombieentity.func_70624_b(livingentity);
zombieentity.func_213386_a(this.field_70170_p, this.field_70170_p.func_175649_E(new BlockPos(zombieentity)), SpawnReason.REINFORCEMENT, (ILivingEntityData)null, (CompoundNBT)null); zombieentity.func_213386_a(this.field_70170_p, this.field_70170_p.func_175649_E(new BlockPos(zombieentity)), SpawnReason.REINFORCEMENT, (ILivingEntityData)null, (CompoundNBT)null);
this.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement caller charge", (double)-0.05F, AttributeModifier.Operation.ADDITION)); this.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement caller charge", (double)-0.05F, AttributeModifier.Operation.ADDITION));
@@ -426,7 +431,7 @@ @@ -429,7 +434,7 @@
float f = p_213386_2_.func_180170_c(); float f = p_213386_2_.func_180170_c();
this.func_98053_h(this.field_70146_Z.nextFloat() < 0.55F * f); this.func_98053_h(this.field_70146_Z.nextFloat() < 0.55F * f);
if (p_213386_4_ == null) { if (p_213386_4_ == null) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/entity/passive/RabbitEntity.java --- a/net/minecraft/entity/passive/RabbitEntity.java
+++ b/net/minecraft/entity/passive/RabbitEntity.java +++ b/net/minecraft/entity/passive/RabbitEntity.java
@@ -502,7 +502,7 @@ @@ -498,7 +498,7 @@
public boolean func_75250_a() { public boolean func_75250_a() {
if (this.field_179496_a <= 0) { if (this.field_179496_a <= 0) {

View file

@ -22,8 +22,8 @@
j = MathHelper.func_76128_c(this.field_70163_u); j = MathHelper.func_76128_c(this.field_70163_u);
k = MathHelper.func_76128_c(this.field_70161_v + (double)((float)(l / 2 % 2 * 2 - 1) * 0.25F)); k = MathHelper.func_76128_c(this.field_70161_v + (double)((float)(l / 2 % 2 * 2 - 1) * 0.25F));
BlockPos blockpos = new BlockPos(i, j, k); BlockPos blockpos = new BlockPos(i, j, k);
- if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && this.field_70170_p.func_180494_b(blockpos).func_180626_a(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) { - if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && this.field_70170_p.func_180494_b(blockpos).func_225486_c(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
+ if (this.field_70170_p.func_175623_d(blockpos) && this.field_70170_p.func_180494_b(blockpos).func_180626_a(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) { + if (this.field_70170_p.func_175623_d(blockpos) && this.field_70170_p.func_180494_b(blockpos).func_225486_c(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
this.field_70170_p.func_175656_a(blockpos, blockstate); this.field_70170_p.func_175656_a(blockpos, blockstate);
} }
} }

View file

@ -11,7 +11,7 @@
public static final EntitySize field_213835_bs = EntitySize.func_220314_b(0.6F, 1.8F); public static final EntitySize field_213835_bs = EntitySize.func_220314_b(0.6F, 1.8F);
private static final Map<Pose, EntitySize> field_213836_b = ImmutableMap.<Pose, EntitySize>builder().put(Pose.STANDING, field_213835_bs).put(Pose.SLEEPING, field_213377_as).put(Pose.FALL_FLYING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SWIMMING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SPIN_ATTACK, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SNEAKING, EntitySize.func_220314_b(0.6F, 1.5F)).put(Pose.DYING, EntitySize.func_220311_c(0.2F, 0.2F)).build(); private static final Map<Pose, EntitySize> field_213836_b = ImmutableMap.<Pose, EntitySize>builder().put(Pose.STANDING, field_213835_bs).put(Pose.SLEEPING, field_213377_as).put(Pose.FALL_FLYING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SWIMMING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SPIN_ATTACK, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SNEAKING, EntitySize.func_220314_b(0.6F, 1.5F)).put(Pose.DYING, EntitySize.func_220311_c(0.2F, 0.2F)).build();
private static final DataParameter<Float> field_184829_a = EntityDataManager.func_187226_a(PlayerEntity.class, DataSerializers.field_187193_c); private static final DataParameter<Float> field_184829_a = EntityDataManager.func_187226_a(PlayerEntity.class, DataSerializers.field_187193_c);
@@ -149,6 +153,9 @@ @@ -150,6 +154,9 @@
private final CooldownTracker field_184832_bU = this.func_184815_l(); private final CooldownTracker field_184832_bU = this.func_184815_l();
@Nullable @Nullable
public FishingBobberEntity field_71104_cf; public FishingBobberEntity field_71104_cf;
@ -21,7 +21,7 @@
public PlayerEntity(World p_i45324_1_, GameProfile p_i45324_2_) { public PlayerEntity(World p_i45324_1_, GameProfile p_i45324_2_) {
super(EntityType.field_200729_aH, p_i45324_1_); super(EntityType.field_200729_aH, p_i45324_1_);
@@ -167,6 +174,7 @@ @@ -181,6 +188,7 @@
this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.1F); this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.1F);
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188790_f); this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188790_f);
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188792_h); this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188792_h);
@ -29,7 +29,7 @@
} }
protected void func_70088_a() { protected void func_70088_a() {
@@ -180,6 +188,7 @@ @@ -194,6 +202,7 @@
} }
public void func_70071_h_() { public void func_70071_h_() {
@ -37,7 +37,7 @@
this.field_70145_X = this.func_175149_v(); this.field_70145_X = this.func_175149_v();
if (this.func_175149_v()) { if (this.func_175149_v()) {
this.field_70122_E = false; this.field_70122_E = false;
@@ -195,7 +204,7 @@ @@ -209,7 +218,7 @@
this.field_71076_b = 100; this.field_71076_b = 100;
} }
@ -46,7 +46,7 @@
this.func_70999_a(false, true, true); this.func_70999_a(false, true, true);
} }
} else if (this.field_71076_b > 0) { } else if (this.field_71076_b > 0) {
@@ -253,6 +262,7 @@ @@ -267,6 +276,7 @@
this.func_203041_m(); this.func_203041_m();
this.field_184832_bU.func_185144_a(); this.field_184832_bU.func_185144_a();
this.func_213832_dB(); this.func_213832_dB();
@ -54,7 +54,7 @@
} }
protected boolean func_204229_de() { protected boolean func_204229_de() {
@@ -427,10 +437,10 @@ @@ -441,10 +451,10 @@
this.field_71107_bF = this.field_71109_bG; this.field_71107_bF = this.field_71109_bG;
this.field_71109_bG = 0.0F; this.field_71109_bG = 0.0F;
this.func_71015_k(this.field_70165_t - d0, this.field_70163_u - d1, this.field_70161_v - d2); this.func_71015_k(this.field_70165_t - d0, this.field_70163_u - d1, this.field_70161_v - d2);
@ -67,7 +67,7 @@
} }
} }
@@ -543,6 +553,7 @@ @@ -557,6 +567,7 @@
} }
public void func_70645_a(DamageSource p_70645_1_) { public void func_70645_a(DamageSource p_70645_1_) {
@ -75,7 +75,7 @@
super.func_70645_a(p_70645_1_); super.func_70645_a(p_70645_1_);
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v); this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
if (!this.func_175149_v()) { if (!this.func_175149_v()) {
@@ -597,12 +608,14 @@ @@ -611,12 +622,14 @@
@Nullable @Nullable
public ItemEntity func_71040_bB(boolean p_71040_1_) { public ItemEntity func_71040_bB(boolean p_71040_1_) {
@ -92,7 +92,7 @@
} }
@Nullable @Nullable
@@ -636,7 +649,12 @@ @@ -650,7 +663,12 @@
} }
} }
@ -105,7 +105,7 @@
float f = this.field_71071_by.func_184438_a(p_184813_1_); float f = this.field_71071_by.func_184438_a(p_184813_1_);
if (f > 1.0F) { if (f > 1.0F) {
int i = EnchantmentHelper.func_185293_e(this); int i = EnchantmentHelper.func_185293_e(this);
@@ -678,11 +696,12 @@ @@ -692,11 +710,12 @@
f /= 5.0F; f /= 5.0F;
} }
@ -119,7 +119,7 @@
} }
public void func_70037_a(CompoundNBT p_70037_1_) { public void func_70037_a(CompoundNBT p_70037_1_) {
@@ -706,6 +725,17 @@ @@ -720,6 +739,17 @@
this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced"); this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced");
} }
@ -137,7 +137,7 @@
this.field_71100_bB.func_75112_a(p_70037_1_); this.field_71100_bB.func_75112_a(p_70037_1_);
this.field_71075_bZ.func_75095_b(p_70037_1_); this.field_71075_bZ.func_75095_b(p_70037_1_);
if (p_70037_1_.func_150297_b("EnderItems", 9)) { if (p_70037_1_.func_150297_b("EnderItems", 9)) {
@@ -751,9 +781,26 @@ @@ -765,9 +795,26 @@
p_213281_1_.func_218657_a("ShoulderEntityRight", this.func_192025_dl()); p_213281_1_.func_218657_a("ShoulderEntityRight", this.func_192025_dl());
} }
@ -164,7 +164,7 @@
if (this.func_180431_b(p_70097_1_)) { if (this.func_180431_b(p_70097_1_)) {
return false; return false;
} else if (this.field_71075_bZ.field_75102_a && !p_70097_1_.func_76357_e()) { } else if (this.field_71075_bZ.field_75102_a && !p_70097_1_.func_76357_e()) {
@@ -785,7 +832,7 @@ @@ -799,7 +846,7 @@
protected void func_190629_c(LivingEntity p_190629_1_) { protected void func_190629_c(LivingEntity p_190629_1_) {
super.func_190629_c(p_190629_1_); super.func_190629_c(p_190629_1_);
@ -173,7 +173,7 @@
this.func_190777_m(true); this.func_190777_m(true);
} }
@@ -806,13 +853,15 @@ @@ -820,13 +867,15 @@
} }
protected void func_184590_k(float p_184590_1_) { protected void func_184590_k(float p_184590_1_) {
@ -190,7 +190,7 @@
if (hand == Hand.MAIN_HAND) { if (hand == Hand.MAIN_HAND) {
this.func_184201_a(EquipmentSlotType.MAINHAND, ItemStack.field_190927_a); this.func_184201_a(EquipmentSlotType.MAINHAND, ItemStack.field_190927_a);
} else { } else {
@@ -828,11 +877,14 @@ @@ -842,11 +891,14 @@
protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) { protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) {
if (!this.func_180431_b(p_70665_1_)) { if (!this.func_180431_b(p_70665_1_)) {
@ -205,7 +205,7 @@
float f1 = f - p_70665_2_; float f1 = f - p_70665_2_;
if (f1 > 0.0F && f1 < 3.4028235E37F) { if (f1 > 0.0F && f1 < 3.4028235E37F) {
this.func_195067_a(Stats.field_212738_J, Math.round(f1 * 10.0F)); this.func_195067_a(Stats.field_212738_J, Math.round(f1 * 10.0F));
@@ -887,6 +939,8 @@ @@ -901,6 +953,8 @@
return ActionResultType.PASS; return ActionResultType.PASS;
} else { } else {
@ -214,7 +214,7 @@
ItemStack itemstack = this.func_184586_b(p_190775_2_); ItemStack itemstack = this.func_184586_b(p_190775_2_);
ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l(); ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l();
if (p_190775_1_.func_184230_a(this, p_190775_2_)) { if (p_190775_1_.func_184230_a(this, p_190775_2_)) {
@@ -894,6 +948,9 @@ @@ -908,6 +962,9 @@
itemstack.func_190920_e(itemstack1.func_190916_E()); itemstack.func_190920_e(itemstack1.func_190916_E());
} }
@ -224,7 +224,7 @@
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} else { } else {
if (!itemstack.func_190926_b() && p_190775_1_ instanceof LivingEntity) { if (!itemstack.func_190926_b() && p_190775_1_ instanceof LivingEntity) {
@@ -903,6 +960,7 @@ @@ -917,6 +974,7 @@
if (itemstack.func_111282_a(this, (LivingEntity)p_190775_1_, p_190775_2_)) { if (itemstack.func_111282_a(this, (LivingEntity)p_190775_1_, p_190775_2_)) {
if (itemstack.func_190926_b() && !this.field_71075_bZ.field_75098_d) { if (itemstack.func_190926_b() && !this.field_71075_bZ.field_75098_d) {
@ -232,7 +232,7 @@
this.func_184611_a(p_190775_2_, ItemStack.field_190927_a); this.func_184611_a(p_190775_2_, ItemStack.field_190927_a);
} }
@@ -929,6 +987,7 @@ @@ -943,6 +1001,7 @@
} }
public void func_71059_n(Entity p_71059_1_) { public void func_71059_n(Entity p_71059_1_) {
@ -240,7 +240,7 @@
if (p_71059_1_.func_70075_an()) { if (p_71059_1_.func_70075_an()) {
if (!p_71059_1_.func_85031_j(this)) { if (!p_71059_1_.func_85031_j(this)) {
float f = (float)this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111126_e(); float f = (float)this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111126_e();
@@ -956,8 +1015,10 @@ @@ -970,8 +1029,10 @@
boolean flag2 = flag && this.field_70143_R > 0.0F && !this.field_70122_E && !this.func_70617_f_() && !this.func_70090_H() && !this.func_70644_a(Effects.field_76440_q) && !this.func_184218_aH() && p_71059_1_ instanceof LivingEntity; boolean flag2 = flag && this.field_70143_R > 0.0F && !this.field_70122_E && !this.func_70617_f_() && !this.func_70090_H() && !this.func_70644_a(Effects.field_76440_q) && !this.func_184218_aH() && p_71059_1_ instanceof LivingEntity;
flag2 = flag2 && !this.func_70051_ag(); flag2 = flag2 && !this.func_70051_ag();
@ -252,7 +252,7 @@
} }
f = f + f1; f = f + f1;
@@ -1045,8 +1106,10 @@ @@ -1059,8 +1120,10 @@
} }
if (!this.field_70170_p.field_72995_K && !itemstack1.func_190926_b() && entity instanceof LivingEntity) { if (!this.field_70170_p.field_72995_K && !itemstack1.func_190926_b() && entity instanceof LivingEntity) {
@ -263,7 +263,7 @@
this.func_184611_a(Hand.MAIN_HAND, ItemStack.field_190927_a); this.func_184611_a(Hand.MAIN_HAND, ItemStack.field_190927_a);
} }
} }
@@ -1088,7 +1151,7 @@ @@ -1102,7 +1165,7 @@
} }
if (this.field_70146_Z.nextFloat() < f) { if (this.field_70146_Z.nextFloat() < f) {
@ -272,7 +272,7 @@
this.func_184602_cy(); this.func_184602_cy();
this.field_70170_p.func_72960_a(this, (byte)30); this.field_70170_p.func_72960_a(this, (byte)30);
} }
@@ -1132,6 +1195,9 @@ @@ -1146,6 +1209,9 @@
} }
public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) { public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) {
@ -282,7 +282,7 @@
Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D); Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D);
if (!this.field_70170_p.field_72995_K) { if (!this.field_70170_p.field_72995_K) {
if (this.func_70608_bn() || !this.func_70089_S()) { if (this.func_70608_bn() || !this.func_70089_S()) {
@@ -1142,7 +1208,7 @@ @@ -1156,7 +1222,7 @@
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE); return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE);
} }
@ -291,7 +291,7 @@
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_NOW); return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_NOW);
} }
@@ -1184,6 +1250,8 @@ @@ -1197,6 +1263,8 @@
private boolean func_190774_a(BlockPos p_190774_1_, Direction p_190774_2_) { private boolean func_190774_a(BlockPos p_190774_1_, Direction p_190774_2_) {
if (Math.abs(this.field_70165_t - (double)p_190774_1_.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)p_190774_1_.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)p_190774_1_.func_177952_p()) <= 3.0D) { if (Math.abs(this.field_70165_t - (double)p_190774_1_.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)p_190774_1_.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)p_190774_1_.func_177952_p()) <= 3.0D) {
return true; return true;
@ -300,7 +300,7 @@
} else { } else {
BlockPos blockpos = p_190774_1_.func_177972_a(p_190774_2_.func_176734_d()); BlockPos blockpos = p_190774_1_.func_177972_a(p_190774_2_.func_176734_d());
return Math.abs(this.field_70165_t - (double)blockpos.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)blockpos.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)blockpos.func_177952_p()) <= 3.0D; return Math.abs(this.field_70165_t - (double)blockpos.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)blockpos.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)blockpos.func_177952_p()) <= 3.0D;
@@ -1196,6 +1264,7 @@ @@ -1209,6 +1277,7 @@
} }
public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_) { public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_) {
@ -308,7 +308,7 @@
Optional<BlockPos> optional = this.func_213374_dv(); Optional<BlockPos> optional = this.func_213374_dv();
super.func_213366_dy(); super.func_213366_dy();
if (this.field_70170_p instanceof ServerWorld && p_70999_2_) { if (this.field_70170_p instanceof ServerWorld && p_70999_2_) {
@@ -1216,17 +1285,17 @@ @@ -1229,17 +1298,17 @@
} }
public static Optional<Vec3d> func_213822_a(IWorldReader p_213822_0_, BlockPos p_213822_1_, boolean p_213822_2_) { public static Optional<Vec3d> func_213822_a(IWorldReader p_213822_0_, BlockPos p_213822_1_, boolean p_213822_2_) {
@ -330,7 +330,7 @@
} }
} }
@@ -1241,23 +1310,67 @@ @@ -1254,23 +1323,67 @@
public void func_146105_b(ITextComponent p_146105_1_, boolean p_146105_2_) { public void func_146105_b(ITextComponent p_146105_1_, boolean p_146105_2_) {
} }
@ -407,7 +407,7 @@
} }
public void func_195066_a(ResourceLocation p_195066_1_) { public void func_195066_a(ResourceLocation p_195066_1_) {
@@ -1423,6 +1536,8 @@ @@ -1436,6 +1549,8 @@
} }
super.func_180430_e(p_180430_1_, p_180430_2_); super.func_180430_e(p_180430_1_, p_180430_2_);
@ -416,7 +416,7 @@
} }
} }
@@ -1685,7 +1800,10 @@ @@ -1703,7 +1818,10 @@
} }
public ITextComponent func_145748_c_() { public ITextComponent func_145748_c_() {
@ -428,7 +428,7 @@
return this.func_208016_c(itextcomponent); return this.func_208016_c(itextcomponent);
} }
@@ -1921,4 +2039,44 @@ @@ -1939,4 +2057,44 @@
return this.field_221260_g; return this.field_221260_g;
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/item/BoneMealItem.java --- a/net/minecraft/item/BoneMealItem.java
+++ b/net/minecraft/item/BoneMealItem.java +++ b/net/minecraft/item/BoneMealItem.java
@@ -27,7 +27,7 @@ @@ -26,7 +26,7 @@
World world = p_195939_1_.func_195991_k(); World world = p_195939_1_.func_195991_k();
BlockPos blockpos = p_195939_1_.func_195995_a(); BlockPos blockpos = p_195939_1_.func_195995_a();
BlockPos blockpos1 = blockpos.func_177972_a(p_195939_1_.func_196000_l()); BlockPos blockpos1 = blockpos.func_177972_a(p_195939_1_.func_196000_l());
@ -9,14 +9,14 @@
if (!world.field_72995_K) { if (!world.field_72995_K) {
world.func_217379_c(2005, blockpos, 0); world.func_217379_c(2005, blockpos, 0);
} }
@@ -48,8 +48,17 @@ @@ -47,8 +47,17 @@
} }
} }
+ @Deprecated //Forge: Use Player/Hand version + @Deprecated //Forge: Use Player/Hand version
public static boolean func_195966_a(ItemStack p_195966_0_, World p_195966_1_, BlockPos p_195966_2_) { public static boolean func_195966_a(ItemStack p_195966_0_, World p_195966_1_, BlockPos p_195966_2_) {
+ if (p_195966_1_ instanceof net.minecraft.world.ServerWorld) + if (p_195966_1_ instanceof net.minecraft.world.server.ServerWorld)
+ return applyBonemeal(p_195966_0_, p_195966_1_, p_195966_2_, net.minecraftforge.common.util.FakePlayerFactory.getMinecraft((net.minecraft.world.ServerWorld)p_195966_1_)); + return applyBonemeal(p_195966_0_, p_195966_1_, p_195966_2_, net.minecraftforge.common.util.FakePlayerFactory.getMinecraft((net.minecraft.world.server.ServerWorld)p_195966_1_));
+ return false; + return false;
+ } + }
+ +
@ -27,7 +27,7 @@
if (blockstate.func_177230_c() instanceof IGrowable) { if (blockstate.func_177230_c() instanceof IGrowable) {
IGrowable igrowable = (IGrowable)blockstate.func_177230_c(); IGrowable igrowable = (IGrowable)blockstate.func_177230_c();
if (igrowable.func_176473_a(p_195966_1_, p_195966_2_, blockstate, p_195966_1_.field_72995_K)) { if (igrowable.func_176473_a(p_195966_1_, p_195966_2_, blockstate, p_195966_1_.field_72995_K)) {
@@ -125,7 +134,7 @@ @@ -124,7 +133,7 @@
} }
BlockState blockstate = p_195965_0_.func_180495_p(p_195965_1_); BlockState blockstate = p_195965_0_.func_180495_p(p_195965_1_);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/item/FilledMapItem.java --- a/net/minecraft/item/FilledMapItem.java
+++ b/net/minecraft/item/FilledMapItem.java +++ b/net/minecraft/item/FilledMapItem.java
@@ -52,6 +52,16 @@ @@ -51,6 +51,16 @@
@Nullable @Nullable
public static MapData func_195950_a(ItemStack p_195950_0_, World p_195950_1_) { public static MapData func_195950_a(ItemStack p_195950_0_, World p_195950_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/network/NetworkManager.java --- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java +++ b/net/minecraft/network/NetworkManager.java
@@ -76,6 +76,7 @@ @@ -74,6 +74,7 @@
private float field_211397_t; private float field_211397_t;
private int field_211398_u; private int field_211398_u;
private boolean field_211399_v; private boolean field_211399_v;
@ -8,7 +8,7 @@
public NetworkManager(PacketDirection p_i46004_1_) { public NetworkManager(PacketDirection p_i46004_1_) {
this.field_179294_g = p_i46004_1_; this.field_179294_g = p_i46004_1_;
@@ -85,6 +86,7 @@ @@ -83,6 +84,7 @@
super.channelActive(p_channelActive_1_); super.channelActive(p_channelActive_1_);
this.field_150746_k = p_channelActive_1_.channel(); this.field_150746_k = p_channelActive_1_.channel();
this.field_150743_l = this.field_150746_k.remoteAddress(); this.field_150743_l = this.field_150746_k.remoteAddress();
@ -16,7 +16,7 @@
try { try {
this.func_150723_a(ProtocolType.HANDSHAKING); this.func_150723_a(ProtocolType.HANDSHAKING);
@@ -269,7 +271,9 @@ @@ -257,7 +259,9 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static NetworkManager func_181124_a(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) { public static NetworkManager func_181124_a(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) {
@ -26,7 +26,7 @@
Class<? extends SocketChannel> oclass; Class<? extends SocketChannel> oclass;
LazyLoadBase<? extends EventLoopGroup> lazyloadbase; LazyLoadBase<? extends EventLoopGroup> lazyloadbase;
if (Epoll.isAvailable() && p_181124_2_) { if (Epoll.isAvailable() && p_181124_2_) {
@@ -297,6 +301,7 @@ @@ -285,6 +289,7 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public static NetworkManager func_150722_a(SocketAddress p_150722_0_) { public static NetworkManager func_150722_a(SocketAddress p_150722_0_) {
final NetworkManager networkmanager = new NetworkManager(PacketDirection.CLIENTBOUND); final NetworkManager networkmanager = new NetworkManager(PacketDirection.CLIENTBOUND);
@ -34,7 +34,7 @@
(new Bootstrap()).group(field_179296_e.func_179281_c()).handler(new ChannelInitializer<Channel>() { (new Bootstrap()).group(field_179296_e.func_179281_c()).handler(new ChannelInitializer<Channel>() {
protected void initChannel(Channel p_initChannel_1_) throws Exception { protected void initChannel(Channel p_initChannel_1_) throws Exception {
p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager); p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager);
@@ -388,6 +393,14 @@ @@ -376,6 +381,14 @@
return this.field_211397_t; return this.field_211397_t;
} }

View file

@ -15,7 +15,7 @@
this.func_147326_c(); this.func_147326_c();
} else if (this.field_147328_g == ServerLoginNetHandler.State.DELAY_ACCEPT) { } else if (this.field_147328_g == ServerLoginNetHandler.State.DELAY_ACCEPT) {
ServerPlayerEntity serverplayerentity = this.field_147327_f.func_184103_al().func_177451_a(this.field_147337_i.getId()); ServerPlayerEntity serverplayerentity = this.field_147327_f.func_184103_al().func_177451_a(this.field_147337_i.getId());
@@ -124,7 +130,7 @@ @@ -128,7 +134,7 @@
this.field_147328_g = ServerLoginNetHandler.State.KEY; this.field_147328_g = ServerLoginNetHandler.State.KEY;
this.field_147333_a.func_179290_a(new SEncryptionRequestPacket("", this.field_147327_f.func_71250_E().getPublic(), this.field_147330_e)); this.field_147333_a.func_179290_a(new SEncryptionRequestPacket("", this.field_147327_f.func_71250_E().getPublic(), this.field_147330_e));
} else { } else {
@ -24,7 +24,7 @@
} }
} }
@@ -138,7 +144,7 @@ @@ -142,7 +148,7 @@
this.field_147335_k = p_147315_1_.func_149300_a(privatekey); this.field_147335_k = p_147315_1_.func_149300_a(privatekey);
this.field_147328_g = ServerLoginNetHandler.State.AUTHENTICATING; this.field_147328_g = ServerLoginNetHandler.State.AUTHENTICATING;
this.field_147333_a.func_150727_a(this.field_147335_k); this.field_147333_a.func_150727_a(this.field_147335_k);
@ -33,7 +33,7 @@
public void run() { public void run() {
GameProfile gameprofile = ServerLoginNetHandler.this.field_147337_i; GameProfile gameprofile = ServerLoginNetHandler.this.field_147337_i;
@@ -147,11 +153,11 @@ @@ -151,11 +157,11 @@
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.field_147327_f.func_147130_as().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.func_191235_a()); ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.field_147327_f.func_147130_as().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.func_191235_a());
if (ServerLoginNetHandler.this.field_147337_i != null) { if (ServerLoginNetHandler.this.field_147337_i != null) {
ServerLoginNetHandler.field_147332_c.info("UUID of player {} is {}", ServerLoginNetHandler.this.field_147337_i.getName(), ServerLoginNetHandler.this.field_147337_i.getId()); ServerLoginNetHandler.field_147332_c.info("UUID of player {} is {}", ServerLoginNetHandler.this.field_147337_i.getName(), ServerLoginNetHandler.this.field_147337_i.getId());
@ -47,7 +47,7 @@
} else { } else {
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.unverified_username")); ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.unverified_username"));
ServerLoginNetHandler.field_147332_c.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName()); ServerLoginNetHandler.field_147332_c.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName());
@@ -160,7 +166,7 @@ @@ -164,7 +170,7 @@
if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) { if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
ServerLoginNetHandler.field_147332_c.warn("Authentication servers are down but will let them in anyway!"); ServerLoginNetHandler.field_147332_c.warn("Authentication servers are down but will let them in anyway!");
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile); ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
@ -56,7 +56,7 @@
} else { } else {
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.authservers_down")); ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.authservers_down"));
ServerLoginNetHandler.field_147332_c.error("Couldn't verify username because servers are unavailable"); ServerLoginNetHandler.field_147332_c.error("Couldn't verify username because servers are unavailable");
@@ -181,6 +187,7 @@ @@ -185,6 +191,7 @@
} }
public void func_209526_a(CCustomPayloadLoginPacket p_209526_1_) { public void func_209526_a(CCustomPayloadLoginPacket p_209526_1_) {

View file

@ -12,29 +12,18 @@
this.field_147371_a.func_179290_a(new SMoveVehiclePacket(entity)); this.field_147371_a.func_179290_a(new SMoveVehiclePacket(entity));
return; return;
} }
@@ -826,7 +828,9 @@ @@ -839,7 +841,9 @@
double d1 = this.field_147369_b.field_70163_u - ((double)blockpos.func_177956_o() + 0.5D) + 1.5D;
double d2 = this.field_147369_b.field_70161_v - ((double)blockpos.func_177952_p() + 0.5D);
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
- if (d3 > 36.0D) {
+ double dist = field_147369_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 1;
+ dist *= dist;
+ if (d3 > dist) {
return;
} else if (blockpos.func_177956_o() >= this.field_147367_d.func_71207_Z()) {
return;
@@ -866,7 +870,9 @@
Direction direction = blockraytraceresult.func_216354_b(); Direction direction = blockraytraceresult.func_216354_b();
this.field_147369_b.func_143004_u(); this.field_147369_b.func_143004_u();
if (blockpos.func_177956_o() < this.field_147367_d.func_71207_Z() - 1 || direction != Direction.UP && blockpos.func_177956_o() < this.field_147367_d.func_71207_Z()) { if (blockpos.func_177956_o() < this.field_147367_d.func_71207_Z() - 1 || direction != Direction.UP && blockpos.func_177956_o() < this.field_147367_d.func_71207_Z()) {
- if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < 64.0D && !this.field_147367_d.func_175579_a(serverworld, blockpos, this.field_147369_b) && serverworld.func_175723_af().func_177746_a(blockpos)) { - if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < 64.0D && serverworld.func_175660_a(this.field_147369_b, blockpos)) {
+ double dist = field_147369_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 3; + double dist = field_147369_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 3;
+ dist *= dist; + dist *= dist;
+ if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < dist && !this.field_147367_d.func_175579_a(serverworld, blockpos, this.field_147369_b) && serverworld.func_175723_af().func_177746_a(blockpos)) { + if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < dist && serverworld.func_175660_a(this.field_147369_b, blockpos)) {
this.field_147369_b.field_71134_c.func_219441_a(this.field_147369_b, serverworld, itemstack, hand, blockraytraceresult); this.field_147369_b.field_71134_c.func_219441_a(this.field_147369_b, serverworld, itemstack, hand, blockraytraceresult);
} }
} else { } else {
@@ -986,7 +992,9 @@ @@ -959,7 +963,9 @@
if (s.startsWith("/")) { if (s.startsWith("/")) {
this.func_147361_d(s); this.func_147361_d(s);
} else { } else {
@ -45,7 +34,7 @@
this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false); this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false);
} }
@@ -1084,6 +1092,7 @@ @@ -1057,6 +1063,7 @@
this.field_147369_b.func_190775_a(entity, hand); this.field_147369_b.func_190775_a(entity, hand);
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.INTERACT_AT) { } else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.INTERACT_AT) {
Hand hand1 = p_147340_1_.func_186994_b(); Hand hand1 = p_147340_1_.func_186994_b();
@ -53,7 +42,7 @@
entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), hand1); entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), hand1);
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.ATTACK) { } else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.ATTACK) {
if (entity instanceof ItemEntity || entity instanceof ExperienceOrbEntity || entity instanceof AbstractArrowEntity || entity == this.field_147369_b) { if (entity instanceof ItemEntity || entity instanceof ExperienceOrbEntity || entity instanceof AbstractArrowEntity || entity == this.field_147369_b) {
@@ -1114,7 +1123,7 @@ @@ -1087,7 +1094,7 @@
return; return;
} }
@ -62,7 +51,7 @@
if (this.field_147367_d.func_71199_h()) { if (this.field_147367_d.func_71199_h()) {
this.field_147369_b.func_71033_a(GameType.SPECTATOR); this.field_147369_b.func_71033_a(GameType.SPECTATOR);
this.field_147369_b.func_71121_q().func_82736_K().func_223585_a(GameRules.field_223613_p).func_223570_a(false, this.field_147367_d); this.field_147369_b.func_71121_q().func_82736_K().func_223585_a(GameRules.field_223613_p).func_223570_a(false, this.field_147367_d);
@@ -1291,6 +1300,8 @@ @@ -1264,6 +1271,8 @@
} }
public void func_147349_a(CCustomPayloadPacket p_147349_1_) { public void func_147349_a(CCustomPayloadPacket p_147349_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/pathfinding/WalkNodeProcessor.java --- a/net/minecraft/pathfinding/WalkNodeProcessor.java
+++ b/net/minecraft/pathfinding/WalkNodeProcessor.java +++ b/net/minecraft/pathfinding/WalkNodeProcessor.java
@@ -26,6 +26,7 @@ @@ -27,6 +27,7 @@
public class WalkNodeProcessor extends NodeProcessor { public class WalkNodeProcessor extends NodeProcessor {
protected float field_176183_h; protected float field_176183_h;
@ -8,7 +8,7 @@
public void func_186315_a(IWorldReader p_186315_1_, MobEntity p_186315_2_) { public void func_186315_a(IWorldReader p_186315_1_, MobEntity p_186315_2_) {
super.func_186315_a(p_186315_1_, p_186315_2_); super.func_186315_a(p_186315_1_, p_186315_2_);
@@ -258,7 +259,9 @@ @@ -269,7 +270,9 @@
PathNodeType pathnodetype = PathNodeType.BLOCKED; PathNodeType pathnodetype = PathNodeType.BLOCKED;
double d0 = (double)p_186319_5_.func_213311_cf() / 2.0D; double d0 = (double)p_186319_5_.func_213311_cf() / 2.0D;
BlockPos blockpos = new BlockPos(p_186319_5_); BlockPos blockpos = new BlockPos(p_186319_5_);
@ -18,7 +18,7 @@
if (enumset.contains(PathNodeType.FENCE)) { if (enumset.contains(PathNodeType.FENCE)) {
return PathNodeType.FENCE; return PathNodeType.FENCE;
} else { } else {
@@ -348,6 +351,7 @@ @@ -359,6 +362,7 @@
if (pathnodetype1 == PathNodeType.DAMAGE_OTHER) { if (pathnodetype1 == PathNodeType.DAMAGE_OTHER) {
pathnodetype = PathNodeType.DAMAGE_OTHER; pathnodetype = PathNodeType.DAMAGE_OTHER;
} }
@ -26,7 +26,7 @@
} }
pathnodetype = this.func_193578_a(p_186330_1_, p_186330_2_, p_186330_3_, p_186330_4_, pathnodetype); pathnodetype = this.func_193578_a(p_186330_1_, p_186330_2_, p_186330_3_, p_186330_4_, pathnodetype);
@@ -360,12 +364,14 @@ @@ -371,12 +375,14 @@
for(int i = -1; i <= 1; ++i) { for(int i = -1; i <= 1; ++i) {
for(int j = -1; j <= 1; ++j) { for(int j = -1; j <= 1; ++j) {
if (i != 0 || j != 0) { if (i != 0 || j != 0) {
@ -45,7 +45,7 @@
p_193578_5_ = PathNodeType.DANGER_OTHER; p_193578_5_ = PathNodeType.DANGER_OTHER;
} }
} }
@@ -380,9 +386,11 @@ @@ -391,9 +397,11 @@
protected PathNodeType func_189553_b(IBlockReader p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_) { protected PathNodeType func_189553_b(IBlockReader p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_) {
BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_); BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_);
BlockState blockstate = p_189553_1_.func_180495_p(blockpos); BlockState blockstate = p_189553_1_.func_180495_p(blockpos);

View file

@ -2,7 +2,7 @@
+++ b/net/minecraft/potion/Effects.java +++ b/net/minecraft/potion/Effects.java
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
import net.minecraft.world.Difficulty; import net.minecraft.world.Difficulty;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
+@net.minecraftforge.registries.ObjectHolder("minecraft") +@net.minecraftforge.registries.ObjectHolder("minecraft")
public class Effects { public class Effects {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -181,7 +181,7 @@ @@ -191,7 +191,7 @@
private final GameProfileRepository field_152365_W; private final GameProfileRepository field_152365_W;
private final PlayerProfileCache field_152366_X; private final PlayerProfileCache field_152366_X;
private long field_147142_T; private long field_147142_T;
@ -9,7 +9,7 @@
p_213187_0_.setUncaughtExceptionHandler((p_213206_0_, p_213206_1_) -> { p_213187_0_.setUncaughtExceptionHandler((p_213206_0_, p_213206_1_) -> {
field_147145_h.error(p_213206_1_); field_147145_h.error(p_213206_1_);
}); });
@@ -317,6 +317,8 @@ @@ -327,6 +327,8 @@
this.func_200245_b(new TranslationTextComponent("menu.loadingLevel")); this.func_200245_b(new TranslationTextComponent("menu.loadingLevel"));
SaveHandler savehandler = this.func_71254_M().func_197715_a(p_71247_1_, this); SaveHandler savehandler = this.func_71254_M().func_197715_a(p_71247_1_, this);
this.func_175584_a(this.func_71270_I(), savehandler); this.func_175584_a(this.func_71270_I(), savehandler);
@ -18,7 +18,7 @@
WorldInfo worldinfo = savehandler.func_75757_d(); WorldInfo worldinfo = savehandler.func_75757_d();
WorldSettings worldsettings; WorldSettings worldsettings;
if (worldinfo == null) { if (worldinfo == null) {
@@ -337,7 +339,6 @@ @@ -347,7 +349,6 @@
} }
this.func_195560_a(savehandler.func_75765_b(), worldinfo); this.func_195560_a(savehandler.func_75765_b(), worldinfo);
@ -26,7 +26,7 @@
this.func_213194_a(savehandler, worldinfo, worldsettings, ichunkstatuslistener); this.func_213194_a(savehandler, worldinfo, worldsettings, ichunkstatuslistener);
this.func_147139_a(this.func_147135_j(), true); this.func_147139_a(this.func_147135_j(), true);
this.func_213186_a(ichunkstatuslistener); this.func_213186_a(ichunkstatuslistener);
@@ -385,6 +386,7 @@ @@ -395,6 +396,7 @@
if (dimensiontype != DimensionType.field_223227_a_) { if (dimensiontype != DimensionType.field_223227_a_) {
this.field_71305_c.put(dimensiontype, new ServerMultiWorld(serverworld1, this, this.field_213217_au, p_213194_1_, dimensiontype, this.field_71304_b, p_213194_4_)); this.field_71305_c.put(dimensiontype, new ServerMultiWorld(serverworld1, this, this.field_213217_au, p_213194_1_, dimensiontype, this.field_71304_b, p_213194_4_));
} }
@ -34,7 +34,7 @@
} }
} }
@@ -540,6 +542,7 @@ @@ -552,6 +554,7 @@
for(ServerWorld serverworld1 : this.func_212370_w()) { for(ServerWorld serverworld1 : this.func_212370_w()) {
if (serverworld1 != null) { if (serverworld1 != null) {
try { try {
@ -42,7 +42,7 @@
serverworld1.close(); serverworld1.close();
} catch (IOException ioexception) { } catch (IOException ioexception) {
field_147145_h.error("Exception closing the level", (Throwable)ioexception); field_147145_h.error("Exception closing the level", (Throwable)ioexception);
@@ -580,6 +583,7 @@ @@ -592,6 +595,7 @@
public void run() { public void run() {
try { try {
if (this.func_71197_b()) { if (this.func_71197_b()) {
@ -50,7 +50,7 @@
this.field_211151_aa = Util.func_211177_b(); this.field_211151_aa = Util.func_211177_b();
this.field_147147_p.func_151315_a(new StringTextComponent(this.field_71286_C)); this.field_147147_p.func_151315_a(new StringTextComponent(this.field_71286_C));
this.field_147147_p.func_151321_a(new ServerStatusResponse.Version(SharedConstants.func_215069_a().getName(), SharedConstants.func_215069_a().getProtocolVersion())); this.field_147147_p.func_151321_a(new ServerStatusResponse.Version(SharedConstants.func_215069_a().getName(), SharedConstants.func_215069_a().getProtocolVersion()));
@@ -611,9 +615,15 @@ @@ -623,9 +627,15 @@
this.field_71304_b.func_219897_b(); this.field_71304_b.func_219897_b();
this.field_71296_Q = true; this.field_71296_Q = true;
} }
@ -66,7 +66,7 @@
} catch (Throwable throwable1) { } catch (Throwable throwable1) {
field_147145_h.error("Encountered an unexpected exception", throwable1); field_147145_h.error("Encountered an unexpected exception", throwable1);
CrashReport crashreport; CrashReport crashreport;
@@ -630,6 +640,7 @@ @@ -642,6 +652,7 @@
field_147145_h.error("We were unable to save this crash report to disk."); field_147145_h.error("We were unable to save this crash report to disk.");
} }
@ -74,7 +74,7 @@
this.func_71228_a(crashreport); this.func_71228_a(crashreport);
} finally { } finally {
try { try {
@@ -638,6 +649,7 @@ @@ -650,6 +661,7 @@
} catch (Throwable throwable) { } catch (Throwable throwable) {
field_147145_h.error("Exception stopping the server", throwable); field_147145_h.error("Exception stopping the server", throwable);
} finally { } finally {
@ -82,7 +82,7 @@
this.func_71240_o(); this.func_71240_o();
} }
@@ -734,6 +746,7 @@ @@ -746,6 +758,7 @@
protected void func_71217_p(BooleanSupplier p_71217_1_) { protected void func_71217_p(BooleanSupplier p_71217_1_) {
long i = Util.func_211178_c(); long i = Util.func_211178_c();
@ -90,7 +90,7 @@
++this.field_71315_w; ++this.field_71315_w;
this.func_71190_q(p_71217_1_); this.func_71190_q(p_71217_1_);
if (i - this.field_147142_T >= 5000000000L) { if (i - this.field_147142_T >= 5000000000L) {
@@ -748,6 +761,7 @@ @@ -760,6 +773,7 @@
Collections.shuffle(Arrays.asList(agameprofile)); Collections.shuffle(Arrays.asList(agameprofile));
this.field_147147_p.func_151318_b().func_151330_a(agameprofile); this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
@ -98,7 +98,7 @@
} }
if (this.field_71315_w % 6000 == 0) { if (this.field_71315_w % 6000 == 0) {
@@ -775,6 +789,7 @@ @@ -787,6 +801,7 @@
long i1 = Util.func_211178_c(); long i1 = Util.func_211178_c();
this.field_213215_ap.func_181747_a(i1 - i); this.field_213215_ap.func_181747_a(i1 - i);
this.field_71304_b.func_76319_b(); this.field_71304_b.func_76319_b();
@ -106,7 +106,7 @@
} }
protected void func_71190_q(BooleanSupplier p_71190_1_) { protected void func_71190_q(BooleanSupplier p_71190_1_) {
@@ -782,7 +797,8 @@ @@ -794,7 +809,8 @@
this.func_193030_aL().func_73660_a(); this.func_193030_aL().func_73660_a();
this.field_71304_b.func_219895_b("levels"); this.field_71304_b.func_219895_b("levels");
@ -116,7 +116,7 @@
if (serverworld.field_73011_w.func_186058_p() == DimensionType.field_223227_a_ || this.func_71255_r()) { if (serverworld.field_73011_w.func_186058_p() == DimensionType.field_223227_a_ || this.func_71255_r()) {
this.field_71304_b.func_194340_a(() -> { this.field_71304_b.func_194340_a(() -> {
return serverworld.func_72912_H().func_76065_j() + " " + Registry.field_212622_k.func_177774_c(serverworld.field_73011_w.func_186058_p()); return serverworld.func_72912_H().func_76065_j() + " " + Registry.field_212622_k.func_177774_c(serverworld.field_73011_w.func_186058_p());
@@ -794,6 +810,7 @@ @@ -806,6 +822,7 @@
} }
this.field_71304_b.func_76320_a("tick"); this.field_71304_b.func_76320_a("tick");
@ -124,7 +124,7 @@
try { try {
serverworld.func_72835_b(p_71190_1_); serverworld.func_72835_b(p_71190_1_);
@@ -802,12 +819,16 @@ @@ -814,12 +831,16 @@
serverworld.func_72914_a(crashreport); serverworld.func_72914_a(crashreport);
throw new ReportedException(crashreport); throw new ReportedException(crashreport);
} }
@ -141,7 +141,7 @@
this.field_71304_b.func_219895_b("connection"); this.field_71304_b.func_219895_b("connection");
this.func_147137_ag().func_151269_c(); this.func_147137_ag().func_151269_c();
this.field_71304_b.func_219895_b("players"); this.field_71304_b.func_219895_b("players");
@@ -844,6 +865,7 @@ @@ -856,6 +877,7 @@
OptionSpec<Integer> optionspec10 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1); OptionSpec<Integer> optionspec10 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1);
OptionSpec<String> optionspec11 = optionparser.accepts("serverId").withRequiredArg(); OptionSpec<String> optionspec11 = optionparser.accepts("serverId").withRequiredArg();
OptionSpec<String> optionspec12 = optionparser.nonOptions(); OptionSpec<String> optionspec12 = optionparser.nonOptions();
@ -149,7 +149,7 @@
try { try {
OptionSet optionset = optionparser.parse(p_main_0_); OptionSet optionset = optionparser.parse(p_main_0_);
@@ -936,7 +958,7 @@ @@ -948,7 +970,7 @@
} }
public ServerWorld func_71218_a(DimensionType p_71218_1_) { public ServerWorld func_71218_a(DimensionType p_71218_1_) {
@ -158,7 +158,7 @@
} }
public Iterable<ServerWorld> func_212370_w() { public Iterable<ServerWorld> func_212370_w() {
@@ -975,7 +997,7 @@ @@ -987,7 +1009,7 @@
} }
public String getServerModName() { public String getServerModName() {
@ -167,11 +167,10 @@
} }
public CrashReport func_71230_b(CrashReport p_71230_1_) { public CrashReport func_71230_b(CrashReport p_71230_1_) {
@@ -1517,4 +1539,29 @@ @@ -1529,6 +1551,31 @@
}
public abstract boolean func_213199_b(GameProfile p_213199_1_); public abstract boolean func_213199_b(GameProfile p_213199_1_);
+
+ private Map<DimensionType, long[]> tickTimes = Maps.newIdentityHashMap(); + private Map<DimensionType, long[]> tickTimes = Maps.newIdentityHashMap();
+ @Nullable + @Nullable
+ public long[] getTickTime(DimensionType dim) { + public long[] getTickTime(DimensionType dim) {
@ -196,4 +195,7 @@
+ worldArrayLast = worldArrayMarker; + worldArrayLast = worldArrayMarker;
+ return worldArray; + return worldArray;
+ } + }
} +
public void func_223711_a(Path p_223711_1_) throws IOException {
Path path = p_223711_1_.resolve("levels");

View file

@ -50,7 +50,7 @@
} }
} }
@@ -538,4 +544,9 @@ @@ -542,4 +548,9 @@
public boolean func_213199_b(GameProfile p_213199_1_) { public boolean func_213199_b(GameProfile p_213199_1_) {
return false; return false;
} }

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/server/management/PlayerInteractionManager.java --- a/net/minecraft/server/management/PlayerInteractionManager.java
+++ b/net/minecraft/server/management/PlayerInteractionManager.java +++ b/net/minecraft/server/management/PlayerInteractionManager.java
@@ -74,7 +74,7 @@ @@ -76,7 +76,7 @@
++this.field_73100_i;
if (this.field_73097_j) { if (this.field_73097_j) {
int i = this.field_73100_i - this.field_73093_n;
BlockState blockstate = this.field_73092_a.func_180495_p(this.field_180241_i); BlockState blockstate = this.field_73092_a.func_180495_p(this.field_180241_i);
- if (blockstate.func_196958_f()) { - if (blockstate.func_196958_f()) {
+ if (blockstate.isAir(field_73092_a, field_180241_i)) { + if (blockstate.isAir(field_73092_a, field_180241_i)) {
this.field_73097_j = false; this.field_73097_j = false;
} else { } else {
float f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180241_i) * (float)(i + 1); float f = this.func_225417_a(blockstate, this.field_180241_i);
@@ -91,13 +91,13 @@ @@ -87,7 +87,7 @@
} }
} else if (this.field_73088_d) { } else if (this.field_73088_d) {
BlockState blockstate1 = this.field_73092_a.func_180495_p(this.field_180240_f); BlockState blockstate1 = this.field_73092_a.func_180495_p(this.field_180240_f);
@ -18,199 +18,29 @@
this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, -1); this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, -1);
this.field_73094_o = -1; this.field_73094_o = -1;
this.field_73088_d = false; this.field_73088_d = false;
} else { @@ -115,7 +115,9 @@
int k = this.field_73100_i - this.field_73089_e; double d1 = this.field_73090_b.field_70163_u - ((double)p_225416_1_.func_177956_o() + 0.5D) + 1.5D;
- float f1 = blockstate1.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180241_i) * (float)(k + 1); double d2 = this.field_73090_b.field_70161_v - ((double)p_225416_1_.func_177952_p() + 0.5D);
+ float f1 = blockstate1.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180240_f) * (float)(k + 1); // Forge: Fix network break progress using wrong position double d3 = d0 * d0 + d1 * d1 + d2 * d2;
int l = (int)(f1 * 10.0F); - if (d3 > 36.0D) {
if (l != this.field_73094_o) { + double dist = field_73090_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 1;
this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, l); + dist *= dist;
@@ -109,6 +109,12 @@ + if (d3 > dist) {
} this.field_73090_b.field_71135_a.func_147359_a(new SPlayerDiggingPacket(p_225416_1_, this.field_73092_a.func_180495_p(p_225416_1_), p_225416_2_, false));
} else if (p_225416_1_.func_177956_o() >= p_225416_4_) {
public void func_180784_a(BlockPos p_180784_1_, Direction p_180784_2_) { this.field_73090_b.field_71135_a.func_147359_a(new SPlayerDiggingPacket(p_225416_1_, this.field_73092_a.func_180495_p(p_225416_1_), p_225416_2_, false));
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(field_73090_b, p_180784_1_, p_180784_2_); @@ -145,12 +147,12 @@
+ if (event.isCanceled()) { // Restore block and te data this.field_73089_e = this.field_73100_i;
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_)); float f = 1.0F;
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3); BlockState blockstate = this.field_73092_a.func_180495_p(p_225416_1_);
+ return; - if (!blockstate.func_196958_f()) {
+ } + if (!blockstate.isAir(field_73092_a, p_225416_1_)) {
if (this.func_73083_d()) { blockstate.func_196942_a(this.field_73092_a, p_225416_1_, this.field_73090_b);
if (!this.field_73092_a.func_175719_a((PlayerEntity)null, p_180784_1_, p_180784_2_)) { f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_225416_1_);
this.func_180237_b(p_180784_1_);
@@ -137,12 +143,26 @@
this.field_73089_e = this.field_73100_i;
float f = 1.0F;
BlockState blockstate = this.field_73092_a.func_180495_p(p_180784_1_);
- if (!blockstate.func_196958_f()) {
+ if (!blockstate.isAir(field_73092_a, p_180784_1_)) {
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
blockstate.func_196942_a(this.field_73092_a, p_180784_1_, this.field_73090_b);
+ this.field_73092_a.func_175719_a((PlayerEntity)null, p_180784_1_, p_180784_2_);
+ } else { // Restore block and te data
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_));
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3);
+ }
f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_180784_1_);
}
- if (!blockstate.func_196958_f() && f >= 1.0F) {
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) {
+ if (f >= 1.0F) { // Restore block and te data
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_));
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3);
+ }
+ return;
+ }
+
+ if (!blockstate.isAir(field_73092_a, p_180784_1_) && f >= 1.0F) {
this.func_180237_b(p_180784_1_);
} else {
this.field_73088_d = true;
@@ -160,7 +180,7 @@
if (p_180785_1_.equals(this.field_180240_f)) {
int i = this.field_73100_i - this.field_73089_e;
BlockState blockstate = this.field_73092_a.func_180495_p(p_180785_1_);
- if (!blockstate.func_196958_f()) {
+ if (!blockstate.isAir(field_73092_a, p_180785_1_)) {
float f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_180785_1_) * (float)(i + 1);
if (f >= 0.7F) {
this.field_73088_d = false;
@@ -183,9 +203,11 @@
}
private boolean func_180235_c(BlockPos p_180235_1_) {
+ return removeBlock(p_180235_1_, false);
+ }
+ private boolean removeBlock(BlockPos p_180235_1_, boolean canHarvest) {
BlockState blockstate = this.field_73092_a.func_180495_p(p_180235_1_);
- blockstate.func_177230_c().func_176208_a(this.field_73092_a, p_180235_1_, blockstate, this.field_73090_b);
- boolean flag = this.field_73092_a.func_217377_a(p_180235_1_, false);
+ boolean flag = blockstate.removedByPlayer(field_73092_a, p_180235_1_, field_73090_b, canHarvest, field_73092_a.func_204610_c(p_180235_1_));
if (flag) {
blockstate.func_177230_c().func_176206_d(this.field_73092_a, p_180235_1_, blockstate);
}
@@ -195,7 +217,8 @@
public boolean func_180237_b(BlockPos p_180237_1_) {
BlockState blockstate = this.field_73092_a.func_180495_p(p_180237_1_);
- if (!this.field_73090_b.func_184614_ca().func_77973_b().func_195938_a(blockstate, this.field_73092_a, p_180237_1_, this.field_73090_b)) {
+ int exp = net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(field_73092_a, field_73091_c, field_73090_b, p_180237_1_);
+ if (exp == -1) {
return false;
} else {
TileEntity tileentity = this.field_73092_a.func_175625_s(p_180237_1_);
@@ -204,6 +227,11 @@
this.field_73092_a.func_184138_a(p_180237_1_, blockstate, blockstate, 3);
return false;
} else {
+ ItemStack stack = field_73090_b.func_184614_ca();
+ if (stack.onBlockStartBreak(p_180237_1_, field_73090_b)) {
+ return false;
+ }
+
if (this.field_73091_c.func_82752_c()) {
if (this.field_73091_c == GameType.SPECTATOR) {
return false;
@@ -222,17 +250,28 @@
}
} }
- boolean flag1 = this.func_180235_c(p_180237_1_); - if (!blockstate.func_196958_f() && f >= 1.0F) {
+ boolean flag1 = false; + if (!blockstate.isAir(field_73092_a, p_225416_1_) && f >= 1.0F) {
if (!this.func_73083_d()) { this.func_225415_a(p_225416_1_, p_225416_2_);
ItemStack itemstack2 = this.field_73090_b.func_184614_ca();
- boolean flag = this.field_73090_b.func_184823_b(blockstate);
+ ItemStack copy = itemstack2.func_77946_l();
+ boolean flag = blockstate.canHarvestBlock(field_73092_a, p_180237_1_, field_73090_b);
itemstack2.func_179548_a(this.field_73092_a, blockstate, p_180237_1_, this.field_73090_b);
+ if (itemstack2.func_190926_b() && !copy.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_73090_b, copy, Hand.MAIN_HAND);
+ }
+ flag1 = this.removeBlock(p_180237_1_, flag);
if (flag1 && flag) {
ItemStack itemstack1 = itemstack2.func_190926_b() ? ItemStack.field_190927_a : itemstack2.func_77946_l();
blockstate.func_177230_c().func_180657_a(this.field_73092_a, this.field_73090_b, p_180237_1_, blockstate, tileentity, itemstack1);
}
+ } else {
+ flag1 = this.func_180235_c(p_180237_1_);
}
+ if (!this.func_73083_d() && flag1 && exp > 0) { // Drop experience
+ blockstate.func_177230_c().func_180637_b(field_73092_a, p_180237_1_, exp);
+ }
+
return flag1;
}
}
@@ -244,8 +283,11 @@
} else if (p_187250_1_.func_184811_cZ().func_185141_a(p_187250_3_.func_77973_b())) {
return ActionResultType.PASS;
} else {
+ ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187250_1_, p_187250_4_);
+ if (cancelResult != null) return cancelResult;
int i = p_187250_3_.func_190916_E();
int j = p_187250_3_.func_77952_i();
+ ItemStack copyBeforeUse = p_187250_3_.func_77946_l();
ActionResult<ItemStack> actionresult = p_187250_3_.func_77957_a(p_187250_2_, p_187250_1_, p_187250_4_);
ItemStack itemstack = actionresult.func_188398_b();
if (itemstack == p_187250_3_ && itemstack.func_190916_E() == i && itemstack.func_77988_m() <= 0 && itemstack.func_77952_i() == j) {
@@ -262,6 +304,7 @@
}
if (itemstack.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187250_1_, copyBeforeUse, p_187250_4_);
p_187250_1_.func_184611_a(p_187250_4_, ItemStack.field_190927_a);
}
@@ -286,19 +329,45 @@
return ActionResultType.PASS;
}
} else {
- boolean flag = !p_219441_1_.func_184614_ca().func_190926_b() || !p_219441_1_.func_184592_cb().func_190926_b();
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks.onRightClickBlock(field_73090_b, p_219441_4_, blockpos, p_219441_5_.func_216354_b());
+ if (event.isCanceled()) return event.getCancellationResult();
+
+ ActionResultType result = ActionResultType.PASS;
+ if (event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
+ result = p_219441_3_.onItemUseFirst(new ItemUseContext(p_219441_1_, p_219441_4_, p_219441_5_));
+ if (result != ActionResultType.PASS) {
+ return result;
+ }
+ }
+
+ boolean flag = !(field_73090_b.func_184614_ca().doesSneakBypassUse(p_219441_2_, blockpos, p_219441_1_) && field_73090_b.func_184592_cb().doesSneakBypassUse(p_219441_2_, blockpos, p_219441_1_));
boolean flag1 = p_219441_1_.func_70093_af() && flag;
- if (!flag1 && blockstate.func_215687_a(p_219441_2_, p_219441_1_, p_219441_4_, p_219441_5_)) {
- return ActionResultType.SUCCESS;
- } else if (!p_219441_3_.func_190926_b() && !p_219441_1_.func_184811_cZ().func_185141_a(p_219441_3_.func_77973_b())) {
+ if ((!flag1 || event.getUseBlock() == net.minecraftforge.eventbus.api.Event.Result.ALLOW) &&
+ event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY &&
+ blockstate.func_215687_a(p_219441_2_, p_219441_1_, p_219441_4_, p_219441_5_)) {
+ result = ActionResultType.SUCCESS;
+ }
+
+ if (!p_219441_3_.func_190926_b() && !p_219441_1_.func_184811_cZ().func_185141_a(p_219441_3_.func_77973_b())) {
ItemUseContext itemusecontext = new ItemUseContext(p_219441_1_, p_219441_4_, p_219441_5_);
if (this.func_73083_d()) {
int i = p_219441_3_.func_190916_E();
+ if ((result != ActionResultType.SUCCESS && event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) ||
+ (result == ActionResultType.SUCCESS && event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.ALLOW)) {
ActionResultType actionresulttype = p_219441_3_.func_196084_a(itemusecontext);
p_219441_3_.func_190920_e(i);
return actionresulttype;
+ } else return result;
} else { } else {
- return p_219441_3_.func_196084_a(itemusecontext); this.field_73088_d = true;
+ if ((result != ActionResultType.SUCCESS && event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) ||
+ (result == ActionResultType.SUCCESS && event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.ALLOW)) {
+ ItemStack copyBeforeUse = p_219441_3_.func_77946_l();
+ result = p_219441_3_.func_196084_a(itemusecontext);
+ if (p_219441_3_.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(field_73090_b, copyBeforeUse, p_219441_4_);
+ }
+ }
+ return result;
}
} else {
return ActionResultType.PASS;

View file

@ -11,7 +11,7 @@
if (this.field_213934_g.size() <= 1) { if (this.field_213934_g.size() <= 1) {
beacontileentity$beamsegment = new BeaconTileEntity.BeamSegment(afloat); beacontileentity$beamsegment = new BeaconTileEntity.BeamSegment(afloat);
this.field_213934_g.add(beacontileentity$beamsegment); this.field_213934_g.add(beacontileentity$beamsegment);
@@ -181,8 +181,7 @@ @@ -183,8 +183,7 @@
for(int k = p_213927_1_ - i; k <= p_213927_1_ + i && flag; ++k) { for(int k = p_213927_1_ - i; k <= p_213927_1_ + i && flag; ++k) {
for(int l = p_213927_3_ - i; l <= p_213927_3_ + i; ++l) { for(int l = p_213927_3_ - i; l <= p_213927_3_ + i; ++l) {

View file

@ -4,10 +4,10 @@
this.field_75532_g = blockpos.func_177958_n() + MathHelper.func_76141_d(MathHelper.func_76134_b(f) * 32.0F); this.field_75532_g = blockpos.func_177958_n() + MathHelper.func_76141_d(MathHelper.func_76134_b(f) * 32.0F);
this.field_75538_h = blockpos.func_177956_o(); this.field_75538_h = blockpos.func_177956_o();
this.field_75539_i = blockpos.func_177952_p() + MathHelper.func_76141_d(MathHelper.func_76126_a(f) * 32.0F); this.field_75539_i = blockpos.func_177952_p() + MathHelper.func_76141_d(MathHelper.func_76126_a(f) * 32.0F);
- if (this.func_179867_a(new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i)) != null) { - if (this.func_225476_a(p_75529_1_, new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i)) != null) {
+ Vec3d siegeLocation = this.func_179867_a(new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i)); + Vec3d siegeLocation = this.func_225476_a(p_75529_1_, new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i));
+ if (siegeLocation != null) { + if (siegeLocation != null) {
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.village.VillageSiegeEvent(this, field_75537_a, playerentity, siegeLocation))) return false; + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.village.VillageSiegeEvent(this, p_75529_1_, playerentity, siegeLocation))) return false;
this.field_75534_e = 0; this.field_75534_e = 0;
this.field_75533_d = 20; this.field_75533_d = 20;
break; break;
@ -15,8 +15,8 @@
if (vec3d != null) { if (vec3d != null) {
ZombieEntity zombieentity; ZombieEntity zombieentity;
try { try {
- zombieentity = new ZombieEntity(this.field_75537_a); - zombieentity = new ZombieEntity(p_75530_1_);
+ zombieentity = EntityType.field_200725_aD.func_200721_a(this.field_75537_a); //Forge: Direct Initialization is deprecated, use EntityType. + zombieentity = EntityType.field_200725_aD.func_200721_a(p_75530_1_); //Forge: Direct Initialization is deprecated, use EntityType.
zombieentity.func_213386_a(this.field_75537_a, this.field_75537_a.func_175649_E(new BlockPos(zombieentity)), SpawnReason.EVENT, (ILivingEntityData)null, (CompoundNBT)null); zombieentity.func_213386_a(p_75530_1_, p_75530_1_.func_175649_E(new BlockPos(zombieentity)), SpawnReason.EVENT, (ILivingEntityData)null, (CompoundNBT)null);
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/Explosion.java --- a/net/minecraft/world/Explosion.java
+++ b/net/minecraft/world/Explosion.java +++ b/net/minecraft/world/Explosion.java
@@ -47,6 +47,7 @@ @@ -48,6 +48,7 @@
private DamageSource field_199593_j; private DamageSource field_199593_j;
private final List<BlockPos> field_77281_g = Lists.newArrayList(); private final List<BlockPos> field_77281_g = Lists.newArrayList();
private final Map<PlayerEntity, Vec3d> field_77288_k = Maps.newHashMap(); private final Map<PlayerEntity, Vec3d> field_77288_k = Maps.newHashMap();
@ -8,7 +8,7 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public Explosion(World p_i45752_1_, @Nullable Entity p_i45752_2_, double p_i45752_3_, double p_i45752_5_, double p_i45752_7_, float p_i45752_9_, List<BlockPos> p_i45752_10_) { public Explosion(World p_i45752_1_, @Nullable Entity p_i45752_2_, double p_i45752_3_, double p_i45752_5_, double p_i45752_7_, float p_i45752_9_, List<BlockPos> p_i45752_10_) {
@@ -69,6 +70,7 @@ @@ -70,6 +71,7 @@
this.field_77286_a = p_i50007_10_; this.field_77286_a = p_i50007_10_;
this.field_222260_b = p_i50007_11_; this.field_222260_b = p_i50007_11_;
this.field_199593_j = DamageSource.func_94539_a(this); this.field_199593_j = DamageSource.func_94539_a(this);
@ -16,7 +16,7 @@
} }
public static float func_222259_a(Vec3d p_222259_0_, Entity p_222259_1_) { public static float func_222259_a(Vec3d p_222259_0_, Entity p_222259_1_) {
@@ -128,8 +130,8 @@ @@ -129,8 +131,8 @@
BlockPos blockpos = new BlockPos(d4, d6, d8); BlockPos blockpos = new BlockPos(d4, d6, d8);
BlockState blockstate = this.field_77287_j.func_180495_p(blockpos); BlockState blockstate = this.field_77287_j.func_180495_p(blockpos);
IFluidState ifluidstate = this.field_77287_j.func_204610_c(blockpos); IFluidState ifluidstate = this.field_77287_j.func_204610_c(blockpos);
@ -27,7 +27,7 @@
if (this.field_77283_e != null) { if (this.field_77283_e != null) {
f2 = this.field_77283_e.func_180428_a(this, this.field_77287_j, blockpos, blockstate, ifluidstate, f2); f2 = this.field_77283_e.func_180428_a(this, this.field_77287_j, blockpos, blockstate, ifluidstate, f2);
} }
@@ -159,6 +161,7 @@ @@ -160,6 +162,7 @@
int j2 = MathHelper.func_76128_c(this.field_77282_d - (double)f3 - 1.0D); int j2 = MathHelper.func_76128_c(this.field_77282_d - (double)f3 - 1.0D);
int j1 = MathHelper.func_76128_c(this.field_77282_d + (double)f3 + 1.0D); int j1 = MathHelper.func_76128_c(this.field_77282_d + (double)f3 + 1.0D);
List<Entity> list = this.field_77287_j.func_72839_b(this.field_77283_e, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1)); List<Entity> list = this.field_77287_j.func_72839_b(this.field_77283_e, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1));
@ -35,7 +35,7 @@
Vec3d vec3d = new Vec3d(this.field_77284_b, this.field_77285_c, this.field_77282_d); Vec3d vec3d = new Vec3d(this.field_77284_b, this.field_77285_c, this.field_77282_d);
for(int k2 = 0; k2 < list.size(); ++k2) { for(int k2 = 0; k2 < list.size(); ++k2) {
@@ -229,9 +232,9 @@ @@ -230,9 +233,9 @@
this.field_77287_j.func_195594_a(ParticleTypes.field_197601_L, d0, d1, d2, d3, d4, d5); this.field_77287_j.func_195594_a(ParticleTypes.field_197601_L, d0, d1, d2, d3, d4, d5);
} }
@ -48,7 +48,7 @@
LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld)this.field_77287_j)).func_216023_a(this.field_77287_j.field_73012_v).func_216015_a(LootParameters.field_216286_f, blockpos).func_216015_a(LootParameters.field_216289_i, ItemStack.field_190927_a).func_216021_b(LootParameters.field_216288_h, tileentity); LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld)this.field_77287_j)).func_216023_a(this.field_77287_j.field_73012_v).func_216015_a(LootParameters.field_216286_f, blockpos).func_216015_a(LootParameters.field_216289_i, ItemStack.field_190927_a).func_216021_b(LootParameters.field_216288_h, tileentity);
if (this.field_222260_b == Explosion.Mode.DESTROY) { if (this.field_222260_b == Explosion.Mode.DESTROY) {
lootcontext$builder.func_216015_a(LootParameters.field_216290_j, this.field_77280_f); lootcontext$builder.func_216015_a(LootParameters.field_216290_j, this.field_77280_f);
@@ -240,15 +243,14 @@ @@ -241,15 +244,14 @@
Block.func_220078_b(blockstate, lootcontext$builder); Block.func_220078_b(blockstate, lootcontext$builder);
} }
@ -66,7 +66,7 @@
this.field_77287_j.func_175656_a(blockpos1, Blocks.field_150480_ab.func_176223_P()); this.field_77287_j.func_175656_a(blockpos1, Blocks.field_150480_ab.func_176223_P());
} }
} }
@@ -287,6 +289,10 @@ @@ -288,6 +290,10 @@
return this.field_77281_g; return this.field_77281_g;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/ServerMultiWorld.java --- a/net/minecraft/world/ServerMultiWorld.java
+++ b/net/minecraft/world/ServerMultiWorld.java +++ b/net/minecraft/world/ServerMultiWorld.java
@@ -10,11 +10,18 @@ @@ -11,11 +11,18 @@
import net.minecraft.world.storage.SaveHandler; import net.minecraft.world.storage.SaveHandler;
public class ServerMultiWorld extends ServerWorld { public class ServerMultiWorld extends ServerWorld {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/TrackedEntity.java --- a/net/minecraft/world/TrackedEntity.java
+++ b/net/minecraft/world/TrackedEntity.java +++ b/net/minecraft/world/TrackedEntity.java
@@ -77,9 +77,8 @@ @@ -78,9 +78,8 @@
if (this.field_219461_c instanceof ItemFrameEntity && this.field_219472_n % 10 == 0) { if (this.field_219461_c instanceof ItemFrameEntity && this.field_219472_n % 10 == 0) {
ItemFrameEntity itemframeentity = (ItemFrameEntity)this.field_219461_c; ItemFrameEntity itemframeentity = (ItemFrameEntity)this.field_219461_c;
ItemStack itemstack = itemframeentity.func_82335_i(); ItemStack itemstack = itemframeentity.func_82335_i();
@ -12,7 +12,7 @@
for(ServerPlayerEntity serverplayerentity : this.field_219460_b.func_217369_A()) { for(ServerPlayerEntity serverplayerentity : this.field_219460_b.func_217369_A()) {
mapdata.func_76191_a(serverplayerentity, itemstack); mapdata.func_76191_a(serverplayerentity, itemstack);
IPacket<?> ipacket = ((FilledMapItem)itemstack.func_77973_b()).func_150911_c(itemstack, this.field_219460_b, serverplayerentity); IPacket<?> ipacket = ((FilledMapItem)itemstack.func_77973_b()).func_150911_c(itemstack, this.field_219460_b, serverplayerentity);
@@ -183,12 +182,14 @@ @@ -184,12 +183,14 @@
public void func_219454_a(ServerPlayerEntity p_219454_1_) { public void func_219454_a(ServerPlayerEntity p_219454_1_) {
this.field_219461_c.func_184203_c(p_219454_1_); this.field_219461_c.func_184203_c(p_219454_1_);
p_219454_1_.func_152339_d(this.field_219461_c); p_219454_1_.func_152339_d(this.field_219461_c);

View file

@ -40,7 +40,7 @@
AbstractChunkProvider abstractchunkprovider = this.func_72863_F(); AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
Chunk chunk = abstractchunkprovider.func_217205_a(p_180494_1_.func_177958_n() >> 4, p_180494_1_.func_177952_p() >> 4, false); Chunk chunk = abstractchunkprovider.func_217205_a(p_180494_1_.func_177958_n() >> 4, p_180494_1_.func_177952_p() >> 4, false);
if (chunk != null) { if (chunk != null) {
@@ -169,23 +177,51 @@ @@ -169,17 +177,45 @@
} else { } else {
Chunk chunk = this.func_175726_f(p_180501_1_); Chunk chunk = this.func_175726_f(p_180501_1_);
Block block = p_180501_2_.func_177230_c(); Block block = p_180501_2_.func_177230_c();
@ -86,14 +86,7 @@
+ { + {
if (blockstate1 == p_180501_2_) { if (blockstate1 == p_180501_2_) {
if (blockstate != blockstate1) { if (blockstate != blockstate1) {
this.func_217396_m(p_180501_1_); this.func_225319_b(p_180501_1_, blockstate, blockstate1);
}
- if ((p_180501_3_ & 2) != 0 && (!this.field_72995_K || (p_180501_3_ & 4) == 0) && (this.field_72995_K || chunk.func_217321_u() != null && chunk.func_217321_u().func_219065_a(ChunkHolder.LocationType.TICKING))) {
+ if ((p_180501_3_ & 2) != 0 && (!this.field_72995_K || (p_180501_3_ & 4) == 0) && (this.field_72995_K || chunk == null || chunk.func_217321_u() != null && chunk.func_217321_u().func_219065_a(ChunkHolder.LocationType.TICKING))) {
this.func_184138_a(p_180501_1_, blockstate, p_180501_2_, p_180501_3_);
}
@@ -205,8 +241,6 @@ @@ -205,8 +241,6 @@
this.func_217393_a(p_180501_1_, blockstate, blockstate1); this.func_217393_a(p_180501_1_, blockstate, blockstate1);
@ -178,7 +171,7 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public Vec3d func_217382_a(BlockPos p_217382_1_, float p_217382_2_) { public Vec3d func_217382_a(BlockPos p_217382_1_, float p_217382_2_) {
+ return this.field_73011_w.getSkyColor(p_217382_1_, p_217382_2_); + return this.field_73011_w.getSkyColor(p_217382_1_, p_217382_2_);
+ } + }
+ +
+ @OnlyIn(Dist.CLIENT) + @OnlyIn(Dist.CLIENT)
@ -187,7 +180,7 @@
float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F; float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F;
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F); f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
- Biome biome = this.func_180494_b(p_217382_1_); - Biome biome = this.func_180494_b(p_217382_1_);
- float f2 = biome.func_180626_a(p_217382_1_); - float f2 = biome.func_225486_c(p_217382_1_);
- int i = biome.func_76731_a(f2); - int i = biome.func_76731_a(f2);
+ int i = net.minecraftforge.client.ForgeHooksClient.getSkyBlendColour(this, p_217382_1_); + int i = net.minecraftforge.client.ForgeHooksClient.getSkyBlendColour(this, p_217382_1_);
float f3 = (float)(i >> 16 & 255) / 255.0F; float f3 = (float)(i >> 16 & 255) / 255.0F;
@ -448,9 +441,9 @@
+ int k = MathHelper.func_76128_c((p_175647_2_.field_72339_c - getMaxEntityRadius()) / 16.0D); + int k = MathHelper.func_76128_c((p_175647_2_.field_72339_c - getMaxEntityRadius()) / 16.0D);
+ int l = MathHelper.func_76143_f((p_175647_2_.field_72334_f + getMaxEntityRadius()) / 16.0D); + int l = MathHelper.func_76143_f((p_175647_2_.field_72334_f + getMaxEntityRadius()) / 16.0D);
List<T> list = Lists.newArrayList(); List<T> list = Lists.newArrayList();
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
for(int i1 = i; i1 < j; ++i1) { @@ -1001,7 +1092,7 @@
@@ -980,7 +1071,7 @@
public int func_175651_c(BlockPos p_175651_1_, Direction p_175651_2_) { public int func_175651_c(BlockPos p_175651_1_, Direction p_175651_2_) {
BlockState blockstate = this.func_180495_p(p_175651_1_); BlockState blockstate = this.func_180495_p(p_175651_1_);
@ -459,7 +452,7 @@
} }
public boolean func_175640_z(BlockPos p_175640_1_) { public boolean func_175640_z(BlockPos p_175640_1_) {
@@ -1025,7 +1116,7 @@ @@ -1046,7 +1137,7 @@
} }
public long func_72905_C() { public long func_72905_C() {
@ -468,7 +461,7 @@
} }
public long func_82737_E() { public long func_82737_E() {
@@ -1033,11 +1124,11 @@ @@ -1054,11 +1145,11 @@
} }
public long func_72820_D() { public long func_72820_D() {
@ -482,7 +475,7 @@
} }
protected void func_217389_a() { protected void func_217389_a() {
@@ -1049,7 +1140,7 @@ @@ -1070,7 +1161,7 @@
} }
public BlockPos func_175694_M() { public BlockPos func_175694_M() {
@ -491,7 +484,7 @@
if (!this.func_175723_af().func_177746_a(blockpos)) { if (!this.func_175723_af().func_177746_a(blockpos)) {
blockpos = this.func_205770_a(Heightmap.Type.MOTION_BLOCKING, new BlockPos(this.func_175723_af().func_177731_f(), 0.0D, this.func_175723_af().func_177721_g())); blockpos = this.func_205770_a(Heightmap.Type.MOTION_BLOCKING, new BlockPos(this.func_175723_af().func_177731_f(), 0.0D, this.func_175723_af().func_177721_g()));
} }
@@ -1058,10 +1149,14 @@ @@ -1079,10 +1170,14 @@
} }
public void func_175652_B(BlockPos p_175652_1_) { public void func_175652_B(BlockPos p_175652_1_) {
@ -507,7 +500,7 @@
return true; return true;
} }
@@ -1129,8 +1224,7 @@ @@ -1150,8 +1245,7 @@
} }
public boolean func_180502_D(BlockPos p_180502_1_) { public boolean func_180502_D(BlockPos p_180502_1_) {
@ -517,7 +510,7 @@
} }
@Nullable @Nullable
@@ -1144,12 +1238,11 @@ @@ -1165,12 +1259,11 @@
} }
public int func_72940_L() { public int func_72940_L() {
@ -532,7 +525,7 @@
} }
public CrashReportCategory func_72914_a(CrashReport p_72914_1_) { public CrashReportCategory func_72914_a(CrashReport p_72914_1_) {
@@ -1180,16 +1273,15 @@ @@ -1201,16 +1294,15 @@
public abstract Scoreboard func_96441_U(); public abstract Scoreboard func_96441_U();
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) { public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) {
@ -553,7 +546,7 @@
blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false); blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false);
} }
} }
@@ -1268,4 +1360,16 @@ @@ -1289,4 +1381,16 @@
public BlockPos func_205770_a(Heightmap.Type p_205770_1_, BlockPos p_205770_2_) { public BlockPos func_205770_a(Heightmap.Type p_205770_1_, BlockPos p_205770_2_) {
return new BlockPos(p_205770_2_.func_177958_n(), this.func_201676_a(p_205770_1_, p_205770_2_.func_177958_n(), p_205770_2_.func_177952_p()), p_205770_2_.func_177952_p()); return new BlockPos(p_205770_2_.func_177958_n(), this.func_201676_a(p_205770_1_, p_205770_2_.func_177958_n(), p_205770_2_.func_177952_p()), p_205770_2_.func_177952_p());
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/biome/Biome.java --- a/net/minecraft/world/biome/Biome.java
+++ b/net/minecraft/world/biome/Biome.java +++ b/net/minecraft/world/biome/Biome.java
@@ -55,7 +55,7 @@ @@ -58,7 +58,7 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -9,7 +9,7 @@
public static final Logger field_150586_aC = LogManager.getLogger(); public static final Logger field_150586_aC = LogManager.getLogger();
public static final Set<Biome> field_201870_ab = Sets.newHashSet(); public static final Set<Biome> field_201870_ab = Sets.newHashSet();
public static final ObjectIntIdentityMap<Biome> field_185373_j = new ObjectIntIdentityMap<>(); public static final ObjectIntIdentityMap<Biome> field_185373_j = new ObjectIntIdentityMap<>();
@@ -132,11 +132,11 @@ @@ -145,11 +145,11 @@
} }
protected void func_201866_a(EntityClassification p_201866_1_, Biome.SpawnListEntry p_201866_2_) { protected void func_201866_a(EntityClassification p_201866_1_, Biome.SpawnListEntry p_201866_2_) {
@ -23,8 +23,8 @@
} }
public Biome.RainType func_201851_b() { public Biome.RainType func_201851_b() {
@@ -168,7 +168,7 @@ @@ -198,7 +198,7 @@
if (this.func_180626_a(p_201854_2_) >= 0.15F) { if (this.func_225486_c(p_201854_2_) >= 0.15F) {
return false; return false;
} else { } else {
- if (p_201854_2_.func_177956_o() >= 0 && p_201854_2_.func_177956_o() < 256 && p_201854_1_.func_175642_b(LightType.BLOCK, p_201854_2_) < 10) { - if (p_201854_2_.func_177956_o() >= 0 && p_201854_2_.func_177956_o() < 256 && p_201854_1_.func_175642_b(LightType.BLOCK, p_201854_2_) < 10) {
@ -32,7 +32,7 @@
BlockState blockstate = p_201854_1_.func_180495_p(p_201854_2_); BlockState blockstate = p_201854_1_.func_180495_p(p_201854_2_);
IFluidState ifluidstate = p_201854_1_.func_204610_c(p_201854_2_); IFluidState ifluidstate = p_201854_1_.func_204610_c(p_201854_2_);
if (ifluidstate.func_206886_c() == Fluids.field_204546_a && blockstate.func_177230_c() instanceof FlowingFluidBlock) { if (ifluidstate.func_206886_c() == Fluids.field_204546_a && blockstate.func_177230_c() instanceof FlowingFluidBlock) {
@@ -193,7 +193,7 @@ @@ -223,7 +223,7 @@
} else { } else {
if (p_201850_2_.func_177956_o() >= 0 && p_201850_2_.func_177956_o() < 256 && p_201850_1_.func_175642_b(LightType.BLOCK, p_201850_2_) < 10) { if (p_201850_2_.func_177956_o() >= 0 && p_201850_2_.func_177956_o() < 256 && p_201850_1_.func_175642_b(LightType.BLOCK, p_201850_2_) < 10) {
BlockState blockstate = p_201850_1_.func_180495_p(p_201850_2_); BlockState blockstate = p_201850_1_.func_180495_p(p_201850_2_);
@ -41,7 +41,7 @@
return true; return true;
} }
} }
@@ -488,6 +488,18 @@ @@ -526,6 +526,18 @@
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/chunk/BlockStateContainer.java --- a/net/minecraft/world/chunk/BlockStateContainer.java
+++ b/net/minecraft/world/chunk/BlockStateContainer.java +++ b/net/minecraft/world/chunk/BlockStateContainer.java
@@ -63,6 +63,9 @@ @@ -65,6 +65,9 @@
} }
private void func_186012_b(int p_186012_1_) { private void func_186012_b(int p_186012_1_) {
@ -10,7 +10,7 @@
if (p_186012_1_ != this.field_186024_e) { if (p_186012_1_ != this.field_186024_e) {
this.field_186024_e = p_186012_1_; this.field_186024_e = p_186012_1_;
if (this.field_186024_e <= 4) { if (this.field_186024_e <= 4) {
@@ -73,6 +76,8 @@ @@ -75,6 +78,8 @@
} else { } else {
this.field_186022_c = this.field_205521_b; this.field_186022_c = this.field_205521_b;
this.field_186024_e = MathHelper.func_151241_e(this.field_205523_d.func_186804_a()); this.field_186024_e = MathHelper.func_151241_e(this.field_205523_d.func_186804_a());
@ -19,7 +19,7 @@
} }
this.field_186022_c.func_186041_a(this.field_205526_g); this.field_186022_c.func_186041_a(this.field_205526_g);
@@ -135,12 +140,16 @@ @@ -137,12 +142,16 @@
this.func_210459_b(); this.func_210459_b();
int i = p_186010_1_.readByte(); int i = p_186010_1_.readByte();
if (this.field_186024_e != i) { if (this.field_186024_e != i) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/chunk/Chunk.java --- a/net/minecraft/world/chunk/Chunk.java
+++ b/net/minecraft/world/chunk/Chunk.java +++ b/net/minecraft/world/chunk/Chunk.java
@@ -56,7 +56,7 @@ @@ -57,7 +57,7 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -9,7 +9,7 @@
private static final Logger field_150817_t = LogManager.getLogger(); private static final Logger field_150817_t = LogManager.getLogger();
public static final ChunkSection field_186036_a = null; public static final ChunkSection field_186036_a = null;
private final ChunkSection[] field_76652_q = new ChunkSection[16]; private final ChunkSection[] field_76652_q = new ChunkSection[16];
@@ -89,6 +89,7 @@ @@ -90,6 +90,7 @@
} }
public Chunk(World p_i49946_1_, ChunkPos p_i49946_2_, Biome[] p_i49946_3_, UpgradeData p_i49946_4_, ITickList<Block> p_i49946_5_, ITickList<Fluid> p_i49946_6_, long p_i49946_7_, @Nullable ChunkSection[] p_i49946_9_, @Nullable Consumer<Chunk> p_i49946_10_) { public Chunk(World p_i49946_1_, ChunkPos p_i49946_2_, Biome[] p_i49946_3_, UpgradeData p_i49946_4_, ITickList<Block> p_i49946_5_, ITickList<Fluid> p_i49946_6_, long p_i49946_7_, @Nullable ChunkSection[] p_i49946_9_, @Nullable Consumer<Chunk> p_i49946_10_) {
@ -17,7 +17,7 @@
this.field_76645_j = new ClassInheritanceMultiMap[16]; this.field_76645_j = new ClassInheritanceMultiMap[16];
this.field_76637_e = p_i49946_1_; this.field_76637_e = p_i49946_1_;
this.field_212816_F = p_i49946_2_; this.field_212816_F = p_i49946_2_;
@@ -116,6 +117,7 @@ @@ -117,6 +118,7 @@
field_150817_t.warn("Could not set level chunk sections, array length is {} instead of {}", p_i49946_9_.length, this.field_76652_q.length); field_150817_t.warn("Could not set level chunk sections, array length is {} instead of {}", p_i49946_9_.length, this.field_76652_q.length);
} }
} }
@ -25,7 +25,7 @@
} }
@@ -261,14 +263,14 @@ @@ -262,14 +264,14 @@
if (!this.field_76637_e.field_72995_K) { if (!this.field_76637_e.field_72995_K) {
blockstate.func_196947_b(this.field_76637_e, p_177436_1_, p_177436_2_, p_177436_3_); blockstate.func_196947_b(this.field_76637_e, p_177436_1_, p_177436_2_, p_177436_3_);
@ -42,7 +42,7 @@
TileEntity tileentity = this.func_177424_a(p_177436_1_, Chunk.CreateEntityType.CHECK); TileEntity tileentity = this.func_177424_a(p_177436_1_, Chunk.CreateEntityType.CHECK);
if (tileentity != null) { if (tileentity != null) {
tileentity.func_145836_u(); tileentity.func_145836_u();
@@ -279,10 +281,10 @@ @@ -280,10 +282,10 @@
p_177436_2_.func_215705_a(this.field_76637_e, p_177436_1_, blockstate, p_177436_3_); p_177436_2_.func_215705_a(this.field_76637_e, p_177436_1_, blockstate, p_177436_3_);
} }
@ -55,7 +55,7 @@
this.field_76637_e.func_175690_a(p_177436_1_, tileentity1); this.field_76637_e.func_175690_a(p_177436_1_, tileentity1);
} else { } else {
tileentity1.func_145836_u(); tileentity1.func_145836_u();
@@ -322,11 +324,13 @@ @@ -323,11 +325,13 @@
k = this.field_76645_j.length - 1; k = this.field_76645_j.length - 1;
} }
@ -69,7 +69,7 @@
} }
public void func_201607_a(Heightmap.Type p_201607_1_, long[] p_201607_2_) { public void func_201607_a(Heightmap.Type p_201607_1_, long[] p_201607_2_) {
@@ -347,6 +351,7 @@ @@ -348,6 +352,7 @@
} }
this.field_76645_j[p_76608_2_].remove(p_76608_1_); this.field_76645_j[p_76608_2_].remove(p_76608_1_);
@ -77,7 +77,7 @@
} }
public int func_201576_a(Heightmap.Type p_201576_1_, int p_201576_2_, int p_201576_3_) { public int func_201576_a(Heightmap.Type p_201576_1_, int p_201576_2_, int p_201576_3_) {
@@ -357,7 +362,7 @@ @@ -358,7 +363,7 @@
private TileEntity func_177422_i(BlockPos p_177422_1_) { private TileEntity func_177422_i(BlockPos p_177422_1_) {
BlockState blockstate = this.func_180495_p(p_177422_1_); BlockState blockstate = this.func_180495_p(p_177422_1_);
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
@ -86,7 +86,7 @@
} }
@Nullable @Nullable
@@ -368,6 +373,10 @@ @@ -369,6 +374,10 @@
@Nullable @Nullable
public TileEntity func_177424_a(BlockPos p_177424_1_, Chunk.CreateEntityType p_177424_2_) { public TileEntity func_177424_a(BlockPos p_177424_1_, Chunk.CreateEntityType p_177424_2_) {
TileEntity tileentity = this.field_150816_i.get(p_177424_1_); TileEntity tileentity = this.field_150816_i.get(p_177424_1_);
@ -97,7 +97,7 @@
if (tileentity == null) { if (tileentity == null) {
CompoundNBT compoundnbt = this.field_201618_i.remove(p_177424_1_); CompoundNBT compoundnbt = this.field_201618_i.remove(p_177424_1_);
if (compoundnbt != null) { if (compoundnbt != null) {
@@ -383,9 +392,6 @@ @@ -384,9 +393,6 @@
tileentity = this.func_177422_i(p_177424_1_); tileentity = this.func_177422_i(p_177424_1_);
this.field_76637_e.func_175690_a(p_177424_1_, tileentity); this.field_76637_e.func_175690_a(p_177424_1_, tileentity);
} }
@ -107,7 +107,7 @@
} }
return tileentity; return tileentity;
@@ -400,7 +406,8 @@ @@ -401,7 +407,8 @@
} }
public void func_177426_a(BlockPos p_177426_1_, TileEntity p_177426_2_) { public void func_177426_a(BlockPos p_177426_1_, TileEntity p_177426_2_) {
@ -117,7 +117,7 @@
p_177426_2_.func_145834_a(this.field_76637_e); p_177426_2_.func_145834_a(this.field_76637_e);
p_177426_2_.func_174878_a(p_177426_1_); p_177426_2_.func_174878_a(p_177426_1_);
p_177426_2_.func_145829_t(); p_177426_2_.func_145829_t();
@@ -420,9 +427,14 @@ @@ -421,9 +428,14 @@
public CompoundNBT func_223134_j(BlockPos p_223134_1_) { public CompoundNBT func_223134_j(BlockPos p_223134_1_) {
TileEntity tileentity = this.func_175625_s(p_223134_1_); TileEntity tileentity = this.func_175625_s(p_223134_1_);
if (tileentity != null && !tileentity.func_145837_r()) { if (tileentity != null && !tileentity.func_145837_r()) {
@ -132,7 +132,7 @@
} else { } else {
CompoundNBT compoundnbt = this.field_201618_i.get(p_223134_1_); CompoundNBT compoundnbt = this.field_201618_i.get(p_223134_1_);
if (compoundnbt != null) { if (compoundnbt != null) {
@@ -457,8 +469,8 @@ @@ -458,8 +470,8 @@
} }
public void func_177414_a(@Nullable Entity p_177414_1_, AxisAlignedBB p_177414_2_, List<Entity> p_177414_3_, @Nullable Predicate<? super Entity> p_177414_4_) { public void func_177414_a(@Nullable Entity p_177414_1_, AxisAlignedBB p_177414_2_, List<Entity> p_177414_3_, @Nullable Predicate<? super Entity> p_177414_4_) {
@ -143,7 +143,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -485,8 +497,8 @@ @@ -486,8 +498,8 @@
} }
public void func_217313_a(@Nullable EntityType<?> p_217313_1_, AxisAlignedBB p_217313_2_, List<Entity> p_217313_3_, Predicate<? super Entity> p_217313_4_) { public void func_217313_a(@Nullable EntityType<?> p_217313_1_, AxisAlignedBB p_217313_2_, List<Entity> p_217313_3_, Predicate<? super Entity> p_217313_4_) {
@ -154,7 +154,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -501,8 +513,8 @@ @@ -502,8 +514,8 @@
} }
public <T extends Entity> void func_177430_a(Class<? extends T> p_177430_1_, AxisAlignedBB p_177430_2_, List<T> p_177430_3_, @Nullable Predicate<? super T> p_177430_4_) { public <T extends Entity> void func_177430_a(Class<? extends T> p_177430_1_, AxisAlignedBB p_177430_2_, List<T> p_177430_3_, @Nullable Predicate<? super T> p_177430_4_) {
@ -165,7 +165,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1); i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1); j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -533,6 +545,11 @@ @@ -534,6 +546,11 @@
}; };
Sets.newHashSet(this.field_150816_i.keySet()).stream().filter(predicate).forEach(this.field_76637_e::func_175713_t); Sets.newHashSet(this.field_150816_i.keySet()).stream().filter(predicate).forEach(this.field_76637_e::func_175713_t);
@ -177,7 +177,7 @@
for(int i = 0; i < this.field_76652_q.length; ++i) { for(int i = 0; i < this.field_76652_q.length; ++i) {
ChunkSection chunksection = this.field_76652_q[i]; ChunkSection chunksection = this.field_76652_q[i];
if ((p_217326_3_ & 1 << i) == 0) { if ((p_217326_3_ & 1 << i) == 0) {
@@ -703,9 +720,9 @@ @@ -704,9 +721,9 @@
private TileEntity func_212815_a(BlockPos p_212815_1_, CompoundNBT p_212815_2_) { private TileEntity func_212815_a(BlockPos p_212815_1_, CompoundNBT p_212815_2_) {
TileEntity tileentity; TileEntity tileentity;
if ("DUMMY".equals(p_212815_2_.func_74779_i("id"))) { if ("DUMMY".equals(p_212815_2_.func_74779_i("id"))) {
@ -190,7 +190,7 @@
} else { } else {
tileentity = null; tileentity = null;
field_150817_t.warn("Tried to load a DUMMY block entity @ {} but found not block entity block {} at location", p_212815_1_, this.func_180495_p(p_212815_1_)); field_150817_t.warn("Tried to load a DUMMY block entity @ {} but found not block entity block {} at location", p_212815_1_, this.func_180495_p(p_212815_1_));
@@ -797,4 +814,30 @@ @@ -798,4 +815,30 @@
QUEUED, QUEUED,
CHECK; CHECK;
} }

View file

@ -1,8 +1,8 @@
--- a/net/minecraft/world/chunk/ChunkStatus.java --- a/net/minecraft/world/chunk/ChunkStatus.java
+++ b/net/minecraft/world/chunk/ChunkStatus.java +++ b/net/minecraft/world/chunk/ChunkStatus.java
@@ -21,7 +21,7 @@ @@ -23,7 +23,7 @@
import net.minecraft.world.gen.WorldGenRegion; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.gen.feature.template.TemplateManager; import net.minecraft.world.server.ServerWorldLightManager;
-public class ChunkStatus { -public class ChunkStatus {
+public class ChunkStatus extends net.minecraftforge.registries.ForgeRegistryEntry<ChunkStatus> { +public class ChunkStatus extends net.minecraftforge.registries.ForgeRegistryEntry<ChunkStatus> {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/chunk/ChunkHolder.java --- a/net/minecraft/world/server/ChunkHolder.java
+++ b/net/minecraft/world/chunk/ChunkHolder.java +++ b/net/minecraft/world/server/ChunkHolder.java
@@ -127,7 +127,7 @@ @@ -135,7 +135,7 @@
Chunk chunk = this.func_219298_c(); Chunk chunk = this.func_219298_c();
if (chunk != null) { if (chunk != null) {
this.field_219322_q |= 1 << (p_219279_2_ >> 4); this.field_219322_q |= 1 << (p_219279_2_ >> 4);
@ -9,7 +9,7 @@
short short1 = (short)(p_219279_1_ << 12 | p_219279_3_ << 8 | p_219279_2_); short short1 = (short)(p_219279_1_ << 12 | p_219279_3_ << 8 | p_219279_2_);
for(int i = 0; i < this.field_219321_p; ++i) { for(int i = 0; i < this.field_219321_p; ++i) {
@@ -136,6 +136,8 @@ @@ -144,6 +144,8 @@
} }
} }
@ -18,7 +18,7 @@
this.field_219320_o[this.field_219321_p++] = short1; this.field_219320_o[this.field_219321_p++] = short1;
} }
@@ -158,7 +160,7 @@ @@ -166,7 +168,7 @@
public void func_219274_a(Chunk p_219274_1_) { public void func_219274_a(Chunk p_219274_1_) {
if (this.field_219321_p != 0 || this.field_219325_t != 0 || this.field_219324_s != 0) { if (this.field_219321_p != 0 || this.field_219325_t != 0 || this.field_219324_s != 0) {
World world = p_219274_1_.func_177412_p(); World world = p_219274_1_.func_177412_p();
@ -27,7 +27,7 @@
this.field_219323_r = -1; this.field_219323_r = -1;
} }
@@ -181,20 +183,19 @@ @@ -189,20 +191,19 @@
int k = (this.field_219320_o[0] >> 8 & 15) + this.field_219319_n.field_77275_b * 16; int k = (this.field_219320_o[0] >> 8 & 15) + this.field_219319_n.field_77275_b * 16;
BlockPos blockpos = new BlockPos(l, j1, k); BlockPos blockpos = new BlockPos(l, j1, k);
this.func_219293_a(new SChangeBlockPacket(world, blockpos), false); this.func_219293_a(new SChangeBlockPacket(world, blockpos), false);

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/world/chunk/ChunkManager.java --- a/net/minecraft/world/server/ChunkManager.java
+++ b/net/minecraft/world/chunk/ChunkManager.java +++ b/net/minecraft/world/server/ChunkManager.java
@@ -371,6 +371,7 @@ @@ -385,6 +385,7 @@
while(p_223155_1_.getAsBoolean() && (runnable = this.field_223181_A.poll()) != null) { while((p_223155_1_.getAsBoolean() || this.field_223181_A.size() > 2000) && (runnable = this.field_223181_A.poll()) != null) {
runnable.run(); runnable.run();
} }
+ if (this.field_219251_e.isEmpty()) net.minecraftforge.common.DimensionManager.unloadWorld(this.field_219255_i); + if (this.field_219251_e.isEmpty()) net.minecraftforge.common.DimensionManager.unloadWorld(this.field_219255_i);
} }
@@ -384,6 +385,7 @@ @@ -398,6 +399,7 @@
if (this.field_219253_g.remove(p_219212_1_, p_219212_3_) && p_219185_5_ != null) { if (this.field_219253_g.remove(p_219212_1_, p_219212_3_) && p_219185_5_ != null) {
if (p_219185_5_ instanceof Chunk) { if (p_219185_5_ instanceof Chunk) {
((Chunk)p_219185_5_).func_177417_c(false); ((Chunk)p_219185_5_).func_177417_c(false);
@ -16,7 +16,7 @@
} }
this.func_219229_a(p_219185_5_); this.func_219229_a(p_219185_5_);
@@ -461,6 +463,7 @@ @@ -475,6 +477,7 @@
if (flag) { if (flag) {
IChunk ichunk = ChunkSerializer.func_222656_a(this.field_219255_i, this.field_219269_w, this.field_219260_n, p_223172_1_, compoundnbt); IChunk ichunk = ChunkSerializer.func_222656_a(this.field_219255_i, this.field_219269_w, this.field_219260_n, p_223172_1_, compoundnbt);
ichunk.func_177432_b(this.field_219255_i.func_82737_E()); ichunk.func_177432_b(this.field_219255_i.func_82737_E());
@ -24,7 +24,7 @@
return Either.left(ichunk); return Either.left(ichunk);
} }
@@ -570,6 +573,7 @@ @@ -584,6 +587,7 @@
if (list != null) { if (list != null) {
list.forEach(chunk::func_76622_b); list.forEach(chunk::func_76622_b);
} }
@ -32,7 +32,7 @@
} }
return chunk; return chunk;
@@ -654,6 +658,7 @@ @@ -668,6 +672,7 @@
} }
CompoundNBT compoundnbt1 = ChunkSerializer.func_222645_a(this.field_219255_i, p_219229_1_); CompoundNBT compoundnbt1 = ChunkSerializer.func_222645_a(this.field_219255_i, p_219229_1_);
@ -40,7 +40,7 @@
this.func_219100_a(chunkpos, compoundnbt1); this.func_219100_a(chunkpos, compoundnbt1);
return true; return true;
} catch (Exception exception) { } catch (Exception exception) {
@@ -756,6 +761,7 @@ @@ -804,6 +809,7 @@
for(int l = i - this.field_219247_A; l <= i + this.field_219247_A; ++l) { for(int l = i - this.field_219247_A; l <= i + this.field_219247_A; ++l) {
for(int k = j - this.field_219247_A; k <= j + this.field_219247_A; ++k) { for(int k = j - this.field_219247_A; k <= j + this.field_219247_A; ++k) {
ChunkPos chunkpos = new ChunkPos(l, k); ChunkPos chunkpos = new ChunkPos(l, k);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/ServerWorld.java --- a/net/minecraft/world/server/ServerWorld.java
+++ b/net/minecraft/world/ServerWorld.java +++ b/net/minecraft/world/server/ServerWorld.java
@@ -118,7 +118,7 @@ @@ -134,7 +134,7 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -9,7 +9,7 @@
private static final Logger field_147491_a = LogManager.getLogger(); private static final Logger field_147491_a = LogManager.getLogger();
private final List<Entity> field_217497_w = Lists.newArrayList(); private final List<Entity> field_217497_w = Lists.newArrayList();
private final Int2ObjectMap<Entity> field_217498_x = new Int2ObjectLinkedOpenHashMap<>(); private final Int2ObjectMap<Entity> field_217498_x = new Int2ObjectLinkedOpenHashMap<>();
@@ -145,10 +145,14 @@ @@ -160,10 +160,14 @@
private boolean field_211159_Q; private boolean field_211159_Q;
@Nullable @Nullable
private final WanderingTraderSpawner field_217496_L; private final WanderingTraderSpawner field_217496_L;
@ -25,7 +25,7 @@
return p_i50703_1_.func_71218_a(DimensionType.field_223227_a_).func_217481_x(); return p_i50703_1_.func_71218_a(DimensionType.field_223227_a_).func_217481_x();
}); });
}, p_i50703_6_, false); }, p_i50703_6_, false);
@@ -166,6 +170,7 @@ @@ -181,6 +185,7 @@
} }
this.field_217496_L = this.field_73011_w.func_186058_p() == DimensionType.field_223227_a_ ? new WanderingTraderSpawner(this) : null; this.field_217496_L = this.field_73011_w.func_186058_p() == DimensionType.field_223227_a_ ? new WanderingTraderSpawner(this) : null;
@ -33,7 +33,7 @@
} }
public void func_72835_b(BooleanSupplier p_72835_1_) { public void func_72835_b(BooleanSupplier p_72835_1_) {
@@ -175,6 +180,7 @@ @@ -190,6 +195,7 @@
this.func_175723_af().func_212673_r(); this.func_175723_af().func_212673_r();
iprofiler.func_219895_b("weather"); iprofiler.func_219895_b("weather");
boolean flag = this.func_72896_J(); boolean flag = this.func_72896_J();
@ -41,7 +41,7 @@
if (this.field_73011_w.func_191066_m()) { if (this.field_73011_w.func_191066_m()) {
if (this.func_82736_K().func_223586_b(GameRules.field_223617_t)) { if (this.func_82736_K().func_223586_b(GameRules.field_223617_t)) {
int i = this.field_72986_A.func_176133_A(); int i = this.field_72986_A.func_176133_A();
@@ -236,6 +242,7 @@ @@ -251,6 +257,7 @@
this.field_73004_o = MathHelper.func_76131_a(this.field_73004_o, 0.0F, 1.0F); this.field_73004_o = MathHelper.func_76131_a(this.field_73004_o, 0.0F, 1.0F);
} }
@ -49,7 +49,7 @@
if (this.field_73003_n != this.field_73004_o) { if (this.field_73003_n != this.field_73004_o) {
this.field_73061_a.func_184103_al().func_148537_a(new SChangeGameStatePacket(7, this.field_73004_o), this.field_73011_w.func_186058_p()); this.field_73061_a.func_184103_al().func_148537_a(new SChangeGameStatePacket(7, this.field_73004_o), this.field_73011_w.func_186058_p());
@@ -245,15 +252,19 @@ @@ -260,15 +267,19 @@
this.field_73061_a.func_184103_al().func_148537_a(new SChangeGameStatePacket(8, this.field_73017_q), this.field_73011_w.func_186058_p()); this.field_73061_a.func_184103_al().func_148537_a(new SChangeGameStatePacket(8, this.field_73017_q), this.field_73011_w.func_186058_p());
} }
@ -73,7 +73,7 @@
} }
if (this.func_72912_H().func_76093_s() && this.func_175659_aa() != Difficulty.HARD) { if (this.func_72912_H().func_76093_s() && this.func_175659_aa() != Difficulty.HARD) {
@@ -265,7 +276,7 @@ @@ -280,7 +291,7 @@
})) { })) {
this.field_73068_P = false; this.field_73068_P = false;
if (this.func_82736_K().func_223586_b(GameRules.field_223607_j)) { if (this.func_82736_K().func_223586_b(GameRules.field_223607_j)) {
@ -82,15 +82,15 @@
this.func_72877_b(l - l % 24000L); this.func_72877_b(l - l % 24000L);
} }
@@ -291,6 +302,7 @@ @@ -304,6 +315,7 @@
this.field_175740_d.func_75528_a();
iprofiler.func_219895_b("portalForcer"); iprofiler.func_219895_b("portalForcer");
this.field_85177_Q.func_85189_a(this.func_82737_E()); this.field_85177_Q.func_85189_a(this.func_82737_E());
+ customTeleporters.forEach(t -> t.func_85189_a(func_82737_E())); + customTeleporters.forEach(t -> t.func_85189_a(func_82737_E()));
iprofiler.func_219895_b("raid"); iprofiler.func_219895_b("raid");
this.field_217494_c.func_215171_a(); this.field_217494_c.func_215171_a();
if (this.field_217496_L != null) { if (this.field_217496_L != null) {
@@ -314,6 +326,7 @@ @@ -327,6 +339,7 @@
Entity entity = this.field_217497_w.get(i1); Entity entity = this.field_217497_w.get(i1);
this.func_217390_a((p_217473_0_) -> { this.func_217390_a((p_217473_0_) -> {
++p_217473_0_.field_70173_aa; ++p_217473_0_.field_70173_aa;
@ -98,7 +98,7 @@
p_217473_0_.func_70071_h_(); p_217473_0_.func_70071_h_();
}, entity); }, entity);
if (entity.field_70128_L) { if (entity.field_70128_L) {
@@ -390,7 +403,7 @@ @@ -403,7 +416,7 @@
int j = chunkpos.func_180333_d(); int j = chunkpos.func_180333_d();
IProfiler iprofiler = this.func_217381_Z(); IProfiler iprofiler = this.func_217381_Z();
iprofiler.func_76320_a("thunder"); iprofiler.func_76320_a("thunder");
@ -107,7 +107,7 @@
BlockPos blockpos = this.func_175736_a(this.func_217383_a(i, 0, j, 15)); BlockPos blockpos = this.func_175736_a(this.func_217383_a(i, 0, j, 15));
if (this.func_175727_C(blockpos)) { if (this.func_175727_C(blockpos)) {
DifficultyInstance difficultyinstance = this.func_175649_E(blockpos); DifficultyInstance difficultyinstance = this.func_175649_E(blockpos);
@@ -408,10 +421,11 @@ @@ -421,10 +434,11 @@
} }
iprofiler.func_219895_b("iceandsnow"); iprofiler.func_219895_b("iceandsnow");
@ -120,7 +120,7 @@
if (biome.func_201848_a(this, blockpos3)) { if (biome.func_201848_a(this, blockpos3)) {
this.func_175656_a(blockpos3, Blocks.field_150432_aD.func_176223_P()); this.func_175656_a(blockpos3, Blocks.field_150432_aD.func_176223_P());
} }
@@ -498,10 +512,7 @@ @@ -511,10 +525,7 @@
} }
private void func_73051_P() { private void func_73051_P() {
@ -132,7 +132,7 @@
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@@ -514,7 +525,7 @@ @@ -527,7 +538,7 @@
int j = this.field_72986_A.func_76074_e(); int j = this.field_72986_A.func_76074_e();
int k = 0; int k = 0;
@ -141,7 +141,7 @@
i += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8); i += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8);
j += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8); j += this.field_73012_v.nextInt(8) - this.field_73012_v.nextInt(8);
++k; ++k;
@@ -557,8 +568,9 @@ @@ -570,8 +581,9 @@
if (p_217479_1_.field_70175_ag) { if (p_217479_1_.field_70175_ag) {
++p_217479_1_.field_70173_aa; ++p_217479_1_.field_70173_aa;
this.func_217381_Z().func_194340_a(() -> { this.func_217381_Z().func_194340_a(() -> {
@ -152,7 +152,7 @@
p_217479_1_.func_70071_h_(); p_217479_1_.func_70071_h_();
this.func_217381_Z().func_76319_b(); this.func_217381_Z().func_76319_b();
} }
@@ -620,6 +632,11 @@ @@ -633,6 +645,11 @@
} }
public boolean func_175660_a(PlayerEntity p_175660_1_, BlockPos p_175660_2_) { public boolean func_175660_a(PlayerEntity p_175660_1_, BlockPos p_175660_2_) {
@ -164,7 +164,7 @@
return !this.field_73061_a.func_175579_a(this, p_175660_2_, p_175660_1_) && this.func_175723_af().func_177746_a(p_175660_2_); return !this.field_73061_a.func_175579_a(this, p_175660_2_, p_175660_1_) && this.func_175723_af().func_177746_a(p_175660_2_);
} }
@@ -629,6 +646,7 @@ @@ -642,6 +659,7 @@
} else if (this.field_72986_A.func_76067_t() == WorldType.field_180272_g) { } else if (this.field_72986_A.func_76067_t() == WorldType.field_180272_g) {
this.field_72986_A.func_176143_a(BlockPos.field_177992_a.func_177984_a()); this.field_72986_A.func_176143_a(BlockPos.field_177992_a.func_177984_a());
} else { } else {
@ -172,7 +172,7 @@
BiomeProvider biomeprovider = this.field_73020_y.func_201711_g().func_202090_b(); BiomeProvider biomeprovider = this.field_73020_y.func_201711_g().func_202090_b();
List<Biome> list = biomeprovider.func_76932_a(); List<Biome> list = biomeprovider.func_76932_a();
Random random = new Random(this.func_72905_C()); Random random = new Random(this.func_72905_C());
@@ -711,6 +729,7 @@ @@ -724,6 +742,7 @@
p_217445_1_.func_200209_c(new TranslationTextComponent("menu.savingChunks")); p_217445_1_.func_200209_c(new TranslationTextComponent("menu.savingChunks"));
} }
@ -180,16 +180,16 @@
serverchunkprovider.func_217210_a(p_217445_2_); serverchunkprovider.func_217210_a(p_217445_2_);
} }
} }
@@ -769,7 +788,7 @@ @@ -799,7 +818,7 @@
for(Entity entity : this.field_217498_x.values()) {
if (!(entity instanceof MobEntity) || !((MobEntity)entity).func_104002_bU()) {
- EntityClassification entityclassification = entity.func_200600_R().func_220339_d();
+ EntityClassification entityclassification = entity.getClassification(true);
if (entityclassification != EntityClassification.MISC && this.func_72863_F().func_223435_b(entity)) {
object2intmap.mergeInt(entityclassification, 1, Integer::sum);
} }
@@ -814,6 +833,7 @@ }
- EntityClassification entityclassification = entity.func_200600_R().func_220339_d();
+ EntityClassification entityclassification = entity.getClassification(true);
if (entityclassification != EntityClassification.MISC && this.func_72863_F().func_223435_b(entity)) {
object2intmap.mergeInt(entityclassification, 1, Integer::sum);
}
@@ -841,6 +860,7 @@
} }
private void func_217448_f(ServerPlayerEntity p_217448_1_) { private void func_217448_f(ServerPlayerEntity p_217448_1_) {
@ -197,7 +197,7 @@
Entity entity = this.field_175741_N.get(p_217448_1_.func_110124_au()); Entity entity = this.field_175741_N.get(p_217448_1_.func_110124_au());
if (entity != null) { if (entity != null) {
field_147491_a.warn("Force-added player with duplicate UUID {}", (Object)p_217448_1_.func_110124_au().toString()); field_147491_a.warn("Force-added player with duplicate UUID {}", (Object)p_217448_1_.func_110124_au().toString());
@@ -838,6 +858,7 @@ @@ -865,6 +885,7 @@
} else if (this.func_217478_l(p_72838_1_)) { } else if (this.func_217478_l(p_72838_1_)) {
return false; return false;
} else { } else {
@ -205,7 +205,7 @@
IChunk ichunk = this.func_217353_a(MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D), MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D), ChunkStatus.field_222617_m, p_72838_1_.field_98038_p); IChunk ichunk = this.func_217353_a(MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D), MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D), ChunkStatus.field_222617_m, p_72838_1_.field_98038_p);
if (!(ichunk instanceof Chunk)) { if (!(ichunk instanceof Chunk)) {
return false; return false;
@@ -853,6 +874,7 @@ @@ -880,6 +901,7 @@
if (this.func_217478_l(p_217440_1_)) { if (this.func_217478_l(p_217440_1_)) {
return false; return false;
} else { } else {
@ -213,7 +213,7 @@
this.func_217465_m(p_217440_1_); this.func_217465_m(p_217440_1_);
return true; return true;
} }
@@ -889,11 +911,15 @@ @@ -916,11 +938,15 @@
} }
public void func_217484_g(Entity p_217484_1_) { public void func_217484_g(Entity p_217484_1_) {
@ -230,7 +230,7 @@
this.field_175741_N.remove(p_217484_1_.func_110124_au()); this.field_175741_N.remove(p_217484_1_.func_110124_au());
this.func_72863_F().func_217226_b(p_217484_1_); this.func_72863_F().func_217226_b(p_217484_1_);
@@ -907,6 +933,7 @@ @@ -934,6 +960,7 @@
this.field_217495_I.remove(((MobEntity)p_217484_1_).func_70661_as()); this.field_217495_I.remove(((MobEntity)p_217484_1_).func_70661_as());
} }
@ -238,7 +238,7 @@
} }
private void func_217465_m(Entity p_217465_1_) { private void func_217465_m(Entity p_217465_1_) {
@@ -927,9 +954,13 @@ @@ -954,9 +981,13 @@
} }
} }
@ -252,7 +252,7 @@
if (this.field_217492_a) { if (this.field_217492_a) {
throw new IllegalStateException("Removing entity while ticking!"); throw new IllegalStateException("Removing entity while ticking!");
} else { } else {
@@ -948,7 +979,10 @@ @@ -975,7 +1006,10 @@
} }
public void func_217434_e(ServerPlayerEntity p_217434_1_) { public void func_217434_e(ServerPlayerEntity p_217434_1_) {
@ -264,7 +264,7 @@
this.func_217467_h(p_217434_1_); this.func_217467_h(p_217434_1_);
this.func_72854_c(); this.func_72854_c();
} }
@@ -973,10 +1007,20 @@ @@ -1000,10 +1034,20 @@
} }
public void func_184148_a(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) { public void func_184148_a(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) {
@ -285,7 +285,7 @@
this.field_73061_a.func_184103_al().func_148543_a(p_217384_1_, p_217384_2_.field_70165_t, p_217384_2_.field_70163_u, p_217384_2_.field_70161_v, p_217384_5_ > 1.0F ? (double)(16.0F * p_217384_5_) : 16.0D, this.field_73011_w.func_186058_p(), new SSpawnMovingSoundEffectPacket(p_217384_3_, p_217384_4_, p_217384_2_, p_217384_5_, p_217384_6_)); this.field_73061_a.func_184103_al().func_148543_a(p_217384_1_, p_217384_2_.field_70165_t, p_217384_2_.field_70163_u, p_217384_2_.field_70161_v, p_217384_5_ > 1.0F ? (double)(16.0F * p_217384_5_) : 16.0D, this.field_73011_w.func_186058_p(), new SSpawnMovingSoundEffectPacket(p_217384_3_, p_217384_4_, p_217384_2_, p_217384_5_, p_217384_6_));
} }
@@ -1012,6 +1056,7 @@ @@ -1039,6 +1083,7 @@
public Explosion func_217401_a(@Nullable Entity p_217401_1_, DamageSource p_217401_2_, double p_217401_3_, double p_217401_5_, double p_217401_7_, float p_217401_9_, boolean p_217401_10_, Explosion.Mode p_217401_11_) { public Explosion func_217401_a(@Nullable Entity p_217401_1_, DamageSource p_217401_2_, double p_217401_3_, double p_217401_5_, double p_217401_7_, float p_217401_9_, boolean p_217401_10_, Explosion.Mode p_217401_11_) {
Explosion explosion = new Explosion(this, p_217401_1_, p_217401_3_, p_217401_5_, p_217401_7_, p_217401_9_, p_217401_10_, p_217401_11_); Explosion explosion = new Explosion(this, p_217401_1_, p_217401_3_, p_217401_5_, p_217401_7_, p_217401_9_, p_217401_10_, p_217401_11_);
@ -293,11 +293,10 @@
if (p_217401_2_ != null) { if (p_217401_2_ != null) {
explosion.func_199592_a(p_217401_2_); explosion.func_199592_a(p_217401_2_);
} }
@@ -1261,4 +1306,15 @@ @@ -1289,6 +1334,17 @@
public void func_217489_a(IReputationType p_217489_1_, Entity p_217489_2_, IReputationTracking p_217489_3_) {
p_217489_3_.func_213739_a(p_217489_1_, p_217489_2_); p_217489_3_.func_213739_a(p_217489_1_, p_217489_2_);
} }
+
+ protected void initCapabilities() { + protected void initCapabilities() {
+ net.minecraftforge.common.capabilities.ICapabilityProvider parent = field_73011_w.initCapabilities(); + net.minecraftforge.common.capabilities.ICapabilityProvider parent = field_73011_w.initCapabilities();
+ this.gatherCapabilities(parent); + this.gatherCapabilities(parent);
@ -308,4 +307,7 @@
+ public java.util.stream.Stream<Entity> getEntities() { + public java.util.stream.Stream<Entity> getEntities() {
+ return field_217498_x.values().stream(); + return field_217498_x.values().stream();
+ } + }
} +
public void func_225322_a(Path p_225322_1_) throws IOException {
ChunkManager chunkmanager = this.func_72863_F().field_217237_a;

View file

@ -1,31 +1,31 @@
--- a/net/minecraft/world/spawner/WorldEntitySpawner.java --- a/net/minecraft/world/spawner/WorldEntitySpawner.java
+++ b/net/minecraft/world/spawner/WorldEntitySpawner.java +++ b/net/minecraft/world/spawner/WorldEntitySpawner.java
@@ -82,7 +82,7 @@ @@ -86,7 +86,7 @@
} }
if (biome$spawnlistentry == null) { if (biome$spawnlistentry == null) {
- biome$spawnlistentry = func_222264_a(chunkgenerator, p_222263_0_, p_222263_1_.field_73012_v, blockpos$mutableblockpos); - biome$spawnlistentry = func_222264_a(chunkgenerator, p_222263_0_, p_222263_1_.field_73012_v, blockpos$mutableblockpos);
+ biome$spawnlistentry = getSpawnList(chunkgenerator, p_222263_0_, p_222263_1_.field_73012_v, blockpos$mutableblockpos, p_222263_1_); + biome$spawnlistentry = getSpawnList(chunkgenerator, p_222263_0_, p_222263_1_.field_73012_v, blockpos$mutableblockpos, p_222263_1_);
if (biome$spawnlistentry == null) { if (biome$spawnlistentry == null) {
break label117; break label123;
} }
@@ -95,7 +95,7 @@ @@ -99,7 +99,7 @@
} }
EntityType<?> entitytype = biome$spawnlistentry.field_200702_b; EntityType<?> entitytype = biome$spawnlistentry.field_200702_b;
- if (!entitytype.func_200720_b() || !func_222261_a(chunkgenerator, p_222263_0_, biome$spawnlistentry, blockpos$mutableblockpos)) { - if (!entitytype.func_200720_b() || !func_222261_a(chunkgenerator, p_222263_0_, biome$spawnlistentry, blockpos$mutableblockpos)) {
+ if (!entitytype.func_200720_b() || !getSpawnList(chunkgenerator, p_222263_0_, biome$spawnlistentry, blockpos$mutableblockpos, p_222263_1_)) { + if (!entitytype.func_200720_b() || !getSpawnList(chunkgenerator, p_222263_0_, biome$spawnlistentry, blockpos$mutableblockpos, p_222263_1_)) {
break label109; break label115;
} }
@@ -118,15 +118,17 @@ @@ -122,15 +122,17 @@
} }
mobentity.func_70012_b((double)f, (double)k, (double)f1, p_222263_1_.field_73012_v.nextFloat() * 360.0F, 0.0F); mobentity.func_70012_b((double)f, (double)k, (double)f1, p_222263_1_.field_73012_v.nextFloat() * 360.0F, 0.0F);
- if (playerentity.func_70092_e((double)f, (double)k, (double)f1) > 16384.0D && mobentity.func_213397_c(playerentity.func_70092_e((double)f, (double)k, (double)f1)) || !mobentity.func_213380_a(p_222263_1_, SpawnReason.NATURAL) || !mobentity.func_205019_a(p_222263_1_)) { - if (d0 > 16384.0D && mobentity.func_213397_c(d0) || !mobentity.func_213380_a(p_222263_1_, SpawnReason.NATURAL) || !mobentity.func_205019_a(p_222263_1_)) {
+ int canSpawn = net.minecraftforge.common.ForgeHooks.canEntitySpawn(mobentity, p_222263_1_, f, k, f1, null); + int canSpawn = net.minecraftforge.common.ForgeHooks.canEntitySpawn(mobentity, p_222263_1_, f, k, f1, null);
+ if (canSpawn == -1 || (canSpawn == 0 && (playerentity.func_70092_e((double)f, (double)k, (double)f1) > 16384.0D && (mobentity.func_213397_c(playerentity.func_70092_e((double)f, (double)k, (double)f1)) || !mobentity.func_213380_a(p_222263_1_, SpawnReason.NATURAL) || !mobentity.func_205019_a(p_222263_1_))))) { + if (canSpawn == -1 || (canSpawn == 0 && d0 > 16384.0D && (mobentity.func_213397_c(d0) || !mobentity.func_213380_a(p_222263_1_, SpawnReason.NATURAL) || !mobentity.func_205019_a(p_222263_1_)))) {
break label109; break label115;
} }
+ if (!net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn(mobentity, p_222263_1_, f, k, f1, null)) + if (!net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn(mobentity, p_222263_1_, f, k, f1, null))
@ -38,7 +38,7 @@
return; return;
} }
@@ -149,13 +151,15 @@ @@ -153,13 +155,15 @@
} }
@Nullable @Nullable
@ -56,7 +56,7 @@
return list.isEmpty() ? false : list.contains(p_222261_2_); return list.isEmpty() ? false : list.contains(p_222261_2_);
} }
@@ -184,6 +188,13 @@ @@ -188,6 +192,13 @@
if (p_209382_0_ == EntitySpawnPlacementRegistry.PlacementType.NO_RESTRICTIONS) { if (p_209382_0_ == EntitySpawnPlacementRegistry.PlacementType.NO_RESTRICTIONS) {
return true; return true;
} else if (p_209382_3_ != null && p_209382_1_.func_175723_af().func_177746_a(p_209382_2_)) { } else if (p_209382_3_ != null && p_209382_1_.func_175723_af().func_177746_a(p_209382_2_)) {
@ -70,7 +70,7 @@
BlockState blockstate = p_209382_1_.func_180495_p(p_209382_2_); BlockState blockstate = p_209382_1_.func_180495_p(p_209382_2_);
IFluidState ifluidstate = p_209382_1_.func_204610_c(p_209382_2_); IFluidState ifluidstate = p_209382_1_.func_204610_c(p_209382_2_);
BlockPos blockpos = p_209382_2_.func_177984_a(); BlockPos blockpos = p_209382_2_.func_177984_a();
@@ -194,14 +205,12 @@ @@ -198,14 +209,12 @@
case ON_GROUND: case ON_GROUND:
default: default:
BlockState blockstate1 = p_209382_1_.func_180495_p(blockpos1); BlockState blockstate1 = p_209382_1_.func_180495_p(blockpos1);
@ -86,7 +86,7 @@
} }
} }
@@ -244,6 +253,7 @@ @@ -248,6 +257,7 @@
entity.func_70012_b(d0, (double)blockpos.func_177956_o(), d1, p_77191_4_.nextFloat() * 360.0F, 0.0F); entity.func_70012_b(d0, (double)blockpos.func_177956_o(), d1, p_77191_4_.nextFloat() * 360.0F, 0.0F);
if (entity instanceof MobEntity) { if (entity instanceof MobEntity) {
MobEntity mobentity = (MobEntity)entity; MobEntity mobentity = (MobEntity)entity;

View file

@ -62,10 +62,10 @@ public class FMLClientLaunchProvider extends FMLCommonLaunchHandler implements I
public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder) public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder)
{ {
super.configureTransformationClassLoader(builder); super.configureTransformationClassLoader(builder);
Path realms = LibraryFinder.findJarPathFor("com/mojang/realmsclient/plugin/RealmsPluginImpl.class", "realms"); Path patchy = LibraryFinder.findJarPathFor("com/mojang/patch/LegacyXMLLayout.class", "patchy");
Path mapped = Paths.get(realms.toString().substring(0, realms.toString().length() - 4) + '-' + FMLLoader.getMcpVersion() + ".jar"); Path mapped = Paths.get(patchy.toString().substring(0, patchy.toString().length() - 4) + '-' + FMLLoader.getMcpVersion() + ".jar");
LOGGER.debug(CORE, "Found realms library at {}", Files.exists(mapped) ? mapped : realms); LOGGER.debug(CORE, "Found patchy library at {}", Files.exists(mapped) ? mapped : patchy);
builder.addTransformationPath(Files.exists(mapped) ? mapped : realms); builder.addTransformationPath(Files.exists(mapped) ? mapped : patchy);
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View file

@ -39,6 +39,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockModelShapes; import net.minecraft.client.renderer.BlockModelShapes;
import net.minecraft.client.renderer.ItemModelMesher; import net.minecraft.client.renderer.ItemModelMesher;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.BlockPart; import net.minecraft.client.renderer.model.BlockPart;
import net.minecraft.client.renderer.model.BlockPartFace; import net.minecraft.client.renderer.model.BlockPartFace;
@ -136,9 +137,9 @@ public final class ModelLoader extends ModelBakery
return isLoading; return isLoading;
} }
public ModelLoader(IResourceManager manager, AtlasTexture map, IProfiler profiler) public ModelLoader(IResourceManager manager, AtlasTexture map, BlockColors colours, IProfiler profiler)
{ {
super(manager, map, profiler); super(manager, map, colours, profiler);
VanillaLoader.INSTANCE.setLoader(this); VanillaLoader.INSTANCE.setLoader(this);
VariantLoader.INSTANCE.setLoader(this); VariantLoader.INSTANCE.setLoader(this);
ModelLoaderRegistry.clearModelCache(manager); ModelLoaderRegistry.clearModelCache(manager);

View file

@ -51,7 +51,7 @@ import net.minecraft.util.registry.MutableRegistry;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.chunk.listener.IChunkStatusListener; import net.minecraft.world.chunk.listener.IChunkStatusListener;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.ServerMultiWorld; import net.minecraft.world.ServerMultiWorld;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.event.world.RegisterDimensionsEvent; import net.minecraftforge.event.world.RegisterDimensionsEvent;

View file

@ -23,7 +23,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.client.CloudRenderer; import net.minecraftforge.client.CloudRenderer;
import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.common.util.FakePlayerFactory;
import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent;

View file

@ -75,7 +75,7 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.IWorldWriter; import net.minecraft.world.IWorldWriter;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.dimension.EndDimension; import net.minecraft.world.dimension.EndDimension;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -49,7 +49,7 @@ import net.minecraft.world.IEnviromentBlockReader;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.IPlantable;

View file

@ -19,7 +19,7 @@
package net.minecraftforge.common.extensions; package net.minecraftforge.common.extensions;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
public interface IForgeWorldServer extends IForgeWorld public interface IForgeWorldServer extends IForgeWorld
{ {

View file

@ -33,7 +33,7 @@ import net.minecraft.stats.Stat;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.fml.server.ServerLifecycleHooks; import net.minecraftforge.fml.server.ServerLifecycleHooks;

View file

@ -28,7 +28,7 @@ import java.util.UUID;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
//To be expanded for generic Mod fake players? //To be expanded for generic Mod fake players?
public class FakePlayerFactory public class FakePlayerFactory

View file

@ -67,7 +67,7 @@ import net.minecraft.world.Explosion;
import net.minecraft.world.GameRules; import net.minecraft.world.GameRules;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.IChunk; import net.minecraft.world.chunk.IChunk;

View file

@ -21,7 +21,7 @@ package net.minecraftforge.event.world;
import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.util.math.ChunkPos; import net.minecraft.util.math.ChunkPos;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.Event;
/** /**

View file

@ -26,7 +26,7 @@ import net.minecraft.network.NetworkManager;
import net.minecraft.network.IPacket; import net.minecraft.network.IPacket;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ServerChunkProvider; import net.minecraft.world.server.ServerChunkProvider;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.LogicalSidedProvider; import net.minecraftforge.fml.LogicalSidedProvider;

View file

@ -27,7 +27,7 @@ import net.minecraft.command.CommandSource;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponent; import net.minecraft.util.text.TextComponent;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.chunk.IChunk; import net.minecraft.world.chunk.IChunk;

View file

@ -42,7 +42,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.ChunkPos; import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.ServerWorld; import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;

View file

@ -104,8 +104,8 @@ protected net.minecraft.util.ObjectIntIdentityMap field_148749_a # internal map
protected net.minecraft.util.ObjectIntIdentityMap field_195868_a # nextId protected net.minecraft.util.ObjectIntIdentityMap field_195868_a # nextId
public net.minecraft.util.WeightedRandom$Item field_76292_a #probability public net.minecraft.util.WeightedRandom$Item field_76292_a #probability
public net.minecraft.util.concurrent.ThreadTaskExecutor func_213165_a(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture; # func_213165_a public net.minecraft.util.concurrent.ThreadTaskExecutor func_213165_a(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture; # func_213165_a
public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILnet/minecraft/util/SoundEvent;)V public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILnet/minecraft/util/SoundEvent;I)V
public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILnet/minecraft/util/SoundEvent;Ljava/util/function/Predicate;)V public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILnet/minecraft/util/SoundEvent;Ljava/util/function/Predicate;I)V
public net.minecraft.world.GameRules func_223595_a(Ljava/lang/String;Lnet/minecraft/world/GameRules$RuleType;)Lnet/minecraft/world/GameRules$RuleKey; # register public net.minecraft.world.GameRules func_223595_a(Ljava/lang/String;Lnet/minecraft/world/GameRules$RuleType;)Lnet/minecraft/world/GameRules$RuleKey; # register
protected net.minecraft.world.Teleporter field_77187_a # random protected net.minecraft.world.Teleporter field_77187_a # random
protected net.minecraft.world.Teleporter field_85191_c # destinationCoordinateCache protected net.minecraft.world.Teleporter field_85191_c # destinationCoordinateCache
@ -117,12 +117,15 @@ public net.minecraft.world.World field_73018_p #prevThunderingStrength
public net.minecraft.world.World func_175701_a(Lnet/minecraft/util/math/BlockPos;)Z # isValid public net.minecraft.world.World func_175701_a(Lnet/minecraft/util/math/BlockPos;)Z # isValid
public net.minecraft.world.World func_189509_E(Lnet/minecraft/util/math/BlockPos;)Z # isOutsideBuildHeight public net.minecraft.world.World func_189509_E(Lnet/minecraft/util/math/BlockPos;)Z # isOutsideBuildHeight
public-f net.minecraft.world.WorldType field_77139_a #worldTypes public-f net.minecraft.world.WorldType field_77139_a #worldTypes
public net.minecraft.world.biome.Biome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.DeepFrozenOceanBiome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.FrozenOceanBiome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.provider.BiomeProvider field_201540_a # BIOMES_TO_SPAWN_IN public net.minecraft.world.biome.provider.BiomeProvider field_201540_a # BIOMES_TO_SPAWN_IN
private-f net.minecraft.world.chunk.ChunkHolder field_219320_o # block update location
public net.minecraft.world.chunk.ChunkStatus <init>(Ljava/lang/String;Lnet/minecraft/world/chunk/ChunkStatus;ILjava/util/EnumSet;Lnet/minecraft/world/chunk/ChunkStatus$Type;Lnet/minecraft/world/chunk/ChunkStatus$IGenerationWorker;Lnet/minecraft/world/chunk/ChunkStatus$ILoadingWorker;)V public net.minecraft.world.chunk.ChunkStatus <init>(Ljava/lang/String;Lnet/minecraft/world/chunk/ChunkStatus;ILjava/util/EnumSet;Lnet/minecraft/world/chunk/ChunkStatus$Type;Lnet/minecraft/world/chunk/ChunkStatus$IGenerationWorker;Lnet/minecraft/world/chunk/ChunkStatus$ILoadingWorker;)V
public net.minecraft.world.chunk.ServerChunkProvider field_186029_c # chunkGenerator
public net.minecraft.world.chunk.ServerChunkProvider field_73251_h # worldObj
public net.minecraft.world.gen.IChunkGeneratorFactory public net.minecraft.world.gen.IChunkGeneratorFactory
public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/world/gen/layer/traits/IAreaTransformer1;Lnet/minecraft/world/gen/area/IAreaFactory;ILjava/util/function/LongFunction;)Lnet/minecraft/world/gen/area/IAreaFactory; # repeat public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/world/gen/layer/traits/IAreaTransformer1;Lnet/minecraft/world/gen/area/IAreaFactory;ILjava/util/function/LongFunction;)Lnet/minecraft/world/gen/area/IAreaFactory; # repeat
private-f net.minecraft.world.server.ChunkHolder field_219320_o # block update location
public net.minecraft.world.server.ServerChunkProvider field_186029_c # chunkGenerator
public net.minecraft.world.server.ServerChunkProvider field_73251_h # worldObj
private-f net.minecraft.world.storage.loot.LootPool field_186455_c # rolls private-f net.minecraft.world.storage.loot.LootPool field_186455_c # rolls
private-f net.minecraft.world.storage.loot.LootPool field_186456_d # bonusRolls private-f net.minecraft.world.storage.loot.LootPool field_186456_d # bonusRolls

View file

@ -58,15 +58,15 @@ net/minecraft/world/World.markAndNotifyBlock(Lnet/minecraft/util/math/BlockPos;L
net/minecraft/world/World.getSunBrightnessBody(F)F=|p_72971_1_ net/minecraft/world/World.getSunBrightnessBody(F)F=|p_72971_1_
net/minecraft/world/World.getSkyColorBody(Lnet/minecraft/util/math/BlockPos;F)Lnet/minecraft/util/math/Vec3d;=|p_217382_1_,p_217382_2_ net/minecraft/world/World.getSkyColorBody(Lnet/minecraft/util/math/BlockPos;F)Lnet/minecraft/util/math/Vec3d;=|p_217382_1_,p_217382_2_
net/minecraft/world/World.getCloudColorBody(F)Lnet/minecraft/util/math/Vec3d;=|p_72824_1_ net/minecraft/world/World.getCloudColorBody(F)Lnet/minecraft/util/math/Vec3d;=|p_72824_1_
net/minecraft/world/ServerWorld.canMineBlockBody(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;)Z=|p_175660_1_,p_175660_2_ net/minecraft/world/server/ServerWorld.canMineBlockBody(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;)Z=|p_175660_1_,p_175660_2_
net/minecraft/world/ServerWorld.removeEntityComplete(Lnet/minecraft/entity/Entity;Z)V=|p_217484_1_,keepData net/minecraft/world/server/ServerWorld.removeEntityComplete(Lnet/minecraft/entity/Entity;Z)V=|p_217484_1_,keepData
net/minecraft/world/ServerWorld.removeEntity(Lnet/minecraft/entity/Entity;Z)V=|p_217467_1_,keepData net/minecraft/world/server/ServerWorld.removeEntity(Lnet/minecraft/entity/Entity;Z)V=|p_217467_1_,keepData
net/minecraft/world/ServerWorld.removePlayer(Lnet/minecraft/entity/player/ServerPlayerEntity;Z)V=|p_217434_1_,keepData net/minecraft/world/server/ServerWorld.removePlayer(Lnet/minecraft/entity/player/ServerPlayerEntity;Z)V=|p_217434_1_,keepData
net/minecraft/world/dimension/DimensionType.<init>(ILjava/lang/String;Ljava/lang/String;Ljava/util/function/BiFunction;ZLnet/minecraftforge/common/ModDimension;Lnet/minecraft/network/PacketBuffer;)V=|p_i49935_1_,p_i49935_2_,p_i49935_3_,p_i49935_4_,p_i49935_5_,modType,data net/minecraft/world/dimension/DimensionType.<init>(ILjava/lang/String;Ljava/lang/String;Ljava/util/function/BiFunction;ZLnet/minecraftforge/common/ModDimension;Lnet/minecraft/network/PacketBuffer;)V=|p_i49935_1_,p_i49935_2_,p_i49935_3_,p_i49935_4_,p_i49935_5_,modType,data
net/minecraft/world/chunk/BlockStateContainer.setBits(IZ)V=|p_186012_1_,forceBits net/minecraft/world/chunk/BlockStateContainer.setBits(IZ)V=|p_186012_1_,forceBits
net/minecraft/world/end/DragonFightManager.<init>(Lnet/minecraft/world/ServerWorld;Lnet/minecraft/nbt/CompoundNBT;Lnet/minecraft/world/dimension/EndDimension;)V=|p_i46669_1_,p_i46669_2_,dim net/minecraft/world/end/DragonFightManager.<init>(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraft/nbt/CompoundNBT;Lnet/minecraft/world/dimension/EndDimension;)V=|p_i46669_1_,p_i46669_2_,dim
net/minecraft/entity/EntityType.<init>(Lnet/minecraft/entity/EntityType$IFactory;Lnet/minecraft/entity/EntityClassification;ZZZLcom/mojang/datafixers/types/Type;Lnet/minecraft/entity/EntitySize;Ljava/util/function/Predicate;Ljava/util/function/ToIntFunction;Ljava/util/function/ToIntFunction;Ljava/util/function/BiFunction;)V=|p_i50385_1_,p_i50385_2_,p_i50385_3_,p_i50385_4_,p_i50385_5_,p_i50385_6_,p_i50385_7_,velocityUpdateSupplier,trackingRangeSupplier,updateIntervalSupplier,customClientFactory net/minecraft/entity/EntityType.<init>(Lnet/minecraft/entity/EntityType$IFactory;Lnet/minecraft/entity/EntityClassification;ZZZLcom/mojang/datafixers/types/Type;Lnet/minecraft/entity/EntitySize;Ljava/util/function/Predicate;Ljava/util/function/ToIntFunction;Ljava/util/function/ToIntFunction;Ljava/util/function/BiFunction;)V=|p_i50385_1_,p_i50385_2_,p_i50385_3_,p_i50385_4_,p_i50385_5_,p_i50385_6_,p_i50385_7_,velocityUpdateSupplier,trackingRangeSupplier,updateIntervalSupplier,customClientFactory
net/minecraft/world/spawner/WorldEntitySpawner.getSpawnList(Lnet/minecraft/world/gen/ChunkGenerator;Lnet/minecraft/entity/EntityClassification;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/World;)Z|p_222264_0_,p_222264_1_,p_222264_2_,p_222264_3_,world net/minecraft/world/spawner/WorldEntitySpawner.getSpawnList(Lnet/minecraft/world/gen/ChunkGenerator;Lnet/minecraft/entity/EntityClassification;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/World;)Z|p_222264_0_,p_222264_1_,p_222264_2_,p_222264_3_,world

View file

@ -71,7 +71,6 @@ public class FMLDevClientLaunchProvider extends FMLCommonLaunchHandler implement
public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder) public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder)
{ {
super.configureTransformationClassLoader(builder); super.configureTransformationClassLoader(builder);
builder.addTransformationPath(LibraryFinder.findJarPathFor("com/mojang/realmsclient/plugin/RealmsPluginImpl.class", "realms"));
} }
@Override @Override

View file

@ -61,6 +61,5 @@ public class FMLUserdevClientLaunchProvider extends FMLUserdevLaunchProvider imp
public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder) public void configureTransformationClassLoader(final ITransformingClassLoaderBuilder builder)
{ {
super.configureTransformationClassLoader(builder); super.configureTransformationClassLoader(builder);
builder.addTransformationPath(LibraryFinder.findJarPathFor("com/mojang/realmsclient/plugin/RealmsPluginImpl.class", "realms"));
} }
} }