EnergyCraft
EnergyCraft
Downloads:
Newest Version: 1.3.0 Beta | CB1.5.1-R0.1 Compatible!
EnergyCraft Reloaded by R_Shadowhand: Download Here
Description
Do you have tons of random things in your chests that are just taking up room?
This plugin solves that!
Now you can turn your useless cobblestone into diamonds with an "energy condenser".
Why Should I use it?
Although Equivalent Exchange has an Energy Condenser (not anymore), and is included in the tekkit pack, many people would prefer to be able to use such a feature without requiring client-side mods. This plugin will allow a server to have this feature, without any extra requirements, because it will only utilize vanilla blocks/graphics. While some people will flame this for directly copying EE, I disagree. EE requires client mods, whether single or multi-player. This plugin does not claim to be superior to EE, since many features are not implemented. It is simply an alternate that will work just fine in vanilla minecraft.
Features
- Use vanilla blocks to build a Equivalent Exchange-esque "Energy Condenser."
- Use EE's EMC values, or specify your own!
There will be a new video soon documenting all the newest features!
I've Got the Plugin. Now What?
Building The Condenser
Lets get started on building your first condenser!
There are four levels of condensers that can be built.
The higher the level, the less energy is lost through conversion (configurable)
The standard condenser recipe is:
Chest | Enchantment Table | Chest
Iron Block | Obsidian | Modifier Block
By default, here are the modifiers along with loss factors:
Level | Modifier | Loss % |
---|---|---|
1 | Gold Block | 35% |
2 | Emerald Block | 25% |
3 | Diamond Block | 10% |
4 | Beacon Block | 0% |
(Both the modifier block and % loss is fully configurable)
Using it
To set a target for the condenser, just right click the sign, or any part of the enchantment table!
Now, to get the condenser going, just dump anything you want into the INPUT (left) chest, and watch!
Please note, opening either IN or OUT chest requires the permission ec.use, or ownership over the condenser (see Permissions section)
Other Things
You can right click the sign/enchantment table while you're not holding anything to PAUSE/UNPAUSE the condenser. This change will be displayed on line 4 of the sign.
If you stop the server, all condensers will be saved to "condensers.sav", and loaded again upon server start. All EMC and items will be saved.
Left clicking the sign will reset the condenser, but only if you have the permission ec.reset
Condensing a damaged tool will only return a percent of it's total EMC.
(1 - (damage_value / max_damage)) * EMC_value
Setting a damaged tool as a target will create more tools with the same damage level. If you want to condense tools at full health, you must have one available to condense...
Commands
'/emc' will tell you the value of the item in your hand. This will return the FULL EMC value, so if your condenser has energy loss, the item will actually be worth less
'/ec reload' will reload the EMCConfig while the server is running. This allows for editing the config without stopping the server. All condensers and /emc will be updated the moment this command is run. This command requires the perm "ec.reload"
Permissions
Action | Owner | Needed Perm |
---|---|---|
Build | Doesn't Matter | "ec.build" |
Edit | Yes | none |
Edit | No | "ec.edit" |
Open | Yes | none |
Open | No | "ec.use" (see note) |
Break | Yes | "ec.build" |
Break | No | "ec.build" AND "ec.edit" |
Reset | Doesn't Matter | "ec.reset" |
/ec reload | n/a | "ec.reload" |
Get build/destroy messages | Doesn't Matter | "ec.broadcast" |
"Edit" means changing the target block, or pausing a condenser. Essentially, any right clicking the sign is an edit.
"Open" means accessing the I/O chests. This perm can be turned off in the config.
ec.use is unique in that you can give a user the ability to access any condenser with ec.use.* or specific condensers.
The perm format for a specific condenser is as follows: ec.use.[World]:[X]:[Y]:[Z]:[Orientation]
An example of a specific perm would be: ec.use.MyWorld:32:15:-135:2
To find the specific ID of a condenser, please check your condensers.sav file. The world, X, Y, and Z points are the location of the Iron block in the condenser. The orientation is a number 1-4, whose calculation is too difficult to explain. Please, just look in the sav file!
Configuration
The main config (config.yml) has the following options:
- check-interval: 1
- max-stack-condense: 4
- permission-to-use: false
- broadcast-messages: true
- level1: 41-35%
- level2: 133-25%
- level3: 57-10%
- level4: 138-0%
check-interval controls how often blocks in the INPUT chest will get condensed. 1 = once every .25 seconds. 2 = once every .5 seconds, etc... (Note, this is not exact because your server might lag or run slower/faster than it theoretically should)
max-stack-condense controls how many blocks are created at a time in the OUTPUT chest if there is extra EMC in the condenser.
permission-to-use turns ec.use on and off. When this is false, users do not need ec.use to access I/O
broadcast-messages Messages will only be broadcast to users with ec.broadcast. If this is false, no messages will be broadcast at all
levels The first number is the BlockID of the modifier block, and the second is the percent loss.
The EMC config (emcConfig.yml) has a option for every item ID.
- The values are stored as 'ID-DAMAGE_VALUE': EMC
- Some items are stored as 'ID-A':EMC - this means that regardless of the damage value, all items with that id will have the same EMC (like wool)
- Some are stored as 'ID-X':EMC - this means that this item can be damaged, and it's emc will be calculated as a percent of the given EMC, based on damage.
Notes
Source code will be available on my github
Plugin Idea by inventorman101, code by vsams14
My other plugins:
Clicking the enchanting table brings up the enchanting gui, the sign does nothing. I am using 1.2.6 beta one 1.4.5 R2.0
I was using the detailed descriptions option to see damage values and item ids, it showed four...
Unless you meant it had 4 hits left. In which case, 1 - (128/132) * 11 = 1/3, which gets rounded to zero, so non-condensible. If you don't know where I got these numbers from, take a look at my damage algorithm above...
Could not reproduce. A stone pick after mining 4 blocks (damage value 4) has an EMC of 10.6, which gets rounded to 10. Works just fine on my end.
@vsams14
A stone pick with a damage value of 4 or below (Not sure about above, I didn't test...) and a stone spade, but I did not check the damage value of it.
@coolo1
which tool, and what was the damage value for it? it may be that it was so damaged that it was no longer worth any EMC, hence uncondensible...
Almost broken tools do not condense either...
I'll fix it and maybe find a patch tomorrow evening. I don't have time to program during the week anymore... Thanks for your patience!
vsams14
Spigot is a bukkit modification based on Craftbukkit++ made to reduce lag (Reduce loaded chunks, reduce spawned mobs, reduce random ticks etc) and make more features possible (Such as custom whitelist disconnect messages and crop growth speed) The forums are here: http://www.spigotmc.org/
[Edit] Also, I love the new decraft feature! :D
@coolo1
That could be arranged. Can you tell me about spigot?
Idea: To patch up the spigot compatibility bug, could you hide the error messages that show when the chunk is unloaded? Since the plugin still works fine, they are un-neaded, produce lag and fill up the console.
@Everyone. If you get an error, and it contains the text "at org.bukkit.craftbukkit.inventory.CraftInventory.getSize" this is a problem that multiple users are experiencing. I am TRYING to figure out why it happens, but I am still unsure. Please do not post about it, unless you think you can provide new information that will help me fix the bug.
vsams14
Seems to be broken in 1.4.5 R0.2
Build - 2488
Spams this in the console. Server eventually crashes.
2012-11-22 02:16:00 [WARNING] [EnergyCraft] Task #18 for EnergyCraft v1.2.6 generated an exception
java.lang.NullPointerException
at org.bukkit.craftbukkit.inventory.CraftInventory.getSize(CraftInventory.java:38)
at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(CraftInventory.java:51)
at org.bukkit.craftbukkit.inventory.CraftInventory.firstEmpty(CraftInventory.java:206)
at com.github.vsams14.energycraft.Condenser.hasEmptySpace(Condenser.java:107)
at com.github.vsams14.energycraft.Condenser.condense(Condenser.java:53)
at com.github.vsams14.energycraft.CondenseTask.run(CondenseTask.java:9)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:529)
at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:493)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:426)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)
v1.2.6 is out. It fixes all previous permission problems, and adds in pretty much every item that was missing. For a full list of the items that are STILL not added, please see the caveat section of the above link!
Enjoy!
-vsams14
v1.2.6 will patch in ALL blocks/items that appear in vanilla minecraft. It will also add a decrafting function so that instead of all blocks from the condenser being lost when it is broken, instead they are put into a chest where the obsidian block usually is. Finally, it will fix the rest of the permission glitches, because apparently coding at two in the morning does not provide the best results...
Also, please comment if you would like an Auto-update system that download new versions of EC for you when they come out.
-vsams14
NOTE: It's not out yet, I'm just giving yo a heads up.
@batbat01
Please pm me for further discussion, I'll try my best to help you.
I'm new to troubleshooting Bukkit Plugins so I don't fully understand the errors I'm seeing. I was able to get Energy craft to work with my current list of plugins after breaking the condenser I had and rebuilding it. But after a few minutes it starts spitting out that error over and over. I will do more thorough troubleshooting with various plugins this evening when I get home. It is entirely possible that there is a conflict somewhere, though I haven't added any new plugins lately. Only updated ones that have been updated for 1.4. They all got along fine before so it would be nice to find out for sure where the problem is even if it isn't EC. btw, is there someplace you would rather I take this conversation beside on this page?
And if I haven't said it yet, thanks for the plugin. It really is cool. =)
Disclaimer: if your issues are due to plugin conflicts, it is not my fault and/or responsibility to fix said issue
@PhunkeyMonkeh
Ill look into this. I don't use perm on my server, so ther is a chance that I programmed it wrong.
-vsams14
@batbat01
Not sure why this is happening. Could you confirm that it's only while the chunk is unloaded? If so, do you have any plugins that automatically unload chunks? EnergyCraft is supposed to keep chunks with condensers always loaded.
-vsams14