Jump to content

Recommended Posts

Posted

It appears to run but then nothing, checking with Task Manager shows the Java binary starting and exiting almost instantly, so am reporting it as a bug.

 

Server version 1.12.2 - 14.23.3.2655 or lower starts fine with the exact same startup batch file:

Spoiler

@echo off
setlocal enableDelayedExpansion
set max=0
for /f "tokens=1* delims=-.0" %%A in ('dir /b /a-d forge-*-universal.jar') do if %%B gtr !max! set max=%%B
rem echo higest version: forge-%max%
set JAVA_HOME=C:\Program Files\Java\jre1.8.0_152
set PATH=C:\Program Files\Java\jre1.8.0_152\bin;%PATH%
start /abovenormal javaw -jar forge-%max% /NOCONSOLE

It checks for the highest installed version of Forge's server .jar then runs it with Java 1.8.0_152

(It has worked since I've used a Forge server, I started with MC 1.8, and have both Java 8 and 9 64 bit installed)

 

Logs and Debug Logs:

https://pastebin.com/wyCrKRNE - latest.log - 2668

https://pastebin.com/6uFTkEqJ - debug.log - 2668

 

Working Server Logs and Debug Logs: (For comparison purposes)

https://pastebin.com/uiRCD09f -;latest.log - 2655

https://pastebin.com/8VG9L06X - debug.log - 2655

 

The interesting part (for me) is that from 2656 the logs say it has a problem with Maven and also canonicalizing the libraries path, (2668 excerpt in spoiler)

(It looks like it may be a / vs \ directory issue between the Java..jar and Windows to me)

Spoiler

[00:04:08] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected: C:\Users\Coolio\AppData\Roaming\.minecraft\server\libraries\org\apache\maven\maven-artifact\3.5.3\maven-artifact-3.5.3.jar. Using default libraries directory.
[00:04:08] [main/INFO] [FML]: Unable to canonicalize path C:/Users/Coolio/AppData/Roaming/.minecraft/server/libraries relative to C:\Users\Coolio\AppData\Roaming\.minecraft\server\.
java.io.IOException: The filename, directory name, or volume label syntax is incorrect

I hope this will help resolve this issue and help me get the latest server version running soon™

 

Oh and just to confirm the Java game client version is working fine (Including versions 2655 through 2668)

Posted

Post your mod_list.json files from /mods and /mods/1.12.2/

Seems you've configured it incorrectly.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Only mod_list.json I have in C:\Users\Coolio\AppData\Roaming\.minecraft\server\mods is: 

{
    "repositoryRoot": "C:/Users/Coolio/AppData/Roaming/.minecraft/server/libraries",
    "modRef": [
        "net.minecraftforge:MercuriusUpdater:1.12.2"
    ]
}

I don't have a /mods/1.12/2/ that I can find...

The server has been working since MC 1.8 and having the forge installer install both client, then server files...

As for this issue it's fine up until i try upgrading to the 2656 or higher universal .jar (I Have now tried both the installer and the standalone downloads) then the server refuses to start, every other version from forge going right back to the 1.8 versions has worked fine.

 

It has me baffled atm.

Posted

    "repositoryRoot": "C:/Users/Coolio/AppData/Roaming/.minecraft/server/libraries",

 

Thats your issue that's not a valid repository root. They have always been relative to the MC directory unless you specify "absolute:" before it

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted (edited)

That was the default mod_list.json that came with forge, it was setup by your own installer based on the directory chosen to install the server

 

Yes single player uses the Program Files/minecraft server directory ( C:\Program Files (x86)\Minecraft\server )

 

But if you are specifying a server location for the installer shouldn't it make that change correctly itself?

As stated the versions up to 2655 work, even if the fault existed then, they work by using the install directories /libraries

 

The later versions FAIL with a near useless verbose output, I come here for help and get told the automatically generated mod_list.json needs editing

with a change I have no clue how to implement just because I was playing 1.8 locally and had a 1.8 separate server for myself and friends to use which

happened to be in a different directory to avoid destroying each world. with the other.

 

Sorry but I have Aspergers and this issue is somewhat distressing.

 

IMHO as 2655 works and the later versions fail, yes there may be a config error but it looks like the failsafe they had has been changed to a failhard

and the server installer part of the Windows Installer package should make this location correction automatically, thereby reducing the likely hood of

this issue occurring.

 

I will manually attempt to correct the/your mod_list.json file and see if that fixes the issue.

-----

Just made a json edit:

{
    "absolute:" "repositoryRoot": "C:/Users/Coolio/AppData/Roaming/.minecraft/server/libraries",
    "modRef": [
        "net.minecraftforge:MercuriusUpdater:1.12.2"
    ]
}

2655 starts up...

And

2668 starts up... (Yay, but still shows an error.)

 

Even http://www.minecraftforge.net/forum/topic/42881-solved-how-to-specify-absolute-path-in-mod_listjson/  isn't helping.

 

Renaming the mod_list.json stops it triggering most of the errors, the server still shows a maven issue but it starts.

Spoiler

[03:06:39] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected: C:\Users\Coolio\AppData\Roaming\.minecraft\server\libraries\org\apache\maven\maven-artifact\3.5.3\maven-artifact-3.5.3.jar. Using default libraries directory.

How do I force it to re-install the Apache Maven library folder correctly, I'm so confused...

Edited by Coolio_Wolfus
Additional
Posted

Interesting you are correct that the installer is creating an incorrect json, I wonder when that happened and why it hasn't broken things before now.

However, you can just delete the modlist and you'll be fine.

I can add hardening for things like this. But doesn't really matter as the modern versions no longer include Mercurius.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Could I suggest that the server installer option as well as installing the universal.jar also removes (if it exists) the server locations /mods/mod_list.json
This would prevent this issue for most windows player, but you have helped me fix the server refusing to start anyway so case solved :D

 

I'll leave the pastebin logs up so you can compare them and compare Forge universal 2655 with 2656 as that change is the one that borked my server

And please remember the current  Recommended Version (as of this post) is currently 2655, once that changes you may start seeing more reports of

this now (mostly) solved* issue.

 

* The only other issue is the Apache Maven one, but I'm not sure how that can be fixed...

Posted

The current recommended version is before the library re-write so that doesn't matter.

And no the installer will not go around deleting your modlists. That would just be stupid.

I've added hardening for broken modlists. That solves this issue, beyond that, you can just delete your json and you'll be fine.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Understood, sorry (I blame my Aspergers)

 

Anyway do feel free to include the batch file with a desktop shortcut for those wanting it, it will as mentioned automatically search through the directory for the forge universal jar's and then run the highest numbered one found aka the latest installed, making installing a forge server update better than a client one, MC still insists the player updates their forge client version in the launch properties, prior to running the new version.

 

(I'm sure you can adapt the batch file to use the highest available 1.8 java version a user has installed too)

startserver.bat

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.