Skip to content

Commit 866fceb

Browse files
committed
Merge 1.18 into 1.19.2
2 parents 6c465c7 + 27c7400 commit 866fceb

File tree

3 files changed

+38
-15
lines changed

3 files changed

+38
-15
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package org.embeddedt.modernfix.common.mixin.perf.dynamic_dfu;
2+
3+
import com.mojang.datafixers.DSL;
4+
import com.mojang.datafixers.types.Type;
5+
import net.minecraft.world.level.block.entity.BlockEntityType;
6+
import org.spongepowered.asm.mixin.Mixin;
7+
import org.spongepowered.asm.mixin.injection.At;
8+
import org.spongepowered.asm.mixin.injection.Redirect;
9+
10+
/**
11+
* Prevent fetchChoiceType calls from loading DFU early. Vanilla doesn't need the return values here.
12+
*/
13+
@Mixin(BlockEntityType.class)
14+
public class BlockEntityTypeMixin {
15+
@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;"))
16+
private static Type<?> skipSchemaCheck(DSL.TypeReference ref, String s) {
17+
return null;
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package org.embeddedt.modernfix.common.mixin.perf.dynamic_dfu;
2+
3+
import com.mojang.datafixers.DSL;
4+
import com.mojang.datafixers.types.Type;
5+
import net.minecraft.world.entity.EntityType;
6+
import org.spongepowered.asm.mixin.Mixin;
7+
import org.spongepowered.asm.mixin.injection.At;
8+
import org.spongepowered.asm.mixin.injection.Redirect;
9+
10+
/**
11+
* Prevent fetchChoiceType calls from loading DFU early. Vanilla doesn't need the return values here.
12+
*/
13+
@Mixin(EntityType.Builder.class)
14+
public class EntityTypeBuilderMixin {
15+
@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;"))
16+
private Type<?> skipSchemaCheck(DSL.TypeReference ref, String s) {
17+
return null;
18+
}
19+
}

common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/dynamic_dfu/SharedConstantsMixin.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)