Draylar / better-dropped-items

https://www.curseforge.com/minecraft/mc-mods/better-dropped-items
Other
13 stars 17 forks source link

Building and some decoration blocks doesn't seem falling in a natural position #4

Open egeesin opened 4 years ago

egeesin commented 4 years ago

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.

number1

Head of the dragon is buried down and it looks undescribable.

number2

skylorbeck commented 4 years ago

Fixed it for the dev. image

// 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));
        }
skylorbeck commented 4 years ago

Fun thing I just found. Redstone dust is an aliasedblockitem, so now the dust doesn't fall right.

skylorbeck commented 4 years ago

oh hey, this is the root cause of #8

skylorbeck commented 4 years ago

Appended above fix with accounting for these odd blockitems