Address gen concurrency issue causing crashes (Fixes #2746)

This commit is contained in:
Shane Freeder 2019-12-16 01:38:00 +00:00
parent 8b25307b34
commit 9e58f22640
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
3 changed files with 67 additions and 30 deletions

View File

@ -1,11 +1,11 @@
From 499a94be3e76d1a2ed87c18bad399d0543c5ded7 Mon Sep 17 00:00:00 2001 From ba2a355955cf55d5ece6e390a2316420ceefdd36 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400 Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 960dce230..253890e53 100644 index 960dce2307..253890e537 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java --- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -54,7 +54,7 @@ public abstract class BiomeBase { @@ -54,7 +54,7 @@ public abstract class BiomeBase {
@ -27,7 +27,7 @@ index 960dce230..253890e53 100644
public List<WorldGenFeatureConfigured<?, ?>> g() { public List<WorldGenFeatureConfigured<?, ?>> g() {
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
index cd277dd17..ab0542579 100644 index cd277dd17f..ab05425793 100644
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java --- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java +++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
@@ -29,7 +29,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> { @@ -29,7 +29,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@ -72,7 +72,7 @@ index cd277dd17..ab0542579 100644
S s0 = this.f.get(iblockstate, v0); S s0 = this.f.get(iblockstate, v0);
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index e40f9c153..c88a62f6b 100644 index e40f9c153b..c88a62f6b7 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java --- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali @@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -92,7 +92,7 @@ index e40f9c153..c88a62f6b 100644
}); });
} }
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
index 28cfbaae2..1486d460c 100644 index 28cfbaae28..1486d460c8 100644
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java --- a/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java +++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T> @@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
@ -109,7 +109,7 @@ index 28cfbaae2..1486d460c 100644
if (this.b.containsKey(s1)) { if (this.b.containsKey(s1)) {
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index 68a601bac..efdf611e6 100644 index 68a601bac5..efdf611e66 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java --- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -84,7 +84,7 @@ public class ChunkStatus { @@ -84,7 +84,7 @@ public class ChunkStatus {
@ -122,7 +122,7 @@ index 68a601bac..efdf611e6 100644
for (int j = a().size() - 1; j >= 0; --j) { for (int j = a().size() - 1; j >= 0; --j) {
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index 2dd27edc8..6def3616e 100644 index 2dd27edc83..6def3616ef 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java --- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java +++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -58,7 +58,7 @@ public class CraftingManager extends ResourceDataJson { @@ -58,7 +58,7 @@ public class CraftingManager extends ResourceDataJson {
@ -135,7 +135,7 @@ index 2dd27edc8..6def3616e 100644
CraftingManager.LOGGER.info("Loaded {} recipes", map1.size()); CraftingManager.LOGGER.info("Loaded {} recipes", map1.size());
} }
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index f2c0e06ba..909d13c42 100644 index f2c0e06bab..909d13c427 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -376,7 +376,7 @@ public class EnderDragonBattle { @@ -376,7 +376,7 @@ public class EnderDragonBattle {
@ -157,7 +157,7 @@ index f2c0e06ba..909d13c42 100644
private EntityEnderDragon o() { private EntityEnderDragon o() {
diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java
index 8e28c4725..3988e68d4 100644 index 8e28c4725a..3988e68d4f 100644
--- a/src/main/java/net/minecraft/server/EntityFireballFireball.java --- a/src/main/java/net/minecraft/server/EntityFireballFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java
@@ -18,7 +18,7 @@ public abstract class EntityFireballFireball extends EntityFireball { @@ -18,7 +18,7 @@ public abstract class EntityFireballFireball extends EntityFireball {
@ -170,7 +170,7 @@ index 8e28c4725..3988e68d4 100644
})); }));
} }
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index 7d44348c7..73ecdd22e 100644 index 7d44348c78..73ecdd22ea 100644
--- a/src/main/java/net/minecraft/server/EntityVindicator.java --- a/src/main/java/net/minecraft/server/EntityVindicator.java
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java +++ b/src/main/java/net/minecraft/server/EntityVindicator.java
@@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract { @@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
@ -183,7 +183,7 @@ index 7d44348c7..73ecdd22e 100644
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 1f3ea23ae..b098d86e3 100644 index 1f3ea23ae1..b098d86e3a 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R @@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@ -213,7 +213,7 @@ index 1f3ea23ae..b098d86e3 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index 3be9efd22..3a1ad2346 100644 index 3be9efd22c..3a1ad2346b 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java --- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -281,12 +281,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements @@ -281,12 +281,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
@ -253,7 +253,7 @@ index 3be9efd22..3a1ad2346 100644
for (i = 0; i < k; ++i) { for (i = 0; i < k; ++i) {
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index a2bbca22b..c8512f9f4 100644 index a2bbca22b5..c8512f9f41 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java --- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -47,7 +47,7 @@ public interface IEntityAccess { @@ -47,7 +47,7 @@ public interface IEntityAccess {
@ -314,7 +314,7 @@ index a2bbca22b..c8512f9f4 100644
if (pathfindertargetcondition.a(entityliving, t0)) { if (pathfindertargetcondition.a(entityliving, t0)) {
list1.add(t0); list1.add(t0);
diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java
index a986f2912..c5658c077 100644 index a986f2912f..c5658c0779 100644
--- a/src/main/java/net/minecraft/server/IOWorker.java --- a/src/main/java/net/minecraft/server/IOWorker.java
+++ b/src/main/java/net/minecraft/server/IOWorker.java +++ b/src/main/java/net/minecraft/server/IOWorker.java
@@ -46,7 +46,7 @@ public class IOWorker implements AutoCloseable { @@ -46,7 +46,7 @@ public class IOWorker implements AutoCloseable {
@ -354,7 +354,7 @@ index a986f2912..c5658c077 100644
IOWorker.LOGGER.error("Failed to close storage", exception); IOWorker.LOGGER.error("Failed to close storage", exception);
this.h.completeExceptionally(exception); this.h.completeExceptionally(exception);
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
index 59bb53543..3ed6a1e78 100644 index 59bb535431..3ed6a1e785 100644
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java --- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java +++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
@@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract { @@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
@ -382,7 +382,7 @@ index 59bb53543..3ed6a1e78 100644
} }
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index 829a7ae0a..8b9e47b4c 100644 index 829a7ae0a2..8b9e47b4c7 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java --- a/src/main/java/net/minecraft/server/NBTBase.java
+++ b/src/main/java/net/minecraft/server/NBTBase.java +++ b/src/main/java/net/minecraft/server/NBTBase.java
@@ -18,7 +18,7 @@ public interface NBTBase { @@ -18,7 +18,7 @@ public interface NBTBase {
@ -395,7 +395,7 @@ index 829a7ae0a..8b9e47b4c 100644
default String asString() { default String asString() {
return this.toString(); return this.toString();
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index 22035b6c0..5406f4c40 100644 index 22035b6c0b..5406f4c40f 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java --- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java +++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -51,7 +51,7 @@ public class NBTTagList extends NBTList<NBTBase> { @@ -51,7 +51,7 @@ public class NBTTagList extends NBTList<NBTBase> {
@ -408,7 +408,7 @@ index 22035b6c0..5406f4c40 100644
private byte type; private byte type;
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
index 8471920b8..e9c405fb5 100644 index 8471920b8b..e9c405fb53 100644
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java --- a/src/main/java/net/minecraft/server/NextTickListEntry.java
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java +++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
@@ -37,13 +37,13 @@ public class NextTickListEntry<T> { @@ -37,13 +37,13 @@ public class NextTickListEntry<T> {
@ -430,7 +430,7 @@ index 8471920b8..e9c405fb5 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
index 737afc7d7..db9f0196b 100644 index 737afc7d71..db9f0196bd 100644
--- a/src/main/java/net/minecraft/server/RegionFileSection.java --- a/src/main/java/net/minecraft/server/RegionFileSection.java
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java +++ b/src/main/java/net/minecraft/server/RegionFileSection.java
@@ -83,9 +83,9 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC @@ -83,9 +83,9 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
@ -455,7 +455,7 @@ index 737afc7d7..db9f0196b 100644
}, dynamic2); }, dynamic2);
}); });
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index 7f89562e9..4efcb8b59 100644 index 7f89562e90..4efcb8b595 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java --- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java +++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> { @@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
@ -468,7 +468,7 @@ index 7f89562e9..4efcb8b59 100644
this.c.set(i, t0); this.c.set(i, t0);
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
index 4cb78c6a3..e15d28671 100644 index 4cb78c6a3f..e15d286710 100644
--- a/src/main/java/net/minecraft/server/RegistryID.java --- a/src/main/java/net/minecraft/server/RegistryID.java
+++ b/src/main/java/net/minecraft/server/RegistryID.java +++ b/src/main/java/net/minecraft/server/RegistryID.java
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> { @@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
@ -496,7 +496,7 @@ index 4cb78c6a3..e15d28671 100644
this.f = 0; this.f = 0;
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index 8534585eb..7b92ecfff 100644 index 8534585eb1..7b92ecfff9 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java --- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -45,8 +45,8 @@ public class SystemUtils { @@ -45,8 +45,8 @@ public class SystemUtils {
@ -540,7 +540,7 @@ index 8534585eb..7b92ecfff 100644
if (throwable != null) { if (throwable != null) {
completablefuture.completeExceptionally(throwable); completablefuture.completeExceptionally(throwable);
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
index ee2059cf8..77bb6b092 100644 index ee2059cf8e..77bb6b092a 100644
--- a/src/main/java/net/minecraft/server/Ticket.java --- a/src/main/java/net/minecraft/server/Ticket.java
+++ b/src/main/java/net/minecraft/server/Ticket.java +++ b/src/main/java/net/minecraft/server/Ticket.java
@@ -23,7 +23,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> { @@ -23,7 +23,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
@ -553,7 +553,7 @@ index ee2059cf8..77bb6b092 100644
} }
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
index c137484f6..c999f8c9b 100644 index c137484f66..c999f8c9bf 100644
--- a/src/main/java/net/minecraft/server/VillagePlace.java --- a/src/main/java/net/minecraft/server/VillagePlace.java
+++ b/src/main/java/net/minecraft/server/VillagePlace.java +++ b/src/main/java/net/minecraft/server/VillagePlace.java
@@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> { @@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
@ -584,7 +584,7 @@ index c137484f6..c999f8c9b 100644
} }
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
index a06a31534..3bcf0b385 100644 index a06a31534e..3bcf0b385d 100644
--- a/src/main/java/net/minecraft/server/VillagerTrades.java --- a/src/main/java/net/minecraft/server/VillagerTrades.java
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java +++ b/src/main/java/net/minecraft/server/VillagerTrades.java
@@ -15,12 +15,12 @@ import javax.annotation.Nullable; @@ -15,12 +15,12 @@ import javax.annotation.Nullable;
@ -603,8 +603,20 @@ index a06a31534..3bcf0b385 100644
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)}))); hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)}))); hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)}))); hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
index 555cf6be79..22e14fe1e9 100644
--- a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
@@ -40,6 +40,6 @@ public class WorldGenFeatureStateProviderWeighted extends WorldGenFeatureStatePr
builder.put(dynamicops.createString("type"), dynamicops.createString(IRegistry.t.getKey(this.a).toString())).put(dynamicops.createString("entries"), this.b.a(dynamicops, (iblockdata) -> {
return IBlockData.a(dynamicops, iblockdata);
}));
- return (new Dynamic(dynamicops, dynamicops.createMap(builder.build()))).getValue();
+ return (new Dynamic<T>(dynamicops, dynamicops.createMap(builder.build()))).getValue(); // Paper - decompile fix
}
}
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 55fe7625a..19e68a783 100644 index 55fe7625af..19e68a7831 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java --- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -37,7 +37,7 @@ public class WorldPersistentData { @@ -37,7 +37,7 @@ public class WorldPersistentData {

View File

@ -1,11 +1,11 @@
From 456b08a9c36183ca6be42b2bf40f5c43a34162cb Mon Sep 17 00:00:00 2001 From 2658c1b132e2176ce72f91f6670923ad8349f757 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 24 May 2019 07:53:16 +0100 Date: Fri, 24 May 2019 07:53:16 +0100
Subject: [PATCH] Fix some generation concurrency issues Subject: [PATCH] Fix some generation concurrency issues
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9889b0543..e80cb3b97 100644 index 66e1745836..d7a7720996 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -100,6 +100,23 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -100,6 +100,23 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -32,8 +32,34 @@ index 9889b0543..e80cb3b97 100644
public CraftWorld getWorld() { public CraftWorld getWorld() {
return this.world; return this.world;
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
index 22e14fe1e9..e2af6d43b2 100644
--- a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
@@ -23,18 +23,18 @@ public class WorldGenFeatureStateProviderWeighted extends WorldGenFeatureStatePr
this(new WeightedList<>(dynamic.get("entries").orElseEmptyList(), IBlockData::a));
}
- public WorldGenFeatureStateProviderWeighted a(IBlockData iblockdata, int i) {
+ public synchronized WorldGenFeatureStateProviderWeighted a(IBlockData iblockdata, int i) { // Paper
this.b.a(iblockdata, i);
return this;
}
@Override
- public IBlockData a(Random random, BlockPosition blockposition) {
+ public synchronized IBlockData a(Random random, BlockPosition blockposition) { // Paper
return (IBlockData) this.b.b(random);
}
@Override
- public <T> T a(DynamicOps<T> dynamicops) {
+ public synchronized <T> T a(DynamicOps<T> dynamicops) { // Paper
Builder<T, T> builder = ImmutableMap.builder();
builder.put(dynamicops.createString("type"), dynamicops.createString(IRegistry.t.getKey(this.a).toString())).put(dynamicops.createString("entries"), this.b.a(dynamicops, (iblockdata) -> {
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
index b34a0683a..e002ed53f 100644 index b34a0683a1..e002ed53f6 100644
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java --- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java +++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
@@ -10,10 +10,12 @@ import javax.annotation.Nullable; @@ -10,10 +10,12 @@ import javax.annotation.Nullable;

View File

@ -93,7 +93,6 @@ done
# we do not need any lines added to this file for NMS # we do not need any lines added to this file for NMS
# import FileName # import FileName
import EntityFireballFireball