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:
And that's v1.1.5
Should fix any and all bugs listed up till now. If more are found, I'll patch them as I go.
All the blocks for 1.3 and the aforementioned blocks from 1.2.5 that do not work will be added in version 1.2, unless bug patches require 1.2 to exist prior!
vsams14
@Samkio
Ya that would be totaly awesome if you could make a plugin showcase! By the way I love your youtube channel :)
Fixed Issue #2
And it looks like #3 was happening BECAUSE it was setting the target as a full stack of 64.
Looks like that itemstack.clone() was useful, but I did not include it...
Patching to 1.1.5
vsams14
Installed a 1.3.1 R2.0 Server, and I can definitely confirm that the bugs are there. Will try to fix them ASAP.
In the meantime, I'm going to put up the video (that I made), which is probably crap...
Have fun!
vsams14
@mm75
I have the same problem as you with the latest version. I'll take a look at the problem.
@vsams14
i am using 1.3.1 RB 2.0 1. ok whoops i can be stupid some times 2. i don't know if it works with all items but when i have a newly built condenser and i right click the sign with 64 diamonds it takes all except one 3. i am using 1.1.0
Also, I think I know why you guys are getting bugs that I've never run into. You are probably testing it on a 1.3.1 Server, which is something I should do, but I didn't because 1.2.5 is still much more stable and has less blocks.
On the note of 1.3.1, any blocks added in that update are incompatible with the condenser. I'll add all of them when I add the 1.2.5 blocks that don't work right now.
vsams14
@mm75
1. Pausing will only work if you are not holding ANYTHING. There will be no exception.
2. As far as taking the entire stack except one, that has never happened on my end, and I'll look into it. Can I have steps to reproduce the error? Does this happen with any stack or just a certain item?
3. Disappearing diamonds is Samkio's False Stack glitch. Try using 1.1.0 instead.
vsams14
i found a really big bug, a few really. when some tries to pause with an item in hand it takes it even if the same item in the machine. also when u right click with a stack it takes the whole stack except one. and one more thing is when i use a diamond and i put 64 blocks of gold the whole chest fills with diamonds and u can take 1 stack of diamonds but when u try to take the 2nd stack all of the diamonds in the chest disappear but the sign says it is still making diamonds
And 1.1.0 Beta is out! You can go to the download page to see the changes!
Merged some stuff with Samkio's pull.
@Samkio, you can make the video now, or you can wait till I implement all blocks. Your choice...
vsams14
@vsams14
Awesome. The false stack glitch is basically the out chest would fill it self up with stacks of 64 of an item (visually). Except when you would click them they would disappear. eg. Condense to iron ingot and put a few diamonds in the in chest would do it. I added a clean inventory bit to hopefully remove these items as well as fix up the way it choose the item to condense to.
Putting "this." in front of everything is just a habit of mine. :P Java will know you are accessing the right variable but I like to make sure. xD
@Samkio
Also, not to be picky, because you are a great help, but why do you have 'this.' in front of pretty much every variable? Doesn't java know that you're accessing a global variable if there are no locals of the same name? o.0
vsams14
@Samkio
What is the false stack glitch? I thought I had fixed that (if we're thinking of the same thing...)
Also I agree on seperating the emc config and the normal config. I'll take a look at all the changes later. I suppose since you are able to look at and understand the code, you should have no problem making a video that describes the features, I'll just merge some stuff (maybe not everything), and I'll get back to you...
vsams14
@vsams14
Just tried it out. I love it! :D
Works a treat (apart from the false stack glitch in the out chest [which I think you are aware of and have fixed?]). I made a couple of edits to it, feel free to use / not use it if you wish (forked on GitHub). I placed all the emc values in their own config, added an /emc command (Which could be extended to /emc <itemName>).
Keep up the great work! I won't do a video just yet, will wait till it's all finalised. :D
There are more features than listed above, so I suggest that you guys wait for my video. I'll make it quick, I promise!
vsams14
And the first beta is up! You can find it here
Enjoy!
Also, I made a rudimentary video to explain functionality, since it might be difficult to figure out. I'll have that up tomorrow! @Samkio will make a better one (hopefully), later...
vsams14
Hey!
I might have something functional today, actually. No guarantee that it will be bug free, but...
Working on saving/loading condensers to/from a file now, so that the server will remember where they are upon restart.
vsams14
@mm75
Hehe that's what I am like. :P
I'm constantly checking this and the github for updates. xD As soon there is any source on github i'm compiling it and giving it a go. Can't wait! :D
@vsams14
WHAT!?!?!?! I WANT IT NOW. GOT TO CAlm down. it will be ready next week. i can get then. AAAAAAAAAAAAAAAAAAAAAAAAAA I WANT IT NOW!!!!!!!!!!!!GOD DAMMIT I HAVE TO CALM DOWN.
@mm75
I expect to have a early alpha version for next week!