MinecraftTransportSimulator icon indicating copy to clipboard operation
MinecraftTransportSimulator copied to clipboard

1.20.1 port

Open slava110 opened this issue 1 year ago • 17 comments
trafficstars

Hi. I've started porting mod to 1.20.1 recently. Most of the stuff to make it compilable is done, but some things changed in MC a lot so I'm waiting for your opinion on some of then. I'm currently using ArchLoom instead of ForgeGradle, but it could be changed later on if you really want. I just really hate ForgeGradle c: P.S.: If you want, I can remake commits so it'll be clear what changes I've made from 1.16.5 version (by adding intermediate commit with unmodified 1.16.5 code on 1.20.1 branch).

Resources used

  • mts/1.16.5 commit https://github.com/DonBruce64/MinecraftTransportSimulator/commit/d220760ed3a80e67f9695c76a227aed140037099 (Bench sound additions and adjustments)
  • NeoForgeBot in Discord to fix migrate from MCP to MojMaps (!mcp -c moj <search term> command)
  • https://github.com/MinecraftForge/MinecraftForge/issues/8165 contains a lot of Forge renames in 1.19

Changes to Gradle:

  • Updated gradle version
  • enabled_platforms property in gradle.properties is required if you want to include specific subprojects and create tasks. Format: <modloader>-<version>, example: forge-1.12.2, forge-1.20.1
  • Removed unused stuff in main buildscript

ToDo (opinion required):

Other ToDo:

~~- Controller class not found I guess it doesn't exist on that version? Should be replaced with something. Or maybe dependency like Controllable could be used~~

~~- mcinterface1201.InterfaceCore.getOredictMaterials I should just check how tag system works to fix this method~~

~~- mcinterface1201.BuilderTileEntity.tick Doesn't override anything. BlockEntityTicker should be registered~~

~~- mcinterface1201/BuilderItem mcinterface1201/InterfaceLoader mcinterface1201.BuilderCreativeTab Creative tabs changed in new MC. Should be registered using events IIRC~~

~~- JEI compat Is completely broken~~

slava110 avatar Jun 24 '24 22:06 slava110

image If I directly replace materials with BlockTags there's not enough of them lol. Maybe predicate could be used to check if block is instance of clay, grass, etc. . What do you think? P.s.: Also I will probably need your help with things left in ToDo if you can c:

slava110 avatar Jun 25 '24 08:06 slava110

Great work! This is the best attempt so far to port this mod to a new version. Will you continue to help with mod develop? There is only one person making the mod, and it would be nice to have someone else help with the mod.

dldev32 avatar Jun 26 '24 07:06 dldev32

Great work! This is the best attempt so far to port this mod to a new version. Will you continue to help with mod develop? There is only one person making the mod, and it would be nice to have someone else help with the mod.

I probably won't. I just want to finish port and maybe add some features for the server I'm working on if server owner will need them. Also:

  1. Working on multiversion mods is hell. I would prefer working on 1.20.1 version only personally
  2. I prefer not to work on ARR-licensed mods and usually try to avoid them 🙃

slava110 avatar Jun 26 '24 10:06 slava110

Great work! This is the best attempt so far to port this mod to a new version. Will you continue to help with mod develop? There is only one person making the mod, and it would be nice to have someone else help with the mod.

I probably won't. I just want to finish port and maybe add some features for the server I'm working on if server owner will need them. Also:

  1. Working on multiversion mods is hell. I would prefer working on 1.20.1 version only personally
  2. I prefer not to work on ARR-licensed mods and usually try to avoid them 🙃

Well, good luck! I just wanted to say that there are some issues that the dev of this mod cannot solve, and it would be nice if someone else solved them. In any case, thanks for the answer!

dldev32 avatar Jun 26 '24 10:06 dldev32

@slava110 try looking at the 1.18.2 branch for a lot of your issues here. I've started porting to that version and a lot of the things are likely to be similar between these two versions. The 1.18.2 branch will actually compile and boot, and you can even spawn in vehicles, though the GUI doesn't work, collision is wonky, and trying to render anything just kills the game. But, you at least can get most of the bulk of the code and methods converted.

DonBruce64 avatar Jun 26 '24 14:06 DonBruce64

Also, the mod isn't techincally ARR, but it's certianly not one that permits forking. I've seen what that does to modpacked mods with what has happend to Flansmod, where there's tons of different versions, none of which combine the best work of the others.

DonBruce64 avatar Jun 26 '24 14:06 DonBruce64

try looking at the 1.18.2 branch for a lot of your issues here

Yep, I totally missed that branch when I've started porting 💀. I don't think there's much I can take from it at this point, but I'll check again anyway a bit later, thanks. Some of the stuff I've mentioned in ToDos actually differs from 1.18 though (absence of Material and addition of DamageSource registry). And not sure what to do with them rn 🤷

Also, the mod isn't techincally ARR, but it's certianly not one that permits forking

