litematica icon indicating copy to clipboard operation
litematica copied to clipboard

Forge 1.16

Open ZacSharp opened this issue 5 years ago • 52 comments

Risking to ask a dumb question: In your README you state that you are waiting for Forge to ship Mixin and lately I noticed that I don't need MixinBootstrap anymore. Does that mean we will get a new Forge version soon or is Mixin working without MixinBootsrap still not enough? EDIT: also I found org.spongepowered:mixin:0.8 in Forge's version.json so that means it' shipping it right?

ZacSharp avatar Sep 21 '20 22:09 ZacSharp

Yes Forge did start shipping Mixin a while back, so now it would be possible to make proper Forge ports.

However I decided that I'm not going to waste time porting the current 1.13.2+ code base to Forge, because I consider the current 1.13.2+ versions to be "trash" compared to the later 1.12.2 code. And even the current 1.12.2 version is still lacking many features and improvements that get asked about constantly, plus there are some renderer optimizations and fixes that I've wanted to do for a long time now. So I'm currently focusing (whatever little modding time I have atm) on working on those "most important" improvements and fixes on 1.12.2 first, and after I get a bunch of the most important and urgent things finished there, I'm then going to port that state of code to all the 1.13.2+ MC versions on Fabric, and then also porting that new 1.16.3 Fabric version to 1.16.3 Forge.

I can't give any kind of reliable time line, as most often stuff takes ten times longer to do than I would estimate, plus my free time and modding motivation comes and goes... but I'm kind of hoping I could do that next round of updates from 1.12.2 to all the other versions, and then also the Forge ports, towards the end of this year still (ie. somewhat unlikely to happen before December, and I won't guarantee that they actually will happen in December either).

maruohon avatar Sep 21 '20 23:09 maruohon

@ZacSharp Sorry for necro'ing like this, but I can't find another way to contact you!

Maruohon mentioned a forge port you were working on in the curseforge comments of Litematica. I checked out your GitHub and found it. I downloaded Litematica and malilib, then went to build them using Gradle 4.9 as noted. Malilib builds fine, but Litematica is giving me troubles on compileJava. It's saying Deprececated features were used, making it incompatible with Gradle 5.0. Any ideas what I'm doing wrong? I've removed all other versions of Gradle from the system and path, so 4.9's the only version I have.

Sorry for posting this here!

TheSonicCry avatar May 05 '21 21:05 TheSonicCry

@TheSonicCry That warning alone should not fail the build. Did it not complete successfully? If not, then there must be some other issues as well?

Where did you put/clone the repos? Looks like the current build script expects the malilib repo to be in the same directory as the Litematica repo (not inside it, like adjacent/sibling to it) ie.

implementation fileTree(dir: "../malilib/build/libs", include: "**.jar")

So you should have the malilib repo directory named as malilib.

maruohon avatar May 05 '21 21:05 maruohon

Hey there, thanks for the reply. I've renamed the malilib directory to malilib and placed in in the same root as the litematica so it redirects like you posted, but no luck.

Here's what the log is showing right now: https://pastebin.com/K6KhNZHc

Also, here's gradle -v: https://pastebin.com/y5wz2W8y

If it'd be more helpful to run it with --stacktrace or some such please let me know! I really appreciate the help!

TheSonicCry avatar May 06 '21 02:05 TheSonicCry

You are using java 14, don't know if that works with litematica. I always use java 8 for gradle. Looks like it can't open the log file, but that doesn't seem to be a problem. And for the type errors: It wants a ITextComponent for StringUtils#translate, even though that clearly takes a String. Are you sure it is using the right version of malilib? (didn't find one that contains "translate(I" or " translate([^Sa-z]" though)

    public static String translate(String translationKey, Object... args)
    {
        return net.minecraft.client.resources.I18n.format(translationKey, args);
    }

ZacSharp avatar May 06 '21 09:05 ZacSharp

Works with openjdk-8 and renaming malilib-forge-1.16 -> malilib Zac your a fucking legend. Here's my jars if you can't get the build from source working.

DannyParker0001 avatar May 06 '21 12:05 DannyParker0001

So. I'm actually stupid.

I built malilib then removed the deobf.jar when I copied it to my mods earlier. I rebuilt malilib using Jdk 8, then was able to build litematica just fine. Thank you for the help, and sorry for the wasted brain power over my unimaginable stupidity.

TheSonicCry avatar May 07 '21 19:05 TheSonicCry

Works with openjdk-8 and renaming malilib-forge-1.16 -> malilib Zac your a fucking legend. Here's my jars if you can't get the build from source working.

The files loaded successfully, but the mod does not work in game. Do you have a new jar to make available?

rlcoldx avatar May 11 '21 15:05 rlcoldx

