Skip to content

Commit

Permalink
Update boader
Browse files Browse the repository at this point in the history
Turns out the way I made MixinEntityPlayerSided was never legal and the mixins update catches it now. It worked just fine though... :(
  • Loading branch information
js6pak committed Nov 1, 2023
1 parent c32152a commit 1653f9b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/develop
minecraft_version=b1.7.3
yarn_mappings=b1.7.3+build.8
loader_version=0.14.13-babric.1
loader_version=0.14.24-babric.1

# Mod Properties
mod_version = 0.5.2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2023 js6pak
*
* This file is part of MojangFix.
*
* MojangFix is free software: you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation, version 3.
*
* MojangFix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with MojangFix. If not, see <https://www.gnu.org/licenses/>.
*/

package pl.js6pak.mojangfix.mixin.client.skin;

import net.minecraft.entity.player.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.world.World;
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;
import pl.js6pak.mojangfix.client.skinfix.SkinService;

@Mixin(ClientPlayerEntity.class)

public abstract class ClientPlayerEntityMixin extends PlayerEntity {
public ClientPlayerEntityMixin(World arg) {
super(arg);
}

@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(CallbackInfo ci) {
SkinService.getInstance().init(this);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 js6pak
* Copyright (C) 2023 js6pak
*
* This file is part of MojangFix.
*
Expand All @@ -16,7 +16,6 @@
package pl.js6pak.mojangfix.mixin.client.skin;

import net.minecraft.client.network.OtherPlayerEntity;
import net.minecraft.entity.player.ClientPlayerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -25,14 +24,14 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import pl.js6pak.mojangfix.client.skinfix.SkinService;

@Mixin({OtherPlayerEntity.class, ClientPlayerEntity.class})
public abstract class MixinEntityPlayerSided extends PlayerEntity {
public MixinEntityPlayerSided(World world) {
super(world);
}
@Mixin(OtherPlayerEntity.class)
public abstract class OtherPlayerEntityMixin extends PlayerEntity {
public OtherPlayerEntityMixin(World arg) {
super(arg);
}

@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(CallbackInfo ci) {
SkinService.getInstance().init(this);
}
@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(CallbackInfo ci) {
SkinService.getInstance().init(this);
}
}
15 changes: 8 additions & 7 deletions src/main/resources/mojangfix.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"defaultRequire": 1
},
"client": [
"client.MinecraftAccessor",
"client.ScreenAccessor",
"client.auth.ClientNetworkHandlerMixin",
"client.auth.SessionMixin",
"client.controls.ControlsOptionsScreenMixin",
Expand All @@ -16,30 +18,29 @@
"client.inventory.PlayerEntityMixin",
"client.misc.DeathScreenMixin",
"client.misc.InGameHudMixin",
"client.misc.MinecraftMixin",
"client.misc.MinecraftAppletMixin",
"client.misc.MinecraftMixin",
"client.misc.ResourceDownloadThreadMixin",
"client.misc.ScreenMixin",
"client.misc.TitleScreenMixin",
"client.misc.ResourceDownloadThreadMixin",
"client.multiplayer.ReturnToMainMenuMixin",
"client.multiplayer.TitleScreenMixin",
"client.skin.BipedEntityModelMixin",
"client.skin.ClientPlayerEntityMixin",
"client.skin.EntityRenderDispatcherMixin",
"client.skin.MixinEntityPlayerSided",
"client.skin.ModelPartMixin",
"client.skin.OtherPlayerEntityMixin",
"client.skin.PlayerEntityMixin",
"client.skin.PlayerEntityRendererMixin",
"client.skin.SkinImageProcessorMixin",
"client.skin.WorldRendererMixin",
"client.text.TextFieldWidgetMixin",
"client.text.chat.ChatScreenMixin",
"client.text.chat.SleepingChatScreenMixin",
"client.text.sign.ClientNetworkHandlerMixin",
"client.text.sign.SignBlockEntityMixin",
"client.text.sign.SignBlockEntityRendererMixin",
"client.text.sign.SignEditScreenMixin",
"client.text.TextFieldWidgetMixin",
"client.MinecraftAccessor",
"client.ScreenAccessor"
"client.text.sign.SignEditScreenMixin"
],
"server": [
"server.auth.ServerNetworkHandlerAccessor",
Expand Down

0 comments on commit 1653f9b

Please sign in to comment.