Jump to content

Can't place modded blocks in my server


Nyxistaken

Recommended Posts

Hello! I am still very new to creating servers but today I was trying to make one so that me and my brother could play with mods.
I created a forge server and allowed it to install, I also made a run.bat file though had to delete it afterwards as it stopped working, not sure why. Now the server itself does work, but whenever I try to place a modded block it just seems to vanish
here are my latest logs: 
[19:21:45] [Server thread/INFO]: Starting minecraft server version 1.12.2
[19:21:45] [Server thread/INFO]: Loading properties
[19:21:45] [Server console handler/ERROR]: Exception handling console input
java.io.IOException: The handle is invalid
    at java.io.FileInputStream.readBytes(Native Method) ~[?:?]
    at java.io.FileInputStream.read(Unknown Source) ~[?:?]
    at java.io.BufferedInputStream.read1(Unknown Source) ~[?:?]
    at java.io.BufferedInputStream.read(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[?:?]
    at java.io.InputStreamReader.read(Unknown Source) ~[?:?]
    at java.io.BufferedReader.fill(Unknown Source) ~[?:?]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:?]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:?]
    at nz$2.run(SourceFile:100) [minecraft_server.1.12.2.jar:?]
[19:21:45] [Server thread/INFO]: Default game type: SURVIVAL
[19:21:45] [Server thread/INFO]: Generating keypair
[19:21:45] [Server thread/INFO]: Starting Minecraft server on 192.168.0.150:25565
[19:21:45] [Server thread/INFO]: Using default channel type
[19:21:46] [Server thread/INFO]: Preparing level "world"
[19:21:46] [Server thread/INFO]: Loaded 488 advancements
[19:21:46] [Server thread/INFO]: Preparing start region for level 0
[19:21:47] [Server thread/INFO]: Preparing spawn area: 48%
[19:21:48] [Server thread/INFO]: Done (1.771s)! For help, type "help" or "?"
[19:22:01] [User Authenticator #1/INFO]: UUID of player Nyxistaken is 0609cbac-80f9-45a0-8fe0-0c261d3ef31b
[19:22:01] [Server thread/INFO]: Nyxistaken[/192.168.0.150:55368] logged in with entity id 190 at (37.5, 63.0, 252.5)
[19:22:01] [Server thread/INFO]: Nyxistaken joined the game
[19:22:33] [Server thread/INFO]: Set Nyxistaken's game mode to Survival Mode
[19:22:47] [Server thread/INFO]: Set Nyxistaken's game mode to Creative Mode

I have about 13 mods that I am using including an NPC mod and the Aether mod. My brother has these installed as well, I have them installed on my main game and in the server folder so I'm not sure why it isn't working

Link to comment
Share on other sites

1 hour ago, Nyxistaken said:

[19:21:45] [Server thread/INFO]: Starting minecraft server version 1.12.2
[19:21:45] [Server thread/INFO]: Loading properties
[19:21:45] [Server console handler/ERROR]: Exception handling console input
java.io.IOException: The handle is invalid
    at java.io.FileInputStream.readBytes(Native Method) ~[?:?]
    at java.io.FileInputStream.read(Unknown Source) ~[?:?]
    at java.io.BufferedInputStream.read1(Unknown Source) ~[?:?]
    at java.io.BufferedInputStream.read(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[?:?]
    at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[?:?]
    at java.io.InputStreamReader.read(Unknown Source) ~[?:?]
    at java.io.BufferedReader.fill(Unknown Source) ~[?:?]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:?]
    at java.io.BufferedReader.readLine(Unknown Source) ~[?:?]
    at nz$2.run(SourceFile:100) [minecraft_server.1.12.2.jar:?]
[19:21:45] [Server thread/INFO]: Default game type: SURVIVAL
[19:21:45] [Server thread/INFO]: Generating keypair
[19:21:45] [Server thread/INFO]: Starting Minecraft server on 192.168.0.150:25565
[19:21:45] [Server thread/INFO]: Using default channel type
[19:21:46] [Server thread/INFO]: Preparing level "world"
[19:21:46] [Server thread/INFO]: Loaded 488 advancements
[19:21:46] [Server thread/INFO]: Preparing start region for level 0
[19:21:47] [Server thread/INFO]: Preparing spawn area: 48%
[19:21:48] [Server thread/INFO]: Done (1.771s)! For help, type "help" or "?"
[19:22:01] [User Authenticator #1/INFO]: UUID of player Nyxistaken is 0609cbac-80f9-45a0-8fe0-0c261d3ef31b
[19:22:01] [Server thread/INFO]: Nyxistaken[/192.168.0.150:55368] logged in with entity id 190 at (37.5, 63.0, 252.5)
[19:22:01] [Server thread/INFO]: Nyxistaken joined the game
[19:22:33] [Server thread/INFO]: Set Nyxistaken's game mode to Survival Mode
[19:22:47] [Server thread/INFO]: Set Nyxistaken's game mode to Creative Mode

This is a vanilla server. To start a modded server you have to start the forge jar.

Link to comment
Share on other sites

59 minutes ago, Danebi said:

This is a vanilla server. To start a modded server you have to start the forge jar.

I just figured that out with a video, but when I try to launch the forge jar this is what I get
 

C:\Users\Filip\Desktop\Minecraft Server>java -Xmx4096M -Xms4096M -jar forgeserver.jar nogui
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
        at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        ... 6 more

C:\Users\Filip\Desktop\Minecraft Server>PAUSE
Press any key to continue . . .

and that's after having changed the file name to forgeserver and the run task to forgeserver.jar 
If I keep the same names as default on run.bat I end up with a "click a key to continue" without any other info
the thing just doesn't launch

Link to comment
Share on other sites

35 minutes ago, Danebi said:

What version of java do you have?

I'm not sure, I installed it quite a wee while ago. Tbh I haven't touched MC until a few weeks ago when my brother bought it, hence why I wanted to make a server with mods (LAN connection kept timing out or having weird errors)

Link to comment
Share on other sites

Downloaded the latest version and now I am getting this:
 

C:\Users\Filip\Desktop\Minecraft Server>java -Xmx4096M -Xms4096M -jar forgeserver.jar nogui
Invalid maximum heap size: -Xmx4096M
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

C:\Users\Filip\Desktop\Minecraft Server>PAUSE
Press any key to continue . . .

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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