Skip to content

Commit

Permalink
Removed pehkui compat
Browse files Browse the repository at this point in the history
mod is not being maintained
  • Loading branch information
WenXin20 committed Dec 27, 2024
1 parent 38f3160 commit 0588c78
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import net.neoforged.neoforge.event.entity.living.LivingIncomingDamageEvent;
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent;
import virtuoel.pehkui.api.ScaleTypes;

@EventBusSubscriber(modid = Marioverse.MOD_ID)
public class MarioverseEventHandlers {
Expand Down Expand Up @@ -140,10 +139,10 @@ public static void onEntityDamaged(LivingIncomingDamageEvent event) {
if (!tag.getBoolean("marioverse:has_mushroom") && ConfigRegistry.DAMAGE_SHRINKS_PLAYERS.get()
&& !player.getType().is(TagRegistry.CANNOT_LOSE_POWER_UP)
&& !player.getType().is(TagRegistry.DAMAGE_CANNOT_SHRINK)
&& (ScaleTypes.HEIGHT.getScaleData(event.getEntity()).getTargetScale() > 0.5F
|| ScaleTypes.WIDTH.getScaleData(event.getEntity()).getTargetScale() > 0.75F)) {
ScaleTypes.HEIGHT.getScaleData(event.getEntity()).setTargetScale(0.5F);
ScaleTypes.WIDTH.getScaleData(event.getEntity()).setTargetScale(0.75F);
/*&& (ScaleTypes.HEIGHT.getScaleData(event.getEntity()).getTargetScale() > 0.5F
|| ScaleTypes.WIDTH.getScaleData(event.getEntity()).getTargetScale() > 0.75F)*/) {
// ScaleTypes.HEIGHT.getScaleData(event.getEntity()).setTargetScale(0.5F);
// ScaleTypes.WIDTH.getScaleData(event.getEntity()).setTargetScale(0.75F);
world.playSound(null, player.blockPosition(), SoundRegistry.DAMAGE_TAKEN.get(),
SoundSource.PLAYERS, 1.0F, 1.0F);
}
Expand Down Expand Up @@ -201,10 +200,10 @@ public static void onEntityDamaged(LivingIncomingDamageEvent event) {
if (!tag.getBoolean("marioverse:has_mushroom")
&& ConfigRegistry.DAMAGE_SHRINKS_ALL_MOBS.get()
&& !entity.getType().is(TagRegistry.DAMAGE_CANNOT_SHRINK)
&& (ScaleTypes.HEIGHT.getScaleData(event.getEntity()).getTargetScale() > 0.5F
|| ScaleTypes.WIDTH.getScaleData(event.getEntity()).getTargetScale() > 0.75F)) {
ScaleTypes.HEIGHT.getScaleData(event.getEntity()).setTargetScale(0.5F);
ScaleTypes.WIDTH.getScaleData(event.getEntity()).setTargetScale(0.75F);
/*&& (ScaleTypes.HEIGHT.getScaleData(event.getEntity()).getTargetScale() > 0.5F
|| ScaleTypes.WIDTH.getScaleData(event.getEntity()).getTargetScale() > 0.75F)*/) {
// ScaleTypes.HEIGHT.getScaleData(event.getEntity()).setTargetScale(0.5F);
// ScaleTypes.WIDTH.getScaleData(event.getEntity()).setTargetScale(0.75F);
world.playSound(null, entity.blockPosition(), SoundRegistry.DAMAGE_TAKEN.get(),
SoundSource.HOSTILE, 1.0F, 1.0F);
}
Expand Down Expand Up @@ -266,31 +265,31 @@ public static void onEntityHeal(LivingHealEvent event) {
if (player.getHealth() > ConfigRegistry.HEALTH_SHRINK_PLAYERS.get()) {
tag.putBoolean("marioverse:has_mushroom", true);
if (tag.getBoolean("marioverse:has_mushroom") && ConfigRegistry.DAMAGE_SHRINKS_PLAYERS.get()
&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)) {
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
/*&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)*/) {
// ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
// ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
}
} else if (tag.getBoolean("marioverse:has_mushroom") && ConfigRegistry.DAMAGE_SHRINKS_PLAYERS.get()
&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)) {
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
/*&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)*/) {
// ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
// ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
}
} else if (entity instanceof LivingEntity livingEntity) {
if (livingEntity.getHealth() > livingEntity.getMaxHealth() * ConfigRegistry.HEALTH_SHRINK_MOBS.get()) {
tag.putBoolean("marioverse:has_mushroom", true);
if (tag.getBoolean("marioverse:has_mushroom") && ConfigRegistry.DAMAGE_SHRINKS_PLAYERS.get()
&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)) {
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
/*&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)*/) {
// ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
// ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
}
} else if (tag.getBoolean("marioverse:has_mushroom") && ConfigRegistry.DAMAGE_SHRINKS_PLAYERS.get()
&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)) {
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
/*&& (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.0F
|| ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.0F)*/) {
// ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale(1.0F);
// ScaleTypes.WIDTH.getScaleData(entity).setTargetScale(1.0F);
}
}
}
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ versionRange="[4.6,)"
ordering="NONE"
side="CLIENT"

[[dependencies.marioverse]]
modId="pehkui"
type="required"
versionRange="[3.8.3+1.21-neoforge,)"
ordering="NONE"
side="BOTH"

[[dependencies.marioverse]]
modId="ctm"
type="optional"
Expand Down

0 comments on commit 0588c78

Please sign in to comment.