Archiviert
13
0

Removing dataFixer initialisation

Dieser Commit ist enthalten in:
Lixfel 2020-12-26 23:49:53 +01:00
Ursprung c9bb3ddbc0
Commit 0524364f57
2 geänderte Dateien mit 100 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,82 @@
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
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java (revision ec1b4311cebfd9bc35a5f84f56df46cf7319649a)
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java (date 1609015897972)
@@ -1,26 +1,63 @@
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.DynamicOps;
+import com.mojang.datafixers.types.Type;
+import com.mojang.datafixers.types.templates.TypeTemplate;
+import com.mojang.datafixers.util.Pair;
+
+import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import java.util.function.BiFunction;
+import java.util.function.Supplier;
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();
+ 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());
+ @Override
+ protected Map<String, Type<?>> buildTypes() {
+ 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;
+ }
+ };
+ }
+ };
public static DataFixer a() {
return DataConverterRegistry.c;

Datei anzeigen

@ -0,0 +1,18 @@
Index: src/main/java/net/minecraft/server/JsonList.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
--- a/src/main/java/net/minecraft/server/JsonList.java (revision ec1b4311cebfd9bc35a5f84f56df46cf7319649a)
+++ b/src/main/java/net/minecraft/server/JsonList.java (date 1609013366119)
@@ -156,6 +156,9 @@
}
public void save() throws IOException {
+ if(!this.c.canWrite())
+ return;
+
Collection<V> collection = this.d.values();
String s = this.b.toJson(collection);
BufferedWriter bufferedwriter = null;