Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 32 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,38 @@ publishing {
mavenMain(MavenPublication) {
artifactId = "BendableCuboidsMerged"

pom {
name = artifactId
description = "Adds model cubes that can be bent, for example like arms in MC Story Mode!"
url = "https://github.com/PlayerAnimationLibrary/BendableCuboids"

developers {
developer {
id = "dima_dencep"
name = "dima_dencep"
email = "dima_dencep@redlance.org"
}
developer {
id = "zigythebird"
name = "ZigyTheBird"
email = "imanyarandi222@gmail.com"
}
}

licenses {
license {
name = "MIT"
url = "https://github.com/PlayerAnimationLibrary/BendableCuboids/blob/HEAD/LICENSE"
}
}

scm {
connection = "scm:git:github.com/PlayerAnimationLibrary/BendableCuboids.git"
developerConnection = "scm:git:github.com/PlayerAnimationLibrary/BendableCuboids.git"
url = "https://github.com/PlayerAnimationLibrary/BendableCuboids.git"
}
}

artifact shadowJar
artifact mergedSourcesJar
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true

# Mod properties
mod_version = 2.0.2
mod_version = 2.0.2+dev
maven_group = com.zigythebird.bendable_cuboids
archives_base_name = BendableCuboids

Expand All @@ -13,4 +13,4 @@ minecraft_version = 26.1.2
# Dependencies
fabric_loader_version = 0.19.2
neoforge_version = 26.1.2.59-beta
player_anim_version = 1.2.3+mc.26.1
player_anim_version = 1.2.3+dev+mc.26.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.zigythebird.bendable_cuboids.fabric;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import com.zigythebird.bendable_cuboids.BendableCuboidsMod;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;

@J2ObjCIncompatible
public class BendableCuboidsModFabric extends BendableCuboidsMod implements ClientModInitializer {
@Override
public void onInitializeClient() {
Expand Down
4 changes: 2 additions & 2 deletions src/fabric/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
],
"contributors": [],
"contact": {
"sources": "https://github.com/ZigyTheBird/BendableCuboids",
"issues": "https://github.com/ZigyTheBird/BendableCuboids/issues"
"sources": "https://github.com/PlayerAnimationLibrary/BendableCuboids",
"issues": "https://github.com/PlayerAnimationLibrary/BendableCuboids/issues"
},
"license": "MIT License",
"environment": "client",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.zigythebird.bendable_cuboids;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import com.zigythebird.bendable_cuboids.impl.compatibility.SkinLayersCompat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@J2ObjCIncompatible
public abstract class BendableCuboidsMod {
public static final Logger LOGGER = LoggerFactory.getLogger("BendableCuboids");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zigythebird.bendable_cuboids;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
Expand All @@ -9,6 +10,7 @@
import java.util.List;
import java.util.Set;

@J2ObjCIncompatible
public class ModMixinPlugin implements IMixinConfigPlugin {
@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.zigythebird.bendable_cuboids.api;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import com.zigythebird.playeranim.animation.AvatarAnimManager;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;

@ApiStatus.Internal
@J2ObjCIncompatible
public interface IMutableModel {
@Nullable
AvatarAnimManager bc$getAnimation();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ReflectionSupport(ReflectionSupport.Level.NATIVE_ONLY)
package com.zigythebird.bendable_cuboids.api;

import com.google.j2objc.annotations.ReflectionSupport;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zigythebird.bendable_cuboids.impl;

import com.google.j2objc.annotations.AutoreleasePool;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.zigythebird.bendable_cuboids.api.BendableCube;
Expand Down Expand Up @@ -106,6 +107,7 @@ public BendableCuboid(int texCoordU, int texCoordV, float originX, float originY
}

@Override
@AutoreleasePool
public void compile(PoseStack.Pose pose, VertexConsumer buffer, int packedLight, int packedOverlay, int color) {
if ((this.useSodiumRendering && this.bend == 0) || this.sides == null) {
super.compile(pose, buffer, packedLight, packedOverlay, color);
Expand All @@ -123,6 +125,7 @@ public void compile(PoseStack.Pose pose, VertexConsumer buffer, int packedLight,
* @param bendValue bend value (Same as rotX)
*/
@Override
@AutoreleasePool
public void applyBend(float bendValue) {
// Don't enable bend until rotation is bigger than epsilon.
// This should avoid unnecessary heavy calculations.
Expand Down Expand Up @@ -183,6 +186,7 @@ public float getBend() {
return this.bend;
}

@AutoreleasePool
public void iteratePositions(Function<Vector3f, Vector3f> function) {
if (this.positions == null) return;
for (RememberingPos pos : this.positions) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zigythebird.bendable_cuboids.impl.compatibility;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import com.zigythebird.bendable_cuboids.BendableCuboidsMod;
import com.zigythebird.bendable_cuboids.api.BendableCube;
import com.zigythebird.bendable_cuboids.api.BendableModelPart;
Expand All @@ -19,6 +20,7 @@
import java.util.EnumSet;
import java.util.Set;

@J2ObjCIncompatible
public class SkinLayersCompat implements MeshTransformerProvider, MeshTransformer {
private static final Set<Direction> ALL_VISIBLE = EnumSet.allOf(Direction.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ReflectionSupport(ReflectionSupport.Level.NATIVE_ONLY)
package com.zigythebird.bendable_cuboids.impl.compatibility;

import com.google.j2objc.annotations.ReflectionSupport;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ReflectionSupport(ReflectionSupport.Level.NATIVE_ONLY)
package com.zigythebird.bendable_cuboids.impl;

import com.google.j2objc.annotations.ReflectionSupport;
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.zigythebird.bendable_cuboids.neoforge;

import com.google.j2objc.annotations.J2ObjCIncompatible;
import com.zigythebird.bendable_cuboids.BendableCuboidsMod;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLLoader;

@J2ObjCIncompatible
@Mod(value = "bendable_cuboids", dist = Dist.CLIENT)
public class BendableCuboidsModNeo extends BendableCuboidsMod {
public BendableCuboidsModNeo() {
Expand Down
4 changes: 2 additions & 2 deletions src/neoforge/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
modLoader = "javafml"
loaderVersion = "*"
issueTrackerURL = "https://github.com/ZigyTheBird/BendableCuboids/issues"
issueTrackerURL = "https://github.com/PlayerAnimationLibrary/BendableCuboids/issues"
license = "MIT License"

[[mods]]
modId = "bendable_cuboids"
version = "${version}"
displayURL = "https://github.com/ZigyTheBird/BendableCuboids"
displayURL = "https://github.com/PlayerAnimationLibrary/BendableCuboids"
displayName = "Bendable Cuboids Library"
authors = "Zigy, dima_dencep, KosmX"
description = '''
Expand Down