Skip to content

Commit

Permalink
fix(1.20.1-forged): gamemode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlimiter committed Feb 17, 2024
1 parent 541bf5c commit 7c8260a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: Re-Avaritia-Lex-${{ github.ref }}
name: Re-Avaritia-Forged-${{ github.ref_name }}
files: build/libs/*
body: Please refer to [CHANGELOG.md](https://github.com/Nova-Committee/re-avaritia/blob/master/CHANGELOG.md) for details.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ curios_version=5.4.7+1.20.1
mod_id=avaritia
mod_name=Re-Avaritia-forged
mod_license=MIT
mod_version=1.3.5
mod_version=1.3.5.3
mod_group_id=committee.nova.mods
mod_authors=cnlimiter, Asek3, MikhailTapio
mod_description=Are you the type of modded Minecraft player that makes a beeline for the designated \"end game\" and then gives up on ever playing again once you get there? Do you wish there was a way to make the process take significantly longer? Do you love GregTech, but wish it weren't so short? Do you sit down on your chest full of Galgadorian Drills and wish there was a mod that didn't just hand things to you on a silver platter?\n\n \n\nThis might be the mod for you!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void updateAbilities(LivingEvent.LivingTickEvent event) {
if (hasChest) {
handleChestStateChange(entity);
} else {
if (!entity.isCreative()) {
if (!entity.isCreative() && !entity.isSpectator()){
entity.getAbilities().mayfly = false;
entity.getAbilities().flying = false;
}
Expand Down Expand Up @@ -114,8 +114,10 @@ private static void stripAbilities(Player entity) {
}

if (entitiesWithChest.remove(key)) {
entity.getAbilities().mayfly = false;
entity.getAbilities().flying = false;
if (!entity.isCreative() && !entity.isSpectator()){
entity.getAbilities().mayfly = false;
entity.getAbilities().flying = false;
}
}

if (entitiesWithLeggings.remove(key)) {
Expand Down Expand Up @@ -222,7 +224,7 @@ public static void onDeath(LivingDeathEvent event) {
public static void jumpBoost(LivingEvent.LivingJumpEvent event) {
LivingEntity entity = event.getEntity();
if (entity instanceof Player player && entitiesWithBoots.contains(player.getGameProfile().getName() + ":" + entity.level().isClientSide))
player.setDeltaMovement(0, 2.0f, 0);
player.setDeltaMovement(0, 0.65f, 0);
}

@SubscribeEvent
Expand All @@ -245,13 +247,6 @@ public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
stripAbilities(event.getEntity());
}

// @SubscribeEvent
// public static void entityConstructEvent(EntityEvent.EntityConstructing event) {
// if (event.getEntity() instanceof Player entity) {
// stripAbilities(entity);
// }
// }

@SubscribeEvent
public static void onEntityDeath(LivingDeathEvent event) {
if (event.getEntity() instanceof Player entity) {
Expand Down

0 comments on commit 7c8260a

Please sign in to comment.