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

[BUG] BlockPlaceEvent.getBlockReplacedState() wrong block type. #115

Open
fantahund opened this issue Sep 30, 2022 · 6 comments
Open

[BUG] BlockPlaceEvent.getBlockReplacedState() wrong block type. #115

fantahund opened this issue Sep 30, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@fantahund
Copy link

When you set a block, you get in BlockPlaceEvent.getBlockReplacedState() the block type of the set block and not of the block that was at the place before.

Probably the error can be found in patches\net\minecraftforge\event\world\BlockEvent.java.patch

@fantahund fantahund added the bug Something isn't working label Sep 30, 2022
@EverNife
Copy link
Member

I don't get it.

IF you place a block on the World, for example, Dirt!

The getBlockReplacedState() rather than returning "AIR", or "WATER", returns "DIRT"

@fantahund
Copy link
Author

fantahund commented Sep 30, 2022

Yes, exactly.
the problem already existed at that time in Cauldron

@EverNife
Copy link
Member

Yep, from what i see on forge the correct way would be that:

"event.block" holds the previous existing block instance
"event.placedBlock" holds the new instance that will be placed at that location

@fantahund
Copy link
Author

That can be, I don't have much to do with Forge. It would be nice if you can fix that. ^^

@EverNife
Copy link
Member

I will check on both Forge and Bukkit "PlaceEvents" to see if the problem is present on both.

@fantahund
Copy link
Author

fantahund commented Sep 30, 2022

okay thx ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants