Skip to content

Commit

Permalink
client-side mixin fixes, 2.1.0 bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Jan 13, 2022
1 parent 36d71f6 commit 6e018c7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package draylar.identity.mixin.player;

import draylar.identity.impl.PlayerDataProvider;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket;
Expand All @@ -15,6 +17,7 @@
import java.util.HashMap;
import java.util.Map;

@Environment(EnvType.CLIENT)
@Mixin(ClientPlayNetworkHandler.class)
public class ClientPlayerDataCacheMixin {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,14 @@ public static void handleFavoriteSyncPacket(PacketByteBuf packet, NetworkManager
}

public static void handleAbilitySyncPacket(PacketByteBuf packet, NetworkManager.PacketContext context) {
if(context.getPlayer() == null) {
return;
}

int cooldown = packet.readInt();
((PlayerDataProvider) context.getPlayer()).setAbilityCooldown(cooldown);
context.queue(() -> {
((PlayerDataProvider) context.getPlayer()).setAbilityCooldown(cooldown);
});
}

public static void handleConfigurationSyncPacket(PacketByteBuf packet, NetworkManager.PacketContext context) {
Expand Down
26 changes: 13 additions & 13 deletions common/src/main/resources/identity.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "draylar.identity.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"ActiveTargetGoalMixin",
"CreeperEntityMixin",
Expand All @@ -26,26 +26,15 @@
"VillagerEntityMixin",
"VillagerHostilesSensorMixin",
"WolfEntityMixin",
"accessor.BlazeEntityModelAccessor",
"accessor.CreeperEntityAccessor",
"accessor.EntityAccessor",
"accessor.EntityTypeTagsAccessor",
"accessor.IllagerEntityModelAccessor",
"accessor.IronGolemEntityAccessor",
"accessor.LivingEntityAccessor",
"accessor.LivingEntityRendererAccessor",
"accessor.LlamaEntityModelAccessor",
"accessor.MobEntityAccessor",
"accessor.OcelotEntityModelAccessor",
"accessor.ParrotEntityAccessor",
"accessor.QuadrupedEntityModelAccessor",
"accessor.RavagerEntityAccessor",
"accessor.RavagerEntityModelAccessor",
"accessor.ScreenAccessor",
"accessor.SpiderEntityModelAccessor",
"accessor.SquidEntityModelAccessor",
"entity.BowItemMixin",
"player.ClientPlayerDataCacheMixin",
"player.PlayerEntityDataMixin",
"player.PlayerEntityTickMixin",
"player.PlayerManagerMixin",
Expand All @@ -59,7 +48,18 @@
"PlayerEntityRendererMixin",
"ShadowMixin",
"StrayOverlayMixin",
"accessor.EntityShadowAccessor"
"accessor.EntityShadowAccessor",
"player.ClientPlayerDataCacheMixin",
"accessor.RavagerEntityModelAccessor",
"accessor.ScreenAccessor",
"accessor.SpiderEntityModelAccessor",
"accessor.QuadrupedEntityModelAccessor",
"accessor.OcelotEntityModelAccessor",
"accessor.LivingEntityRendererAccessor",
"accessor.LlamaEntityModelAccessor",
"accessor.IllagerEntityModelAccessor",
"accessor.SquidEntityModelAccessor",
"accessor.BlazeEntityModelAccessor"
],
"injectors": {
"defaultRequire": 1
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/identity-fabric.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "draylar.identity.fabric.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"WitherEntityMixin"
],
Expand Down
4 changes: 1 addition & 3 deletions forge/src/main/resources/identity-forge.mixins.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"required": true,
"package": "draylar.identity.forge.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"PlayerEntityDataMixin",
"PlayerEntityTickMixin",
"WitherEntityMixin"
],
"client": [
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2048M
# Base Versions
minecraft_version=1.17.1
archives_base_name=identity
mod_version=2.0.0
mod_version=2.1.0-beta
maven_group=dev.draylar

# Loader Versions
Expand Down

0 comments on commit 6e018c7

Please sign in to comment.