Skip to content
This repository was archived by the owner on Jun 14, 2026. It is now read-only.

Commit 5aca0c1

Browse files
author
mtctx
committed
feat(0.0.1): Removed qodana, added Game Loop (incomplete) and added custom Dispatchers (Game, Window and Input, Mods, Logger), added Game Modules (for Graphics, Input, ...)
1 parent 2b26ce9 commit 5aca0c1

27 files changed

Lines changed: 293 additions & 202 deletions

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: "🐛 Bug Report"
33
about: Report a bug to help us improve Foresst.
44
title: "[BUG] "
5-
labels: ["bug"]
5+
labels: [ "bug" ]
66
assignees: ""
77
---
88

@@ -11,6 +11,7 @@ A clear and concise description of what the bug is. For example, "When I do X, t
1111

1212
**Steps to Reproduce**
1313
Steps to reproduce the behavior:
14+
1415
1. Go to '...'
1516
2. Click on '....'
1617
3. Scroll down to '....'
@@ -27,6 +28,7 @@ If applicable, add screenshots or a video to help explain your problem.
2728

2829
**Environment**
2930
Please provide the following information:
31+
3032
- **Operating System:** [e.g., Windows 11, macOS, Linux]
3133
- **Java Version:** [e.g., JDK 21]
3234
- **Foresst Version:** [e.g., `v1.0.0-alpha`, commit hash `abcde123`]

.github/ISSUE_TEMPLATE/docs_improvement.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
name: "✍️ Documentation Improvement"
33
about: Suggest an improvement to the project's documentation.
44
title: "[DOCS] "
5-
labels: ["documentation"]
5+
labels: [ "documentation" ]
66
assignees: ""
77
---
88

99
**What part of the documentation needs improvement?**
1010
Provide a link to the specific page or file (e.g., `CONTRIBUTING.md`).
1111

