November 01, 2024, 01:29:38 am

Author Topic: Lava Buckets in Furnaces  (Read 19562 times)

0 Members and 1 Guest are viewing this topic.

Nick3306

  • Owner
  • Champion Member
  • *****
  • Posts: 3795
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #15 on: April 13, 2013, 06:07:22 am »
I find it funny when you guys post code to show off. You obviously know that opti can do this stuff so the code you put in the topic is purely to show off.
R.I.P. Blocky Jr. - Brutally killed by Kodak on accident

DeeKay

  • Owner
  • Champion Member
  • *****
  • Posts: 2162
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #16 on: April 13, 2013, 06:13:47 am »
100101101

andersad

  • Hero Member
  • **
  • Posts: 733
  • Get out there and live!
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #17 on: April 13, 2013, 06:16:36 am »
      This sounds like a VERY good idea to me, I mean like many others have said, If there's a way to prevent us from placing it but still let us pick it up and use it as fuel. This would be my solution to having to use all my coal to smelt connlestone into stone for stone bricks, instead, I could just use this, MUCH easier? But then again, that would defeat the whole point of us all even collection coal other than for torches? I support this idea anyways, It would make my life MUCH MUCH simpler.
Opticraft- Best SMP server EVER
Go get em' :)

Sugna

  • Sr. Member
  • **
  • Posts: 473
  • -woodenslime-
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #18 on: April 13, 2013, 07:27:20 am »
     This sounds like a VERY good idea to me, I mean like many others have said, If there's a way to prevent us from placing it but still let us pick it up and use it as fuel. This would be my solution to having to use all my coal to smelt connlestone into stone for stone bricks, instead, I could just use this, MUCH easier? But then again, that would defeat the whole point of us all even collection coal other than for torches? I support this idea anyways, It would make my life MUCH MUCH simpler.


You could always only be able to get lava buckets at the market for $100. Myabe
( ͡° ͜ʖ ͡°)

andersad

  • Hero Member
  • **
  • Posts: 733
  • Get out there and live!
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #19 on: April 13, 2013, 04:16:49 pm »
    Yes that should happen, where you can only get lava buckets at the market, so only people really serious about wanting them would get them. Ahere would be no extra lag in the nether. Very good idea, I didn't see it earlier, nice.
Opticraft- Best SMP server EVER
Go get em' :)

tiggy26668

  • Sr. Member
  • **
  • Posts: 464
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #20 on: April 13, 2013, 05:16:29 pm »
I find it funny when you guys post code to show off. You obviously know that opti can do this stuff so the code you put in the topic is purely to show off.

well there's that... and the fact that people like to say suggestions wont work because "it'd be too hard to code" so showing that it takes 5 lines of code usually prevents that from happening...

course u kno me, big showoffy jerk.... but there are other motivations.....  :D
I'm Much more smarter admin than whoever banned me.

Chief149

  • Hero Member
  • **
  • Posts: 646
  • Oppan Gangnam Style
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #21 on: April 13, 2013, 08:48:36 pm »
I find it funny when you guys post code to show off. You obviously know that opti can do this stuff so the code you put in the topic is purely to show off.

Way to be an ass. Just assume I'm being a showoff when I did not have that intention. It was purely to show that the implementation wouldn't be that difficult. In other words, just a supporting argument for why this should be implemented.

Its like saying that xDeeKay is a showoff because opti also knows what binary is.

Tiggy, to answer your question about flowing lava, that isn't an issue. Flowing lava must originate from the source block placed by the player holding a lava bucket. Basically each "event" which is triggered somehow has a state that says whether or not it should be cancelled. These events are created before any info about them is sent to the player. When the server finally processes each event, it looks at the cancelled state. If the cancelled state is true then the event is never processed. Because of this, the lava block is never placed, and therefore flowing lava is never created.

The game client on the other hand places a lava block as that is what it thinks should happen. But the lava block immediately disappears because the server says "No that isn't supposed to be there" so the placed block disappears.



Best griefer name ^



Nick3306

  • Owner
  • Champion Member
  • *****
  • Posts: 3795
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #22 on: April 13, 2013, 09:15:27 pm »
I find it funny when you guys post code to show off. You obviously know that opti can do this stuff so the code you put in the topic is purely to show off.

Way to be an ass. Just assume I'm being a showoff when I did not have that intention. It was purely to show that the implementation wouldn't be that difficult. In other words, just a supporting argument for why this should be implemented.

Its like saying that xDeeKay is a showoff because opti also knows what binary is.

Tiggy, to answer your question about flowing lava, that isn't an issue. Flowing lava must originate from the source block placed by the player holding a lava bucket. Basically each "event" which is triggered somehow has a state that says whether or not it should be cancelled. These events are created before any info about them is sent to the player. When the server finally processes each event, it looks at the cancelled state. If the cancelled state is true then the event is never processed. Because of this, the lava block is never placed, and therefore flowing lava is never created.

The game client on the other hand places a lava block as that is what it thinks should happen. But the lava block immediately disappears because the server says "No that isn't supposed to be there" so the placed block disappears.
Writing code is not a supporting argument. No one in this topic said it would be hard to code. The question is should we add it, showing us how to add it is irrelevant to the discussion.
R.I.P. Blocky Jr. - Brutally killed by Kodak on accident

Chief149

  • Hero Member
  • **
  • Posts: 646
  • Oppan Gangnam Style
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #23 on: April 13, 2013, 10:14:02 pm »
I still was not, as you stated, "showing off"

