Smart Items
Smart-items
The goal of this mod is to allow items on the ground to interact with the block below and give Dispenser some new abilities.
- Saplings that land on dirt or grass will plant themselves.
- Crops that land on farmland will become Planted in a 3x3 area.
- Nether wart will plant on its self on soul sand in a 3x3 area.
- Bone meal that lands on/in a plant will cause it to grow.
- Items Passing over a powered workbench will be Crafted into the item in its Item frame.
- A powered workbench can Craft water potions if water is above the workbench.
- A Powered cauldron will pick up Items Below it, and place into a container, or on top.
- If an Item Frame is placed on a cauldron or hopper it will only accept items like the one in the frame.
- Tools in dispensers will affect a cone of blocks directly in front the dispenser, and animals. (Shovels , Axes, Pickaxes, Hoes, Fishing Rods, and Shears)
- Food near two animals will cause them to breed.
- Empty buckets near cows will fill with milk.
Tips and Tricks
Images of some Gagets
Vsit the Tips and Tricks Page for more ideas.
How To Install and run
- Download the plugin
- Place .jar file in your plugins directory.
- edit/create Config File
- Run the server.
config.yml
CropPlantingTimer: 120 # time in ticks before a seed plants
TreePlantingTimer: 120 # time in ticks before a sapling becomes a sapling block
UseWorldGuard: true # Will disable tree planting, dispenser tools and blocks in any region.
AllowAutoCraft: true # allows auto craft system
AllowBreeding: true # Stops animals from making babes when near food.
AllowCauldronLift: true # turns off Cauldron ability to lift items.
Arrows2Items: true # arrows become arrow items after impact.
DispenserUsesTools: true # allows Dispenser to use Tools
AllowDispensingBlocks: true # allows Dispenser to drop blocks as blocks
DispenserRange: 1 # extends range of Dispensers tool use 0 = 3x3, 3 = 3x6
DisabledWorlds: world1_nether,world1 # worlds ignored by the mod.
Know Problems
- Delete old Config Files to prevent crashes!
- Problems with new Tree types
- Some Auto Crafting problems with complex items, like fireworks.
This mod is hard to explain anyone want to make a video for me?
@Vapor_Lock
Sure just chests or Dispensers also?
I have the next version 99% complete and im working on a demo world to show whats possible.
Can you add a config option to turn off items going into chests?
added fishing, and sheep shearing. thinking about adding cow milking, any other requests?
Cant wait for droppers and hoppers!
@CommodoreAlpha Theres no way I can think of to track the player that dropped and item. For the case of 4 item frames the first one it finds it uses, same for item frames on chests. it should work with any recipe in the server list. As for RecipeManager I think it work.
@BenRush yes there are options in the config to turn off things.
I still haven't found a way to use world guard yet. but whats the worst they can do? plant a forest in spawn?
Turning off things is a feature that the developer could probably add to his/her plugin.
If you look at my "mini-conversation" with the developer, worldguard compatibility hasn't been added yet, but is planned. Just hold tight and be patient. :)
yeah but i got question. Can i turn off some things? I don't need all of them :/ and does it have compatiblity with wg? for example can I drop sapplings to protected region and will they plant?
Permission support for non-admin commands (like reload) would be extremely difficult.
Here's an example why: How would a dispenser know when or when not to fire based on the player powering it? Technically, the player never interacted with the dispenser, the environment (redstone wiring) did.
Or how would a workbench know when to craft a set of dropped items? Tracking who dropped those items would consume resources, and even if it did, the items may have been dropped from dropper or a dispenser.
Also, what happens when I put four item frames (each with different items) on the same workbench? Will the plugin become confused, or will it craft any one of the four items based on what lands on top? Also, will this plugin respect recipes I set via RecipeManager?
http://dev.bukkit.org/server-mods/recipemanager/
I know it's outdated, but I have so many recipes on it that I can't move onto another plugin. :/
Maybe add a permission support?
THIS IS AWESOME!!!!!
you guys are going to love this next update! I was able to get Workbenches running with every recipe in the game even ones added by other mods.
My Axe Factory and soup maker
@CommodoreAlpha
I think i can follow the log up to check for leaves that will naturally decay, (player placed leaves don't decay) I'm sure I can make it work for trees that have one trunk, but why reinvent something thats already out there. I'm talking to the guy who made treechop2 to find away to link up to it.
The fire is coming out nicely it looks like a flame thrower coming out of the dispenser.
and minecraft seems to keep stealing my ideas, every snapshot has something i was adding to this mod lol!
I'm sorry to say, but this is the part where I'm absolutely useless as I know exactly zero Java (or any other coding). The closest I get to being any good at code is logic (What does x mean?) and flowcharts (What methods or approaches does x take on?) when put into non-coding language, and even then, that's not much (it only helps when troubleshooting bugs).
I've been meaning to learn Java at some point in my life (not sure when), so I probably should pick up a book this summer. Anyway back on topic.
You should change the description "axes in dispensers will chop down logs in front of them" to "axes in dispensers will chop down logs directly in front of said dispenser" to clear up ambiguity. In front could technically mean at the same altitude, in the dispenser's line of sight, but 30 blocks away. Thanks for making that clearer though, but not everyone will read this comment to understand the mechanic more specifically.
As for distinguishing natural log blocks from placed ones, (this is where my code illiteracy comes in) is it possible for the plugin to "know" if a block was generated by natural means or player involvement? If not, you could make the plugin check for surrounding log blocks. If it finds logs attached to more logs, it could keep tracing back the logs until it finds logs that touch leaf blocks. If it detects these leaf blocks, it will treat it as a naturally generated tree and level it like a real tree. Note that player-placed leaf blocks have different data (I believe different damage value) from naturally-generated leaf blocks; hence why placed leaves don't decay.
However, if tracing each log block and looking for each neighbouring log block until natural leaves are found is an unfeasible option, you could just do a proximity check (within a certain radius) for naturally generated leaves and see if the leaves touch naturally generated leaf blocks or logs, though this could lead to issues as this isn't totally foolproof. I suggest asking one of the many "realistic tree-chopping" developers, I bet at least one of them will help you out. Here's the one I use:
http://dev.bukkit.org/server-mods/choptree2/
Again, sorry for being of no help.
@CommodoreAlpha
I need help or sample code to make WorldGuard or Residences work.
The current way I'm doing it (only works with axes at the moment) if theres a Log directly in front of the Dispenser the axe in the dispenser loses one durability. and the log is chopped down.
There was a mod called LumberJack where the whole tree fell if the bottom was chopped. I'm looking into making something like that. if I can figure out a way to separate trees from log houses.
For flint and steel I could set the dispenser to fire a "fire block" and the fire block lights a fire where it lands, and some how not consumes fire blocks so when the fire ends an new one from the stack starts a new fire. How ever adding that before i figure out protections could be dangerous.
I'll add it to the next version but have it off by default. if it works.
Having environmentally-aware items is a smart idea, especially for automating things! (Which, in my opinion, beats many industry mods built for the lazy. Not that being lazy is bad.) :)
But environmentally aware items doesn't mean eco-friendly items. By that, I mean that when a dispenser dispenses an axe, shovel, or pick to break a block, it might bypass protections, if you haven't already thought of this or added it. For example, one day I accidentally leave out an unlocked dispenser (with a button) at Spawn, and someone gets the smart idea to load it up, so now everything in front of it is...
Well, you get the point. You might want to make sure that such block breaks respect most major protection plugins, like WorldGuard and Residences.
Also, this is a weird idea, but can dropped fire set fire to where it lands? The more fire in a single stack there was, the longer the fire would last (if that were possible). And about the flint and tinder item creating a fire, where exactly will it make the fire? If it made the fire where it landed, there would be one less flint and steel (a waste of the "steel"), so it would make sense to light a fire one block away from it. You could even turn the flint and steel into a fire weapon and have it set fire to all blocks immediately around it.
@Vapor_Lock
@MrMightyGnome Things to add to config
any thing you want to add?
I agree with MrMightyGnome, the config should have things such as what can or cannot be enabled. These things can include what can or cannot be auto planted, maybe a way to disable it in certain worlds or regions, a way to choose whether or not arrows should drop from skeles and inf bows, maybe a way to add custom blocks and a way to choose the delay in ticks or seconds until the item that is dropped is actually planted/how long before the item dropped goes into a container. I hope you take this into consideration. Thanks.
more like, i wish there was a config for, how long it takes for things to work.. (how long does it take for the saplings to plant themselves, same for seeds and how long does it take for food to cook over fire.) There MUST be a config file. Enabling/Disabling features and such. they should all be added in a config file.
@MrMightyGnome
The cooking will probably go away no point with hoppers and ovens.
Cant wait for bukkit to include hoppers. :)
well, making it so you can turn off some features you may or may not like. I might have plans to turn off cooking with fire beneath :( other than that, this plugin is great! cheers!