Skip to content

Commit

Permalink
Updated to 7.1-pre2a
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro270707 committed Mar 25, 2024
1 parent e0d74e1 commit cc8b66f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
org.gradle.jvmargs=-Xmx4G

# BTA
bta_version=7.1-pre1a
bta_version=7.1-pre2a

# Loader
loader_version=0.14.19-babric.3-bta

# HalpLibe
halplibe_version=3.1.4
halplibe_version=3.4.17

# Mod
mod_version=1.3.0
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ public static void register(CommandDispatcher<CommanderCommandSource> dispatcher
int entitiesAffected = 0;
for (Entity entity : entities) {
if (entity instanceof EntityLiving) {
int maxHealth = 20;
try {
maxHealth = ((EntityLiving)entity.getClass().getConstructor(World.class).newInstance(c.getSource().getWorld())).health;
} catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException ignored) {
}
int originalHealth = ((EntityLiving)entity).health;
((EntityLiving)entity).health = MathHelper.clamp(((EntityLiving)entity).health + amount, 0, maxHealth);
if (((EntityLiving)entity).health != originalHealth) ++entitiesAffected;
int maxHealth = ((EntityLiving) entity).getMaxHealth();
int originalHealth = ((EntityLiving) entity).getHealth();
((EntityLiving)entity).setHealthRaw(MathHelper.clamp(((EntityLiving)entity).getHealth() + amount, 0, maxHealth));
if (((EntityLiving)entity).getHealth() != originalHealth) ++entitiesAffected;
}
}
c.getSource().sendTranslatableMessage("commands.commander.heal.success_" + (entitiesAffected == 1 ? "single" : "multiple"), entitiesAffected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void register(CommandDispatcher<CommanderCommandSource> dispatcher
server.playerList.savePlayerStates();
}
for (int i = 0; i < server.dimensionWorlds.length; ++i) {
server.dimensionWorlds[i].saveWorld(true, null);
server.dimensionWorlds[i].saveWorld(true, null, true);
}
server.initiateShutdown();
return Command.SINGLE_SUCCESS;
Expand Down

0 comments on commit cc8b66f

Please sign in to comment.