@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/Convertable.java
|
||||
+++ b/net/minecraft/world/level/storage/Convertable.java
|
||||
@@ -77,6 +77,10 @@
|
||||
@@ -78,6 +78,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();
|
||||
@@ -148,7 +152,7 @@
|
||||
@@ -149,7 +153,7 @@
|
||||
}
|
||||
|
||||
public static WorldDataConfiguration readDataConfig(Dynamic<?> dynamic) {
|
||||
@@ -20,9 +20,9 @@
|
||||
Logger logger = Convertable.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -167,6 +171,7 @@
|
||||
@@ -168,6 +172,7 @@
|
||||
WorldDimensions.b worlddimensions_b = generatorsettings.dimensions().bake(iregistry);
|
||||
Lifecycle lifecycle = worlddimensions_b.lifecycle().add(iregistrycustom_dimension.allRegistriesLifecycle());
|
||||
Lifecycle lifecycle = worlddimensions_b.lifecycle().add(holderlookup_a.allRegistriesLifecycle());
|
||||
WorldDataServer worlddataserver = WorldDataServer.parse(dynamic1, worldsettings, worlddimensions_b.specialWorldProperty(), generatorsettings.options(), lifecycle);
|
||||
+ worlddataserver.pdc = ((Dynamic<NBTBase>) dynamic1).getElement("BukkitValues", null); // CraftBukkit - Add PDC to world
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
GameProfileSerializer.addCurrentDataVersion(nbttagcompound);
|
||||
DynamicOps<NBTBase> dynamicops = iregistrycustom.createSerializationContext(DynamicOpsNBT.INSTANCE);
|
||||
- DataResult dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, iregistrycustom);
|
||||
+ DataResult<NBTBase> dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, new WorldDimensions(this.customDimensions != null ? this.customDimensions : iregistrycustom.registryOrThrow(Registries.LEVEL_STEM))); // CraftBukkit
|
||||
+ DataResult<NBTBase> dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, new WorldDimensions(this.customDimensions != null ? this.customDimensions : iregistrycustom.lookupOrThrow(Registries.LEVEL_STEM))); // CraftBukkit
|
||||
Logger logger = WorldDataServer.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/LootDataType.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/LootDataType.java
|
||||
@@ -15,6 +15,11 @@
|
||||
@@ -9,6 +9,11 @@
|
||||
import net.minecraft.world.level.storage.loot.functions.LootItemFunctions;
|
||||
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.CraftLootTable;
|
||||
@@ -11,11 +11,11 @@
|
||||
+
|
||||
public record LootDataType<T>(ResourceKey<IRegistry<T>> registryKey, Codec<T> codec, LootDataType.a<T> validator) {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -48,6 +53,7 @@
|
||||
public static final LootDataType<LootItemCondition> PREDICATE = new LootDataType<>(Registries.PREDICATE, LootItemCondition.DIRECT_CODEC, createSimpleValidator());
|
||||
@@ -32,6 +37,7 @@
|
||||
private static LootDataType.a<LootTable> createLootTableValidator() {
|
||||
return (lootcollector, resourcekey, loottable) -> {
|
||||
loottable.validate(lootcollector.setParams(loottable.getParamSet()).enterElement("{" + String.valueOf(resourcekey.registry()) + "/" + String.valueOf(resourcekey.location()) + "}", resourcekey));
|
||||
loottable.validate(lootcollector.setContextKeySet(loottable.getParamSet()).enterElement("{" + String.valueOf(resourcekey.registry()) + "/" + String.valueOf(resourcekey.location()) + "}", resourcekey));
|
||||
+ loottable.craftLootTable = new CraftLootTable(CraftNamespacedKey.fromMinecraft(resourcekey.location()), loottable); // CraftBukkit
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
private final BiFunction<ItemStack, LootTableInfo, ItemStack> compositeFunction;
|
||||
+ public CraftLootTable craftLootTable; // CraftBukkit
|
||||
|
||||
LootTable(LootContextParameterSet lootcontextparameterset, Optional<MinecraftKey> optional, List<LootSelector> list, List<LootItemFunction> list1) {
|
||||
this.paramSet = lootcontextparameterset;
|
||||
LootTable(ContextKeySet contextkeyset, Optional<MinecraftKey> optional, List<LootSelector> list, List<LootItemFunction> list1) {
|
||||
this.paramSet = contextkeyset;
|
||||
@@ -157,9 +165,22 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
|
||||
@@ -32,7 +32,8 @@
|
||||
@@ -31,7 +31,8 @@
|
||||
RandomSource randomsource = loottableinfo.getRandom();
|
||||
float f = 1.0F / ofloat;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user