From c07d35b4d490c94606bbdf7ccb178df01fa45c27 Mon Sep 17 00:00:00 2001 From: Gegy Date: Mon, 18 Nov 2024 15:19:07 +0100 Subject: [PATCH] Fix my mistakes :( --- .../resources/assets/ltextras/lang/en_ud.json | 2 - .../resources/assets/ltextras/lang/en_us.json | 2 - .../java/com/lovetropics/extras/LTExtras.java | 47 ------------------- 3 files changed, 51 deletions(-) diff --git a/src/generated/resources/assets/ltextras/lang/en_ud.json b/src/generated/resources/assets/ltextras/lang/en_ud.json index 7da2747..614d453 100644 --- a/src/generated/resources/assets/ltextras/lang/en_ud.json +++ b/src/generated/resources/assets/ltextras/lang/en_ud.json @@ -366,7 +366,6 @@ "block.ltextras.yellow_terracotta_slab": "qɐןS ɐʇʇoɔɐɹɹǝ⟘ ʍoןןǝʎ", "block.ltextras.yellow_terracotta_stairs": "sɹıɐʇS ɐʇʇoɔɐɹɹǝ⟘ ʍoןןǝʎ", "block.ltextras.yellow_terracotta_wall": "ןןɐM ɐʇʇoɔɐɹɹǝ⟘ ʍoןןǝʎ", - "commands.nametag.success": "%s :sbɐʇǝɯɐu ɹǝpuǝɹ sʎɐʍןⱯ", "commands.tpa.general_error": "ʇɹodǝןǝʇ oʇ ǝןqɐu∩", "commands.tpa.help.back": "buıʇɹodǝןǝʇ ǝɹoɟǝq ǝɹǝʍ noʎ ǝɹǝɥʍ oʇ ʞɔɐq ʇɹodǝןǝ⟘ - ʞɔɐq/", "commands.tpa.help.tpa": "ɹǝʎɐןd ɐ oʇ ʇɹodǝןǝʇ oʇ ʇsǝnbǝᴚ - >ɹǝʎɐןd< ɐdʇ/", @@ -381,7 +380,6 @@ "commands.tpa.request_sent": "ʇuǝs ʇsǝnbǝᴚ", "commands.tpa.too_much": "ɥɔnɯ ooʇ ʇɐɥʇ buıop ǝɹɐ noʎ", "commands.tpa.tp_accepted": "uɹnʇǝɹ oʇ ʞɔɐq/ ǝs∩ ˙ʇsǝnbǝɹ ʇɹodǝןǝʇ ɹnoʎ pǝʇdǝɔɔɐ sɐɥ %s", - "commands.warp.general_error": "ǝɹǝɥʇ ob ʇ,upןnoƆ", "commands.warp.not_found": "punoɟ ʇou uoıʇɐuıʇsǝᗡ", "commands.warp.success": "%s oʇ pǝdɹɐM", "effect.ltextras.fish_eye": "ǝʎƎ ɥsıℲ", diff --git a/src/generated/resources/assets/ltextras/lang/en_us.json b/src/generated/resources/assets/ltextras/lang/en_us.json index 60dbd39..93712d8 100644 --- a/src/generated/resources/assets/ltextras/lang/en_us.json +++ b/src/generated/resources/assets/ltextras/lang/en_us.json @@ -366,7 +366,6 @@ "block.ltextras.yellow_terracotta_slab": "Yellow Terracotta Slab", "block.ltextras.yellow_terracotta_stairs": "Yellow Terracotta Stairs", "block.ltextras.yellow_terracotta_wall": "Yellow Terracotta Wall", - "commands.nametag.success": "Always render nametags: %s", "commands.tpa.general_error": "Unable to teleport", "commands.tpa.help.back": "/back - Teleport back to where you were before teleporting", "commands.tpa.help.tpa": "/tpa - Request to teleport to a player", @@ -381,7 +380,6 @@ "commands.tpa.request_sent": "Request sent", "commands.tpa.too_much": "You are doing that too much", "commands.tpa.tp_accepted": "%s has accepted your teleport request. Use /back to return", - "commands.warp.general_error": "Couldn't go there", "commands.warp.not_found": "Destination not found", "commands.warp.success": "Warped to %s", "effect.ltextras.fish_eye": "Fish Eye", diff --git a/src/main/java/com/lovetropics/extras/LTExtras.java b/src/main/java/com/lovetropics/extras/LTExtras.java index 9fdb07d..419bfbd 100644 --- a/src/main/java/com/lovetropics/extras/LTExtras.java +++ b/src/main/java/com/lovetropics/extras/LTExtras.java @@ -1,6 +1,5 @@ package com.lovetropics.extras; -import com.google.common.collect.Sets; import com.lovetropics.extras.client.command.NameTagModeCommand; import com.lovetropics.extras.client.entity.model.RaveKoaModel; import com.lovetropics.extras.client.particle.ExtraParticles; @@ -19,14 +18,10 @@ import com.mojang.brigadier.CommandDispatcher; import com.tterrag.registrate.Registrate; import com.tterrag.registrate.providers.ProviderType; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; -import net.minecraft.commands.Commands; import net.minecraft.core.Holder; import net.minecraft.core.registries.Registries; -import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; @@ -34,8 +29,6 @@ import net.minecraft.world.entity.ai.attributes.RangedAttribute; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.IEventBus; @@ -54,12 +47,7 @@ import net.neoforged.neoforge.event.entity.EntityAttributeModificationEvent; import javax.annotation.Nullable; -import java.util.Comparator; -import java.util.List; -import java.util.Map; import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; @Mod("ltextras") public class LTExtras { @@ -145,41 +133,6 @@ private void onRegisterCommands(RegisterCommandsEvent event) { WorldEffectCommand.register(dispatcher); WarpCommand.register(dispatcher); PoiCommand.register(dispatcher, buildContext); - dispatcher.register(Commands.literal("test").executes(context -> { - context.getSource().sendSystemMessage(Component.literal("" + Block.BLOCK_STATE_REGISTRY.size())); - List>> sorted = StreamSupport.stream(Block.BLOCK_STATE_REGISTRY.spliterator(), false) - .collect(Collectors.groupingBy(BlockBehaviour.BlockStateBase::getBlock)) - .entrySet() - .stream() -// .sorted(Comparator.comparing(e -> -e.getValue().size())) - .toList(); - Object2IntOpenHashMap wordToCount = new Object2IntOpenHashMap<>(); - for (Map.Entry> entry : sorted) { - String[] parts = entry.getKey().builtInRegistryHolder().key().location().getPath().split("_"); - for (String part : Sets.newHashSet(parts)) { - wordToCount.addTo(part, entry.getValue().size()); - } - wordToCount.addTo(entry.getKey().builtInRegistryHolder().key().location().getNamespace(), entry.getValue().size()); - } - List> list = wordToCount.object2IntEntrySet().stream() - .sorted(Comparator.comparing(e -> -e.getIntValue())) - .toList(); - int i = 0; - for (Object2IntMap.Entry entry : list) { - context.getSource().sendSystemMessage(Component.literal(entry.getKey() + ": " + entry.getIntValue())); - if (i++ > 50) { - break; - } - } -// int i = 0; -// for (Map.Entry> entry : sorted) { -// context.getSource().sendSystemMessage(Component.literal(entry.getKey() + ": " + entry.getValue().size())); -// if (i++ > 500) { -// break; -// } -// } - return 1; - })); } private void onRegisterClientCommands(RegisterClientCommandsEvent event) {