Building and some decoration blocks doesn't seem falling in a natural position
egeesin opened this issue Β· 4 comments
First, I would like to thanks for the realistic approach of the dropped items. Totally loving the mod!
To describe the issue, this mod does its thing really well with items that has custom icons, supposed to face upwards not standing upright. But when it comes to building and decoration blocks, slabs and especially carpets not falling in a natural position as seen in the pictures, everything just blatantly 90ΒΊ flipped. It's hard to figuring out whether you dropped slab or a plank when looking to two sides of the dropped item.
I tried to highlight which items looks right (with green) and not right (with yellow). Then how it should be positioned (with aqua). Also there's only one rare occasions which I prefer the way it looks (with green and yellow dashed stroke) since we used to see logs in horizontal position IRL. There might be a few selected exceptions that doesn't need tinkering.
Head of the dragon is buried down and it looks undescribable.
// rotate item
ItemEntityRotator rotator = (ItemEntityRotator) itemEntity;
if(!itemEntity.isOnGround() && !itemEntity.isSubmergedInWater()) {
float rotation = ((float)itemEntity.getAge() + partialTicks) / 20.0F + itemEntity.hoverHeight;
matrixStack.multiply(Vector3f.POSITIVE_Z.getRadialQuaternion(rotation));
rotator.setRotation(new Vec3d(0, 0, rotation));
} else if(itemEntity.getStack().getItem() instanceof AliasedBlockItem){
matrixStack.multiply(Vector3f.POSITIVE_Z.getRadialQuaternion((float) rotator.getRotation().z));
} else if(itemEntity.getStack().getItem() instanceof BlockItem) {
matrixStack.multiply(Vector3f.POSITIVE_X.getRadialQuaternion(300));
matrixStack.multiply(Vector3f.POSITIVE_Y.getRadialQuaternion((float) rotator.getRotation().z));
matrixStack.multiply(Vector3f.POSITIVE_Z.getRadialQuaternion(0));
} else {
matrixStack.multiply(Vector3f.POSITIVE_Z.getRadialQuaternion((float) rotator.getRotation().z));
}
Fun thing I just found. Redstone dust is an aliasedblockitem, so now the dust doesn't fall right.
oh hey, this is the root cause of #8