Skip to content

Commit df65aec

Browse files
author
BuildTools
committed
Fixed issue where some textures would not be applied correctly
Fixed a number of issues related to model generation, still pending a rework of how bone origin points work
1 parent fbff95c commit df65aec

File tree

8 files changed

+160
-80
lines changed

8 files changed

+160
-80
lines changed

ReadMe.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Consider supporting the development at https://www.patreon.com/magmaguy !
1515
It can:
1616

1717
- Import .bbmodel or fmmodel (FFM's custom format) models
18-
- Generate resource packs with models that exceed normal Minecraft resource pack model limits (up to 112x112x112 units
19-
or 7x7x7 in-game blocks)
18+
- Generate resource packs with models that exceed normal Minecraft resource pack model limits (up to ~~112x112x112~~
19+
106x106x106 units or 7x7x7 in-game blocks)
2020
- Display these models in-game through the use of the command `/fmm spawn static <id>` where the id is the file name of
2121
the model, in lowercase and without the file extension
2222
- Animate these models as they were configured to be animated in Blockbench
@@ -49,28 +49,44 @@ lowercase and without the file extension.
4949

5050
## What can FreeMinecraftModels (FMM) do for modelers?
5151

52-
FMM follows the standard resource pack rules for resource pack generation. Furthermore, it tries to be as compatible with models compatible with ModelEngine as possible in order to try to standardize model creation across plugins.
52+
FMM follows the standard resource pack rules for resource pack generation. Furthermore, it tries to be as compatible
53+
with models compatible with ModelEngine as possible in order to try to standardize model creation across plugins.
5354

5455
### Model generation features / restrictions
5556

56-
If you have ever created models for ModelEngine, you will be familiar with a lot of the Minecraft resource pack generation restrictions:
57+
If you have ever created models for ModelEngine, you will be familiar with a lot of the Minecraft resource pack
58+
generation restrictions:
5759

5860
#### **Cubes:**
61+
5962
Cubes are the same here as they are in Blockbench, they are the cubes that make up the model.
60-
- Cubes can go up to 112x112x112 "pixels" (Blockbench units) or 7x7x7 in-game blocks (normal Minecraft restrictions bypassed using display sizes, soon to be further bypassed for 1.19.4+ thanks to display entities)
63+
64+
- Cubes can go up to ~~112x112x112~~ 106x106x106 "pixels" (Blockbench units) or 7x7x7 in-game blocks (normal Minecraft
65+
restrictions bypassed using display sizes, soon to be further bypassed for 1.19.4+ thanks to display entities)
6166
- Legal rotations for cubes are 0, 22.5, -22.5, 45 and -45. No other rotation works.
62-
- Cubes only rotate in one axis, meaning that a rotation of [22.5, 0, 0] is fine, a rotation of [22.5, 0, 45] will not fully work and only rotate on one axis.
67+
- Cubes only rotate in one axis, meaning that a rotation of [22.5, 0, 0] is fine, a rotation of [22.5, 0, 45] will not
68+
fully work and only rotate on one axis.
6369

6470
#### **Bones:**
65-
Bones are what Blockbench calls "groups". They serve to group the cubes together, and should be used to group bones together for animationsBlueprint.
66-
- Bones can go up to 112x112x112 "pixels" (Blockbench units) or 7x7x7 in-game blocks. *Please note that the size of bones is set by what they have, so if you have cubes that are more than 7 blocks apart, you will probably exceed this size limit. Bypassing this limit is as easy as putting the blocks in a different boneBlueprint not contained in the first boneBlueprint!*
71+
72+
Bones are what Blockbench calls "groups". They serve to group the cubes together, and should be used to group bones
73+
together for animationsBlueprint.
74+
75+
- Bones can go up to ~~112x112x112~~ 106x106x106 (should be 112, not sure why this is) "pixels" (Blockbench units) or
76+
7x7x7 in-game blocks. *Please note that the size of bones is set by what they have, so if you have cubes that are more
77+
than 7 blocks apart, you will probably exceed this size limit. Bypassing this limit is as easy as putting the blocks
78+
in a different boneBlueprint not contained in the first boneBlueprint!*
6779
- Can have any rotation!
6880

69-
Bones are significantly more flexible than cubes, but you should use as few bones as possible! In FMM, due to Minecraft limitations, each boneBlueprint is a different entity. At a scale, this will affect performance rather quickly! Always use as few bones as you can, and be mindful of how many of that model you are planning to spawn - the more of it you plan to have, the fewer bones you should have!
81+
Bones are significantly more flexible than cubes, but you should use as few bones as possible! In FMM, due to Minecraft
82+
limitations, each boneBlueprint is a different entity. At a scale, this will affect performance rather quickly! Always
83+
use as few bones as you can, and be mindful of how many of that model you are planning to spawn - the more of it you
84+
plan to have, the fewer bones you should have!
7085

7186
#### **Virtual Bones**
7287

73-
If you are coming from ModelEngine, you probably want to know if/how virtual bones are implemented in FMM. Virtual bones have been earmarked, but are not currently implemented beyond very basic groundwork.
88+
If you are coming from ModelEngine, you probably want to know if/how virtual bones are implemented in FMM. Virtual bones
89+
have been earmarked, but are not currently implemented beyond very basic groundwork.
7490

7591
However, at the very least, the following virtual bones will be compatible with FMM soon:
7692

src/main/java/com/magmaguy/freeminecraftmodels/customentity/core/Bone.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ public void getNametags(List<ArmorStand> nametags) {
136136
private Location updateArmorStandLocation() {
137137
Location testLocation = skeleton.getCurrentLocation().add(boneBlueprint.getBoneOriginOffset().add(globalTranslation));
138138
testLocation.setYaw(180);
139-
// return skeleton.getCurrentLocation().add(boneBlueprint.getBoneOriginOffset().add(globalTranslation));
140139
return testLocation;
141140
}
142141

src/main/java/com/magmaguy/freeminecraftmodels/dataconverter/AnimationBlueprint.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public AnimationBlueprint(Object data, String modelName, SkeletonBlueprint skele
3232
this.skeletonBlueprint = skeletonBlueprint;
3333
initializeGlobalValues(animationData);
3434

35+
if (animationData.get("animators") == null) return;
3536
//In BBModel files, each bone holds the data for their transformations, so data is stored from the bone's perspective
3637
((Map<String, Object>) animationData.get("animators")).entrySet().forEach(pair -> initializeBones((Map<String, Object>) pair.getValue(), modelName, animationName));
3738

0 commit comments

Comments
 (0)