Jump to content

Recommended Posts

Posted (edited)

Why?: I need EntityUtil.dissconnectPlayer(player) to always  work:

I wrote up a command to disconnect the player and it just freezes the game and doesn't go to the main menu.

package com.EvilNotch.lib.minecraft.content.commands;

import com.EvilNotch.lib.minecraft.EntityUtil;

import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.text.TextComponentString;

public class CMDKick extends CommandBase {
	
	 /**
     * Gets the name of the command
     */
	@Override
    public String getName()
    {
        return "bootPlayer";
    }
    /**
    * Gets the usage string for the command.
    */
    @Override
    public String getUsage(ICommandSender sender)
    {
       return "commands.evilnotchlib.boot.usage";
    }
	@Override
	public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException 
	{
		Entity e = getEntity(server, sender, args[0]);	
		if(e instanceof EntityPlayerMP)
		{
			EntityPlayerMP player = (EntityPlayerMP)e;
			player.connection.disconnect(new TextComponentString("booted"));
		}
	}

    /**
     * Get a list of options for when the user presses the TAB key
     */
    @Override
    public List<String> getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos)
    {
        return args.length != 1 ? Collections.emptyList() : getListOfStringsMatchingLastWord(args, server.getOnlinePlayerNames());
    }

}

 

Edited by jredfox
Posted

It mostly looks like it should work, although I'm not exactly sure why you're using getEntity(). I think there is a getPlayer() method, and also if you look at the ban command they do an different method where they look up a player name in the server's player's list.

 

I guess it is possible that in single-player the disconnect isn't really functional although I couldn't find any obvious code reason why not. Note that the disconnect() method does kick off a scheduled runnable, so your freeze is probably somehow related to that. Is there any error in the log?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)
20 minutes ago, jabelar said:

It mostly looks like it should work, although I'm not exactly sure why you're using getEntity(). I think there is a getPlayer() method, and also if you look at the ban command they do an different method where they look up a player name in the server's player's list.

 

I guess it is possible that in single-player the disconnect isn't really functional although I couldn't find any obvious code reason why not. Note that the disconnect() method does kick off a scheduled runnable, so your freeze is probably somehow related to that. Is there any error in the log?

yeah log says player logged out disconnected for reason doesn't display says saving worlds and then just stops working. Could there be a more proper way to disconnect aka stop the world and go back to the main menu if player is owner?

To clarify the screen of displaying freezes in game showing the world still but, the log shows otherwise

I have verified even adding a tick delay it still occurs occasionally. What does forge use to kick the player when it says hey don't go in this world but, then again your player doesn't even try to render it yet. Should I try and open a gui before starting the process and if so what gui? 

Edited by jredfox
Posted (edited)

Oh yeah it looks like you need to bring up the main menu gui.

 

If you look at the code for the GuiIngameMenu class, you'll see that button 1 is the quit game (return to main menu) and the code for the action performed for that button is as follows:

 

                boolean flag = this.mc.isIntegratedServerRunning();
                boolean flag1 = this.mc.isConnectedToRealms();
                button.enabled = false;
                this.mc.world.sendQuittingDisconnectingPacket();
                this.mc.loadWorld((WorldClient)null);

                if (flag)
                {
                    this.mc.displayGuiScreen(new GuiMainMenu());
                }
                else if (flag1)
                {
                    RealmsBridge realmsbridge = new RealmsBridge();
                    realmsbridge.switchToRealms(new GuiMainMenu());
                }
                else
                {
                    this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
                }

 

I guess technically you should probably copy all of that code (except for the part of the button enable going to false) for the single player case. Note that since this contains reference to the Minecraft and gui classes which are client-side only, you need to put the code in your client proxy (with a dummy version in your common/server proxy) and then call the proxy method from the command class.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)
9 hours ago, jabelar said:

Oh yeah it looks like you need to bring up the main menu gui.

 

If you look at the code for the GuiIngameMenu class, you'll see that button 1 is the quit game (return to main menu) and the code for the action performed for that button is as follows:

 


                boolean flag = this.mc.isIntegratedServerRunning();
                boolean flag1 = this.mc.isConnectedToRealms();
                button.enabled = false;
                this.mc.world.sendQuittingDisconnectingPacket();
                this.mc.loadWorld((WorldClient)null);

                if (flag)
                {
                    this.mc.displayGuiScreen(new GuiMainMenu());
                }
                else if (flag1)
                {
                    RealmsBridge realmsbridge = new RealmsBridge();
                    realmsbridge.switchToRealms(new GuiMainMenu());
                }
                else
                {
                    this.mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
                }

 

I guess technically you should probably copy all of that code (except for the part of the button enable going to false) for the single player case. Note that since this contains reference to the Minecraft and gui classes which are client-side only, you need to put the code in your client proxy (with a dummy version in your common/server proxy) and then call the proxy method from the command class.

