Skip to content

Commit 21737cc

Browse files
committed
Initial commit: ChatCalc NeoForge Port v1.0.0
0 parents  commit 21737cc

35 files changed

Lines changed: 3094 additions & 0 deletions

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable autocrlf on generated files, they always generate with LF
2+
# Add any extra files or paths here to make git stop saying they
3+
# are changed when only line endings change.
4+
src/generated/**/.cache/cache text eol=lf
5+
src/generated/**/*.json text eol=lf

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release Build
2+
3+
on:
4+
release:
5+
types: [created, published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Tag name for the release'
10+
required: true
11+
type: string
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
fetch-tags: true
25+
26+
- name: Setup JDK 21
27+
uses: actions/setup-java@v4
28+
with:
29+
java-version: '21'
30+
distribution: 'temurin'
31+
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v4
34+
35+
- name: Make Gradle wrapper executable
36+
run: chmod +x ./gradlew
37+
38+
- name: Build with Gradle
39+
run: ./gradlew build --no-daemon
40+
41+
- name: Find JAR file
42+
id: find-jar
43+
run: |
44+
JAR_FILE=$(find build/libs -name "*.jar" ! -name "*-sources.jar" ! -name "*-javadoc.jar" -type f | head -n 1)
45+
echo "jar_file=$JAR_FILE" >> $GITHUB_OUTPUT
46+
echo "jar_name=$(basename $JAR_FILE)" >> $GITHUB_OUTPUT
47+
echo "Found JAR: $JAR_FILE"
48+
49+
- name: Upload Release Asset
50+
if: github.event_name == 'release'
51+
uses: actions/upload-release-asset@v1
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
upload_url: ${{ github.event.release.upload_url }}
56+
asset_path: ${{ steps.find-jar.outputs.jar_file }}
57+
asset_name: ${{ steps.find-jar.outputs.jar_name }}
58+
asset_content_type: application/java-archive
59+
60+
- name: Upload Artifact (Manual Trigger)
61+
if: github.event_name == 'workflow_dispatch'
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: chatcalc-${{ inputs.tag }}
65+
path: ${{ steps.find-jar.outputs.jar_file }}
66+
retention-days: 30

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# eclipse
2+
bin
3+
*.launch
4+
.settings
5+
.metadata
6+
.classpath
7+
.project
8+
9+
# idea
10+
out
11+
*.ipr
12+
*.iws
13+
*.iml
14+
.idea
15+
16+
# gradle
17+
build
18+
.gradle
19+
20+
# other
21+
eclipse
22+
run
23+
runs
24+
run-data
25+
26+
repo

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [1.0.0] - 2025-11-10
8+
9+
### Added - Initial NeoForge Port
10+
- Complete port of ChatCalc from Fabric 1.20.2 to NeoForge 1.21.10
11+
- All mathematical calculation features from original mod
12+
- In-chat calculations with TAB key
13+
- Live preview tooltip above chat input
14+
- Custom function and constant definitions
15+
- Click-to-copy functionality for functions and constants
16+
- Hover tooltips on function/constant listings
17+
- Configuration file support (chatcal.json)
18+
- All mathematical operations: basic arithmetic, trigonometry, logarithms, etc.
19+
- Summation and product operators
20+
- Test cases command for verification
21+
22+
### Changed - API Adaptations
23+
- Updated from Fabric API to NeoForge API
24+
- Changed package structure from `ca.rttv.chatcalc` to `de.smallinger.chatcal`
25+
- Updated Mixin injections for Minecraft 1.21.10
26+
- Adapted key event handling from primitive parameters to `KeyEvent` objects
27+
- Changed chat message API from `sendSystemMessage` to `displayClientMessage`
28+
- Updated ClickEvent and HoverEvent to use new interface-based implementations
29+
- Changed tooltip rendering from `drawTooltip` to `setTooltipForNextFrame`
30+
- Updated EditBox rendering from `renderButton` to `renderWidget`
31+
32+
### Technical Details
33+
- **Minecraft Version**: 1.21.10
34+
- **NeoForge Version**: 21.10.49-beta
35+
- **Java Version**: 21
36+
- **Gradle Version**: 9.2.0
37+
- **Mappings**: Parchment 2025.10.12
38+
39+
### Documentation
40+
- Added comprehensive README.md with usage instructions
41+
- Created DEVELOPMENT.md with porting notes and API changes
42+
- Added NOTICE.md with copyright and attribution information
43+
- Added MPL 2.0 license headers to all source files
44+
- Added this CHANGELOG.md
45+
46+
### Credits
47+
- Original ChatCalc Mod by RTTV-TB-III
48+
- NeoForge Port by Smallinger
49+
50+
## [Unreleased]
51+
52+
### Planned Features
53+
- Configuration GUI
54+
- Additional mathematical functions
55+
- Localization support for multiple languages
56+
- Performance optimizations for complex expressions
57+
58+
---
59+
60+
## Version History
61+
62+
### Fabric Original (Reference)
63+
- **Version**: 1.20.2
64+
- **Author**: RTTV-TB-III
65+
- **Repository**: https://github.com/RTTV-TB-III/ChatCalc
66+
67+
### NeoForge Port
68+
- **First Release**: 1.0.0 (2025-11-10)
69+
- **Platform**: NeoForge
70+
- **Minecraft**: 1.21.10

0 commit comments

Comments
 (0)