AmmoniumX / AdminShop

Admin Shop Minecraft Mod
GNU Lesser General Public License v2.1
4 stars 4 forks source link

Shop blocks place in wrong orientation #1

Closed BratrilliantG7 closed 1 year ago

BratrilliantG7 commented 1 year ago

I'm going to preface this first bug report by saying that I love Mechanical Mastery and when I saw you were planning to use this mod for the sequel, I figured I'd try to play around with it for a while and find any bugs/suggestions I could, so prepare to be swarmed, starting with some more serious bugs then moving towards minor issues and suggestions. Anyways:

Minecraft Version: 1.18.2 Forge Version: 40.2.10 Mod Version: 1.7 Modpack used: Mechanical Mastery (Adminshop Port) v.a0.0.10

If any of the shop blocks are placed while the player is looking down at greater than 45 pitch or up at less than -45 pitch, they will orientate facing North rather than facing the player. This makes placing them at your feet or above your head annoying.

Looking down less than 45 degrees: adminshop_44

Looking further down more than 45 degrees: adminshop_45

Looking up less than 45 degrees: adminshop_-44

Looking further up more than 45 degrees: adminshop_-45

BratrilliantG7 commented 1 year ago

I found that it is caused by the class file "CustomDirectionalBlock.java" I find myself questioning the existence of this class? Why did the original author need their blocks to face the player except when looking up or down? It should always face the player regardless or you risk causing frustration. Maybe it's some antiquated thing with 1.12? Regardless hopefully it's safe to remove this class and all references to it. https://github.com/AmmoniumX/AdminShopOverhauled/blob/master-1.18.2/src/main/java/com/ammonium/adminshop/blocks/CustomDirectionalBlock.java

BratrilliantG7 commented 1 year ago

Thinking on it a bit, perhaps whatever block placement code the shops use is the same as blocks like Pistons and Droppers, meaning they could rotate a direction you don't want vertically. If that's the case, simply looking up and using whatever Furnaces use on placement would fix it.

BratrilliantG7 commented 1 year ago

Created a Pull request that removes the CustomDirectionBlock and uses a more standard method to determine the block's facing direction: #5

AmmoniumX commented 1 year ago

The pull request has been merged, and the changes have been ported to the now main branch "master-1.19.2". Thank you for your contributions!