Jump to content

Recommended Posts

Posted

Hello all,

 

So here I am, again struggling with some vanilla behaviour.

 

I want Netherrack to be not falamable outside of Nether, but I'm still finding more and more obstacles.

I've tried to find an event for setting things on fire or checking the flamability with no avail.

So i came up with the using of the 'PlayerInteractEvent', which kind of worked, but didn't worked on dispenser (which I couldn't find event either) and didn't work when I was lighting a side of diagonally placed block.

 

Is there any solution to this problem? Without using the coremods of course.

 

Thank you very much

I come here to ask only after several hours of struggling, forum browsing and googling. Please be kind :)

Posted

There's probably an event for when blocks tick. You could check when fire ticks, and if it isn't in the nether, set it to air

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

@Eternaldoom: I can't seem to find the block tick event, it is possible that there is not one, as diesieben said.

 

I've decided to create new Flint and steel, where I can do my checks in "onItemUse" function, and replace all recipes to output my flint and steel instance.

 

Do you think is it a good approach? (I'm worrying for some mod to use original flint and steel in some recipe).

I come here to ask only after several hours of struggling, forum browsing and googling. Please be kind :)

Posted

As I said in the OP, I've tried to use it, but the problem is that I was not able to restrict it for a dispenser. Also using that event had some side effects - As I don't want to be able to set flame to a netherrack, I need to cancel the event, but I can't cancel the event on client-side, when I want it to be processed by server-side (to play the sound and show particles for all players, and also damage the item), but when I won't cancel it on client side, the flame shows up for a split second, which I don't like.

I come here to ask only after several hours of struggling, forum browsing and googling. Please be kind :)

Posted

Thank you, that helped me a lot.

 

My only problem now, is the fire flashing when I'm overriding the PlayerInteractEvent.

 

Basiaclly When I want the Flint and Steel to not set the netherrack on fire, I need to cancel the event, but then it will not be processed server side (no item damage, no sound and no custom particles)., but when I cancel the event on server side only, the fire "flashes" for a split second.

 

Do you think I need to use Packets for that (item damage, sound and particles)? Or is there an easier solution shich I'm overlooking?

I come here to ask only after several hours of struggling, forum browsing and googling. Please be kind :)

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.

Announcements



×
×
  • Create New...

Important Information

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