Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 1.0.2 (the latest 1.18 version) back to 1.16.5 #113

Open
wants to merge 67 commits into
base: 1.16
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3e94b4b
Merge branch '1.18' into port_18
KosmX Sep 10, 2022
0d5ca98
Merge pull request #19 from KosmX/port_18
KosmX Sep 10, 2022
59a8e5c
Move forge resource loading to client package
KosmX Sep 10, 2022
3dd7013
Merge pull request #22 from KosmX/dev
KosmX Sep 10, 2022
ba7bdf1
Merge branch '1.18' into 118_port
KosmX Sep 13, 2022
9a88341
Merge pull request #23 from KosmX/118_port
KosmX Sep 13, 2022
309f129
1.18 port
KosmX Sep 13, 2022
616acca
Merge branch '1.18' into port_1.18
KosmX Nov 16, 2022
a6b67b0
remove 1.19 testing dependencies
KosmX Nov 16, 2022
f215a9a
Merge pull request #28 from KosmX/port_1.18
KosmX Nov 16, 2022
58f9cb6
Merge pull request #32 from KosmX/dev
KosmX Nov 25, 2022
7a9e001
Merge pull request #36 from KosmX/dev
KosmX Nov 25, 2022
b2e33d0
internal refactor
KosmX Dec 6, 2022
fe2f8c2
Update issue templates
KosmX Dec 14, 2022
d31ed63
Update issue templates
KosmX Dec 14, 2022
3027bb9
change 1.19 to 1.19.2
KosmX Jan 20, 2023
2769dca
Now with clamp guards(tm) - fix neck twist bug in multiplayer
KosmX Jan 20, 2023
2ec13c1
Now with clamp guards(tm) - fix neck twist bug in multiplayer
KosmX Jan 20, 2023
22f192b
Update gradle.properties
KosmX Jan 21, 2023
3a3d7bb
Merge branch '1.18' into 18_back
KosmX Jan 21, 2023
d3b5da9
Merge pull request #41 from KosmX/18_back
KosmX Jan 21, 2023
de152fc
Set license in fabric.mod.json and forge mods.toml
KosmX Jan 21, 2023
bbdf075
Merge pull request #43 from KosmX/dev
KosmX Jan 21, 2023
719389d
Some proto first person animation stuff
KosmX Feb 24, 2023
7757ead
only maven upload
KosmX Feb 24, 2023
1b4688c
only maven upload attempt #2
KosmX Feb 24, 2023
da96486
only maven upload attempt #3
KosmX Feb 24, 2023
160f1b3
only maven upload attempt #4
KosmX Feb 24, 2023
7d20f81
only maven upload attempt #5
KosmX Feb 24, 2023
31f37d6
attempt to fix some small bugs
KosmX Feb 25, 2023
5e7bbc1
more testing
KosmX Feb 25, 2023
c54e81a
The tale of the missing return statement
KosmX Feb 25, 2023
1cec2f6
snapshot 3
KosmX Feb 25, 2023
fca5e41
Add adjustment modifier
Feb 25, 2023
a49b8be
left handed helper
KosmX Feb 25, 2023
b3967df
Merge pull request #48 from KosmX/first_person_animation
KosmX Feb 25, 2023
e49bb64
fix javadoc format
KosmX Feb 25, 2023
0fcfd3b
fix some small stuff
KosmX Feb 25, 2023
d1561b2
Merge pull request #50 from KosmX/feature/adjustment-modifier
KosmX Feb 25, 2023
70b141c
version
KosmX Feb 25, 2023
3bc3db6
set breaks better combat (api reimplementation)
KosmX Feb 25, 2023
df2ba86
Merge pull request #52 from KosmX/dev
KosmX Feb 26, 2023
bbd9b7f
Update gradle.properties
KosmX Feb 26, 2023
5667cfa
Merge pull request #54 from KosmX/port/1.18
KosmX Feb 26, 2023
bdf09a0
Update gradle.properties
KosmX Feb 26, 2023
99a59a8
Merge pull request #55 from KosmX/dev
KosmX Feb 26, 2023
cf9f56c
Use safe cast to avoid crashes.
KosmX Mar 1, 2023
5ad726c
Merge pull request #58 from KosmX/dev
KosmX Mar 1, 2023
2f766e7
fix stupid issue
KosmX Mar 2, 2023
4eff6d3
Update gradle.properties
KosmX Mar 2, 2023
1e551cb
Merge pull request #61 from KosmX/dev
KosmX Mar 2, 2023
e1c4a58
update buildscript
KosmX Mar 11, 2023
85cff9e
Tatar ModMenu Description Translation.
Amirhan-Taipovjan-Greatest-I Jul 24, 2023
1cba387
test and example of the use of coded animations
KosmX Aug 3, 2023
798edd6
Update gradle and loom
KosmX Dec 28, 2023
e436fbe
Replace keyframe finding algorithm with binary search, this should ma…
KosmX Dec 28, 2023
eaee4eb
use lombok if possible
KosmX Dec 28, 2023
fdee49c
Skip bendy-lib linear algebra if not necessary, this alone should spe…
KosmX Dec 28, 2023
c1f125b
Merge pull request #69 from Amirhan-Taipovjan-Greatest-I/patch-1
KosmX Dec 28, 2023
d9d4d96
Merge pull request #72 from KosmX/dev
KosmX Dec 28, 2023
12e098d
internal refactor
KosmX Dec 6, 2022
11dda4c
Update issue templates
KosmX Dec 14, 2022
d68ba26
Update issue templates
KosmX Dec 14, 2022
8b5adb3
Start fixing conflicts
Gcat101 Oct 12, 2024
e319210
Merge 1.16 and 1.18
Gcat101 Oct 12, 2024
f761ab5
Merge pull request #1 from Gcat101/1.18
Gcat101 Oct 12, 2024
16093a9
Backport 2.1.1 to 1.16.5
Gcat101 Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/api-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: API bug report
about: Issue about the API (not the buildscript)
title: "[API]"
labels: bug
assignees: KosmX

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Setup config (minecraft, modloader, libraries):**
- Minecraft version: [e.g. 1.19.3]
- Mod loader: [e.g. Fabric 0.14.11]
- PlayerAnimator Library version [e.g. 0.4.0+1.19.3]
- MC library version (e.g. Fabric API version)

