AlchemicalCauldron
Overview
AlchemicalCauldron is a plugin for bukkit which is used for converting items thrown into a cauldron into other items (e.g. dirt into iron ore).
Features
- Supports the transmutation of items when they come into contact with a cauldron
- Can define input and output materials
- Can define the statistical probabilities of how often items are transmuted
- More seamless item conversion (timers)
- Pop-out effect when items are converted
- Rudimentary collision detection
Permissions
Permission | Usage |
alchemicalcauldron.use | This controls whether or not a player can use cauldrons to transmute items. |
Usage
Simply run the plugin, in order to create the "config.yml".
Use the "config.yml" in order to adjust the item input/output ratios in order to suit your needs.
Reload the server in order to update the config.
Throw items towards a cauldron in order to convert them into other items.
Note: if items do not seem to be getting transmuted, try standing closer and ensure you are throwing items INTO the cauldron.
Ratios
- Items can be input through their name or their item ID
- Input item ratios (0.0-1.0) control how often an item is converted (e.g. 0.46 for dirt will convert it 46% of the time)
- Output item ratios use a slightly more complicated system, but in general the higher the number (0.0-1.0), the greater the chance of that item being created
Source
https://github.com/Indiv0/AlchemicalCauldron
Download
http://dev.bukkit.org/server-mods/alchemicalcauldron/files
Changelog
Version | Changes | Compatible Builds |
1.16.0 | Update for 1.7.2 | 1.7.2 |
1.12.0 | Cleanup/fix code & permissions | 1.6.4 |
Implement basic collision detection | 1.6.2 | |
1.11.1 | Fixed permissions being given by default | 1.5.2 R-1.0 |
Moved to Mbapi | ||
Various fixes | ||
Changed versioning scheme | ||
1.4.2 | Various fixes | 1.4.7 R-0.1 |
Forced Java 7 | ||
1.4 | Large code rewrites/optimizations | 1.4.2 R-0.2 |
Fixed config.yml versioning scheme | 1.3.2 R-3.0 | |
1.3.2 | Added permissions support | 1.4.2 R-0.2 |
1.3.2 R-3.0 | ||
1.3.1 | Fixed several bugs | 1.4.2 R-0.2 |
Added ability to configure item outputs individually | 1.3.2 R-3.0 | |
1.3 | Fixed Java 6 compatibility | 1.4.2 R-0.2 |
Fixed PluginMetrics implementation | 1.3.2 R-3.0 | |
1.2.1 | Built against Java 6u37 to ensure compatibility | 1.3.2 R-3.0 |
1.2 | Added ability to throw stacks of items into cauldron | 1.3.2 R-3.0 |
Fixed small error message spelling mistake | 1.3.2 R-2.0 | |
1.1 | Added timers in order to allow for more seamless item spawn/despawn | 1.3.2 R-2.0 |
Added PluginMetrics support | ||
1.0 | Added base functionality | 1.3.2 R-1.0 |
Added ratio support | ||
Added configuration file support/ratio storage |
Bugs/TODO
All bugs and TODO information can be found on the issue tracker for this project on GitHub.
@Indivisible0
Also, do you think you could add in the feature to take stacks of dropped items into account? It's quite tedious to manually tap your drop key & could be a configurable option.
The buggy part of it is that when I drop a full stack of an item, say dirt, it will think I'm only dropping one item, :o
@TerraVale
Great to hear! I'll look into the error, thank you very much for providing me with the stack trace! :)
@kevinseamus
I'll look into it. I'll try to implement it the way hoohoo4 suggested but like I've said previously it's not easy to do with current events.
Great plugin, can you make it so it works when items are thrown in the cauldron? :)
@Indivisible0
Oh that's right, I probably should have mentioned...
Using the latest version of A.C. and Craftbukkit (1.3.2 R2), it prints some errors to the console about PluginMetrics. Not entirely sure why!
http://pastebin.com/T6i5n5N2
Luckily, it still works, and with v1.1 the error I had in v1.0 is no longer there! :)
@TerraVale
With version 1.1 that shouldn't be happening. That is the version you are running, correct? In 1.1 the items should despawn after about 3 seconds if the conversion was unsuccessful. Try setting the ratios really low and throwing a solitary dirt block at the cauldron. It should stay for a few seconds then despawn.
Erm- I'm guessing that with these ratios, there's supposed to be a chance that the item disappears and gets used, but does not output anything...
Currently, for me, the item just drops on the ground. You then pick it up again, and just try until you get the desired output! Is the dropped item in my scenario supposed to be eaten, or disappear?
@Indivisible0
I just figured out collision detection! Add the SpoutPlugin to your build and do something like this: public class AlchemicalCauldron extends JavaPlugin implements Listener{ Spout spout=new Spout(); @EventHandler public void onServerTickEvent(ServerTickEvent event){ World w=this.getServer().getWorld("world"); Collection<FallingBlock> fall=w.getEntitiesByClass(org.bukkit.entity.FallingBlock.class); if(!fall.isEmpty()){ for(int x=0;x<fall.size();x){ if(((FallingBlock)fall.toArray()[x]).getBlockId()==50){ FallingBlock t=(FallingBlock)fall.toArray()[x]; if(!t.getLocation().add(1,0,0).getBlock().isEmpty()){ t.getLocation().getBlock().setType(Material.TORCH); t.remove(); } if(!t.getLocation().add(-1,0,0).getBlock().isEmpty()){ t.getLocation().getBlock().setType(Material.TORCH); t.remove(); } if(!t.getLocation().add(0,0,1).getBlock().isEmpty()){ t.getLocation().getBlock().setType(Material.TORCH); t.remove(); } if(!t.getLocation().add(0,0,-1).getBlock().isEmpty()){ t.getLocation().getBlock().setType(Material.TORCH); t.remove(); } } } } } That's how I did it for falling block collision... planning on adding a for loop to make it work in all worlds rather than just the one named world.
@hoohoo4
Well you could always add to the bukkit repo and file a pull request, if you are so inclined. I was actually thinking about doing it myself but I am afraid:
a) My coding is not up to par with dinnerbone, et al
b) I have no idea how my changes might affect the rest of bukkit
c) It would take me a while to figure out how to implement it
@Indivisible0
I have the same problem, there seems to be no event for an entity hitting a block, unless said entity extends the projectile class. I wish I could just get a full copy of the Bukkit API and add "extends projectile" to every entity D:
@hoohoo4
Yeah, It's not really a plugin breaking bug but it would be nice.
I'll look into implementing it. It's still a bit of a cop-out because I would only be setting a delay (maybe varying in time) on the conversion as I can't seem to find a way to detect the cauldron/item collision with current Events. :(
Sounds great. Im interested in using this, but allowing items to fall for a time before disappering would be nice.