@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/Convertable.java
|
||||
+++ b/net/minecraft/world/level/storage/Convertable.java
|
||||
@@ -74,6 +74,10 @@
|
||||
@@ -80,6 +80,10 @@
|
||||
import net.minecraft.world.level.validation.PathAllowList;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
public class Convertable {
|
||||
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -160,7 +164,7 @@
|
||||
@@ -169,7 +173,7 @@
|
||||
}
|
||||
|
||||
private static WorldDataConfiguration readDataConfig(Dynamic<?> dynamic) {
|
||||
@@ -20,7 +20,7 @@
|
||||
Logger logger = Convertable.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -176,7 +180,7 @@
|
||||
@@ -185,7 +189,7 @@
|
||||
throw new LevelStorageException(IChatBaseComponent.translatable("selectWorld.load_folder_access"));
|
||||
} else {
|
||||
try {
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
Convertable.a convertable_a;
|
||||
|
||||
@@ -320,6 +324,7 @@
|
||||
@@ -343,6 +347,7 @@
|
||||
WorldDimensions.b worlddimensions_b = generatorsettings.dimensions().bake(iregistry);
|
||||
Lifecycle lifecycle1 = worlddimensions_b.lifecycle().add(lifecycle);
|
||||
WorldDataServer worlddataserver = WorldDataServer.parse(dynamic, datafixer, i, nbttagcompound2, worldsettings, levelversion, worlddimensions_b.specialWorldProperty(), generatorsettings.options(), lifecycle1);
|
||||
@@ -37,14 +37,14 @@
|
||||
|
||||
return Pair.of(worlddataserver, worlddimensions_b);
|
||||
};
|
||||
@@ -415,27 +420,41 @@
|
||||
@@ -441,27 +446,41 @@
|
||||
return this.backupDir;
|
||||
}
|
||||
|
||||
- public Convertable.ConversionSession validateAndCreateAccess(String s) throws IOException, ContentValidationException {
|
||||
+ public Convertable.ConversionSession validateAndCreateAccess(String s, ResourceKey<WorldDimension> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
|
||||
Path path = this.getLevelPath(s);
|
||||
List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateSave(path, true);
|
||||
List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateDirectory(path, true);
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
throw new ContentValidationException(path, list);
|
||||
@@ -83,7 +83,7 @@
|
||||
public static record a(List<Convertable.b> levels) implements Iterable<Convertable.b> {
|
||||
|
||||
public boolean isEmpty() {
|
||||
@@ -487,8 +506,12 @@
|
||||
@@ -513,8 +532,12 @@
|
||||
public final Convertable.b levelDirectory;
|
||||
private final String levelId;
|
||||
private final Map<SavedFile, Path> resources = Maps.newHashMap();
|
||||
@@ -97,7 +97,7 @@
|
||||
this.levelId = s;
|
||||
this.levelDirectory = new Convertable.b(path);
|
||||
this.lock = SessionLock.create(path);
|
||||
@@ -499,7 +522,7 @@
|
||||
@@ -529,7 +552,7 @@
|
||||
}
|
||||
|
||||
public Path getLevelPath(SavedFile savedfile) {
|
||||
@@ -106,7 +106,7 @@
|
||||
Convertable.b convertable_b = this.levelDirectory;
|
||||
|
||||
Objects.requireNonNull(this.levelDirectory);
|
||||
@@ -507,7 +530,7 @@
|
||||
@@ -537,7 +560,7 @@
|
||||
}
|
||||
|
||||
public Path getDimensionPath(ResourceKey<World> resourcekey) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -30,6 +30,7 @@
|
||||
public static final LootDataId<LootTable> EMPTY_LOOT_TABLE_KEY = new LootDataId<>(LootDataType.TABLE, LootTables.EMPTY);
|
||||
private Map<LootDataId<?>, ?> elements = Map.of();
|
||||
private Multimap<LootDataType<?>, MinecraftKey> typeKeys = ImmutableMultimap.of();
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public LootDataManager() {}
|
||||
|
||||
@@ -93,7 +94,7 @@
|
||||
@@ -87,7 +88,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T getElement(LootDataId<T> lootdataid) {
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
@@ -105,16 +106,21 @@
|
||||
@@ -99,16 +100,21 @@
|
||||
});
|
||||
this.elements = map1;
|
||||
this.typeKeys = com_google_common_collect_immutablemultimap_builder.build();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/LootTable.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/LootTable.java
|
||||
@@ -34,6 +34,13 @@
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
@@ -29,6 +29,13 @@
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSets;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -13,8 +13,8 @@
|
||||
+
|
||||
public class LootTable {
|
||||
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -145,9 +152,22 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -149,9 +156,22 @@
|
||||
}
|
||||
|
||||
public void fill(IInventory iinventory, LootParams lootparams, long i) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/functions/LootEnchantFunction.java
|
||||
@@ -49,8 +49,13 @@
|
||||
@@ -57,8 +57,13 @@
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
int i = EnchantmentManager.getMobLooting((EntityLiving) entity);
|
||||
@@ -15,12 +15,3 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -99,7 +104,7 @@
|
||||
public b() {}
|
||||
|
||||
public void serialize(JsonObject jsonobject, LootEnchantFunction lootenchantfunction, JsonSerializationContext jsonserializationcontext) {
|
||||
- super.serialize(jsonobject, (LootItemFunctionConditional) lootenchantfunction, jsonserializationcontext);
|
||||
+ super.serialize(jsonobject, lootenchantfunction, jsonserializationcontext); // CraftBukkit - decompile error
|
||||
jsonobject.add("count", jsonserializationcontext.serialize(lootenchantfunction.value));
|
||||
if (lootenchantfunction.hasLimit()) {
|
||||
jsonobject.add("limit", jsonserializationcontext.serialize(lootenchantfunction.limit));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionRandomChanceWithLooting.java
|
||||
@@ -41,6 +41,11 @@
|
||||
@@ -34,6 +34,11 @@
|
||||
if (entity instanceof EntityLiving) {
|
||||
i = EnchantmentManager.getMobLooting((EntityLiving) entity);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
|
||||
@@ -34,7 +34,8 @@
|
||||
@@ -32,7 +32,8 @@
|
||||
RandomSource randomsource = loottableinfo.getRandom();
|
||||
float f = 1.0F / ofloat;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user