2020-12-26 23:49:53 +01:00
|
|
|
Index: src/main/java/net/minecraft/server/DataConverterRegistry.java
|
|
|
|
IDEA additional info:
|
|
|
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
|
|
<+>UTF-8
|
|
|
|
===================================================================
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
2021-04-12 19:54:42 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java (revision d21469e470c928c37b815d1ef3d1e64517d97512)
|
|
|
|
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java (date 1618249493765)
|
|
|
|
@@ -1,26 +1,61 @@
|
2020-12-26 23:49:53 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
import com.google.common.collect.ImmutableMap;
|
|
|
|
-import com.mojang.datafixers.DSL;
|
|
|
|
-import com.mojang.datafixers.DataFixer;
|
|
|
|
-import com.mojang.datafixers.DataFixerBuilder;
|
|
|
|
-import com.mojang.datafixers.Typed;
|
|
|
|
+import com.google.common.collect.Maps;
|
|
|
|
+import com.mojang.datafixers.*;
|
|
|
|
import com.mojang.datafixers.schemas.Schema;
|
|
|
|
+import com.mojang.datafixers.types.Type;
|
|
|
|
+import com.mojang.datafixers.types.templates.TypeTemplate;
|
|
|
|
+import java.util.Map;
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.function.BiFunction;
|
|
|
|
+import java.util.function.Supplier;
|
2021-04-12 19:54:42 +02:00
|
|
|
+
|
2020-12-26 23:49:53 +01:00
|
|
|
|
|
|
|
public class DataConverterRegistry {
|
|
|
|
|
|
|
|
private static final BiFunction<Integer, Schema, Schema> a = Schema::new;
|
|
|
|
private static final BiFunction<Integer, Schema, Schema> b = DataConverterSchemaNamed::new;
|
|
|
|
- private static final DataFixer c = b();
|
2021-04-12 19:54:42 +02:00
|
|
|
+ //Steamwar Start
|
2020-12-26 23:49:53 +01:00
|
|
|
+ private static final DataFixer c = new DataFixer() {
|
|
|
|
+ @Override
|
|
|
|
+ public <T> Dynamic<T> update(DSL.TypeReference typeReference, Dynamic<T> dynamic, int i, int i1) {
|
|
|
|
+ return dynamic;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Schema getSchema(int i) {
|
|
|
|
+ return new Schema(i, null){
|
|
|
|
+ @Override
|
|
|
|
+ public void registerTypes(Schema schema, Map<String, Supplier<TypeTemplate>> entityTypes, Map<String, Supplier<TypeTemplate>> blockEntityTypes) {}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Supplier<TypeTemplate>> registerEntities(Schema schema) {
|
|
|
|
+ return Maps.newHashMap();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<String, Supplier<TypeTemplate>> registerBlockEntities(Schema schema) {
|
|
|
|
+ return Maps.newHashMap();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- private static DataFixer b() {
|
|
|
|
- DataFixerBuilder datafixerbuilder = new DataFixerBuilder(SharedConstants.getGameVersion().getWorldVersion());
|
2021-04-12 19:54:42 +02:00
|
|
|
+ @Override protected Map<String, Type<?>> buildTypes() {
|
2020-12-26 23:49:53 +01:00
|
|
|
+ return Maps.newHashMap();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- a(datafixerbuilder);
|
|
|
|
- return datafixerbuilder.build(SystemUtils.e());
|
|
|
|
- }
|
|
|
|
+ @Override
|
|
|
|
+ public Type<?> getType(DSL.TypeReference type) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Type<?> getChoiceType(DSL.TypeReference type, String choiceName) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ };
|
2021-04-12 19:54:42 +02:00
|
|
|
+ //Steamwar End
|
2020-12-26 23:49:53 +01:00
|
|
|
|
2021-04-12 19:54:42 +02:00
|
|
|
public static DataFixer getDataFixer() { return a(); } // Paper - OBFHELPER
|
2020-12-26 23:49:53 +01:00
|
|
|
public static DataFixer a() {
|