2024-12-10 17:52:21|Myriagame |source:minecraft skins
This tutorial is set by the author to use the CC By-NC-ND protocol.
The profile of the equivalent exchange version reads:
But do you find that the actual test is not as useful as RELOADEMC?what to do?The answer is simple, make one by yourself.
Want to read how to make and maintain your MOD before making a module?(Forge version) (only supports 1.18.x) tutorial.
How to make RELOADEMC instructions?
There is a reloademcccmd.java file in moze_intel.project.network.commands.The instructions at that time were realized
Package Moze_intel.project.network.Commands;Import Moze_intel.project.config.customemcparser;
Import Moze_intel.project.emc.emcmapper;
Import Moze_intel.project.network.packethandler;
import network.minecraft.command.commandbase;
import network.minecraft.command.icommandSender;
import network.minecraft.server.minecraftserver;
import network.minecraft.util.textComponenttranslation;
import javax.annotation.nonnull;
Public Class Reloademd EXTENDS CommandBase
{{
@Nonnull
@Override
public string getname ()
{{
Return "RELOADEMC";
}
@Nonnull
@Override
Public String Getusage
{{
Return "/Project Reloademc";
}
@Override
Public Void Execute (@Nonnull Minecraftserver Server, @Nonnull ICommandSender Sender, @Nonnull String [] Params)
{{
Sender.SendMessage (New TextComPonenttranslation ("PE.Command.reload.started");
Emcmapper.Clearmaps ();
Customemcparser.init ();
Emcmapper.map ();
Sender.SendMessage (New TextComPonenttranslation ("PE.Command.reload.Success");
PacketHandler.sendfragMenTemcpackettoall ();
}
@Override
Public int GetrequiredPerMissionLevel ()
{{
Return 4;
}
}
Although most of the methods have changed in the high version, the core method of the instruction has not changed.
1.18.2 instructions as an example:
package github.com.gengyoubo.la.network.commands; Import com.mojang.brigadier.command;import com.mojang.brigadier.commanddispatcher;
import com.mojang.brigadier.context.commandContext;
Import Moze_intel.project.config.customemcparser;
Import Moze_intel.project.emcmappinghandler;
Import Moze_intel.project.network.packethandler;
import network.minecraft.commands.comMandsourceStack;
import network.minecraft.commands.commands;
import network.minecraft.network.chansLatablecomponent;
import network.minecraft.server.reloadableServerResources;
import network.minecraft.server.packs.Rsources.RSourceManager;
Import Static Moze_intel.project.emcmappinghandler.Clearemcmap;
Public Class Reloademd Implements Command
{{ Public ReloadableServerResources ServerResources;
Public ResourceManager ResourceManager;
@Override
Pbble int run (CommandConText
confxt) {{{{{{{{{{,? CommandSourceStack source = context.getsource ();
Source.SendSuccess
// Execute instruction logic
Clearmcmap ();
Customemcparser.init ();
Emcmappinghandler.map (serverResources, ResourceManager);
Source.SendSuccess
// Send the update package
PacketHandler.sendfragMenTemcpackettoall ();
Return 1;
}
Public Static Void Register (Commanddispatcher
Dispatcher) { Dispatcher.register (
Commands.literal ("Relademc")
.Requires (source-> source.haspermission (4)) // Set the level of permissions at 4
.Executes (New RELOADEMCCMD ())
);
}
}
Its core is
clearmcmap ();
Customemcparser.init ();
Emcmappinghandler.map (serverResources, ResourceManager);
In 1.12.2, it is
Emcmapper.Clearmaps ();
Customemcparser.init ();
Emcmapper.map ();
Maybe you have found that although the name of the class is changed, the core method has not changed.Just write like above.
Demonstrate
Although it is not very different from the RELOAD instruction.But because only EMC is loaded, it is very useful in the integration package!
refer to
/regoademc
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57The story between humans and
2025-01-28 09:16:27Capture "Trinity 3: Artifact
2025-01-28 09:15:27Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22