Reformatted, and ported back some enhancements from the Forge version.
This commit is contained in:
@@ -18,11 +18,7 @@
|
||||
|
||||
package appeng.server;
|
||||
|
||||
import appeng.server.subcommands.ChunkLogger;
|
||||
import appeng.server.subcommands.SpatialStorageCommand;
|
||||
import appeng.server.subcommands.Supporters;
|
||||
import appeng.server.subcommands.TestMeteoritesCommand;
|
||||
import appeng.server.subcommands.TestOreGenCommand;
|
||||
import appeng.server.subcommands.*;
|
||||
|
||||
public enum Commands {
|
||||
Chunklogger(4, new ChunkLogger(), false), Supporters(0, new Supporters(), false),
|
||||
|
||||
@@ -20,12 +20,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.text.ClickEvent;
|
||||
import net.minecraft.text.HoverEvent;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.Style;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.*;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -169,8 +169,8 @@ public class TestMeteoritesCommand implements ISubCommand {
|
||||
msg.append(getClickablePosition(world, settings, pos)).append(restOfLine);
|
||||
|
||||
// Add a tooltip
|
||||
MutableText tooltip = new LiteralText(settings.toString() + "\nBiome: ")
|
||||
.append(world.getBiome(pos).toString());
|
||||
String biomeId = world.method_31081(pos).map(bk -> bk.getValue().toString()).orElse("unknown");
|
||||
MutableText tooltip = new LiteralText(settings.toString() + "\nBiome: ").append(biomeId);
|
||||
msg.styled(style -> style.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, tooltip)));
|
||||
|
||||
sender.sendFeedback(msg, true);
|
||||
|
||||
Reference in New Issue
Block a user