Skip to content

Commit

Permalink
fix swapped DynamicItemModel conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Feb 20, 2017
1 parent 9e86777 commit f86ae4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/main/java/pl/asie/foamfix/client/Deduplicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public Deduplicator() {
TRIM_ARRAYS_CLASSES.add(SimpleBakedModel.class);
TRIM_ARRAYS_CLASSES.add(WeightedBakedModel.class);

BLACKLIST_CLASS.add(FoamyItemLayerModel.DynamicItemModel.class);
BLACKLIST_CLASS.add(FoamyItemLayerModel.Dynamic3DItemModel.class);

BLACKLIST_CLASS.add(Object.class);
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/pl/asie/foamfix/client/FoamyItemLayerModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ public Dynamic3DItemModel(DynamicItemModel parent) {
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType type) {
Pair<? extends IBakedModel, Matrix4f> pair = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, parent.transforms, type);
if(type != ItemCameraTransforms.TransformType.GUI) {
return Pair.of(parent, pair.getRight());

if (type == ItemCameraTransforms.TransformType.GUI && pair.getRight() == null) {
return Pair.of(parent, null);
}

return pair;
}

Expand Down Expand Up @@ -192,8 +194,8 @@ public ItemOverrideList getOverrides() {
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType type) {
Pair<? extends IBakedModel, Matrix4f> pair = IPerspectiveAwareModel.MapWrapper.handlePerspective(this, transforms, type);

if (type == ItemCameraTransforms.TransformType.GUI && pair.getRight() == null) {
return Pair.of(otherModel, null);
if (type != ItemCameraTransforms.TransformType.GUI) {
return Pair.of(otherModel, pair.getRight());
}

return pair;
Expand Down

0 comments on commit f86ae4a

Please sign in to comment.