Compare commits

..

18 commits

Author SHA1 Message Date
e5437f6efd
1.21.4 fix
All checks were successful
Java CI / Build (push) Successful in 44s
2025-04-05 13:32:00 +02:00
9ba39facc9
Fix CI
All checks were successful
Java CI / Build (push) Successful in 56s
2025-03-27 20:26:58 +01:00
3141068249
Fix CI
Some checks failed
Java CI / Build (push) Failing after 46s
2025-03-27 20:25:07 +01:00
d9e3c4b03d
Fix CI 2025-03-27 20:24:57 +01:00
e867b2ff60
Fix CI
Some checks failed
Java CI / Build (push) Failing after 15s
2025-03-27 20:21:59 +01:00
ce49f14598
Cleanup
Some checks failed
Java CI / Build (push) Failing after 11s
2025-03-27 20:21:25 +01:00
6ebaa4f3bf
Fixed typo
Some checks failed
/ build (push) Failing after 39s
2025-03-27 20:19:29 +01:00
8e5a92b30e
Bump
Some checks failed
/ build (push) Has been cancelled
2025-03-27 20:18:48 +01:00
1a2d8eafc5
Bump
Some checks failed
/ build (push) Failing after 7s
2025-03-27 20:17:00 +01:00
8de44fccf7
CI run
Some checks failed
/ build (push) Has been cancelled
2025-03-27 20:14:55 +01:00
c26b514e6c
CI Setup 2025-03-27 20:14:15 +01:00
9b4d7363dc
Merge branch 'master' of https://git.sbdevelopment.tech/SBDevelopment/MapReflectionAPI into development
# Conflicts:
#	.github/dependabot.yml
2025-03-27 19:55:13 +01:00
ba5b1f5c6e
1.21.5 bump
Some checks failed
Java CI / Build (push) Has been cancelled
2025-03-27 19:47:53 +01:00
bb4ef78a3f
Reverted config change 2024-11-07 19:48:09 +01:00
7a142d1bb3
Reverted config change 2024-11-07 19:47:41 +01:00
b95f5644c9
Updated dependabot config 2024-11-07 19:47:06 +01:00
922db5fead
Merge branch 'master' of github.com:SBDPlugins/MapReflectionAPI into development 2024-11-07 19:46:15 +01:00
54caa2595a
Implemented changes for 1.21.2/3 (untested) 2024-11-07 19:42:50 +01:00
3 changed files with 31 additions and 4 deletions

View file

@ -0,0 +1,29 @@
name: Java CI
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: https://gitea.com/actions/checkout@v4
- name: Set up JDK 21
uses: https://gitea.com/actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Set up Maven
uses: https://gitea.com/actions/setup-maven@v5
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload build artifacts
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: MapReflectionAPI
path: target

View file

@ -1,2 +0,0 @@
jdk:
- openjdk11

View file

@ -168,7 +168,7 @@ public class MapWrapper extends AbstractMapWrapper {
String inventoryMenuName; String inventoryMenuName;
if (supports(21)) { if (supports(21)) {
//1.21.5 = bQ, 1.21 - 1.21.4 = cc //1.21.5 = bQ, 1.21 - 1.21.4 = cc
inventoryMenuName = supports(21, 4) ? "bQ" : "cc"; inventoryMenuName = supports(21, 5) ? "bQ" : "cc";
} else if (supports(20)) { } else if (supports(20)) {
//1.20.5 = cb, 1.20.2 - 1.20.4 = bR, 1.20(.1) = bQ //1.20.5 = cb, 1.20.2 - 1.20.4 = bR, 1.20(.1) = bQ
inventoryMenuName = supports(20, 4) ? "cb" : supports(20, 2) ? "bR" : "bQ"; inventoryMenuName = supports(20, 4) ? "cb" : supports(20, 2) ? "bR" : "bQ";
@ -293,7 +293,7 @@ public class MapWrapper extends AbstractMapWrapper {
//1.20.5 uses new NBT compound system //1.20.5 uses new NBT compound system
if (supports(20, 4)) { if (supports(20, 4)) {
Object mapIdComponent = ReflectionUtil.getDeclaredField(getNMSClass("core.component", "DataComponents"), supports(21, 4) ? "M" : supports(21, 2) ? "L" : "B"); //1.21.2+ uses L, otherwise B Object mapIdComponent = ReflectionUtil.getDeclaredField(getNMSClass("core.component", "DataComponents"), supports(21, 5) ? "M" : supports(21, 2) ? "L" : "B"); //1.21.2+ uses L, otherwise B
Object mapId1 = ReflectionUtil.callConstructor(getNMSClass("world.level.saveddata.maps", "MapId"), mapId); Object mapId1 = ReflectionUtil.callConstructor(getNMSClass("world.level.saveddata.maps", "MapId"), mapId);
// Use generic reflection because of generics // Use generic reflection because of generics