Skip to content

Commit 1e708b8

Browse files
committed
readded 1.8 code and preprocessing (might be wrong)
1 parent 6b073b2 commit 1e708b8

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

mod/src/main/java/gg/skytils/skytilsmod/mixins/transformers/entity/MixinEntityLivingBase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ private boolean spawnParticle(World instance, Entity entity, byte b) {
8282
//#endif
8383
}
8484

85+
//#if MC==10809
86+
//$$ @Inject(method = "isBaby", at = @At("HEAD"), cancellable = true)
87+
//$$ private void setChildState(CallbackInfoReturnable<Boolean> cir) {
88+
//$$ hook.isChild(cir);
89+
//$$ }
90+
//#endif
91+
8592
@NotNull
8693
@Override
8794
public EntityLivingBaseHook getSkytilsHook() {

mod/src/main/java/gg/skytils/skytilsmod/mixins/transformers/renderer/MixinPlayerEntityRenderer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* You should have received a copy of the GNU Affero General Public License
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
18+
//#if MC>12000
1919
package gg.skytils.skytilsmod.mixins.transformers.renderer;
2020

2121
import gg.skytils.skytilsmod.mixins.extensions.ExtensionPlayerEntityRenderer;
@@ -44,3 +44,4 @@ public PlayerEntityRendererHook getSkytilsHook() {
4444
return hook;
4545
}
4646
}
47+
//#endif

mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/entity/EntityLivingBaseHook.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ class EntityLivingBaseHook(val entity: LivingEntity) {
4343
var colorMultiplier: Color? = null
4444
var masterDragonType: WitherKingDragons? = null
4545

46+
//#if MC==10809
47+
//$$ val isBreefing by lazy {
48+
//$$ entity.name.string == "Breefing" && (SuperSecretSettings.breefingDog || Random.nextInt(
49+
//$$ 100
50+
//$$ ) < 3)
51+
//$$ }
52+
//$$
53+
//$$ val isSmol by lazy {
54+
//$$ Utils.inSkyblock && entity is PlayerEntity && (SuperSecretSettings.smolPeople || isBreefing)
55+
//$$ }
56+
//#endif
57+
4658
//#if MC>12000
4759
fun modifyPotionActive(statusEffect: StatusEffect, cir: CallbackInfoReturnable<Boolean>) {
4860
if (!Utils.inSkyblock) return
@@ -68,4 +80,10 @@ class EntityLivingBaseHook(val entity: LivingEntity) {
6880
//$$ return !Skytils.config.hideDeathParticles || !Utils.inSkyblock || particleType != ParticleTypes.EXPLOSION
6981
//$$ }
7082
//#endif
83+
84+
//#if MC==10809
85+
//$$fun isChild(cir: CallbackInfoReturnable<Boolean>) {
86+
//$$ cir.returnValue = isSmol
87+
//$$}
88+
//#endif
7189
}

mod/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/renderer/PlayerEntityRendererHook.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
package gg.skytils.skytilsmod.mixins.hooks.renderer
20-
20+
//#if MC>12000
2121
import gg.skytils.skytilsmod.utils.SuperSecretSettings
2222
import gg.skytils.skytilsmod.utils.Utils
2323
import net.minecraft.client.render.entity.state.PlayerEntityRenderState
@@ -35,4 +35,5 @@ class PlayerEntityRendererHook {
3535
ms.scale(0.5f, 0.5f, 0.5f)
3636
}
3737
}
38-
}
38+
}
39+
//#endif

0 commit comments

Comments
 (0)