[MECH/DEV] MachinaCraft v4.1.11 - A framework for lever-activated devices [1.4.7-R0.1]

Discussion in 'Archived: Plugin Releases' started by Lyneira, Nov 6, 2011.

  1. Offline

    Lyneira

    [​IMG]


    What is MachinaCraft?

    MachinaCraft is a framework for machines made up out of blocks, activated by right-clicking on a lever. It is modular and includes several plugins that can make repetitive tasks easier, such as digging or building in a line, even placing and clearing bodies of water. Because it is modular, other plugins can also use MachinaCraft to make their own activatable machines.

    How do I build a Machina?

    Similar to crafting something on a crafting table, but in the game world. Place blocks in the world in a predefined way and put a lever on the right block. Rightclick the lever, and if you built it correctly, the Machina will activate.

    A demonstration please!

    Plugin Showcase by WoopaGaming

    Pictures! And where do I get a Machina plugin?

    These are the Machina plugins available right now, included in the download:
    Collaboration
    I am looking for help in improving the framework! If you think you can help make it easier to use, more powerful, more efficient, I would like to hear from you via email or PM!
     
  2. Offline

    Mercury

    This plugin is bit conflicting with LWC. When you place chests and LWC auto registers it. You start the machine, while machine begins to move only the Protected Air will be left behind. Also you can hijack LWC protected chests with plugin.
     
  3. Offline

    Lyneira

    Someone reported this to me earlier, created a ticket for it here:
    http://dev.bukkit.org/server-mods/m...aving-this-lwc-with-protected-chests-and-fur/

    I believe I fixed it with the latest version, can you confirm?
     
  4. Offline

    Mercury

  5. Offline

    Lyneira

    Short answer: Yes, in the future :)

    Long answer: The features in that mod like automated crafting, transport of items between chests, crafters and furnaces would be implemented with a proposal earlier in this topic for the pipelining mod, which I do have planned but is a bit longer-term project.
     
    Mercury likes this.
  6. Offline

    Lyneira

    MachinaCraft 2.1.0 is updated for CraftBukkit 1.1-R3!

    With this release, all machina plugins are now configurable.

    Drill:
    - Movement speed
    - Whether to use energy or not

    Builder:
    - Movement speed
    - Build speed
    - Maximum depth
    - Whether to use energy or not

    Pump
    - Maximum tube length up to 64. Affected area is the square of the tube length, so beware with large values!
    - Maximum depth
    - Tick speed (how fast the pump operates)
     
  7. Offline

    Mercury

    Lyneira
    After updating to 2.1.0 and using Bukkit R3 machines won't move or will move only one block. Furnace will continue to work but no any movement or drill action. I didn't change any values in config.

    No errors in console.

    Edit.
    If server is under high load (Can't Keep up) Machines will stop ? Will not move/work ?
     
  8. Offline

    Lyneira

    As far as I'm aware they wouldn't stop working completely, though they might slow down a lot depending on how much load there is on your CPU.

    The machines rely on bukkit's scheduler to be called for their next action, which measures time in server ticks. Normally the server runs 20 ticks/second, but under high load (players and plugins doing all kinds of stuff, world chunks being loaded/generated etc) that number could go down and you will see the server print "Can't Keep up" messages. The further ticks/second goes down, the slower the machines will run.

    In extreme cases that could mean that the machina are doing nothing (or almost nothing) at all.

    Edit: Possible causes: Too many players (especially if they're all far away from each other), or using CPU-intensive plugins are some things I can think of.
     
  9. Offline

    Mineman2000

    Lyneira
    Thank you for this plugin, just a great idea. I would suggest the same additions as Junrall, especially using a piston. This would make it a bit more realistic.

    Edit:

    MachinaDrill/MCMMO
    As a consequence that the blocks mined by the machine appear to the server as mined by machineowner, there are some issues with MCMMO and this plugin:
    • when the player is near (ca. 10 blocks) the activated drill machine, double dropped blocks (MCMMO), do appear and won't be collected.
    • Player gains experience due machine mined blocks
    One good thing is that this machine contains an iron block, so you can repair your tools.
     
  10. Offline

    Lyneira

    I thought about using a piston for the drill for the same reason as you're suggesting, but decided against it for a couple of reasons:
    • It's my understanding that actuating pistons through plugins isn't too well-supported at the moment.
    • Actuating a piston (for every drilled block? while moving?) for realism would add a lot of complexity to the code, since it needs to be de-actuated for every actuation as well, and in-time for the next "tick" of the machine.
    • The noise made by actuating pistons would become a source of annoyance when a player starts using them for an extended time. Even worse when using 5 drills to get big work done.

    As for MCMMO:
    It looks like there's a fundamental problem here that doesn't have an easy solution. MCMMO makes the (logical) assumption that blockbreak events only come from players actually mining stuff. That's not the case with a drill.

    The problem would be solved by having the drill not fire blockbreak events, but that would make the drill invisible to plugins like WorldGuard and LogBlock.
     
  11. Offline

    Mineman2000

    I think single moved pistons aren't necessary. Once 9 blocks (3x3) are mined) the piston(s) could actuate. One piston would be IMHO adequate enough.

    Opinions do differ, but I think a machine should make noise, because real machines do too. I would even suggest to use spout, so a custom sound could be used. Also custom engine blocks would then be possible.

    I try to ask the MCMMO team, maybe they're willed to look at it.
     
  12. Offline

    Lyneira

    If the McMMO team has any ideas on how it could be solved, I'd like to hear from them. Maybe some way to tag a blockbreak event as being from an artificial source?

    One piston actuation when the drill is about to move could work. I haven't experimented with it yet, but if I figure out how to reliably activate a piston from my plugin, I could add this.
     
  13. Offline

    Robulus

    Hi there,

    i just wanted to say "I love your machines" ;-)
    Great plugin.
    I'm running my server since abot a year now and still find new plugins every day.
    But your's will definitely stay on my server :)

    Only one suggestion.
    How about making the drill a little bigger,..not much but 5x5 maybe.
    When you build bigger underground structures or clear bigger land areas it would be useful.

    But,....with or without 5x5. Great Work!!!

    Greetz
    Rob
     
  14. Offline

    Lyneira

    WoopaGaming made a video showcasing MachinaCraft! Many thanks to them.

    5x5 is possible, but I think it would be too big and powerful to have as the default. Maybe something to make configurable, or add a larger version of the drill that requires more materials.
    Edit: Late night left that comment with an unfinished sentence.

    Don't forget you can use more than one drill to speed things up if you need to. :) For clearing a large underground space, I would recommend starting 3 blocks below your future "ceiling", clearing the area you need, then work your way down from there.
     
  15. Offline

    oystergaming

    Hope you don't mind, Me and My friend love your plugin so we made a Plugin Review of it on our Youtube Channel. We noticed the WoopaGaming one aswell, we actually made ours before it but we didn't post it on this thread.

     
  16. Offline

    Mercury

    Lyneira
    While trying to make Vertical Drill, server gives me exception.
    Code:
    2012-03-06 19:47:28 [SEVERE] Could not pass event PlayerInteractEvent to MachinaCore
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:285)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
        at net.minecraft.server.Packet15Place.handle(SourceFile:39)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NullPointerException
        at me.lyneira.MachinaPump.Blueprint.detect(Blueprint.java:42)
        at me.lyneira.MachinaCore.MachinaCore.onLever(MachinaCore.java:62)
        at me.lyneira.MachinaCore.MachinaCoreListener.playerInteract(MachinaCoreListener.java:49)
        at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        ... 12 more
    Running Bukkit 1.2 R0.1 BETA & Latest plugin version.

    Also is it possible to add sign feature to Drill like on builder to make turns.
     
  17. Offline

    Lyneira

    Mercury
    Found the bug that was causing this, it's fixed in the latest version: MachinaCraft 2.1.1

    oystergaming
    Hey there, glad you like the plugin, and thank you for the spotlight!
     
  18. Offline

    Nividica

    Hey all,
    Wanted to show off a project i've been working on using the MachinaCraft framework. It's what I call a Highway_Builder. Custom designed to build the type of road system we have, and saving us a ton of time vs. building it by hand. Thank you @Lyneira for this fantastic framework.
    Behind: HighwayBuilder Behind.jpg , Front: HighwayBuilder Front.jpg , Side: HighwayBuilder Side.jpg , Top: HighwayBuilder Top.jpg
    Highway at night: HighwayBuilder Over_Highway_Redstone_Night.jpg , Under the highway: HighwayBuilder Under_Highway.jpg
     
  19. Offline

    knightfox

    Hi Lyneira,

    Thanks for all the time with this mod. Also could you look at putting some kind of ladder placing mechanism for the vertical drill, that way we don't have to just jump. Thanks again
     
  20. Offline

    xBladeM6x

    Is it possible to make coal burn at a quicker rate? I'm looking to make it burn twice as fast. If this is possible, I would greatly appreciate it if you could tell me what I would need to add to the config and where. Thanks!
     
  21. Offline

    Nividica

    If your talking about just coal then you can simply adjust its fuel amount in the MachinaCore\config file. The default fuel amount (aka Heat Value) can be found on the furnace page of the minecraft wiki
    , you can also find the data values you will need on the data values page or by following the links on the furnace page. For making coal seem like it burns twice as fast, half its fuel amount! The wiki says the default value of coal is 1600, and it's ID is 263. So you would want to add this to your config
    Code:
    fuels:
        263: 800
    And now the machina will use twice as much coal as it used to :)

    Note: If I understand the wiki correctly, coal and charcoal use the same ID, just different data markers. So this should also effect charcoal as well
     
  22. Offline

    Mercury

    @Lyneria

    Some interesting error, I am not sure what happened.


    LWC and MachinaCraft have problems ?
     
  23. Offline

    Lyneira

    Did some testing, it's a problem that got introduced with Bukkit 1.2.3 involving double chest inventories. Long story short, if a machina's chest ever touches a separate chest while it's running, it will throw an error on the next move and the machina will stop. Both chests will be cleared in the process. I have a fix for this in an upcoming version.
     
  24. Offline

    Lyneira

    MachinaCraft v3.0.0 is out! This version requires CraftBukkit 1.2.3-R0.2.

    New features:
    • Moving machina (Builder and Drill) now go through snowfall and long grass.
    • Added sign support for the drill.
    • New machina: HoverPad!
    • New BETA project: MachinaFactory! MachinaFactory allows machina to send objects to other machina through a pipeline of blocks.
      • The Item Relay sends items from its chest through a pipeline. If an Item Relay receives an item, it will start sending items as well.
      • Chests and Dispensers can receive items.
      • The Fabricator will try to craft the recipe in its chest from the inventory of a sending Item Relay and send the result onward through a pipeline.
     
  25. Offline

    Lyneira

    MachinaCraft v3.0.1 is now out:
    • Marked blockbreak and blockplace events from machina as artificial for the benefit of other plugins.
    Fixed bugs:
    • Partial fix: New way of generating and handling events that shouldn't actually be logged. (for example, a moving drill / builder checking if they can move) Should play a bit nicer with LogBlock as they are cancelled at the last possible moment before monitoring plugins get a look.
    • A Fabricator that feeds items back into the chest of the item relay supplying it no longer causes the crafting result to disappear.
    • A Fabricator that fails to send items into a full chest or item relay no longer drains crafting materials from its source.
     
    aritturlt likes this.
  26. Offline

    TheExoduser

    Your Update is awesome (especially the hoverpad ;) ) but is there any way for you to modify the hoverpad in a way that it keeps other blocks (like redstone lamps) at it ? This would be soooo awesome because then the people on my CB Server could use it as a moving lamp.

    Hope to hear from you.

    Lg
    Exo

    P.S. Sorry for my bad english but I'm from germany.
     
  27. Offline

    Lyneira

    MachinaCraft v3.0.2 (sorry for the rapid fire today!):
    • Fixed a bug with blockplace event generation.
    • On a server with mcMMO, blocks placed by a builder will no longer give XP or double drops.
    TheExoduser:
    Do you want the hoverpad to leave the lamp on when it stops? You could leftclick the lever after stopping the hoverpad to make it turn the lamp back on. :)

    When you want to reactivate the hoverpad, turn it off and then rightclick the lever to activate. (rightclick twice works)
     
  28. Offline

    Mineman2000

    Thank you for your great work. I really like the way you do plugins. They are not just another plugin which already exits.
    I will test ist ASAP. Especially the mcMMO part. :D

    Thank You
     
  29. Offline

    bulwark44

    Awesome cant wait to add to my server will this be updating to 1.2.4 any time soon
     
  30. Offline

    ahorner

    Does not run in 1.2.4 (#2109), just thought I would give you a heads up.

    Code:
    00:01:07 [SEVERE] Could not pass event PlayerInteractEvent to MachinaCore
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:179)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:273)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:636)
            at net.minecraft.server.Packet15Place.handle(SourceFile:39)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NoSuchMethodError: org.bukkit.event.block.BlockBreakEvent.<init>(Lorg/bukkit/block/Block;Lorg/bukkit/entity/Player;)V
            at me.lyneira.MachinaCore.ArtificialBlockBreakEvent.<init>(ArtificialBlockBreakEvent.java:16)
            at me.lyneira.MachinaCore.EventSimulator.blockBreakPretend(EventSimulator.java:129)
            at me.lyneira.MachinaCore.EventSimulator.inventoryProtected(EventSimulator.java:176)
            at me.lyneira.MachinaDrill.Blueprint.detect(Blueprint.java:198)
            at me.lyneira.MachinaCore.MachinaCore.onLever(MachinaCore.java:68)
            at me.lyneira.MachinaCore.MachinaCoreListener.playerInteract(MachinaCoreListener.java:49)
            at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
            ... 12 more
    
     
  31. Offline

    Lyneira

Share This Page