does that get called on client or server side and should I also be disconnecting the server side and before or after? Commands run on server so what wait next tick then disconnect player?

Edited by jredfox
Posted (edited)

Game Crash when player is owner:
https://pastebin.com/WvngUH2E

 

public static void disconnectPlayer(EntityPlayerMP player,TextComponentString msg) 
{	
	if(isPlayerOwner(player))
	{
			Minecraft mc = Minecraft.getMinecraft();
            boolean flag = mc.isIntegratedServerRunning();
            boolean flag1 = mc.isConnectedToRealms();
            mc.world.sendQuittingDisconnectingPacket();
            mc.loadWorld((WorldClient)null);

            if (flag)
            {
                mc.displayGuiScreen(new GuiMainMenu());
            }
            else if (flag1)
            {
                RealmsBridge realmsbridge = new RealmsBridge();
                realmsbridge.switchToRealms(new GuiMainMenu());
            }
            else
            {
                mc.displayGuiScreen(new GuiMultiplayer(new GuiMainMenu()));
            }
	}
	else
	{
		player.connection.disconnect(msg);
	}
}

 

Edited by jredfox
Posted
16 minutes ago, jredfox said:

does that get called on client or server side and should I also be disconnecting the server side and before or after? Commands run on server so what wait next tick then disconnect player?

Right so what you command needs to do is see if it is on a dedicated server or integrated server. If on integrated server, it will need to send a dedicated custom packet to client. The client message receiver would run the code mentioned above.

 

i think the error message you posted is because it looks like this is running inside of a server tick handler, and a server wouldn't have the ability to create a GUI. You need custom packet to client to let it know what is going on.

 

There may be easier way to disconnect a single player, but I'm just thinking that the code above is the actual way the Minecraft already disconnects a single player so should be safe and accurate if run from the client side.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
5 minutes ago, jabelar said:

Right so what you command needs to do is see if it is on a dedicated server or integrated server. If on integrated server, it will need to send a dedicated custom packet to client. The client message receiver would run the code mentioned above.

 

i think the error message you posted is because it looks like this is running inside of a server tick handler, and a server wouldn't have the ability to create a GUI. You need custom packet to client to let it know what is going on.

 

There may be easier way to disconnect a single player, but I'm just thinking that the code above is the actual way the Minecraft already disconnects a single player so should be safe and accurate if run from the client side.

I shouldn't need packets since I am the server and client. let my try that code from the client side

Posted (edited)
23 minutes ago, jabelar said:

 

I tried running the thing that's always suppose to work but, sometimes it freezes the game. player.connection.disconnect(msg); on server side. And it always froze from the command.

Edited by jredfox
Posted
29 minutes ago, jredfox said:

I shouldn't need packets since I am the server and client. 

Wrong. You really, really need to understand the client and server stuff. When there is integrated server ("single player") there is still a separate client and server thread and they still communicate using packets. The packets just use the link local address (127.0.0.1 I think) but they are still being used!

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)
7 minutes ago, jabelar said:

Wrong. You really, really need to understand the client and server stuff. When there is integrated server ("single player") there is still a separate client and server thread and they still communicate using packets. The packets just use the link local address (127.0.0.1 I think) but they are still being used!

ok

Edited by jredfox
Posted
4 minutes ago, jabelar said:

Wrong. You really, really need to understand the client and server stuff. When there is integrated server ("single player") there is still a separate client and server thread and they still communicate using packets. The packets just use the link local address (127.0.0.1 I think) but they are still being used!

wait just realize my idea can't work since I want it to be a server utility how to disconnect player from server side only?

Posted (edited)
7 minutes ago, jredfox said:

wait just realize my idea can't work since I want it to be a server utility how to disconnect player from server side only?

Okay. In that case the closest thing I can think of is the ban command. You can look at that code. However, your original code seemed to be close to that so I'm not totally sure why it didn't work. It is possible that you were calling the server side disconnect method from the client and so that might have caused your original problem.

 

In the ban player command, they use this code:

                EntityPlayerMP entityplayermp = server.getPlayerList().getPlayerByUsername(args[0]);

                if (entityplayermp != null)
                {
                    entityplayermp.connection.disconnect(new TextComponentTranslation("multiplayer.disconnect.banned", new Object[0]));
                }

 

Where obviously your command usage would need the player name as args[0].

 

But this is very close to your original code, so not quite sure what the difference is except it uses different way to get the player instance.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)
10 minutes ago, diesieben07 said:

Look at the kick command.

it's not usable on client side till 1.13 and I can't view the code. maybe they have a custom new packet or fixed something?

how do I view the source for that command?

Edited by jredfox
Posted
3 minutes ago, jabelar said:

Okay. In that case the closest thing I can think of is the ban command. You can look at that code. However, your original code seemed to be close to that so I'm not totally sure why it didn't work. It is possible that you were calling the server side disconnect method from the client and so that might have caused your original problem.

 

