Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OptiJava committed Jul 13, 2024
1 parent cbfe811 commit d0619b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private static int listAdvance(CommandContext<ServerCommandSource> context) {
MinecraftServer minecraftServer = context.getSource().getServer();
StringBuilder sb = new StringBuilder();
for (ServerPlayerEntity s : minecraftServer.getPlayerManager().getPlayerList()) {
//#if MC >= 12000
//#if MC >= 12004
//$$ sb.append(s.getName().getString()).append(" ").append(s.interactionManager.getGameMode().getName()).append(" ").append(s.networkHandler.getLatency()).append("ms ").append(s.getIp()).append(" ").append(s.getGameProfile().getId().toString()).append("\n");
//#else
sb.append(s.getName().getString()).append(" ").append(s.interactionManager.getGameMode().getName()).append(" ").append(s.pingMilliseconds).append("ms ").append(s.getIp()).append(" ").append(s.getGameProfile().getId().toString()).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

//#if MC < 11900
import java.util.Random;
//#endif

@Mixin(BatEntity.class)
public class BatEntity_Mixin {
Expand All @@ -22,7 +20,9 @@ public class BatEntity_Mixin {
at = @At("HEAD"),
cancellable = true
)
//#if MC >= 11900
//#if MC == 12001
//$$ private static void injectCanSpawn(EntityType<BatEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random, CallbackInfoReturnable<Boolean> cir) {
//#elseif MC >= 11900
//$$ private static void injectCanSpawn(EntityType<BatEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, net.minecraft.util.math.random.Random random, CallbackInfoReturnable<Boolean> cir) {
//#else
private static void injectCanSpawn(EntityType<BatEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random, CallbackInfoReturnable<Boolean> cir) {
Expand Down

0 comments on commit d0619b5

Please sign in to comment.