**Other mods (If you use other mods, please specify! it might be an incompatibility):**

*Optional:*
** Used library methods, ideas (If you're a developer, what function is not working as expected)**
Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/buildscript-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Buildscript error
about: Something is wrong with buildscript
title: ''
labels: build
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Buildscript content or link to content (If you don't share your code, I cannot debug it):**
https://github.com/KosmX/fabricPlayerAnimatorExample/blob/1.19/build.gradle

**To Reproduce**
Steps to reproduce the behavior:
1. Run `gradle runClient`
2. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- OS: [e.g. Windows 11, Archlinux, Ubuntu 22.04]
- IDE [e.g. IntelliJ, Eclipse, vim+bash]
- Gradle version [e.g. 7.5.1]
- JDK version [e.g. 17.0.5 - Adoptium]
- gradle plugin [e.g. Fabric loom, ForgeGradle] (if I don't see it in your project)
- Minecraft, Loader: (Fabric 0.14.11+1.19.2)

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/library-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Library crash
about: User crash report
title: ''
labels: bug, library
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Crash report (please copy the whole crash report!)**
```
Minecraft 1.19.3
...
```

**Logs (if you have logs from that run, please share it):**
```
...
```
22 changes: 19 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ on:
workflow_dispatch:
inputs:
type:
description: 'alpha/beta/release'
description: 'release type'
required: false
default: 'alpha'
type: choice
options:
- alpha
- beta
- release
changelog:
description: 'changelog'
required: false
default: ''
upload:
required: true
type: choice
options:
- true
- false


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -37,8 +47,13 @@ jobs:
java-version: '17'

# Runs a single command using the runners shell
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Publish package
run: gradle publish --no-daemon
run: ./gradlew publish --no-daemon
env:
KOSMX_MAVEN_USER: ${{ secrets.MAVEN_USER }}
KOSMX_MAVEN_TOKEN: ${{ secrets.MAVEN_PASS }}
Expand All @@ -47,3 +62,4 @@ jobs:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
CHANGELOG: ${{github.event.inputs.changelog}}
RELEASE_TYPE: ${{github.event.inputs.type}}
UPLOAD_TO_PORTAL: ${{github.event.inputs.upload}}
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.0.+" apply false
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false

//Publishing
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id "com.modrinth.minotaur" version "2.4.3" apply false
id "com.modrinth.minotaur" version "2.8.7" apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}

architectury {
Expand Down Expand Up @@ -60,6 +61,7 @@ ext.ENV = System.getenv()
ext.cfType = ENV.RELEASE_TYPE ? ENV.RELEASE_TYPE : "alpha"
ext.changes = ENV.CHANGELOG ? ENV.CHANGELOG.replaceAll("\\\\n", "\n") : ""
ext.ENV = System.getenv()
boolean upload = ENV.UPLOAD_TO_PORTAL ? ENV.UPLOAD_TO_PORTAL == "true" : false

ext.keysExists = ENV.KOSMX_MAVEN_USER != null || project.getGradle().getStartParameter().isDryRun()

Expand All @@ -81,6 +83,8 @@ if(keysExists) {
}

publish {
finalizedBy(':minecraft:publishMod')
if (upload) {
finalizedBy(':minecraft:publishMod')
}
}
}
8 changes: 4 additions & 4 deletions coreLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'


compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'

testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.26'
compileOnly 'org.jetbrains:annotations:23.0.0'
}

Expand Down
5 changes: 3 additions & 2 deletions coreLib/src/main/java/dev/kosmx/playerAnim/api/AnimUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public static AnimationStack getPlayerAnimLayer(Object player) throws IllegalArg
}

