Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing furniture that is more than 1x1x1 size results in buggy behaviour. #4

Closed
MaliWhiteTea opened this issue Feb 26, 2024 · 5 comments
Assignees
Labels
bug Something isn't working completed

Comments

@MaliWhiteTea
Copy link

MaliWhiteTea commented Feb 26, 2024

hi,

how can i use the "replace ia furniture" effect? what should i use for location?
i want to change the furniture at the same location
image

and dou you have a discord account?

@MaliWhiteTea
Copy link
Author

MaliWhiteTea commented Feb 26, 2024

i tried this:
image
it was weird if you try to replace a furniture bigger than 1x1x1 hitbox like this:
image
and its rotation is changing

@Asleeepp
Copy link
Owner

Asleeepp commented Feb 27, 2024

hi,

how can i use the "replace ia furniture" effect? what should i use for location? i want to change the furniture at the same location

The location should be at where the invisible armor stand is (iirc). I didn't make this effect, someone opened a pull request and requested to add it. In their video, but it seemed like the effect worked fine for them. For why it rotates, I have no idea. You may need to specify yaw and pitch.

and dou you have a discord account?

Yes, my username on discord is Asleepp

(sorry for the late response, for some reason github didn't notify me.)

@Asleeepp Asleeepp self-assigned this Feb 27, 2024
@Asleeepp Asleeepp added question Further information is requested waiting for response labels Feb 27, 2024
@Asleeepp Asleeepp added bug Something isn't working help wanted Extra attention is needed complex to fix and removed question Further information is requested waiting for response labels Mar 3, 2024
@Asleeepp Asleeepp changed the title replacing furniture Replacing furniture that is more than 1x1x1 size results in buggy behaviour. Mar 7, 2024
@Fusezion
Copy link

Fusezion commented Mar 27, 2024

Sorry if this seems weird, but from what I understand from the CustomFurniture#replaceFurniture method it's not intended to be treated like "replace existing furniture" it's meant to be used to replace/change an existing furniture to another furniture the fact the rotation isn't the same makes sense as you likely aren't using the same yaw/pitch the previous furniture was using. In addition to the original place point of it

Hopefully this helps a bit in "solving" the month long issue of yours

@Asleeepp
Copy link
Owner

Asleeepp commented Mar 28, 2024

The thing is, is that in the code that he uses, wherever he clicks, the furniture moves there. So if he clicks in the middle, it replaces in the middle, but if he clicks a barrier in the bottom right, the furniture moves to the bottom right. This is the part i'm trying to figure out how to prevent really.

if theres a really easy way to prevent this, then uh. I haven't thought of it lmao.

@Fusezion
Copy link

Fusezion commented Mar 28, 2024

So as I said it's directly controlled by yaw/pitch along side the click location, if he didn't originally click in either of those locations it makes sense as to why it's not placing in the same location. You personally have no method or way to change this behavior unless you can store the origin location onto the armor stand and update the placement from there.

While there is a method like CustomFurnature#getArmorStand() and CustomFurnature#getEntity() I can't tell if any of them represent the origin location

@Asleeepp Asleeepp added completed and removed help wanted Extra attention is needed complex to fix labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed
Projects
None yet
Development

No branches or pull requests

3 participants