Code Monkey home page Code Monkey logo

terre's People

Contributors

cybermaxke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

terre's Issues

Do you think it would be possible to make this broadcast as lan?

I just recently found out you can join mobile terraria servers from console on a lan network because they run the same version as terraria. If you made it so you could join this through lan by broadcasting the server on the local network it would make it possible to have crossplay to consoles.

I've already tried to achieve this but i dont really understand how terraria broadcasts its servers locally and i tried to figure out with wireshark but it just wouldn't show up on the lan list for even the mobile phone

If it's not possible it's fine but it would be cool to have crossplay with console terraria.

Support tModLoader

Add support for tModLoader. There is some initial code, this also needs to be revisited for Terraria 1.4.

Standalone jar cannot handle spaces in the path

C:\Users\Terraria Server\Desktop\terre-proxy>java -Xms256M -Xmx2G -jar terre.jar
Exception in thread "main" java.lang.IllegalStateException: java.nio.file.NoSuchFileException: C:\Users\Terraria%20Server\Desktop\terre-proxy\terre.jar
        at org.lanternpowered.terre.impl.StandaloneMain.main(StandaloneMain.java:69)
Caused by: java.nio.file.NoSuchFileException: C:\Users\Terraria%20Server\Desktop\terre-proxy\terre.jar
        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
        at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:484)
        at java.base/java.nio.file.Files.newOutputStream(Files.java:228)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:162)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:142)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:123)
        at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:339)
        at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:288)
        at org.lanternpowered.terre.impl.StandaloneMain.main(StandaloneMain.java:53)

Portal plugin says portal portal name is already used when creating a portal

java.lang.IllegalStateException: The name 'myportal' is already used.
	at org.lanternpowered.terre.portals.Portals.createPortal-FkN-wW0(Portals.kt:113) ~[?:?]
	at org.lanternpowered.terre.portals.Portals.access$createPortal-FkN-wW0(Portals.kt:48) ~[?:?]
	at org.lanternpowered.terre.portals.Portals$portalCommandExecutor$1.execute(Portals.kt:210) ~[?:?]
	at org.lanternpowered.terre.impl.command.CommandManagerImpl$register$1.execute(CommandManagerImpl.kt:32) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.command.CommandManagerImpl.execute(CommandManagerImpl.kt:44) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.network.client.ClientPlayConnectionHandler.handle(ClientPlayConnectionHandler.kt:113) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.network.ConnectionHandlerBindings$12.invoke(ConnectionHandlerBindings.kt:68) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.network.ConnectionHandlerBindings$12.invoke(ConnectionHandlerBindings.kt:68) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.network.ConnectionHandlerBindings$bindSuspend$1.handle(ConnectionHandlerBindings.kt:111) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at org.lanternpowered.terre.impl.network.Connection$channelRead$function$1.invokeSuspend(Connection.kt:169) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.8.20.jar:1.8.20-release-327(1.8.20)]
	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115) ~[kotlin-stdlib-1.8.20.jar:1.8.20-release-327(1.8.20)]
	at org.lanternpowered.terre.impl.network.Connection.channelRead(Connection.kt:172) ~[terre-proxy-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.90.Final.jar:4.1.90.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.90.Final.jar:4.1.90.Final]
	at java.lang.Thread.run(Thread.java:1583) [?:?]```

Server side character

Add support for server side characters. This would take the responsibility of handling all character data, so the backing servers don't need to do that and character data can be shared between servers without being stored on the client. Backing servers should still be able to have server specific character data, if desired.

This would also allow proxy wide character data that's still not client side.

See if it's possible to make this a plugin.

Forward server disconnect messages to client

Unable to join any backing server because the server is in journey mode, but the character is not. The client disconnect should be the first disconnect message instead of the generic "Failed to connect to a server" message.

[23:32:15] [netty-worker-2/INFO] [Terre] [org.lanternpowered.terre.impl.network.backend.ServerPlayConnectionHandler.handle(ServerPlayConnectionHandler.kt:65)]: Got disconnect: DisconnectPacket(reason=LocalizedText(key=Net.PlayerIsNotCreativeAndWorldIsCreative, substitutions=))
[23:32:15] [netty-worker-2/DEBUG] [Terre] [org.lanternpowered.terre.impl.network.Connection.exceptionCaught(Connection.kt:229)]: A netty connection error occurred
java.net.SocketException: Connection reset
	at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:259) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.buffer.WrappedByteBuf.writeBytes(WrappedByteBuf.java:821) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]```

Reduce garbage generation

  • At the moment a lot of packets are being decoded just to intercept some information without altering the content, however all these packets are being decoded and afterwards encoded. This can be optimized by reusing decoded byte bufs and forwarding them if the content wasn't altered, otherwise just encode the packet again.
  • Conditional packet decoding, only decode certain packets if their features are required. Especially for packets which are send frequently.

All chat colors doesn't seem to work

TShock Chat colors doesn't work, for example user messages with specific group that have color set-up will just show as white color or even death message will just show up as white

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.