Commit Graph

13 Commits

Author SHA1 Message Date
Jonas Herzig
cfb9e15b8a Make use of new @Pattern feature to centralize version-aware code
That is, most of the business code should not be aware that it is being compiled
to multiple versions even when it heavily interacts with MC, preprocessor
statements should be an escape hatch, not the norm.
Similarly, code should not be forced to do `MCVer.getWindow(mc)` instead of the
much more intuitive `mc.getWindow()`, and a new preprocessor (technically remap)
feature makes this possible by defining "search and replace"-like patterns (but
smarter in that they are type-aware) in one or more central places (the
"Patterns.java" files) which then are applied all over the code base.

In a way, this is another step in the automatic back-porting process where
preprocessor statements are used when we cannot yet do something automatically.
Previously we "merely" automatically converted between different mapping, this
new feature now also allows us to automatically perform simple refactoring
tasks like changing field access to a getter+setter (e.g. `mc.getWindow()`), or
changing how a method is called (e.g. `BufferBuilder.begin`), or changing a
method call chain (e.g. `dispatcher.camera.getYaw()`), or most other
search-and-replace-like changes and any combination of those.
The only major limitation is that the replacement itself is not smart, so
arguments must be kept in same order (or be temporarily assigned to local
variables which then can be used in any order).
2021-03-14 12:12:51 +01:00
Jonas Herzig
2f0160c4f6 Update loom to 0.5 (closes #453) 2021-02-17 11:39:57 +01:00
Jonas Herzig
62bbf0efd6 Update IDEA setup instructions
Configuring the annotation processor is done automatically as of IDEA 2020.1.

Run configs for 1.14+ versions should now be generated automatically once the
referenced PR is merged (or when using a local build of it).
2020-07-13 16:07:48 +02:00
Jonas Herzig
9dfd25c3fd Update README 2020-04-22 10:10:01 +02:00
Jonas Herzig
7b97d9ea85 Use FG1.2 fork with Gradle 4.9 fixes so we can build everything at once 2019-05-08 14:00:46 +02:00
Jonas Herzig
9968f81073 Split source preprocessor into separate gradle plugin 2019-04-21 01:40:39 +02:00
Jonas Herzig
8705bbad9a Re-enable and fix building for older MC versions 2019-03-09 13:08:47 +01:00
Jonas Herzig
eb04eb47dc Add 1.7.10 version 2018-03-16 13:01:33 +01:00
Jonas Herzig
fbbca76099 Remove :versions prefix from gradle projects and remove duplicated build code 2018-03-06 12:39:24 +01:00
Jonas Herzig
e508ac40cf Fix formatting/typos in README 2018-02-28 19:33:03 +01:00
Jonas Herzig
d9f318623c Update README for single tree 2018-02-28 11:55:59 +01:00
Jonas Herzig
08e0d65685 Remove preshadowJar steps from README.md (no longer required as of a8f2c74) 2018-01-16 14:02:17 +01:00
johni0702
e86c66d874 Move README.md, LICENSE.md and user docs from master branch to 1.8 2016-12-09 12:10:48 +01:00