In the ban player command, they use this code:


                EntityPlayerMP entityplayermp = server.getPlayerList().getPlayerByUsername(args[0]);

                if (entityplayermp != null)
                {
                    entityplayermp.connection.disconnect(new TextComponentTranslation("multiplayer.disconnect.banned", new Object[0]));
                }

 

Where obviously your command usage would need the player name as args[0].

player connection disconnect is what I was using I could try make a new object that is null at first index like yours but, that is the only difference besides you forcing full player names difficult to type when in mdk.

Posted
14 minutes ago, jabelar said:

Okay. In that case the closest thing I can think of is the ban command. You can look at that code. However, your original code seemed to be close to that so I'm not totally sure why it didn't work. It is possible that you were calling the server side disconnect method from the client and so that might have caused your original problem.

 

In the ban player command, they use this code:


                EntityPlayerMP entityplayermp = server.getPlayerList().getPlayerByUsername(args[0]);

                if (entityplayermp != null)
                {
                    entityplayermp.connection.disconnect(new TextComponentTranslation("multiplayer.disconnect.banned", new Object[0]));
                }

 

Where obviously your command usage would need the player name as args[0].

 

But this is very close to your original code, so not quite sure what the difference is except it uses different way to get the player instance.

woah that seemed to fix it changing it from TextComponentString > TextComponentTranslation made all the difference thank you so much here is my server only 100% kick command 1.13 equivalent in 1.12.2
 

	public static void disconnectPlayer(EntityPlayerMP player,TextComponentString msg) 
	{	
		player.connection.disconnect(new TextComponentTranslation(msg.getText(),new Object[0]) );
	}

 

Posted
1 minute ago, diesieben07 said:

Use your IDE. In Eclipse you use Ctrl-Shift-T, in IntelliJ it's Ctrl-N.

no kick command wasn't usable on client side I was saying I don't even see the command class there but, thank you

Posted
14 minutes ago, diesieben07 said:

What are you even saying...

	public static void disconnectPlayer(EntityPlayerMP player,TextComponentString msg) 
	{	
		player.connection.disconnect(new TextComponentTranslation(msg.getText(),new Object[0]) );
	}

Command seems to freeze the game if something else is loading why is it occurring?

Posted (edited)
35 minutes ago, jabelar said:

Okay. In that case the closest thing I can think of is the ban command. You can look at that code. However, your original code seemed to be close to that so I'm not totally sure why it didn't work. It is possible that you were calling the server side disconnect method from the client and so that might have caused your original problem.

 

In the ban player command, they use this code:


                EntityPlayerMP entityplayermp = server.getPlayerList().getPlayerByUsername(args[0]);

                if (entityplayermp != null)
                {
                    entityplayermp.connection.disconnect(new TextComponentTranslation("multiplayer.disconnect.banned", new Object[0]));
                }

 

Where obviously your command usage would need the player name as args[0].

 

But this is very close to your original code, so not quite sure what the difference is except it uses different way to get the player instance.

so it's not always working if the world is loading not giving it absolute non loading the game will freeze with booting the player. Should I be pausing the game if player is owner?

Edited by jredfox
Posted (edited)
13 minutes ago, diesieben07 said:

What do you mean by "something else is loading"? Why are you putting the text of a TextComponentString into a TextComponentTranslation? Where are you calling this method?

I am calling the method disconnectPlayer() from the command class.

Since the client has to have the mod anyways to use the command and have the issue having client only code is acceptable and if is on server only I know it's always going to work with player disconnect

Edited by jredfox
Posted (edited)
13 minutes ago, diesieben07 said:

Check if the player is the server owner (MinecraftServer::isSinglePlayer && MinecraftServer::getServerOwner().equals(player.getName())), if so, shut down the server instead of kicking (MinecraftServer::initiateShutdown) or show an error message, etc.

player.mcServer.initiateShutdown() > doesn't allow for a custom message any ideas?

Edited by jredfox
Posted (edited)
7 minutes ago, diesieben07 said:

Custom implementation. Look at GuiIngameMenu::actionPerformed case 1 ("quit game" handler).

It executes off of the client side code I would have to do adjustments.

Since this is guaranteed to work though I was thinking since I am the client just override the gui open event when necessary and display my gui disconnected. Might not be proper but, gui screens pause the game and my command does not

Edited by jredfox
Posted
Just now, diesieben07 said:

Yes, custom packets.

 

Might as well do it properly then and use a custom packet.

packet from server to client to shutdown the server to the server send a packet to open up a gui?

Posted
48 minutes ago, diesieben07 said:

Yep, that's what you gotta do.

well I don't think the player logout event is getting fired when I called server shutdown? are you sure that's the right code or should I be using what jeblar sent me?

Posted (edited)
1 minute ago, diesieben07 said:

Well, of course it's not fired. The player is not logging out, the server is closing. The event should not be fired here.

so how to do this properly then?

Edited by jredfox

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.