Compilation fixes
This commit is contained in:
parent
0ee41f262e
commit
e989411074
|
|
@ -55,7 +55,7 @@ public class LazyDataFixer implements DataFixer {
|
||||||
*/
|
*/
|
||||||
static class EmptySchema extends Schema {
|
static class EmptySchema extends Schema {
|
||||||
public EmptySchema() {
|
public EmptySchema() {
|
||||||
super(DataFixUtils.makeKey(SharedConstants.getCurrentVersion().getWorldVersion()), null);
|
super(DataFixUtils.makeKey(SharedConstants.getCurrentVersion().getDataVersion().getVersion()), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Type<?> EMPTY_TYPE = new EmptyPart();
|
private static final Type<?> EMPTY_TYPE = new EmptyPart();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package org.embeddedt.modernfix.mixin.perf.dynamic_dfu;
|
package org.embeddedt.modernfix.mixin.perf.dynamic_dfu;
|
||||||
|
|
||||||
|
import com.mojang.datafixers.DSL;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import net.minecraft.util.datafix.DataFixers;
|
import net.minecraft.util.datafix.DataFixers;
|
||||||
import org.embeddedt.modernfix.dfu.LazyDataFixer;
|
import org.embeddedt.modernfix.dfu.LazyDataFixer;
|
||||||
|
|
@ -9,9 +10,11 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
@Mixin(DataFixers.class)
|
@Mixin(DataFixers.class)
|
||||||
public abstract class DataFixersMixin {
|
public abstract class DataFixersMixin {
|
||||||
@Shadow protected static DataFixer createFixerUpper() {
|
@Shadow protected static DataFixer createFixerUpper(Set<DSL.TypeReference> set) {
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,9 +24,9 @@ public abstract class DataFixersMixin {
|
||||||
* Avoid classloading the DFU logic until we actually need it.
|
* Avoid classloading the DFU logic until we actually need it.
|
||||||
*/
|
*/
|
||||||
@Inject(method = "createFixerUpper", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "createFixerUpper", at = @At("HEAD"), cancellable = true)
|
||||||
private static void createLazyFixerUpper(CallbackInfoReturnable<DataFixer> cir) {
|
private static void createLazyFixerUpper(Set<DSL.TypeReference> set, CallbackInfoReturnable<DataFixer> cir) {
|
||||||
if(lazyDataFixer == null) {
|
if(lazyDataFixer == null) {
|
||||||
lazyDataFixer = new LazyDataFixer(DataFixersMixin::createFixerUpper);
|
lazyDataFixer = new LazyDataFixer(() -> createFixerUpper(set));
|
||||||
cir.setReturnValue(lazyDataFixer);
|
cir.setReturnValue(lazyDataFixer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user