Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions patches/minecraft/net/minecraft/command/CommandLocate.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- before/net/minecraft/command/CommandLocate.java
+++ after/net/minecraft/command/CommandLocate.java
@@ -54,7 +54,7 @@
public List<String> func_184883_a(MinecraftServer p_184883_1_, ICommandSender p_184883_2_, String[] p_184883_3_, @Nullable BlockPos p_184883_4_)
{
return p_184883_3_.length == 1
- ? func_71530_a(p_184883_3_, new String[] {"Stronghold", "Monument", "Village", "Mansion", "EndCity", "Fortress", "Temple", "Mineshaft"})
+ ? func_71530_a(p_184883_3_, net.minecraft.world.gen.structure.MapGenStructureIO.getStartNames())
: Collections.emptyList();
}
}
49 changes: 26 additions & 23 deletions patches/minecraft/net/minecraft/world/WorldServer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,18 @@
public void func_72866_a(Entity p_72866_1_, boolean p_72866_2_)
{
if (!this.func_175735_ai() && (p_72866_1_ instanceof EntityAnimal || p_72866_1_ instanceof EntityWaterMob))
@@ -852,20 +842,21 @@
@@ -852,20 +842,23 @@
return this.field_73061_a.func_71268_U();
}

- @Override
protected IChunkProvider func_72970_h()
{
IChunkLoader ichunkloader = this.field_73019_z.func_75763_a(this.field_73011_w);
return new ChunkProviderServer(this, ichunkloader, this.field_73011_w.func_186060_c());
- return new ChunkProviderServer(this, ichunkloader, this.field_73011_w.func_186060_c());
+ var generator = this.field_73011_w.func_186060_c();
+ net.minecraftforge.common.ForgeHooks.onCreateChunkProvider(this, ichunkloader, this.field_73011_w, generator);
+ return new ChunkProviderServer(this, ichunkloader, generator);
}

- @Override
Expand All @@ -504,7 +507,7 @@
public void func_72963_a(WorldSettings p_72963_1_)
{
if (!this.field_72986_A.func_76070_v())
@@ -881,16 +872,17 @@
@@ -881,16 +874,17 @@

super.func_72963_a(p_72963_1_);
}
Expand All @@ -525,15 +528,15 @@
}

throw new ReportedException(crashreport);
@@ -927,6 +919,7 @@
@@ -927,6 +921,7 @@
}
else
{
+ if (net.minecraftforge.event.ForgeEventFactory.onCreateWorldSpawn(this, p_73052_1_)) return;
this.field_72987_B = true;
BiomeProvider biomeprovider = this.field_73011_w.func_177499_m();
List<Biome> list = biomeprovider.func_76932_a();
@@ -952,8 +945,9 @@
@@ -952,8 +947,9 @@
{
i += random.nextInt(64) - random.nextInt(64);
k += random.nextInt(64) - random.nextInt(64);
Expand All @@ -544,7 +547,7 @@
{
break;
}
@@ -973,7 +967,7 @@
@@ -973,7 +969,7 @@
{
WorldGeneratorBonusChest worldgeneratorbonuschest = new WorldGeneratorBonusChest();

Expand All @@ -553,15 +556,15 @@
{
int j = this.field_72986_A.func_76079_c() + this.field_73012_v.nextInt(6) - this.field_73012_v.nextInt(6);
int k = this.field_72986_A.func_76074_e() + this.field_73012_v.nextInt(6) - this.field_73012_v.nextInt(6);
@@ -1011,6 +1005,7 @@
@@ -1011,6 +1007,7 @@
}

chunkproviderserver.func_186027_a(p_73044_1_);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Save(this));

for (Chunk chunk : Lists.newArrayList(chunkproviderserver.func_189548_a()))
{
@@ -1055,20 +1050,19 @@
@@ -1055,20 +1052,19 @@
this.field_72986_A.func_176135_e(this.func_175723_af().func_177732_i());
this.field_73019_z.func_75755_a(this.field_72986_A, this.field_73061_a.func_184103_al().func_72378_q());
this.field_72988_C.func_75744_a();
Expand All @@ -584,7 +587,7 @@
{
this.field_72996_f.add(entity);
this.func_72923_a(entity);
@@ -1080,7 +1074,7 @@
@@ -1080,7 +1076,7 @@
{
if (p_184165_1_.field_70128_L)
{
Expand All @@ -593,7 +596,7 @@
return false;
}
else
@@ -1103,7 +1097,7 @@
@@ -1103,7 +1099,7 @@
return false;
}

Expand All @@ -602,23 +605,23 @@
}

this.func_72973_f(entity);
@@ -1113,7 +1107,6 @@
@@ -1113,7 +1109,6 @@
}
}

- @Override
public void func_72923_a(Entity p_72923_1_)
{
super.func_72923_a(p_72923_1_);
@@ -1130,7 +1123,6 @@
@@ -1130,7 +1125,6 @@
}
}

