[REQUEST] Furnace Speed Modifier

Discussion in 'Archived: Plugin Requests' started by Nuinbot, Sep 15, 2013.

  1. Offline

    Nuinbot

    I am looking for a mod that simply does one thing: make furnaces smelt faster. This should not affect the fuel cost (and if it does, adjusts it accordingly). This should be controlled via a configuration file with a speed multiplier, as well as a plugin-specific reload command.

    For example: Normally, items that can be cooked/smelted take 10 seconds, regardless of what fuel is used. With this plugin, a multiplier of 2 would change that time to 5 seconds. The same amount of fuel is used.

    This is to provide a faster smelt time for building and cooking, lending to more time spent having fun and not sitting and waiting for furnaces (even with a hopper-minecart system in place, which gets expensive in the iron department).

    If anyone knows of such a plugin (that does not depend/require other blocks nearby), please let me know.

    If anyone is willing to try coding this out, I would really appreciate it. Thanks for looking!
     
  2. Offline

    PatoTheBest

    I have not tried it, but I suppose it would work.
    Code:java
    1. Short cooktime = (short)100;
    2.  
    3. @EventHandler
    4. public void furnaceBurn(FurnaceBurnEvent event) {
    5. Furnace furnace = (Furnace) event.getBlock().getState();
    6. furnace.setCookTime(cooktime);
    7. }
    8.  
    9. @EventHandler
    10. public void furnaceSmeltEvent(FurnaceSmeltEvent event) {
    11. Furnace furnace = (Furnace) event.getBlock().getState();
    12. furnace.setCookTime(cooktime);
    13. }
    14.  
    15. @EventHandler
    16. public void onInventoryClick(InventoryClickEvent event) {
    17. Block blocktype = event.getWhoClicked().getTargetBlock(null, 10);
    18.  
    19. if (blocktype.getType() == Material.FURNACE || blocktype.getType() == Material.BURNING_FURNACE) {
    20. if ((event.getSlot() == 0 || event.getSlot() == 1) && event.getCursor().getType() != Material.AIR) {
    21. Furnace furnace = (Furnace) blocktype.getState();
    22. furnace.setCookTime(cooktime);
    23. }
    24. }
    25. }
     
  3. Offline

    Nuinbot

    Looks good I suppose, but I am no coder and don't know how to implement it.
     
  4. Offline

    AndyMcB1

    PatoTheBest why use a short and not an int?
    Also check the action is a left click in the furnace - you don't want it resetting if they right click
     
  5. Offline

    Nuinbot

    Very surprised nothing like this exists. Anyone?
     
  6. Offline

    PatoTheBest

  7. Offline

    Nuinbot

    I already saw that plugin, but it isn't what I wanted. I want something that doesn't interfere with hopper operation.

    The plugin I want should just change the speed of furnaces on the server. No blocks nearby, no aesthetics.
     
  8. Offline

    Nuinbot

    Still looking for someone to do this. Anyone?
     

Share This Page