Merge 1.18 into 1.19.2
This commit is contained in:
commit
866fcebf2e
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.embeddedt.modernfix.common.mixin.perf.dynamic_dfu;
|
||||||
|
|
||||||
|
import com.mojang.datafixers.DSL;
|
||||||
|
import com.mojang.datafixers.types.Type;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent fetchChoiceType calls from loading DFU early. Vanilla doesn't need the return values here.
|
||||||
|
*/
|
||||||
|
@Mixin(BlockEntityType.class)
|
||||||
|
public class BlockEntityTypeMixin {
|
||||||
|
@Redirect(method = "register", at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;fetchChoiceType(Lcom/mojang/datafixers/DSL$TypeReference;Ljava/lang/String;)Lcom/mojang/datafixers/types/Type;"))
|
||||||
|
private static Type<?> skipSchemaCheck(DSL.TypeReference ref, String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.embeddedt.modernfix.common.mixin.perf.dynamic_dfu;
|
||||||
|
|
||||||
|
import com.mojang.datafixers.DSL;
|
||||||
|
import com.mojang.datafixers.types.Type;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent fetchChoiceType calls from loading DFU early. Vanilla doesn't need the return values here.
|
||||||
|
*/
|
||||||
|
@Mixin(EntityType.Builder.class)
|
||||||
|
public class EntityTypeBuilderMixin {
|
||||||
|
@Redirect(method = "build", at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;fetchChoiceType(Lcom/mojang/datafixers/DSL$TypeReference;Ljava/lang/String;)Lcom/mojang/datafixers/types/Type;"))
|
||||||
|
private Type<?> skipSchemaCheck(DSL.TypeReference ref, String s) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package org.embeddedt.modernfix.common.mixin.perf.dynamic_dfu;
|
|
||||||
|
|
||||||
import net.minecraft.SharedConstants;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
@Mixin(SharedConstants.class)
|
|
||||||
public class SharedConstantsMixin {
|
|
||||||
@Inject(method = "<clinit>", at = @At("RETURN"))
|
|
||||||
private static void skipSchemaCheck(CallbackInfo ci) {
|
|
||||||
SharedConstants.CHECK_DATA_FIXER_SCHEMA = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user