Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
388 commits
Select commit Hold shift + click to select a range
0cb873e
build: loom 1.7
ishland Jul 11, 2024
9e49ba8
fix: correctly handle unloaded chunk futures
ishland Jul 11, 2024
20aab39
fix: now I'm able to join the world
ishland Jul 11, 2024
477458f
fix: use internal storage for ticket propagator
ishland Jul 11, 2024
8c679c9
fix(notickvd): use the right way to get chunk holders
ishland Jul 11, 2024
834600e
new: invoke chunk status listeners
ishland Jul 12, 2024
c700627
new: implement unloading properly
ishland Jul 12, 2024
1349ba7
new: implement shouldDelayUnload
ishland Jul 12, 2024
fe33a9e
work: seems working well enough now
ishland Jul 13, 2024
128676c
fix: handle cases where chunk is unloading when requested
ishland Jul 13, 2024
09b781d
fix: do not convert to full twice
ishland Jul 14, 2024
1424de8
fix: notickvd not sending chunks
ishland Jul 14, 2024
7468333
chore: add warning on startup for now
ishland Jul 14, 2024
d939bb3
change: disable replaceImpl as asyncio isn't integrated yet
ishland Jul 14, 2024
1bd457c
perf: shortcut chunk requests that already exists
ishland Jul 14, 2024
d01e1f7
fix(test): remove always skipped structure locate
ishland Jul 14, 2024
80dca76
fix: actually shut the chunk system down
ishland Jul 14, 2024
d965aa1
build: update FlowSched
ishland Jul 14, 2024
441f50c
fix: always save chunk regardless of anything
ishland Jul 15, 2024
3cec8ab
fix: d
ishland Jul 15, 2024
b94a0fb
fix: return holder on setLevel if possible
ishland Jul 15, 2024
6c9b8c5
fix: correctly provide holder levels
ishland Jul 15, 2024
e43f725
fix: mount chunks read-write for players
ishland Jul 15, 2024
f06224c
fix: save chunks with wrapped chunk
ishland Jul 15, 2024
b202598
fix: gcFreeSerializer
ishland Jul 15, 2024
131919b
fix: avoid NPE after ticket removal
ishland Jul 15, 2024
672c98a
change: keep sending chunks to client when singleplayer is paused
ishland Jun 15, 2024
15e3912
fix: MixinPlugin
ishland Jul 15, 2024
5abe826
change: inline load chunk operation
ishland Jul 17, 2024
bd10408
new: implement async serialization
ishland Jul 18, 2024
641476f
change: reenable replaceImpl by default
ishland Jul 18, 2024
67b2ec5
build: update FlowSched
ishland Jul 19, 2024
5e44b5b
new: implement exception handling
ishland Jul 19, 2024
6608776
fix: correctly release dependencies when upgrade is cancelled
ishland Jul 20, 2024
fb7bcf7
work: migrate to RxJava3 part 1
ishland Jul 21, 2024
87bb679
build: update FlowSched
ishland Jul 21, 2024
7444bd7
build: update FlowSched
ishland Jul 21, 2024
b060526
fix: attempt to fix lighting glitches in notickvd
ishland Jul 21, 2024
c16fcca
perf: attempt to reduce long-lived objects
ishland Jul 21, 2024
b336e57
fix: detach WorldChunk from holder when downgrading below FULL
ishland Jul 22, 2024
8d7ec61
fix: check if holder is open before handing it to vanilla
ishland Jul 22, 2024
f138048
fix: server thread spinning nonsense when shutting down
ishland Jul 22, 2024
cefba73
build: update FlowSched
ishland Jul 22, 2024
32411b4
perf: faster LockTokenImpl#hashCode
ishland Jul 23, 2024
8514627
build: update FlowSched
ishland Jul 23, 2024
2c7998f
work: prepare multithreading
ishland Jul 23, 2024
4e533ca
perf: more micro optimizations
ishland Jul 23, 2024
21e257d
perf: more micro optimizations
ishland Jul 24, 2024
9938a2b
perf: implement application-assisted ticket rerequest
ishland Jul 24, 2024
7c464ac
build: update FlowSched
ishland Jul 24, 2024
0789829
fix: move progress listener to the right place
ishland Jul 24, 2024
0428eb1
fix: scheduled ticks never actually unloaded
ishland Jul 24, 2024
716c94b
build: when the build gets triggered
ishland Jul 24, 2024
7da5419
fix: sync onChunkStatusChange with server thread
ishland Jul 24, 2024
cbada52
Revert "fix: sync onChunkStatusChange with server thread"
ishland Jul 24, 2024
cc0fbc2
fix: ticket propagator misbehaving due to external tickets
ishland Jul 24, 2024
1db592d
fix: properly expose config
ishland Jul 25, 2024
2176b32
change: use mspc queues from jctools (through netty)
ishland Jul 25, 2024
b9753e3
perf: batch background executor calls
ishland Jul 26, 2024
45fa6e9
perf: optimize aquifer
ishland Jul 26, 2024
a22929e
change: save block entities on server thread
ishland Jul 27, 2024
5dba2e2
new: invoke fabric-lifecycle-events-v1 events
ishland Jul 27, 2024
c151415
fix: do not attempt to re-upgrade vanilla chunk status
ishland Jul 27, 2024
2151d75
fix: do not return ProtoChunk for full status
ishland Jul 27, 2024
f31fd72
fix: incorrect locking radius
ishland Jul 27, 2024
32aeb9e
change: fetch lighting data directly from light engine
ishland Jul 28, 2024
6c91186
fix: sync with light engine before saving
ishland Jul 28, 2024
f83340e
change: get blending info early during loading from disk
ishland Jul 28, 2024
b5cf993
change: report block entity mismatch
ishland Jul 28, 2024
f820d64
fix: do not save WorldChunks that doesn't reach full status
ishland Jul 29, 2024
c6c9bd0
change: remove unnecessary sync with light engine
ishland Jul 30, 2024
fbbd5f8
build: update FlowSched
ishland Jul 30, 2024
f0d890c
fix: incorrect hashCode() for LockTokenImpl
ishland Jul 30, 2024
4e84e46
build: update FlowSched
ishland Jul 30, 2024
77c48aa
perf: reduce locking contention
ishland Aug 1, 2024
1061a84
perf: reduce locking contention again
ishland Aug 1, 2024
4fc350d
build: update FlowSched
ishland Aug 1, 2024
c3c1be6
change: remove unneeded lighting lock
ishland Aug 2, 2024
1a8f931
build: update FlowSched
ishland Aug 2, 2024
9b6fb8e
fix: dirtied the wrong key
ishland Aug 2, 2024
22c622e
build: update FlowSched
ishland Aug 2, 2024
43d6b2e
fix: missed wakeup calls
ishland Aug 3, 2024
e8d31af
perf: partial concurrency on tickets
ishland Aug 3, 2024
448f1d7
change: implement ObjectFactory
ishland Aug 5, 2024
eb6bdd9
change: use SingleThreadExecutor for sched thread
ishland Aug 5, 2024
a202115
perf: optimize future fetch slightly
ishland Aug 5, 2024
65a74d8
new: implement notickvd ensureChunkCorrectness properly
ishland Aug 6, 2024
cb5841a
new: log shutdown process
ishland Aug 6, 2024
ffb1187
fix: missed max vd change
ishland Aug 7, 2024
ff5cd70
perf: fastpath notickvd chunk fetching
ishland Aug 7, 2024
7516525
refactor: RxJava3 ReadFromDisk status upgrade
ishland Aug 7, 2024
75b5891
build: 1.21.1
ishland Aug 8, 2024
a82f69b
Revert "chore: add warning on startup for now"
ishland Aug 8, 2024
f5d31bd
fix: respect isSavingDisabled in enhanced autosave
ishland Aug 9, 2024
45c988a
new: add TicketTypeExtension
ishland Aug 9, 2024
53c9b2c
build: drop threadly
ishland Aug 10, 2024
a37b631
docs: update links and README.md
ishland Aug 10, 2024
170ed9a
perf: improve idle loop for storage threads
ishland Aug 11, 2024
bb3033b
change: only execute mid tick on current ticking world
ishland Aug 11, 2024
19269b8
perf: cache `WrapperProtoChunk` instances for chunks
ishland Aug 13, 2024
90c97d5
fix: use AtomicInteger for synchronization
ishland Aug 16, 2024
f130228
fix: sync with light engine before unloading to prevent desync
ishland Aug 18, 2024
9e3b680
fix: load POI data before draining other tasks
ishland Aug 18, 2024
baf095d
fix: wait for storage to shutdown before continuing shutdown
ishland Aug 18, 2024
7e1da3c
fix: thread spinning almost always
ishland Aug 18, 2024
a8bbdc6
fix: prevent read-write reordering in IO system
ishland Aug 18, 2024
69a90a4
fix: check for shutdown flag when spin-waiting
ishland Aug 20, 2024
4b46536
fix: properly send chunk when frozen
ishland Aug 22, 2024
39056a4
fix: deprecation warnings for gradle
ishland Aug 22, 2024
12cf76b
new: initial impl
ishland Aug 24, 2024
5dd0172
build: use c11 and fix non-linux targets
ishland Aug 25, 2024
c2e30ae
fix: GHA attempt 1
ishland Aug 25, 2024
be56fbf
fix: GHA attempt 2
ishland Aug 25, 2024
317fe23
fix: GHA attempt 3
ishland Aug 25, 2024
2b5e8ef
fix: DynamicPriorityQueue in edge cases
ishland Aug 25, 2024
c8a3040
Merge branch 'ver/1.21.1' into feature/nativeaccel-v2
ishland Aug 25, 2024
880e4c4
fix: MT performance and disable avx512skx
ishland Aug 25, 2024
e0cff89
new: InterpolatedNoiseSampler (in game)
ishland Aug 25, 2024
3253888
refactor: add alignment data to c
ishland Aug 26, 2024
b8d0064
refactor: avoid netty calls in benchmarks
ishland Aug 26, 2024
00e2be4
fix: the worst mistake
ishland Aug 26, 2024
d39e746
work: some stuff
ishland Aug 26, 2024
07cb998
new: InterpolatedNoiseSamplerBenchmark
ishland Aug 26, 2024
56099e9
change: enable interleaving for InterpolatedNoiseSampler
ishland Aug 26, 2024
91182de
refactor: tweaks
ishland Aug 26, 2024
5f9a549
refactor: tweaks
ishland Aug 27, 2024
04855e5
refactor: cleanups
ishland Aug 27, 2024
d6091f5
new: end islands
ishland Aug 27, 2024
2ca08a7
fix: EndIslands correctness
ishland Aug 27, 2024
197513d
fix: remove vectorize hint on end islands
ishland Aug 28, 2024
0dc2075
perf: aligned uint32_t ptr
ishland Aug 28, 2024
205fc33
fix: use critical for end islands
ishland Aug 28, 2024
c2692b6
new: BiomeAccess
ishland Aug 28, 2024
d1957cc
perf: reduce type conversions in simplex native
ishland Aug 28, 2024
ac29faa
fix: sodium 0.6.0-beta.1 uncapvd
ishland Aug 29, 2024
0bc8408
refactor: move DoublePerlinNoiseSampler amplitude into native
ishland Aug 29, 2024
e6af606
fix: use strict floating point for DoublePerlinNoiseSampler
ishland Aug 29, 2024
fe15c49
new: add toggle for native accel
ishland Aug 29, 2024
f601de7
new: add accuracy testing for DoublePerlinNoiseSampler
ishland Aug 29, 2024
cae187b
new: add accuracy testing for InterpolatedNoiseSampler
ishland Aug 29, 2024
e54650c
fix: use strict floating point for InterpolatedNoiseSampler
ishland Aug 29, 2024
c202f10
refactor: rename InterpolatedNoiseBenchmark
ishland Aug 29, 2024
339ae4e
new: EndIslandsAccuracy
ishland Aug 29, 2024
daa4662
change: disable nativeaccel by default
ishland Aug 29, 2024
2f32bee
new: BiomeAccessAccuracy
ishland Aug 29, 2024
7445671
perf: use int32 math rather than int8
ishland Aug 30, 2024
3fef2b4
perf: improve memory layout of InterpolatedNoiseSampler
ishland Aug 30, 2024
7bfd314
fix: avoid loading native library when not needed
ishland Aug 30, 2024
926f6e8
change: add logging before native call
ishland Aug 30, 2024
18314d5
change: make AVX-512 usage opt-in
ishland Aug 30, 2024
3095c81
fix: benchmark
ishland Aug 30, 2024
9f983de
docs: update README.md [ci skip]
ishland Aug 31, 2024
961d22d
Merge branch 'feature/nativeaccel-v2' into ver/1.21.1
ishland Aug 31, 2024
7d55573
build: get native builds quieter
ishland Aug 31, 2024
c5e9678
perf: get slightly more from parallel scheduling
ishland Aug 31, 2024
c3ea7b8
fix: nativeaccel not properly enabling itself
ishland Aug 31, 2024
0e0c846
fix: enable native acceleration on CI
ishland Aug 31, 2024
cec6ad4
fix: reproducible builds
ishland Aug 31, 2024
8276feb
build: reproducible builds attempt 1
ishland Aug 31, 2024
96983ce
build: reproducible builds attempt 2
ishland Aug 31, 2024
1a8aa8a
chore: remove unused folder
ishland Aug 31, 2024
8f6738b
fix: vanilla path also called in end islands
ishland Aug 31, 2024
e74073a
perf: reduce scheduling pressure
ishland Sep 1, 2024
5bcc368
new: pain part 1
ishland Sep 2, 2024
0b49d8c
fix: the dumbest mistakes
ishland Sep 2, 2024
b76a771
perf: reenable some optimizations
ishland Sep 2, 2024
72871de
new: attempt to batch noise
ishland Sep 3, 2024
4721143
new: bytecode compiler
ishland Sep 4, 2024
71af2fa
perf: reduce alloc pressure
ishland Sep 4, 2024
3e888c6
work: improvements
ishland Sep 4, 2024
0aadb5d
new: ArrayCache
ishland Sep 4, 2024
f7557b0
change: remove array cache from single calls
ishland Sep 4, 2024
008af32
change: disable batched density functions for now
ishland Sep 5, 2024
eae7df7
new: DFTNoiseNode
ishland Sep 5, 2024
fb625ba
new: DFTShiftNode
ishland Sep 5, 2024
6db14bb
new: DFTShiftANode
ishland Sep 5, 2024
2fe2eda
new: DFTShiftBNode
ishland Sep 5, 2024
06c15aa
new: YClampedGradientNode
ishland Sep 5, 2024
55bb333
new: initial attempt at inlining caches
ishland Sep 7, 2024
d336f23
new: attempt to inline Wrapping
ishland Sep 7, 2024
57dd0ff
fix: wrapping subtree sampling and hashing issues
ishland Sep 8, 2024
0dc6aca
new: WeirdScaledSampler
ishland Sep 8, 2024
7e5af8c
new: compilation cache
ishland Sep 8, 2024
2d17f73
change: delay density function compilation
ishland Sep 9, 2024
fcdd2ab
change: let chunk system handle chunk sending
ishland Sep 10, 2024
cc48077
Merge branch 'ver/1.21.1' into feature/dfc-v0
ishland Sep 10, 2024
ac7358f
new: coordinate filling for position arrays
ishland Sep 12, 2024
d84ef12
refactor: move IChunkSystemAccess into ducks
ishland Sep 15, 2024
d9fbc2a
new: actually unload POI
ishland Sep 16, 2024
829fbe0
Merge branch 'feature/poi-unloading-v0' into feature/dfc-v0
ishland Sep 16, 2024
0ae6add
new: optimizeStructureWeightSampler
ishland Sep 16, 2024
39570a2
refactor: map localvar in aquiferExtracted$getResult1
ishland Sep 17, 2024
0721d80
perf: flatten blockPos for aquifer
ishland Sep 17, 2024
0e64254
fix: codegen error in DFTNoiseNode
ishland Sep 17, 2024
73a899a
perf: more aquifer method split
ishland Sep 18, 2024
66c10d3
perf: eliminate allocation of Result1 in aquifer
ishland Sep 18, 2024
72c6ecd
new: add config for poi unloading
ishland Sep 18, 2024
fc97c7b
Merge branch 'feature/poi-unloading-v0' into feature/dfc-v0
ishland Sep 18, 2024
3db77d3
perf: change iteration order of refreshDistPosIdx
ishland Sep 19, 2024
fd342a1
perf: cache allocation for BinaryOperation
ishland Sep 19, 2024
716d21c
build: remove polly from native builds
ishland Sep 19, 2024
8d038ad
Merge branch 'feature/poi-unloading-v0' into ver/1.21.1
ishland Sep 21, 2024
4e1e671
fix: properly disable nativeaccel on unsupported platforms
ishland Sep 21, 2024
ea693df
perf: actually recycle double[] from BinaryOperation
ishland Sep 22, 2024
8fcfbc6
perf: shrink method size of aquiferExtracted$refreshDistPosIdx
ishland Sep 23, 2024
584e85f
Merge branch 'ver/1.21.1' into feature/dfc-v0
ishland Sep 28, 2024
fccdc89
Fix newer versions of MixinSquared breaking older versions (#360)
Bawnorton Oct 1, 2024
8c9f71d
fix: crashing with terralith
ishland Oct 1, 2024
33f5fed
new: SplineAstNode
ishland Oct 1, 2024
3815533
fix: special case splines with only 1 value
ishland Oct 2, 2024
fb760d2
new: hashCode and equals for spline mixin
ishland Oct 2, 2024
5869109
perf: attempt to slightly reduce the size of spline node
ishland Oct 2, 2024
c9ec64b
change: reuse spline methods more
ishland Oct 2, 2024
ce83c15
perf: spline functions are pure
ishland Oct 2, 2024
9284260
fix: compilation cache
ishland Oct 2, 2024
58168f3
revert: "perf: attempt to slightly reduce the size of spline node"
ishland Oct 2, 2024
158e9a8
chore: add timings to compilation
ishland Oct 2, 2024
321f8a5
perf: more micro optimizations
ishland Oct 2, 2024
14cfd95
perf: merge spline calls for same values
ishland Oct 2, 2024
173dc03
perf: inline const splines
ishland Oct 2, 2024
c4144de
perf: revert to packed positions and branch prediction magic
ishland Oct 3, 2024
d14aaa4
perf: micro optimization for StructureWeightSampler#getMagnitudeWeight
ishland Oct 4, 2024
4522dd5
perf: micro optimization for interpolation iteration
ishland Oct 4, 2024
e0a8b87
fix: equality checks
ishland Oct 4, 2024
90c916f
fix: equality checks for CacheLikeNode
ishland Oct 4, 2024
a08ed12
perf: density functions are pure
ishland Oct 4, 2024
4e0732f
perf: optimize NewChunkHolderVanillaInterface#getSavingFuture
ishland Oct 4, 2024
d66945f
fix: error delivery of chunk io
ishland Oct 4, 2024
01afb60
change: compress data in one call
ishland Oct 4, 2024
b53984f
fix: do not save pointless poi chunks to disk
ishland Oct 4, 2024
3eefeff
Revert "change: compress data in one call"
ishland Oct 4, 2024
2dd72b1
Merge branch 'ver/1.21.1' into feature/dfc-v0
ishland Oct 4, 2024
150b8c6
change: delay CacheLike application
ishland Oct 5, 2024
032f52c
fix: broken cache merging
ishland Oct 6, 2024
8a0c5c8
fix: properly recover from emergency state
ishland Oct 7, 2024
0b7231d
perf: reduce allocation in AquiferSamplerImpl
ishland Oct 7, 2024
adca9be
Removed unneeded disabling of world.player_chunk_tick
Oct 7, 2024
8e26af8
fix: blending hopefully
ishland Oct 8, 2024
e77ca4f
fix: allow building natives without mingw
ishland Oct 8, 2024
43dec92
Merge branch 'ver/1.21.1' of github.com:SeaSide53/C2ME-fabric into ve…
ishland Oct 8, 2024
7472914
Merge branch 'ver/1.21.1' into feature/dfc-v0
ishland Oct 8, 2024
305288c
change: disable dfc by default
ishland Oct 8, 2024
a832bbe
change: enable dfc for testing
ishland Oct 8, 2024
8fdcae8
change: change the compiler export directory
ishland Oct 15, 2024
83cc6bb
fix: the most ubuntu problem ever to have on GHA
ishland Oct 12, 2024
90262cc
Merge branch 'ver/1.21.1' into feature/dfc-v0
ishland Oct 15, 2024
9bf0035
new: uncap render distance in VulkanMod
ishland Oct 15, 2024
e03ee7b
new: introduce density function compiler targetting jvm bytecode (#361)
ishland Oct 15, 2024
df01d50
chore: enable conformVisibility in mixins
ishland Oct 19, 2024
404e068
refactor: use mixin to remap threading fixes rather than hardcoded in…
ishland Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 17 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,30 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
java-version: 22
java-package: jdk

- uses: actions/cache@v2

- name: Install LLVM
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.8"

- name: Install required dependencies
run: sudo apt update && sudo apt install libtinfo5

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand All @@ -37,15 +46,15 @@ jobs:

- name: upload to modrinth and curseforge
run: ./gradlew modrinth curseforge
if: github.ref == 'refs/heads/ver/1.20.1'
if: github.ref == 'refs/heads/ver/1.21.1'
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_UPLOAD_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
GITHUB_EVENT_RAW_PATH: ${{ github.event_path }}
continue-on-error: true

- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: c2me-artifact
path: 'build/libs/*.jar'
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,35 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
testTask: [runTestC2MEServer]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
java-version: 22
java-package: jdk

- uses: actions/cache@v2

- name: Install LLVM
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.8"

- name: Install required dependencies
run: sudo apt update && sudo apt install libtinfo5

- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "FlowSched"]
path = FlowSched
url = https://github.com/RelativityMC/FlowSched.git
1 change: 1 addition & 0 deletions FlowSched
Submodule FlowSched added at ac9b23
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipeline {
}
stage('Build') {
tools {
jdk "OpenJDK 17"
jdk "OpenJDK 21"
}
steps {
withMaven(
Expand All @@ -19,6 +19,7 @@ pipeline {
) {
sh 'git fetch --tags'
sh 'git reset --hard'
sh 'git submodule update --init --recursive --force'
sh './gradlew clean build'
}
}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021-2023 ishland
Copyright (c) 2021-2024 ishland

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 10 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Github-CI](https://github.com/RelativityMC/C2ME-fabric/workflows/C2ME%20Build%20Script/badge.svg)](https://github.com/RelativityMC/C2ME-fabric/actions?query=workflow%3ACI)
[![Build Status](https://ci.codemc.io/job/RelativityMC/job/C2ME-fabric/job/ver%252F1.18/badge/icon)](https://ci.codemc.io/job/RelativityMC/job/C2ME-fabric/job/ver%252F1.18/)
[![Discord](https://img.shields.io/discord/756715786747248641?logo=discord&logoColor=white)](https://discord.io/ishlandbukkit)
[![Discord](https://img.shields.io/discord/756715786747248641?logo=discord&logoColor=white)](https://discord.gg/Kdy8NM5HW4)
<h3>A Fabric mod designed to improve the chunk performance of Minecraft.</h3>
</div>

Expand All @@ -19,33 +19,25 @@ Concurrent chunk management engine, it's about making the game better threaded a
Although it is usable in most cases and tested during build time, it doesn't mean that it is fully stable for a production server.
So backup your worlds and practice good game modding skills.

## Branch development status
| Branch | Status |
|-------------------|--------------------------------------|
| fabric/ver/1.20.1 | Active, Mainline |
| fabric/ver/1.19.4 | Bugfixes only |
| fabric/ver/1.18 | Bugfixes only |


## Downloads
You can find semi-stable releases here: https://github.com/RelativityMC/C2ME-fabric/releases

### Development builds
**Note: Development builds may modify the config files in a way unreadable by previous versions. You may encounter crashes or config reset when rolling back to previous versions. Please always backup your config.**
Modrinth: https://modrinth.com/mod/c2me-fabric
CurseForge: https://www.curseforge.com/minecraft/mc-mods/c2me-fabric

You can find development builds here: https://ci.codemc.io/job/RelativityMC/job/C2ME-fabric
Note that these builds may contain more bugfixes and performance improvements but are less tested.
If you have encountered any problems in release builds, give development builds a try before reporting.
## Support status for Minecraft versions
Only the latest Minecraft release and the latest Minecraft snapshot are fully supported.
Older Minecraft releases are in long-term support and will receive critical bug fixes.
Older Minecraft snapshots are not supported.

## Support
Our issue tracker: [link](https://github.com/RelativityMC/C2ME-fabric/issues)
Our discord server: [link](https://discord.io/ishlandbukkit)
Our discord server: [link](https://discord.gg/Kdy8NM5HW4)

## Building and setting up
JDK 17+ is required to build and use C2ME
JDK 22+, Clang 18+ and MinGW are required to build C2ME
Run the following commands in the root directory:

```shell
git submodule update --init --recursive
./gradlew clean build
```

Expand Down
94 changes: 62 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
id 'java-library'
id 'fabric-loom' version '1.2-SNAPSHOT' apply false
id 'io.github.juuxel.loom-quiltflower' version '1.+' apply false
id "me.champeau.jmh" version "0.7.1"
id 'fabric-loom' version '1.7-SNAPSHOT' apply false
id "me.champeau.jmh" version "0.7.2"
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gradleup.shadow' version '8.3.0' apply false
id 'io.github.tomtzook.gradle-cmake' version '1.2.2' apply false
}

@SuppressWarnings('unused')
Expand All @@ -20,11 +21,15 @@ configure(allprojects) {
apply plugin: 'java'
apply plugin: 'java-library'

it.archivesBaseName = "${it.name}-mc${project.minecraft_version}"
base {
archivesName = "${project.name}-mc${project.minecraft_version}"
}
it.group = project.maven_group
it.sourceCompatibility = JavaVersion.VERSION_17
it.targetCompatibility = JavaVersion.VERSION_17
it.version = project.mod_version + "." + getVersionSuffix()
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

afterEvaluate {
if (it.plugins.hasPlugin("fabric-loom")) {
Expand All @@ -35,31 +40,49 @@ configure(allprojects) {
}
}

archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}"
base {
archivesName = "${project.archives_base_name}-mc${project.minecraft_version}"
}

clean.dependsOn gradle.includedBuild('FlowSched').task(':clean')

allprojects {
repositories {
maven { url 'https://jitpack.io' }
maven {
url "https://maven.bawnorton.com/releases"
content {
includeGroup "com.bawnorton.mixinsquared"
}
}
}
}

configure (allprojects - project(":tests")) {
if (project != project(":") && project.parent != project(":")) return

apply plugin: 'fabric-loom'
apply plugin: 'io.github.juuxel.loom-quiltflower'
apply plugin: 'maven-publish'

repositories {
maven { url 'https://jitpack.io' }
}

dependencies {
//to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

[
"fabric-networking-api-v1",
"fabric-lifecycle-events-v1",
].forEach {
modCompileOnly(fabricApi.module(it, "${project.fabric_version}"))
}
}

loom {
def awFile = file("src/main/resources/${project.name}.accesswidener")
if (awFile.isFile()) {
accessWidenerPath = awFile
}
def file = project(":c2me-base").file("src/main/resources/c2me-base.accesswidener")
accessWidenerPath = file
enableTransitiveAccessWideners = false
// logger.lifecycle(String.format("%s: Using access widener at %s", project, file.getAbsolutePath()))
runs {
server {
ideConfigGenerated project.rootProject == project
Expand All @@ -71,20 +94,20 @@ configure (allprojects - project(":tests")) {
}

processResources {
inputs.property "version", project.version
inputs.property "version", project.version + "+" + project.minecraft_version

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": project.version + "+" + project.minecraft_version
}
}

jar {
from rootProject.file("LICENSE")
}

// java {
// withSourcesJar()
// }
java {
withSourcesJar()
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
Expand Down Expand Up @@ -119,21 +142,19 @@ configure (allprojects - project(":tests")) {
dependencies {
implementation "com.ibm.async:asyncutil:${async_util_version}"
implementation "com.electronwill.night-config:toml:${night_config_version}"
implementation "org.threadly:threadly:${threadly_version}"
implementation "net.objecthunter:exp4j:${exp4j_version}"
implementation "com.github.LlamaLad7:MixinExtras:${mixinextras_version}"

annotationProcessor "com.github.LlamaLad7:MixinExtras:${mixinextras_version}"
implementation "org.jctools:jctools-core:${jctools_version}"
implementation annotationProcessor("com.github.bawnorton.mixinsquared:mixinsquared-fabric:${mixinsquared_version}")
api "com.ishland.flowsched:flowsched"
}
}

subprojects {
afterEvaluate {
afterEvaluate {
genSourcesWithFernFlower.enabled = false
genSourcesWithQuiltflower.enabled = false
genSourcesWithVineflower.enabled = false
genSourcesWithCfr.enabled = false
unpickJar.enabled = false
downloadAssets.enabled = false
}
}
Expand All @@ -150,9 +171,12 @@ dependencies {
include implementation("com.ibm.async:asyncutil:${async_util_version}")
include implementation("com.electronwill.night-config:toml:${night_config_version}")
include implementation("com.electronwill.night-config:core:${night_config_version}")
include implementation("org.threadly:threadly:${threadly_version}")
include implementation("net.objecthunter:exp4j:${exp4j_version}")
include implementation("com.github.LlamaLad7:MixinExtras:${mixinextras_version}")
include implementation("org.jctools:jctools-core:${jctools_version}")
include implementation(annotationProcessor("com.github.bawnorton.mixinsquared:mixinsquared-fabric:${mixinsquared_version}"))
include "io.reactivex.rxjava3:rxjava:${rxjava_version}"
include "org.reactivestreams:reactive-streams:${reactive_streams_version}"
// include implementation("com.ishland.flowsched:flowsched")

// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
Expand Down Expand Up @@ -184,7 +208,7 @@ if (System.getenv("CURSEFORGE_TOKEN")) {

addGameVersion project.minecraft_version
addGameVersion "Fabric"
addGameVersion "Java 17"
addGameVersion "Java 21"

mainArtifact(remapJar) {
displayName = project.version + " devbuild for " + project.minecraft_version
Expand All @@ -203,8 +227,9 @@ dependencies {
(subprojects - project(":tests")).forEach {
if (it.parent != project(":")) return

api project(path: ":${it.name}", configuration: "namedElements")
include project("${it.name}:")
def projectName = it.name
api project(path: ":${projectName}", configuration: "namedElements")
include project("${projectName}:")
}
}
}
Expand Down Expand Up @@ -232,6 +257,11 @@ String getVersionSuffix() {
return split[split.length - 2] + suffix
}

compileJmhJava {
sourceCompatibility = JavaVersion.VERSION_22
targetCompatibility = JavaVersion.VERSION_22
}

jmh {
// includes = ['some regular expression'] // include pattern (regular expression) for benchmarks to be executed
// excludes = ['some regular expression'] // exclude pattern (regular expression) for benchmarks to be executed
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation 'org.jetbrains:annotations:22.0.0'

// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.google.code.gson:gson:2.10.1'
}

gradlePlugin {
Expand Down
Loading