Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

BlockPlaceEvent Needs To Fire on Client Side and Fire First on Client Side

Recommended Posts

The block place event currently only first on server it needs to fire where it happens first on client place then on server. Example of why it causes issues: on block place event I make tile entity read data to update a spawner based on the nbt of the block It renders pig for a couple ticks now on client side because the server needs to send an update packet. I need the client to already have the update to begin with so it doesn't render pig when it's suppose to be a creeper spawner. So I need the data manipulation to happen on both sides client and server.


How you would do this: change the way you fire the event to ItemBlock.class on line 59-60 and fire your event there and then. It would fix my issues no I can't just use BlockEntityTag for the NBT because, TileEntityMobSpawner denies non ops to mess with that tag, so the only logical thing to do is for you to change the line and class of where you fire the event.

Edited by jredfox
making the forum alot cleaner and more advanced reasons
Link to post
Share on other sites
14 hours ago, LexManos said:

No, World logic is done server side. 

well what about ClientBlockPlaceEvent ? I have already simulated it replacing a itemblock for the mob spawner and it works perfectly. The tile entity needs to read from nbt on client in the same time it's happening on the server. Compare the difference if you comment out my line on silk spawners to replace the itemblock. This below is what it use to do compared to now where it's instant no pigs. This is the simulation of what forge would do for all block placements difference is on line 50 compared to the other itemblock.class. Now the reason Why I am asking for a global event is silkspawners 2.0 is suppose to work with modded spawners and I don't want to see no pig for modded spawners, and I also don't want to replace all itemblocks for the modded blocks


Working Fix Code for video: https://gist.github.com/jredfox/a36805e025581efca9ccd8295e362d46


Before Fix


After Fix:


Edited by jredfox
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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 Privacy Policy.