Skip to content

Commit

Permalink
Fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Dec 12, 2020
1 parent 3722d2e commit bae8aff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
minecraft_version=1.16.4
yarn_mappings=1.16.4+build.1
loader_version=0.10.6+build.214
yarn_mappings=1.16.4+build.7
loader_version=0.10.8

#Fabric api
fabric_version=0.25.1+build.416-1.16
fabric_version=0.28.0+1.16

# Mod Properties
mod_version = 1.3.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
package org.samo_lego.fabrictailor.mixin;

import net.minecraft.server.network.EntityTrackerEntry;
import net.minecraft.server.network.ServerPlayerEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import java.util.Set;

@Mixin(targets = "net.minecraft.server.world.ThreadedAnvilChunkStorage$EntityTracker")
public interface EntityTrackerAccessor {
@Accessor("entry")
EntityTrackerEntry getEntry();
@Accessor("playersTracking")
Set<ServerPlayerEntity> getTrackingPlayers();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import com.mojang.authlib.properties.PropertyMap;
import net.fabricmc.fabric.impl.networking.server.EntityTrackerStreamAccessor;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.packet.s2c.play.*;
Expand Down Expand Up @@ -58,7 +57,7 @@ public void reloadSkin() {
ThreadedAnvilChunkStorage storage = ((ServerChunkManager)manager).threadedAnvilChunkStorage;
EntityTrackerAccessor trackerEntry = ((ThreadedAnvilChunkStorageAccessor) storage).getEntityTrackers().get(player.getEntityId());

((EntityTrackerStreamAccessor) trackerEntry).fabric_getTrackingPlayers().forEach(tracking -> trackerEntry.getEntry().startTracking(tracking));
trackerEntry.getTrackingPlayers().forEach(tracking -> trackerEntry.getEntry().startTracking(tracking));

// need to change the player entity on the client
ServerWorld targetWorld = (ServerWorld) player.world;
Expand Down

0 comments on commit bae8aff

Please sign in to comment.