2024/11/24
修改了下
This commit is contained in:
parent
c80f53d5c9
commit
094143c522
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-23T14:23:28.9623441 Languages: en_us for mod: leashedplayer
|
||||
ac6deeef9e460393df3b854a8d898d1a863deb45 assets/leashedplayer/lang/en_us.json
|
||||
// 1.21 2024-11-24T18:33:50.0269287 Languages: en_us for mod: leashedplayer
|
||||
a71b7d357b5cd2711e5d59a1784c7c60d8548c43 assets/leashedplayer/lang/en_us.json
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-23T14:23:28.9623441 Languages: zh_cn for mod: leashedplayer
|
||||
c019c3538ff7dc5a74283f3045cae496b67d7a33 assets/leashedplayer/lang/zh_cn.json
|
||||
// 1.21 2024-11-24T18:33:50.0259301 Languages: zh_cn for mod: leashedplayer
|
||||
81b6af6b88539aaf86f0942573198ead6098478a assets/leashedplayer/lang/zh_cn.json
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// 1.21 2024-11-23T14:23:28.9623441 Languages: zh_tw for mod: leashedplayer
|
||||
c464f0cfad108f12fddf0229aaabd0750d3b1eee assets/leashedplayer/lang/zh_tw.json
|
||||
// 1.21 2024-11-24T18:33:50.0239354 Languages: zh_tw for mod: leashedplayer
|
||||
232af0a8d220b865292cabcc3b5afc0164520116 assets/leashedplayer/lang/zh_tw.json
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
"leashedplayer.command.motion.message.multiply.successful": "§bMultiply Successfully.§a%s§7:§f[§eVec§7: §a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.command.motion.message.setter.successful": "§bSet Successfully.§a%s§7:§f[§eVec§7: §a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.lead_breaker.item.desc": "§7can break the link of leash",
|
||||
"multiplayer.disconnect.addiction": "You've triggered the anti-addiction mechanic, and you'll come back when you rest!",
|
||||
"painting.leashedplayer.group_photo.author": "§9Leisure §4Time §eDock§r",
|
||||
"painting.leashedplayer.group_photo.title": "§dGroup Photo §7[§6memorable§7]§r",
|
||||
"sound.leashedplayer.subtitle.what_does_the_fox_say": "Great Chu will rise again! Chen She will be king!"
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
"leashedplayer.command.motion.message.multiply.successful": "§b倍乘成功.§a%s§7:§f[§e加速度§7:§a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.command.motion.message.setter.successful": "§b设置成功.§a%s§7:§f[§e加速度§7:§a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.lead_breaker.item.desc": "§7可以破坏拴绳链接",
|
||||
"multiplayer.disconnect.addiction": "你触发了防沉迷机制,休息会再来吧!",
|
||||
"painting.leashedplayer.group_photo.author": "§9闲趣§4时§e坞§r",
|
||||
"painting.leashedplayer.group_photo.title": "§d集体照 §7[§6纪念§7]§r",
|
||||
"sound.leashedplayer.subtitle.what_does_the_fox_say": "大楚兴~ 陈胜王~~"
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
"leashedplayer.command.motion.message.multiply.successful": "§b倍乘成功.§a%s§7:§f[§e加速度§7:§a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.command.motion.message.setter.successful": "§b設置成功.§a%s§7:§f[§e加速度§7:§a(§f%f§7,§f%f§7,§f%f§a)§f]§r",
|
||||
"leashedplayer.lead_breaker.item.desc": "§7可以破壞拴繩鏈接",
|
||||
"multiplayer.disconnect.addiction": "你觸發了防沉迷機制,休息會再來吧!",
|
||||
"painting.leashedplayer.group_photo.author": "§9閑趣§4時§e塢§r",
|
||||
"painting.leashedplayer.group_photo.title": "§d集體照 §7[§6紀念§7]§r",
|
||||
"sound.leashedplayer.subtitle.what_does_the_fox_say": "大楚興~ 陳勝王~~"
|
||||
|
|
|
|||
|
|
@ -12,14 +12,18 @@ import com.r3944realms.leashedplayer.content.items.type.ILeashRopeArrow;
|
|||
import com.r3944realms.leashedplayer.utils.Logger;
|
||||
import mcjty.theoneprobe.config.Config;
|
||||
import mcjty.theoneprobe.gui.GuiNote;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.ChatScreen;
|
||||
import net.minecraft.client.gui.screens.DisconnectedScreen;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen;
|
||||
import net.minecraft.client.renderer.entity.player.PlayerRenderer;
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.client.resources.PlayerSkin;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.network.DisconnectionDetails;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.FastColor;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
|
@ -40,6 +44,7 @@ import java.util.Stack;
|
|||
|
||||
|
||||
public abstract class ClientEventHandler {
|
||||
public static final String ADDICTION = "multiplayer.disconnect.addiction";
|
||||
@EventBusSubscriber(value = Dist.CLIENT, bus = EventBusSubscriber.Bus.GAME, modid = LeashedPlayer.MOD_ID)
|
||||
public static class Game extends ClientEventHandler {
|
||||
private static int oldSelect;
|
||||
|
|
@ -72,7 +77,16 @@ public abstract class ClientEventHandler {
|
|||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public static void onScreenOpen(ScreenEvent.Opening opening) {
|
||||
if(opening.getNewScreen() instanceof DisconnectedScreen screen) {
|
||||
if (screen.details.reason().getString().equals("You are already connected to this proxy!")) {
|
||||
screen.details = new DisconnectionDetails(Component.translatable(ADDICTION).withStyle(ChatFormatting.RED));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventBusSubscriber(value = Dist.CLIENT, bus = EventBusSubscriber.Bus.MOD, modid = LeashedPlayer.MOD_ID)
|
||||
public static class Mod extends ClientEventHandler {
|
||||
@SubscribeEvent
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.r3944realms.leashedplayer.datagen.LanguageAndOtherData;
|
||||
|
||||
import com.r3944realms.leashedplayer.ClientEventHandler;
|
||||
import com.r3944realms.leashedplayer.content.commands.ChatCommand;
|
||||
import com.r3944realms.leashedplayer.content.commands.LeashCommand;
|
||||
import com.r3944realms.leashedplayer.content.commands.MotionCommand;
|
||||
|
|
@ -27,6 +28,7 @@ import java.util.function.Supplier;
|
|||
import static com.r3944realms.leashedplayer.content.items.ModCreativeTab.LEASHED_PLAYER_ITEM;
|
||||
|
||||
public enum ModLangKeyValue {
|
||||
ADDICTION(ClientEventHandler.ADDICTION, ModPartEnum.NAME, "You've triggered the anti-addiction mechanic, and you'll come back when you rest!", "你触发了防沉迷机制,休息会再来吧!", "你觸發了防沉迷機制,休息會再來吧!", false),
|
||||
//ITEM
|
||||
ITEM_LEASH_ROPE_ARROW(ModItemRegister.LEASH_ROPE_ARROW, ModPartEnum.ITEM, "Leash Rope Arrow", "拴绳箭", "拴繩箭", true),
|
||||
ITEM_SPECTRAL_LEASH_ROPE_ARROW(ModItemRegister.SPECTRAL_LEASH_ROPE_ARROW, ModPartEnum.ITEM, "Spectral Leash Rope Arrow", "拴绳光灵箭", "拴繩光靈箭", true),
|
||||
|
|
|
|||
|
|
@ -1,23 +1,14 @@
|
|||
package com.r3944realms.leashedplayer.api;
|
||||
package com.r3944realms.leashedplayer.integration.jei;
|
||||
|
||||
import com.r3944realms.leashedplayer.LeashedPlayer;
|
||||
|
||||
import com.r3944realms.leashedplayer.apiContent.item.repcipe.JEIRecipeTypes;
|
||||
import com.r3944realms.leashedplayer.content.items.repcipe.TippedLeashRopeArrowRecipe;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.JeiPlugin;
|
||||
import mezz.jei.api.constants.RecipeTypes;
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.recipe.vanilla.IVanillaRecipeFactory;
|
||||
import mezz.jei.api.registration.IRecipeRegistration;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.RecipeManager;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@JeiPlugin
|
||||
public class JEIPlugin implements IModPlugin {
|
||||
private static final ResourceLocation UID = ResourceLocation.fromNamespaceAndPath(LeashedPlayer.MOD_ID, "jei_plugin");
|
||||
|
|
@ -29,7 +20,9 @@ public class JEIPlugin implements IModPlugin {
|
|||
|
||||
@Override
|
||||
public void registerRecipes(@NotNull IRecipeRegistration registration) {
|
||||
|
||||
var level = Minecraft.getInstance().level;
|
||||
assert level != null;
|
||||
var recipeManager = level.getRecipeManager();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.r3944realms.leashedplayer.apiContent.item.repcipe;
|
||||
package com.r3944realms.leashedplayer.integration.jei;
|
||||
|
||||
import com.r3944realms.leashedplayer.LeashedPlayer;
|
||||
import com.r3944realms.leashedplayer.content.items.repcipe.TippedLeashRopeArrowRecipe;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package com.r3944realms.leashedplayer.integration.jei.category;
|
||||
|
||||
public class LeashedPlayerCategory {
|
||||
}
|
||||
|
|
@ -22,4 +22,6 @@ protected net.minecraft.world.entity.projectile.Projectile ownerUUID # ownerUUID
|
|||
#private -> public
|
||||
public net.minecraft.world.item.alchemy.Potion name # name
|
||||
#packge-private -> public
|
||||
public net.minecraft.world.inventory.ArmorSlot #ArmorSlot
|
||||
public net.minecraft.world.inventory.ArmorSlot #ArmorSlot
|
||||
#private final -> public
|
||||
public-f net.minecraft.client.gui.screens.DisconnectedScreen details # details
|
||||
Loading…
Reference in New Issue
Block a user