/**
* Disable first person animation see-through.
* Has no effect if using mod like FirstPersonModel
* Unused, use proper first person library instead
* will be removed after next release (1.1)
*/
@Deprecated
public static boolean disableFirstPersonAnim = true;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package dev.kosmx.playerAnim.api.firstPerson;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class FirstPersonConfiguration {
boolean showRightArm = false;
boolean showLeftArm = false;
boolean showRightItem = true;
boolean showLeftItem = true;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package dev.kosmx.playerAnim.api.firstPerson;

import lombok.Getter;
import org.jetbrains.annotations.ApiStatus;

public enum FirstPersonMode {

/**
* The animation does not decide first person mode, this way, the animation will be transparent in first person mode.
*/
NONE(false),
/**
* Use the vanilla renderer, most of the time broken, if you use this, please check your animation
*/
VANILLA(true),

/**
* Use the 3rd person player model (only arms/items) to render accurate first-person perspective
*/
THIRD_PERSON_MODEL(true),

/**
* First person animation is DISABLED, vanilla idle will be active.
*/
DISABLED(false),

;
@Getter
private final boolean enabled;


FirstPersonMode(boolean enabled) {
this.enabled = enabled;
}



private static final ThreadLocal<Boolean> firstPersonPass = ThreadLocal.withInitial(() -> false);


/**
* @return is the current render pass a first person pass
*/
public static boolean isFirstPersonPass() {
return firstPersonPass.get();
}

@ApiStatus.Internal
public static void setFirstPersonPass(boolean newValue) {
firstPersonPass.set(newValue);
}
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
package dev.kosmx.playerAnim.api.layered;

import dev.kosmx.playerAnim.api.TransformType;
import dev.kosmx.playerAnim.api.firstPerson.FirstPersonConfiguration;
import dev.kosmx.playerAnim.api.firstPerson.FirstPersonMode;
import dev.kosmx.playerAnim.core.util.Vec3f;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* A container to make swapping animation object easier
* It will clone the behaviour of the held animation
*
* <p>
* you can put endless AnimationContainer into each other
* @param <T> Nullable animation
*/
public class AnimationContainer<T extends IAnimation> implements IAnimation {
@Nullable
protected T anim;

public AnimationContainer(T anim) {
public AnimationContainer(@Nullable T anim) {
this.anim = anim;
}

public AnimationContainer() {
this.anim = null;
}

public void setAnim(T newAnim) {
public void setAnim(@Nullable T newAnim) {
this.anim = newAnim;
}

public T getAnim() {
public @Nullable T getAnim() {
return this.anim;
}

Expand All @@ -40,12 +45,23 @@ public void tick() {
}

@Override
public Vec3f get3DTransform(String modelName, TransformType type, float tickDelta, Vec3f value0) {
public @NotNull Vec3f get3DTransform(@NotNull String modelName, @NotNull TransformType type, float tickDelta, @NotNull Vec3f value0) {
return anim == null ? value0 : anim.get3DTransform(modelName, type, tickDelta, value0);
}

@Override
public void setupAnim(float tickDelta) {
if (this.anim != null) this.anim.setupAnim(tickDelta);
}

@Override
public @NotNull FirstPersonMode getFirstPersonMode(float tickDelta) {
return anim != null ? anim.getFirstPersonMode(tickDelta) : FirstPersonMode.NONE;
}

// Override candidate
@Override
public @NotNull FirstPersonConfiguration getFirstPersonConfiguration(float tickDelta) {
return anim != null ? anim.getFirstPersonConfiguration(tickDelta) : IAnimation.super.getFirstPersonConfiguration(tickDelta);
}
}
Loading