Custom license is technically ARR. But anyway, forking is the thing that matters the most. Had a lot of mods that I cannot use anymore because developer is no longer active anywhere / developer doesn't want port to specific version/modloader (forge/fabric/quilt/mc version). And sometimes I cannot add specific features I want because developer doesn't want them (but that's mostly solvable with mixins nowadays). So I tend to avoid ARR mods usually. Idk what happened to FlansMod specifically. I only know that sometimes people report issues of forked mods to original repo (even though you can have disclaimers everywhere) and that could be annoying. I don't really see issue with tons of different versions of specific mod (they usually still PR some features to original repo if developer isn't against it, no?). But you do you and I won't hate you for that or anything like that 🙂

slava110 avatar Jun 26 '24 14:06 slava110

can you make the port to 1.19.2

Kaban4ik2023 avatar Jun 30 '24 20:06 Kaban4ik2023

can you make the port to 1.19.2

Sorry, but as I've said earlier, I'm mostly doing this so our server could be ported to 1.20.1. I'm not interested in porting to any version we won't have our server on. Might port to 1.21 but only if we'll port our server to 1.21 🤷 (and we're currently targetting specifically 1.20.1). Maybe Don will port it to 1.19.2, 1.19.4, 1.20.4, idk, up to him

slava110 avatar Jul 01 '24 04:07 slava110

@DonBruce64 what specific problems did you have with FG6 on 1.12.2? https://github.com/DonBruce64/MinecraftTransportSimulator/blob/d220760ed3a80e67f9695c76a227aed140037099/mcinterfaceforge1122/build.gradle#L7

slava110 avatar Jul 07 '24 09:07 slava110

Sorry, but as I've said earlier, I'm mostly doing this so our server could be ported to 1.20.1. I'm not interested in porting to any version we won't have our server on. Might port to 1.21 but only if we'll port our server to 1.21 🤷 (and we're currently targetting specifically 1.20.1). Maybe Don will port it to 1.19.2, 1.19.4, 1.20.4, idk, up to him

So I won't be porting to and 1.19.x versions. They just aren't popular enough, especially with the 1.20.x and 1.21.x versions. 1.18.2 is what I'm choosing for my first port personally as there's less different in there vs a larger jump, and even then I'm still struggling with the rendering routines not having any documentation or anything. Horridly de-motivating when all you want to do is send a batch of vertex data to be rendered but there's literally 0 functions in the code that take in a buffer and a stack and queue up said rendering. Even more a PITA when the code crashes with a segfault with no stack so you don't know what you did wrong. Cherry on top is the lack of documentation anywhere for the code. Wasn't a big issue in the older OpenGL direct rendering days as it was the same code as any other direct rendering, but now it's a MC-custom batch system that I have to essentially puzzle out what it wants.

DonBruce64 avatar Jul 16 '24 20:07 DonBruce64

@DonBruce64 what specific problems did you have with FG6 on 1.12.2?

IIRC, it was a Java version issue. Updating to FG6 made 1.12.2 not compile nice since I had to run Java 17 for FG6 to run. However, as of the current setup it appears that this is not an issue as I'm able to run Java 17 with FG5 and not have any issues with compiling (all my issues are related to 1.18.2 ForgeGradle specific issues with project type dependencies not loading into the editor for launch properly with one annotation, and not compiling properly with another, and the 1.18.2 latest IDE just not working period).

I'd say go for FG6 as it probably does work, just was a user error on my end when I last tried it.

DonBruce64 avatar Jul 16 '24 20:07 DonBruce64

When you will release?

b1scuitdev avatar Aug 25 '24 21:08 b1scuitdev

When you will release?

Whenever it will be finished. This port is currently postponed because migrating worlds from 1.12.2 to 1.13+ is harder than was expected (because of Forge and Minecraft changes). And there's no reason for me to port this mod if server world will not be migrated too. If somebody wants to pick it up - go ahead

slava110 avatar Aug 26 '24 19:08 slava110

OK, will version 1.20.1 be publicly available or current for your server?

Kaban4ik2023 avatar Aug 26 '24 20:08 Kaban4ik2023

OK, will version 1.20.1 be publicly available or current for your server?

Public. Otherwise I wouldn't have opened this PR in the first place. But it needs time and I'm dedicating time to other stuff rn

slava110 avatar Aug 26 '24 23:08 slava110

How's the progress so far?

Raiiiden avatar Sep 11 '24 01:09 Raiiiden

so @DonBruce64 @slava110 with the official 1.20 release for MTS / IV on the horizon, what shall we do with this here branch?

SnailPerson avatar Apr 07 '25 17:04 SnailPerson

@SnailPerson I'm going to leave it up until I complete the actual 1.20 port. Just in case things are in here I need to reference. Doesn't hurt to leave it here until everything is tied up in a nice bow y'know?

DonBruce64 avatar Apr 07 '25 17:04 DonBruce64

fair point!

SnailPerson avatar Apr 07 '25 18:04 SnailPerson

Closing since I've ported the mod to this version already.

DonBruce64 avatar Aug 06 '25 03:08 DonBruce64