Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

Request : Conditions on delay #353

Open Kaaji opened 9 years ago

Kaaji commented 9 years ago

Pleeeeease I hightly suggest you to add conditions around the delay feature ! :( The real problem is that, as long as you use the "delay" feature, not any action, not any change, even if you litteraly provoc Apocalypse on the world will distrub the action at the end of the delay. And it's really problematic. I'll explain. Just imagine the possibilites you can afford if the delay have conditions (and using a ressource pack) : • Otherdrops enable to custom the drop of a block, so you can create a oat cereal block (using another metadata than wheat) and make it drop an item "oat" and "oat seeds" (two things I did). by using this trick (and the adequate textures) :

60:
- trigger: RIGHT_CLICK
  tool: 295@1
  command: ["/!*/hpos1","/!*/hpos2", "/!*/expand 1 up", "/!*/replace 0 59:8"]
  consumetool: 1
  effects: STEP_SOUND@CROPS
59@8:
- trigger: BLOCK_PLACE
  delay: 2500
  replacementblock: 59@9
59@9:
- trigger: BLOCK_PLACE
  delay: 2500
  replacementblock: 59@10
59@10:
- trigger: BLOCK_PLACE
  delay: 2500
  replacementblock: 59@11
59@11:
- drop: [295@1~&fOat Seeds/1-3/90%, 296@1~&fOat]

You can manage custom cereals ! (by default, the block 59 will be destruct if it is no farmland (60) below it, so the condition will well working) BUT. There's a but, imagine the player decides to remove his field because he prefers to create a house right here. He will break all the cereal blocks and begin to place a parquet when suddenly, all his planks would be replaced by 59@9. Because the delay has expired and there is no way to explains to the trigger : "Hey oat, you can't grow anymore, I've already broken you", more specifically, there's no way to tell the plugin that it doesn't need to make the "replacementblock" after the delay has expired. Now, imagine it exists a condition like this which would totally block the event if the block is broken :

59@8:
- trigger: BLOCK_PLACE
  delay: 2500
  stop_delay_if: BREAK
  replacementblock: 59@9
59@9:
- trigger: BLOCK_PLACE
  delay: 2500
  stop_delay_if: BREAK
  replacementblock: 59@10
59@10:
- trigger: BLOCK_PLACE
  delay: 2500
  stop_delay_if: BREAK
  replacementblock: 59@11
59@11:
- drop: [295@1~&fOat Seeds/1-3/90%, 296@1~&fOat]

Here if the player doesn't touch the oat block, it will grow correctly after 2500 ticks. But if he break the oat block, the event will stop too so the block will never be replaced.

There would be no problem for an admin to custom a new cereal. • You could also create other block like a bush which grows berries every hours if the harvest block bush is not removed. • You could create a coal/gold/wood box in a NPC's house which will be filled every day. • You could create a dynamite block which explode 30 seconds after if no body defuse it. And so, so more...

We really really need it ! :3