Deduplicate adapter fields into superclass (#2967)

Move common adapter fields into supertype
This commit is contained in:
Hannes Greule
2024-11-04 12:21:14 +01:00
committed by GitHub
parent 9eafbf1c26
commit bd94632c47
5 changed files with 17 additions and 36 deletions

View File

@ -126,18 +126,10 @@ public final class PaperweightFaweAdapter extends FaweAdapter<net.minecraft.nbt.
}
}
private final com.sk89q.worldedit.bukkit.adapter.ext.fawe.v1_20_R4.PaperweightAdapter parent;
// ------------------------------------------------------------------------
// Code that may break between versions of Minecraft
// ------------------------------------------------------------------------
private final PaperweightMapChunkUtil mapUtil = new PaperweightMapChunkUtil();
private char[] ibdToStateOrdinal = null;
private int[] ordinalToIbdID = null;
private boolean initialised = false;
private Map<String, List<Property<?>>> allBlockProperties = null;
public PaperweightFaweAdapter() throws NoSuchFieldException, NoSuchMethodException {
this.parent = new com.sk89q.worldedit.bukkit.adapter.ext.fawe.v1_20_R4.PaperweightAdapter();
super(new com.sk89q.worldedit.bukkit.adapter.ext.fawe.v1_20_R4.PaperweightAdapter());
}
public Function<BlockEntity, FaweCompoundTag> blockEntityToCompoundTag() {