- @Override
public void func_72847_b(Entity p_72847_1_)
{
super.func_72847_b(p_72847_1_);
@@ -1147,22 +1139,11 @@
@@ -1147,22 +1141,11 @@
}
}

Expand All @@ -642,15 +645,15 @@
return true;
}
else
@@ -1171,7 +1152,6 @@
@@ -1171,7 +1154,6 @@
}
}

- @Override
public void func_72960_a(Entity p_72960_1_, byte p_72960_2_)
{
this.func_73039_n().func_151248_b(p_72960_1_, new SPacketEntityStatus(p_72960_1_, p_72960_2_));
@@ -1182,12 +1162,10 @@
@@ -1182,12 +1164,10 @@
return (ChunkProviderServer)super.func_72863_F();
}

Expand All @@ -665,7 +668,7 @@
explosion.func_77278_a();
explosion.func_77279_a(false);

@@ -1198,20 +1176,15 @@
@@ -1198,20 +1178,15 @@

for (EntityPlayer entityplayer : this.field_73010_i)
{
Expand All @@ -688,7 +691,7 @@
public void func_175641_c(BlockPos p_175641_1_, Block p_175641_2_, int p_175641_3_, int p_175641_4_)
{
BlockEventData blockeventdata = new BlockEventData(p_175641_1_, p_175641_2_, p_175641_3_, p_175641_4_);
@@ -1238,19 +1211,7 @@
@@ -1238,19 +1213,7 @@
{
if (this.func_147485_a(blockeventdata))
{
Expand All @@ -709,7 +712,7 @@
}
}

@@ -1261,9 +1222,7 @@
@@ -1261,9 +1224,7 @@
private boolean func_147485_a(BlockEventData p_147485_1_)
{
IBlockState iblockstate = this.func_180495_p(p_147485_1_.func_180328_a());
Expand All @@ -720,15 +723,15 @@
}

public void func_73041_k()
@@ -1271,7 +1230,6 @@
@@ -1271,7 +1232,6 @@
this.field_73019_z.func_75759_a();
}

- @Override
protected void func_72979_l()
{
boolean flag = this.func_72896_J();
@@ -1279,36 +1237,35 @@
@@ -1279,36 +1239,35 @@

if (this.field_73003_n != this.field_73004_o)
{
Expand Down Expand Up @@ -775,7 +778,7 @@
public MinecraftServer func_73046_m()
{
return this.field_73061_a;
@@ -1334,98 +1291,34 @@
@@ -1334,98 +1293,34 @@
return this.field_73019_z.func_186340_h();
}

Expand Down Expand Up @@ -883,7 +886,7 @@
{
p_184159_1_.field_71135_a.func_147359_a(p_184159_9_);
}
@@ -1437,20 +1330,17 @@
@@ -1437,20 +1332,17 @@
return this.field_175741_N.get(p_175733_1_);
}

Expand All @@ -904,7 +907,7 @@
public BlockPos func_190528_a(String p_190528_1_, BlockPos p_190528_2_, boolean p_190528_3_)
{
return this.func_72863_F().func_180513_a(this, p_190528_1_, p_190528_2_, p_190528_3_);
@@ -1464,6 +1354,11 @@
@@ -1464,6 +1356,11 @@
public FunctionManager func_193037_A()
{
return this.field_193036_D;
Expand Down
35 changes: 18 additions & 17 deletions patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -511,18 +511,19 @@
if (this.func_177419_t())
{
if (p_186034_1_.func_185933_a(this, this.field_76635_g, this.field_76647_h))
@@ -1012,8 +1017,10 @@
@@ -1012,8 +1017,11 @@
{
this.func_150809_p();
p_186034_1_.func_185931_b(this.field_76635_g, this.field_76647_h);
+ net.minecraftforge.common.ForgeHooks.postPopulateGenerate(p_186034_1_, this.field_76637_e, this.field_76635_g, this.field_76647_h);
+ net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(this.field_76635_g, this.field_76647_h, this.field_76637_e, p_186034_1_, this.field_76637_e.func_72863_F());
this.func_76630_e();
}
+ populating = prev;
}

public BlockPos func_177440_h(BlockPos p_177440_1_)
@@ -1068,7 +1075,7 @@
@@ -1068,7 +1076,7 @@
{
BlockPos blockpos = this.field_177447_w.poll();

Expand All @@ -531,7 +532,7 @@
{
TileEntity tileentity = this.func_177422_i(blockpos);
this.field_76637_e.func_175690_a(blockpos, tileentity);
@@ -1121,7 +1128,7 @@
@@ -1121,7 +1129,7 @@
{
if (this.field_76652_q.length != p_76602_1_.length)
{
Expand All @@ -540,7 +541,7 @@
}
else
{
@@ -1132,9 +1139,16 @@
@@ -1132,9 +1140,16 @@
@SideOnly(Side.CLIENT)
public void func_186033_a(PacketBuffer p_186033_1_, int p_186033_2_, boolean p_186033_3_)
{
Expand All @@ -558,7 +559,7 @@
{
ExtendedBlockStorage extendedblockstorage = this.field_76652_q[i];

@@ -1168,7 +1182,7 @@
@@ -1168,7 +1183,7 @@
p_186033_1_.readBytes(this.field_76651_r);
}

Expand All @@ -567,7 +568,7 @@
{
if (this.field_76652_q[j] != field_186036_a && (p_186033_2_ & 1 << j) != 0)
{
@@ -1180,10 +1194,16 @@
@@ -1180,10 +1195,16 @@
this.field_76646_k = true;
this.func_76590_a();

Expand All @@ -584,7 +585,7 @@
}

public Biome func_177411_a(BlockPos p_177411_1_, BiomeProvider p_177411_2_)
@@ -1194,9 +1214,14 @@
@@ -1194,9 +1215,14 @@

if (k == 255)
{
Expand All @@ -601,7 +602,7 @@
}

Biome biome1 = Biome.func_150568_d(k);
@@ -1212,7 +1237,7 @@
@@ -1212,7 +1238,7 @@
{
if (this.field_76651_r.length != p_76616_1_.length)
{
Expand All @@ -610,7 +611,7 @@
}
else
{
@@ -1231,7 +1256,7 @@
@@ -1231,7 +1257,7 @@
{
BlockPos blockpos = new BlockPos(this.field_76635_g << 4, 0, this.field_76647_h << 4);

Expand All @@ -619,7 +620,7 @@
{
if (this.field_76649_t >= 4096)
{
@@ -1241,21 +1266,20 @@
@@ -1241,21 +1267,20 @@
int j = this.field_76649_t % 16;
int k = this.field_76649_t / 16 % 16;
int l = this.field_76649_t / 256;
Expand All @@ -645,7 +646,7 @@
{
this.field_76637_e.func_175664_x(blockpos2);
}
@@ -1280,9 +1304,9 @@
@@ -1280,9 +1305,9 @@
{
label44:

Expand All @@ -657,7 +658,7 @@
{
if (!this.func_150811_f(i, j))
{
@@ -1312,7 +1336,7 @@
@@ -1312,7 +1337,7 @@

private void func_177441_y()
{
Expand All @@ -666,7 +667,7 @@
{
this.field_76639_c[i] = true;
}
@@ -1326,28 +1350,28 @@
@@ -1326,28 +1351,28 @@
{
if (p_180700_1_ == EnumFacing.EAST)
{
Expand Down Expand Up @@ -699,7 +700,7 @@
{
this.func_150811_f(l, 0);
}
@@ -1360,11 +1384,9 @@
@@ -1360,11 +1385,9 @@
int i = this.func_76625_h();
boolean flag = false;
boolean flag1 = false;
Expand All @@ -713,7 +714,7 @@
{
blockpos$mutableblockpos.func_181079_c(blockpos$mutableblockpos.func_177958_n(), j, blockpos$mutableblockpos.func_177952_p());
int k = this.func_177437_b(blockpos$mutableblockpos);
@@ -1384,11 +1406,11 @@
@@ -1384,11 +1407,11 @@
}
}

Expand All @@ -727,7 +728,7 @@
{
this.field_76637_e.func_175664_x(blockpos$mutableblockpos);
}
@@ -1422,11 +1444,12 @@
@@ -1422,11 +1445,12 @@
{
if (this.field_76634_f.length != p_177420_1_.length)
{
Expand All @@ -741,7 +742,7 @@
}
}

@@ -1495,5 +1518,56 @@
@@ -1495,5 +1519,56 @@
IMMEDIATE,
QUEUED,
CHECK;
Expand Down
Loading
Loading