1212
**Describe the problem**
13-
A clear and concise description of what is wrong or unclear with the current documentation. (e.g., "There's a typo in X section" or "The instructions for Y are confusing.")
13+
A clear and concise description of what is wrong or unclear with the current documentation. (e.g., "There's a typo in X
14+
section" or "The instructions for Y are confusing.")
1415

1516
**Describe the solution you'd like**
1617
A clear and concise description of what the improved documentation should look like.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
name: "❓ Question / Help"
33
about: Ask a question about using Foresst or get help with a problem that isn't a bug.
44
title: "[QUESTION] "
5-
labels: ["question"]
5+
labels: [ "question" ]
66
assignees: ""
77
---
88

99
**Is your question about a bug or a new feature?**
10+
1011
- If it's a bug, please use the **Bug Report** template.
1112
- If it's a new feature, please use the **Feature Request** template.
1213

1314
**What is your question about?**
1415
Please describe what you are trying to do, what you have tried so far, and what you are stuck on.
1516

1617
**Additional context**
17-
Add any other information that might be helpful. For example, your operating system, Java version, or any relevant configuration files.
18+
Add any other information that might be helpful. For example, your operating system, Java version, or any relevant
19+
configuration files.

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ assignees: ''
77
---
88

99
## Description
10+
1011
Please include a summary of the change and which issue is addressed.
1112
A detailed description of the changes helps reviewers understand the context and purpose of the PR.
1213

1314
**This PR resolves / addresses the following issue(s):**
15+
1416
- Closes # (replace with issue number)
1517

1618
## Type of change
19+
1720
Please delete options that are not relevant.
1821

1922
- [ ] Bug fix (non-breaking change which fixes an issue)
@@ -24,6 +27,7 @@ Please delete options that are not relevant.
2427
- [ ] Build process update (e.g., changes to `gradle.kts` files)
2528

2629
## How Has This Been Tested?
30+
2731
Please describe the tests that you ran to verify your changes.
2832
Provide instructions so we can reproduce the testing if needed.
2933
Also list any relevant details for your test configuration.
@@ -33,6 +37,7 @@ Also list any relevant details for your test configuration.
3337
- [ ] Added integration tests
3438

3539
## Checklist
40+
3641
Please ensure you have completed all of the following items before submitting your PR.
3742

3843
- [ ] I have read the **[CONTRIBUTING.md](CONTRIBUTING.md)** and **[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)** files.

CODE_OF_CONDUCT.md

Lines changed: 84 additions & 40 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
Hey there! 👋
44

5-
We’re super excited that you want to contribute to **Foresst**. It’s an open-source, high-performance Minecraft implementation, and we couldn’t do it without awesome community members like you. By contributing, you’re agreeing to follow our **[Code of Conduct](https://www.google.com/search?q=CODE_OF_CONDUCT.md)**—basically, just be kind, respectful, and collaborative.
5+
We’re super excited that you want to contribute to **Foresst**. It’s an open-source, high-performance Minecraft
6+
implementation, and we couldn’t do it without awesome community members like you. By contributing, you’re agreeing to
7+
follow our **[Code of Conduct](https://www.google.com/search?q=CODE_OF_CONDUCT.md)**—basically, just be kind,
8+
respectful, and collaborative.
69

710
## How You Can Help
811

@@ -34,7 +37,8 @@ Here’s how to get your local setup ready:
3437
```
3538

3639
3. **Open the project**
37-
Open the `Foresst` folder in your favorite IDE (IntelliJ IDEA or VS Code with Kotlin plugins work great). Gradle should automatically detect the modules for you.
40+
Open the `Foresst` folder in your favorite IDE (IntelliJ IDEA or VS Code with Kotlin plugins work great). Gradle
41+
should automatically detect the modules for you.
3842

3943
4. **Run the project**
4044

@@ -48,7 +52,8 @@ Here’s how to get your local setup ready:
4852

4953
## Reporting a Bug
5054

51-
The more details you give, the faster we can fix it. When opening an issue on [GitHub Issues](https://www.google.com/search?q=https://github.com/mtctx/Foresst/issues), try to include:
55+
The more details you give, the faster we can fix it. When opening an issue
56+
on [GitHub Issues](https://www.google.com/search?q=https://github.com/mtctx/Foresst/issues), try to include:
5257

5358
* A **short, clear title** describing the problem
5459
* **Steps to reproduce** the issue
@@ -89,12 +94,14 @@ We love contributions! Before you start, make sure you’re familiar with our co
8994

9095
### Code Style
9196

92-
We follow standard Kotlin conventions. Make your code clean, readable, and consistent. You can use your IDE’s formatter or a linter like **Qodana** (configured in `qodana.yml`).
97+
We follow standard Kotlin conventions. Make your code clean, readable, and consistent. You can use your IDE’s formatter
98+
or a linter like **Qodana** (configured in `qodana.yml`).
9399

94100
---
95101

96102
## Need Help?
97103

98-
Got questions, stuck on setup, or want to brainstorm an idea? Then just create a **[Discussion](https://github.com/mtctx/Foresst/discussions)**.
104+
Got questions, stuck on setup, or want to brainstorm an idea? Then just create a *
105+
*[Discussion](https://github.com/mtctx/Foresst/discussions)**.
99106

100107
Thanks for helping make Foresst even better! We really appreciate it. 💜

SECURITY.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
# 🔒 Foresst Security Policy
22

3-
Hey there! Thanks so much for checking out our security policy. It means a lot that you're taking the time to understand how we keep Foresst safe. We truly believe that a secure project is a community effort, and your help is a huge part of that.
3+
Hey there! Thanks so much for checking out our security policy. It means a lot that you're taking the time to understand
4+
how we keep Foresst safe. We truly believe that a secure project is a community effort, and your help is a huge part of
5+
that.
46

57
---
68

79
### **🛡️ What We Support**
810

9-
We know it's important for you to feel confident that the version of Foresst you're using is protected. To keep things simple and efficient, we focus all our energy on making sure our **very latest version** is as secure as possible.
11+
We know it's important for you to feel confident that the version of Foresst you're using is protected. To keep things
12+
simple and efficient, we focus all our energy on making sure our **very latest version** is as secure as possible.
1013

11-
Since we're a new project and still growing fast, we aren't able to maintain older versions. That means, to get the latest security updates, you should always be on the most recent release.
14+
Since we're a new project and still growing fast, we aren't able to maintain older versions. That means, to get the
15+
latest security updates, you should always be on the most recent release.
1216

1317
**Right now, we are only providing security updates for version `0.0.1`.**
1418

1519
---
1620

1721
### **🚨 Think You Found a Vulnerability?**
1822

19-
If you think you've found a security flaw, please know that we are incredibly grateful for your help! Finding and responsibly reporting these issues is the best way to keep our community safe.
23+
If you think you've found a security flaw, please know that we are incredibly grateful for your help! Finding and
24+
responsibly reporting these issues is the best way to keep our community safe.
2025

21-
**Please, please, please do not create a public issue on GitHub.** Sharing a vulnerability publicly could put everyone at risk, and we want to prevent that at all costs.
26+
**Please, please, please do not create a public issue on GitHub.** Sharing a vulnerability publicly could put everyone
27+
at risk, and we want to prevent that at all costs.
2228

2329
#### **How to Report It**
2430

@@ -30,7 +36,8 @@ We promise to get back to you within **48 hours** to confirm we've received your
3036

3137
#### **What to Include**
3238

33-
To help us understand and fix the issue as quickly as possible, please include as many details as you can. A good report answers these questions:
39+
To help us understand and fix the issue as quickly as possible, please include as many details as you can. A good report
40+
answers these questions:
3441

3542
* **What's the problem?** Give us a clear and simple description of the vulnerability.
3643
* **How can we see it happen?** List the steps we need to take to reproduce it.
@@ -42,8 +49,12 @@ To help us understand and fix the issue as quickly as possible, please include a
4249

4350
Once you report a vulnerability, here's what we'll do:
4451

45-
1. **Acknowledge:** We'll email you back to confirm we got your report.
46-
2. **Investigate:** We'll dive in to understand the issue and start working on a solution. We'll keep you in the loop on our progress.
47-
3. **Disclose:** Once we've released a fix, we'll publish a public security advisory so the community knows what happened and how to stay safe. We'll also give you a big thank you for your help, unless you'd rather remain anonymous.
52+
1. **Acknowledge:** We'll email you back to confirm we got your report.
53+
2. **Investigate:** We'll dive in to understand the issue and start working on a solution. We'll keep you in the loop on
54+
our progress.
55+
3. **Disclose:** Once we've released a fix, we'll publish a public security advisory so the community knows what
56+
happened and how to stay safe. We'll also give you a big thank you for your help, unless you'd rather remain
57+
anonymous.
4858

49-
Thank you again for being a vital part of our community and helping us build a more secure Foresst for everyone. We couldn't do it without you. ❤️
59+
Thank you again for being a vital part of our community and helping us build a more secure Foresst for everyone. We
60+
couldn't do it without you. ❤️
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Foresst: Conversion.kt
3+
* Copyright (C) 2025 mtctx, kvxd
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Affero General Public License as published
7+
* by the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Affero General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Affero General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
package dev.mtctx.foresst.resource
20+
21+
import java.io.InputStream
22+
import java.nio.charset.Charset
23+
24+
fun Resource.asText(charset: Charset = Charsets.UTF_8): String = file.readText(charset)
25+
fun Resource.asByteArray(): ByteArray = file.readBytes()
26+
fun Resource.asInputStream(): InputStream = file.inputStream()
27+
fun Resource.asReader(charset: Charset = Charsets.UTF_8) = file.reader(charset)
28+
fun Resource.asLines(charset: Charset = Charsets.UTF_8): Sequence<String> =
29+
file.useLines(charset) { it.toList() }.asSequence()

core/src/main/kotlin/dev/mtctx/foresst/resource/InputStreamFilePairs.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
22
* Foresst: InputStreamFilePairs.kt
3-
* Copyright (C) 2025 mtctx
3+
* Copyright (C) 2025 mtctx, kvxd
44
*
55
* This program is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
6+
* it under the terms of the GNU Affero General Public License as published
7+
* by the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
99
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
13+
* GNU Affero General Public License for more details.
1414
*
15-
* You should have received a copy of the GNU General Public License
15+
* You should have received a copy of the GNU Affero General Public License
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

core/src/main/kotlin/dev/mtctx/foresst/resource/Resource.kt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
/*
22
* Foresst: Resource.kt
3-
* Copyright (C) 2025 mtctx
3+
* Copyright (C) 2025 mtctx, kvxd
44
*
55
* This program is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
6+
* it under the terms of the GNU Affero General Public License as published
7+
* by the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
99
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
13+
* GNU Affero General Public License for more details.
1414
*
15-
* You should have received a copy of the GNU General Public License
15+
* You should have received a copy of the GNU Affero General Public License
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

1919
package dev.mtctx.foresst.resource
2020

2121
import java.io.File
2222
import java.io.InputStream
23-
import java.nio.charset.Charset
2423
import java.nio.file.Files
2524
import java.nio.file.Path
2625
import java.nio.file.StandardCopyOption
2726

28-
class Resource(resourcePath: String) {
29-
30-
private val inputStream: InputStream =
31-
ResourceLoader.getResourceAsStream(resourcePath)
32-
?: throw IllegalStateException("Resource $resourcePath not found.")
33-
27+
class Resource(
28+
resourcePath: String,
29+
private val inputStream: InputStream = ResourceLoader.getResourceAsStream(resourcePath)
30+
?: throw IllegalStateException("Resource $resourcePath not found."),
31+
) {
3432
private val tempFile: Path by lazy {
3533
val tempFile = Files.createTempFile("foresst-", ".tmp")
3634
tempFile.toFile().deleteOnExit()

0 commit comments

Comments
 (0)