It's not worth showing off. Now using the JNI and JNA libraries to make a working Java RunPE would be worth showing off lol. I haven't been able to even fully understand all of the code in a .NET runPE  :'(

Getting back on topic now, do you have any reasons this shouldn't be implemented? Here's my check:

Is this necessary? Not really. We have coal and blaze rods.
Would this cause issues in the server? Unless we are wrong about the lag part caused by flowing lava, not really since this wouldn't allow placement of lava, and no extra lag as far as we know.
Is this easy to implement, and can this be implemented quickly? Yes.



Best griefer name ^



2468avc

  • Hero Member
  • **
  • Posts: 558
  • SMP Trusted
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #24 on: April 14, 2013, 12:00:18 am »
Is this necessary? Not really. We have coal and blaze rods.

Untrue. Coal doesn't smelt enough stuff to be effective in huge jobs, and blaze rods are fairly hard to come by in large quantites.
-2468avc

*Looking for a signature, feel free to make one for me :)*

cschurz

  • Hero Member
  • **
  • Posts: 545
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #25 on: April 14, 2013, 12:06:06 am »
Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

Personally I would have preffered to combine the two IF statements into one using &&, but since the forum text editor was being wierd I found it to look nicer for viewing with two seperate statements.
Basically, on each and every block placement, the above method is called. Then we check if the block placed is STATIONARY_LAVA, or a lava source block which is what is placed by a filled lava bucket. If I'm wrong then simply change the Material.<material> part on the first IF statement.
If it is a lava block, then check to see if the player who placed the lava has the override permission (such as a moderator permission). Notice I have the ! in front of the hasPermission() call. For those who don't know how to program, that simply stands for if the player DOESNT have the permission. If not, then we set the event state to be cancelled, and Bukkit does the rest.

Add that to the opticraft plugin, and allow lava buckets to be used. That code will block lava placement, but not picking up lava. So long as we can fill a lava bucket, we can use it in a furnace. No harm can be done as long as players can't place the lava.

lol you made the same mistake as cschurz  :P

what about lava that isn't stationary?  ;D

optical made that mistake, not me :)

Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

this prevents users from placing stationary lava, yes. we already have that. the problem is that we have code that prevents members from collecting water/lava into buckets. i just removed that, but it's up to optical to approve it and update the server. i don't see why members shouldn't be allowed to collect stuff into buckets.

Nick3306

  • Owner
  • Champion Member
  • *****
  • Posts: 3795
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #26 on: April 14, 2013, 01:22:57 am »
Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

Personally I would have preffered to combine the two IF statements into one using &&, but since the forum text editor was being wierd I found it to look nicer for viewing with two seperate statements.
Basically, on each and every block placement, the above method is called. Then we check if the block placed is STATIONARY_LAVA, or a lava source block which is what is placed by a filled lava bucket. If I'm wrong then simply change the Material.<material> part on the first IF statement.
If it is a lava block, then check to see if the player who placed the lava has the override permission (such as a moderator permission). Notice I have the ! in front of the hasPermission() call. For those who don't know how to program, that simply stands for if the player DOESNT have the permission. If not, then we set the event state to be cancelled, and Bukkit does the rest.

Add that to the opticraft plugin, and allow lava buckets to be used. That code will block lava placement, but not picking up lava. So long as we can fill a lava bucket, we can use it in a furnace. No harm can be done as long as players can't place the lava.

lol you made the same mistake as cschurz  :P

what about lava that isn't stationary?  ;D

optical made that mistake, not me :)

Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

this prevents users from placing stationary lava, yes. we already have that. the problem is that we have code that prevents members from collecting water/lava into buckets. i just removed that, but it's up to optical to approve it and update the server. i don't see why members shouldn't be allowed to collect stuff into buckets.
Optical made it that way because they cant place it. We were getting tons of complaints about people wasting iron on buckets to have them filled with lava and then they can't do anything with it. Of course this suggestion gives it a use. There were also a lot of bugs with stopping members from placing water/lava. We had numerous cases where placing lava or water was possible even with the restriction.
R.I.P. Blocky Jr. - Brutally killed by Kodak on accident

Chief149

  • Hero Member
  • **
  • Posts: 646
  • Oppan Gangnam Style
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #27 on: April 14, 2013, 01:27:25 am »
The only way the restriction could be bypassed would be if another plugin is setting the cancelled state to false. Otherwise its impossible for that bug to be happening.



Best griefer name ^



Nick3306

  • Owner
  • Champion Member
  • *****
  • Posts: 3795
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #28 on: April 14, 2013, 01:28:38 am »
The only way the restriction could be bypassed would be if another plugin is setting the cancelled state to false. Otherwise its impossible for that bug to be happening.
Hey, I'm just telling you what was happening. I don't have an explanation for it.
R.I.P. Blocky Jr. - Brutally killed by Kodak on accident

Chief149

  • Hero Member
  • **
  • Posts: 646
  • Oppan Gangnam Style
    • View Profile
Re: Lava Buckets in Furnaces
« Reply #29 on: April 14, 2013, 01:42:03 am »
The only way the restriction could be bypassed would be if another plugin is setting the cancelled state to false. Otherwise its impossible for that bug to be happening.
Hey, I'm just telling you what was happening. I don't have an explanation for it.

Yeah I understand. I just mentioned the most likely explanation for it. I think it might be worldguard



Best griefer name ^