Skip to content

Commit

Permalink
Fix mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Sep 8, 2024
1 parent 218b8ea commit a16ea95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Map;

@Mixin(World.class)
public class WorldMixin { // TODO verify
public class WorldMixin {

@Inject(
method = "markAndNotifyBlock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WorldChunkMixin {

@Inject(
method = "<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/world/chunk/UpgradeData;Lnet/minecraft/world/tick/ChunkTickScheduler;Lnet/minecraft/world/tick/ChunkTickScheduler;J[Lnet/minecraft/world/chunk/ChunkSection;Lnet/minecraft/world/chunk/WorldChunk$EntityLoader;Lnet/minecraft/world/gen/chunk/BlendingData;)V",
at = @At(value = "RETURN")
at = @At(value = "INVOKE_ASSIGN", target = "Lcom/google/common/collect/Maps;newHashMap()Ljava/util/HashMap;", shift = At.Shift.AFTER, remap = false)
)
@Coerce
private void createFastUtilMap(World world, ChunkPos pos, UpgradeData upgradeData, ChunkTickScheduler<?> blockTickScheduler, ChunkTickScheduler<?> fluidTickScheduler, long inhabitedTime, ChunkSection[] sectionArrayInitializer, WorldChunk.EntityLoader entityLoader, BlendingData blendingData, CallbackInfo ci) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ private static boolean redirectInstanceOf2(Object obj, Class<?> clazz) {
@Inject(
method = "<init>(Lnet/minecraft/entity/Entity;)V",
at = @At(
value = "RETURN"
value = "INVOKE",
target = "Lnet/minecraft/block/EntityShapeContext;<init>(ZDLnet/minecraft/item/ItemStack;Ljava/util/function/Predicate;Lnet/minecraft/entity/Entity;)V",
shift = At.Shift.AFTER
)
)
private void initFields(Entity entity, CallbackInfo ci) {
Expand Down

0 comments on commit a16ea95

Please sign in to comment.