-
Notifications
You must be signed in to change notification settings - Fork 471
fix: smolpeople breefingdog player sizing #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Changes from 5 commits
6b073b2
1e708b8
f8c312e
60d10c6
2dda415
e7f3731
daa758b
d527682
b84ed65
46d32ba
e6c97a4
e7ff4ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Skytils - Hypixel Skyblock Quality of Life Mod | ||
| * Copyright (C) 2020-2025 Skytils | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published | ||
| * by the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program 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 Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| */ | ||
| package gg.skytils.skytilsmod.mixins.transformers.renderer; | ||
|
|
||
| //#if MC>12000 | ||
| import gg.skytils.skytilsmod.mixins.hooks.renderer.PlayerEntityRendererHook; | ||
| import net.minecraft.client.render.entity.PlayerEntityRenderer; | ||
| import net.minecraft.client.render.entity.state.PlayerEntityRenderState; | ||
| import net.minecraft.client.util.math.MatrixStack; | ||
| import org.jetbrains.annotations.NotNull; | ||
| 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; | ||
|
|
||
| @Mixin(PlayerEntityRenderer.class) | ||
| public class MixinPlayerEntityRenderer { | ||
| @Inject(method = "scale(Lnet/minecraft/client/render/entity/state/PlayerEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;)V", at = @At("HEAD")) | ||
| private static void doScale(PlayerEntityRenderState playerEntityRenderState, MatrixStack matrixStack, CallbackInfo ci){ | ||
| if (PlayerEntityRendererHook.isSmol(playerEntityRenderState)){ | ||
| matrixStack.scale(0.5f, 0.5f, 0.5f); | ||
| } | ||
| } | ||
| } | ||
| //#endif | ||
P3nguinMinecraft marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||||||||||||||
| /* | ||||||||||||||||||
| * Skytils - Hypixel Skyblock Quality of Life Mod | ||||||||||||||||||
| * Copyright (C) 2020-2025 Skytils | ||||||||||||||||||
| * | ||||||||||||||||||
| * This program is free software: you can redistribute it and/or modify | ||||||||||||||||||
| * it under the terms of the GNU Affero General Public License as published | ||||||||||||||||||
| * by the Free Software Foundation, either version 3 of the License, or | ||||||||||||||||||
| * (at your option) any later version. | ||||||||||||||||||
| * | ||||||||||||||||||
| * This program 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 Affero General Public License for more details. | ||||||||||||||||||
| * | ||||||||||||||||||
| * You should have received a copy of the GNU Affero General Public License | ||||||||||||||||||
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||||||||||||||
| */ | ||||||||||||||||||
|
|
||||||||||||||||||
| package gg.skytils.skytilsmod.mixins.hooks.renderer | ||||||||||||||||||
| //#if MC>12000 | ||||||||||||||||||
| import gg.skytils.skytilsmod.utils.SuperSecretSettings | ||||||||||||||||||
| import gg.skytils.skytilsmod.utils.Utils | ||||||||||||||||||
| import net.minecraft.client.render.entity.state.PlayerEntityRenderState | ||||||||||||||||||
| import net.minecraft.client.util.math.MatrixStack | ||||||||||||||||||
| import kotlin.random.Random | ||||||||||||||||||
|
|
||||||||||||||||||
| object PlayerEntityRendererHook { | ||||||||||||||||||
| fun isBreefing(state: PlayerEntityRenderState): Boolean | ||||||||||||||||||
| = state.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt( | ||||||||||||||||||
| 100 | ||||||||||||||||||
| ) < 3) | ||||||||||||||||||
|
||||||||||||||||||
| fun isBreefing(state: PlayerEntityRenderState): Boolean | |
| = state.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt( | |
| 100 | |
| ) < 3) | |
| private fun isBreefing(state: PlayerEntityRenderState): Boolean | |
| = state.name == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt( | |
| 100 | |
| ) < 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: flickering for breefing
Uh oh!
There was an error while loading. Please reload this page.