Read the description. image EDIT: that means restarting the game

ZacSharp avatar May 11 '21 19:05 ZacSharp

Read the description. image

Should I restart the game launcher or what?

onyxcherry avatar May 11 '21 21:05 onyxcherry

Read the description. image

Should I restart the game launcher or what?

Just to check, make sure you’re unbinding everything from ‘M’ in controls, then press M in game. For me it didn’t show up in the controls list and I’d thought it didn’t install properly. The equivalent of ‘turn it on and off again’ lol.

TheSonicCry avatar May 11 '21 21:05 TheSonicCry

Unfortunalety, I pressed m and nothing changed :(. Default Minecraft without any mods excluding these two hasn't any additional keybindings for m... (I use jars from ↑ attached zip - I had compiled malilib, but I couldn't compile litematica because of Java errors - Java, not malilib dependency). JDK11 or Java8 - no oneworks :(

onyxcherry avatar May 12 '21 06:05 onyxcherry

i dont know what im doing wrong but when i successfully compile and put it into mods folder and hit play it says

The game crashed whilst initializing game Error: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered Exit Code: -1

happens with the zip from dannyparker too

TwinkieShip avatar May 16 '21 19:05 TwinkieShip

i dont know what im doing wrong but when i successfully compile and put it into mods folder and hit play it says

The game crashed whilst initializing game Error: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered Exit Code: -1

happens with the zip from dannyparker too

Same thing here

CyberDruid928 avatar May 17 '21 03:05 CyberDruid928

i dont know what im doing wrong but when i successfully compile and put it into mods folder and hit play it says

The game crashed whilst initializing game Error: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered Exit Code: -1

happens with the zip from dannyparker too

got the same problem

Tobs3l avatar May 20 '21 16:05 Tobs3l

I have no idea what's happening there, but maybe one of you can give me a log file so I have at least a slight chance to find it out?

ZacSharp avatar May 20 '21 19:05 ZacSharp

I have no idea what's happening there, but maybe one of you can give me a log file so I have at least a slight chance to find it out?

I hope this is what you need. (thx for the forge port btw, even if it doesnt work) crash-2021-05-20_21.43.51-client.txt

Tobs3l avatar May 20 '21 19:05 Tobs3l

I have no idea what's happening there, but maybe one of you can give me a log file so I have at least a slight chance to find it out?

I hope this is what you need. (thx for the forge port btw, even if it doesnt work) crash-2021-05-20_21.43.51-client.txt

I had the same problem, looking closely, I saw that it was a conflict problem with Optifine, when I removed Optifine from the modpack it worked perfectly.

rlcoldx avatar May 20 '21 21:05 rlcoldx

Btw I noticed that this Litematica port was based on the old fabric_1.16_snapshots branch, so it's missing most of the (also 1.16 specific) fixes and improvements added since then and also the few new features implemented more recently. Merging in the fabric_1.16_temp_features branch is recommended to get those, but due to the mapping differences it probably won't merge very cleanly.

maruohon avatar May 20 '21 21:05 maruohon

Btw I noticed that this Litematica port was based on the old fabric_1.16_snapshots branch, so it's missing most of the (also 1.16 specific) fixes and improvements added since then and also the few new features implemented more recently. Merging in the fabric_1.16_temp_features branch is recommended to get those, but due to the mapping differences it probably won't merge very cleanly.

Yes, especially in the build view settings. You can't see the building under the water.

rlcoldx avatar May 21 '21 02:05 rlcoldx

I have no idea what's happening there, but maybe one of you can give me a log file so I have at least a slight chance to find it out?

I hope this is what you need. (thx for the forge port btw, even if it doesnt work) crash-2021-05-20_21.43.51-client.txt

I had the same problem, looking closely, I saw that it was a conflict problem with Optifine, when I removed Optifine from the modpack it worked perfectly.

Oh yeah, your right. Thanks for the help, still would be cool if there would be a fix or sth for that.

Tobs3l avatar May 21 '21 05:05 Tobs3l

Merging more up-to-date code from litematica and malilib is on my todo list, but I first want to see if I can find out how forgegradle handles mojangs official mappings, because that could save me quite a few hours time. For the optifine bug I can only hope that merging will fix it, because I don't know how I could do that myself. Meanwhile there is an easy fix for the probably most annoying part:

[[dependencies.litematica]]
    modId="malilib"
    mandatory=true
    versionRange="[0.10.0-dev.21+beta.1,)"
-    ordering="NONE"
+    ordering="BEFORE"
    side="CLIENT"

Apply this change to the mods.toml in litematica and it should neither crash during SIDED-SETUP (this does not include the optifine crash) nor not show up in game.

ZacSharp avatar May 21 '21 19:05 ZacSharp

So i changed the NONE to BEFORE but it still crashes. However, when i remove Optifine and it works i cant see any glass blocks when displaying a hologram, it still shows them in the HUD but not visually on screen.

Just wanted to say that i really appreciate your good work, keep it up👍

Tobs3l avatar May 22 '21 08:05 Tobs3l

@Tobs3l Try changing the vanilla video settings from Fabulous to Fancy mode. There are still various issues with translucency and rendering order of things, so you won't be able to see either vanilla translucent blocks through the schematic or vice versa (I forget which way it is atm). Also that render issue might be one of the things fixed in the later 1.16 commits that are currently missing from this Forge port. I remember not being able to see translucent blocks through the schematic overlay being an issue at one point (ie. you would see the blocks if you toggle off the colored overlay).

maruohon avatar May 22 '21 11:05 maruohon

Was tired of reading through code I don't understand, went over to doing changes in code I don't understand and merged fabric_1.16_temp_features. I haven't played with the new jar yet, but from the few test runs I did I know that

  1. it seems to just work with the old malilib jar but I still have plans to update malilib as well, hoping to get rid of the stuck keys thing
  2. it once crashed during sided setup again, I hope that was a one-timer or I will have to make malilib/litematica initialization thread safe
  3. the coloured overlay is back
  4. translucent rendering works. You can't see translucent litematica rendering through translucent vanilla rendering and translucent schematic blocks mostly occlude the schematic overlay, but sometimes it's the other way round
  5. *.schematic and *.nbt can be loaded again, but exporting as *.schematic doesn't work

EDIT: just saw that I forgot to pull before merging, so the next update is already ~~WIP~~ done

ZacSharp avatar May 28 '21 21:05 ZacSharp

Exporting to *.schematic never existed/worked in any of the 1.13.2+ versions as of yet, so don't worry about that. Only exporting to the vanilla structure block template *.nbt format is "supposed to work" atm.

Better schematic format conversions between all formats only exist in 1.12.2 currently. Proper cross-MC-version schematic conversion support on the other hand is still entirely WIP and will be worked on in 1.12.2 before it gets merged to 1.13.2+.

The malilib changes during the 1.16 era have been pretty minimal, and in fact almost no actual development has been done for malilib in any of the 1.13.2+ versions, other than updating to vanilla changes and doing some small bug fixes.

maruohon avatar May 28 '21 22:05 maruohon

Minecraft version 1.16.5 Mod Version litematica-forge-1.16.5-0.0.0-dev.jar malilib-forge-1.16.5-0.10.0-dev.21+beta.1.jar (got them from a comment by DannyParker0001 which was made 23 days ago) (Idk if this is the latest version, but building the project fails for me and I dont know how to fix that issue)

Easy Place mode prevention doesn't work, it'll place the block for the schematic, but then place an additional block as if the schematic one was already there, then pop up "Easy place mode prevented this action" when it didn't prevent it

Myth-1300 avatar May 29 '21 18:05 Myth-1300

DannyParker's version is pretty outdated (it's missing commits from about a year, even though it's not even a month old) and merging the new code for litematica and malilib didn't help. However while I was updating malilib I found the reason for mouse buttons being stuck, double triggering and not being canceled, so with my latest malilib version easy place prevention now works as well and rebuilding schematics is way less annoying.

ZacSharp avatar Jun 01 '21 20:06 ZacSharp

DannyParker's version is pretty outdated (it's missing commits from about a year, even though it's not even a month old) and merging the new code for litematica and malilib didn't help. However while I was updating malilib I found the reason for mouse buttons being stuck, double triggering and not being canceled, so with my latest malilib version easy place prevention now works as well and rebuilding schematics is way less annoying.

Would you be able to help me with how to compile the latest version? Whenever I try I get build failed

Myth-1300 avatar Jun 01 '21 21:06 Myth-1300

DannyParker's version is pretty outdated (it's missing commits from about a year, even though it's not even a month old) and merging the new code for litematica and malilib didn't help. However while I was updating malilib I found the reason for mouse buttons being stuck, double triggering and not being canceled, so with my latest malilib version easy place prevention now works as well and rebuilding schematics is way less annoying.

Would you be able to help me with how to compile the latest version? Whenever I try I get build failed

I had the same problem when compiling... malilib works fine, but Litematica has a lot of errors.

src\main\java\fi\dy\masa\litematica\schematic\conversion\SchematicConversionFixers.java:57: error: cannot find symbol .with(RedstoneWireBlock.WIRE_CONNECTION_WEST, RedstoneSide.SIDE); ^ symbol: variable SIDE location: class RedstoneSide

rlcoldx avatar Jun 01 '21 21:06 rlcoldx