Jump to content

BlockEvents


Tschallacka

Recommended Posts

Currently there is BlockEvent.PlaceEvent but it doesn't fire when lava is placed.

 

I'd like an event that is fired ALWAYS when a block is replaced by an another block. Wether it be air by air, air by lava, grass by flowing_lava, air by falling gravel i'd like to be able to see /monitor what has happened.

 

In this event i'd like an optional playerEntity when its present, like when a lava bucket is used.

Currently I have to resort to getNearestPlayer() which might not always be accurate when a block is placed behind another player(in the case of lava of water for example)

 

Currently i'm using a mix of PlayerUseItemEvent, NeighborNotifyEvent and the BlockPlaced event, but it gets really messy.

 

What i'd prefer is an event that gets called upon setBlockState and prefably has a tie in with a player that caused it. Wether it be a fallingsand entity, tileentity, player wielding a bucket placing water/scooping water, an enderman picking up a block, it would be nice to be able to catch that event and assertain the source.

 

I've had a peek around the source and I realise this may be impossible because setBlockState has no tie-ins to entities and getting the correct responsible entity might be hard/impossible.

 

I'd also be happy if the NeighborNotifyEvent has a boolean appearedInSetBlock so you can filter that instead of having to make your own list to check if it has been there yet. that would save a lot of effort/cpu time too.

 

 

 

 

 

How much wood could a woodchuck chuck if a wood chuck could chuck wood - Guybrush Treepwood

 

I wrote my own mod ish... still a few bugs to fix. http://thaumcraft.duckdns.org/downloads/MagicCookies-1.0.6.4.jar

Link to comment
Share on other sites

As stated many times before it simply isn't possible without refactoring MC in a large scale because that data is not there.

Not to mention the many reasons and places that a player is not involved in setting blocks at all. The information is exposed the best it can be, reliably.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.