michael-zinn / slimeit Goto Github PK
View Code? Open in Web Editor NEWMinecraft Bukkit plugin that consolidates some redundant gameplay elements into one.
License: Other
Minecraft Bukkit plugin that consolidates some redundant gameplay elements into one.
License: Other
This is more of a Java question than a Bukkit question.
Languages like Ruby allow mixins and other cool features, so extending Bukkit could look like this:
Block block; // a default bukkit block
if(block.isStickyPiston() && block.isExtended()) {
block.getExtension().setSticky(false);
block.setSticky(false);
}
Or something similiar like this. However, it's not possible to do this in Java.
Option 1:
A utility e.g.
BukkitPlus bp = new BukkitPlus();
if(bp.isStickyPiston(block) && bp.isExtended(block)) {
bp.setSticky(bp.getExtension(block), false);
bp.setSticky(block, false);
}
However, this is somewhat ugly.
Option 2:
Putting another layer on top of bukkit that covers bukkit completely. This would be pretty to use, but probably overkill, because it would mean duplicating the entire API.
So what should we do here? Please discuss!
The plugin doesn't integrate with any other plugins. This issue isn't tested well yet, but it's probably possible to steal slime from WorldGuard protected areas and smear them on the walls of players you hate :)
I guess the whole slime thing should be seen as constructing, so it should be grouped in the same permissions category as placing or destroying blocks? Feel free to discuss this, I'm pretty much clueless about protection plugins.
There are many other simplifications to be done, e.g. these:
As I see it, there are several options:
I guess it's best to write several plugins that share a common library. That common library would contain both the bukkit simplifications (like getting a piston's base from its head) and some common "This block has something on its side that can be punched off" functionality (instead of limiting it to slime like it is right now it should be in a generic way i.e. a glowing pumpkin has a torch in its face that can be punched off and a cracked stone brick has a crack that can be punched off but drops nothing). Now that I think of it, it might be possible to really write one single PunchCrafting plugin that allows separate configuration files for slime, cracks and pumpkins... that would even allow users to implement funky ideas like punching coal off smooth stones and sticking them to other stones all by themselves!
I'm a github newbie, so please forgive me if the current setup of the project isn't optimal yet. If you want to contribute to this problem, but encounter any problems that I can fix, please add them to the comments!
What can I do to make contributing to this project easier for you?
Abusing the github issue system to create a mini blog!
How blocks and items interact should be defined in config files. Bukkit uses YAML, other options are YAST and JSON (please add other nice markup languages to the comments).
The difficult question is what to model. But lets discuss the (conflicting) requirements first:
There are several things that could be modelled, here are some ideas (these are somewhat mutually exclusive):
It might be best to do a combination of the two. For example, slime balls and torches are passive objects, so they could be defined from the perspective of the block they attach to:
mossycobblestone {
is=cobblestone
sides=slimeball
}
jackolantern {
is=pumpkin
front=torch
}
This is enough to define that you can attach slime to a cobblestone or a torch to the front of a pumpkin. Things like pickaxedamage could be a special thing, like this:
crackedstonebrick {
is=stonebrick
sides=PICKAXEDAMAGE
}
And the plugin code specifies what this special PICKAXEDAMAGE thing is.
Also, the block definitions themselves should be in a config file, e.g. (values made up):
pumpkin {
id = 86
data {
0 = { front = 2 }
1 = { front = 3 }
2 = { front = 0 }
3 = { front = 1 }
}
}
// Inheritance might be overkill here, though.
jackolanternt < pumpkin {
id = 91
}
stonebrick {
id = 98
data = 0
}
crackedstonebrick {
id = 98
data = 1
}
mossystonebrick {
id = 98
data = 2
}
This makes it very easy to adapt the plugin to new versions of minecraft.
Please contribute your ideas in the comments.
Silk touch interaction wasn't even tested yet.
But what's the best solution for silk touch? Should it drop the combined block or separate blocks?
Hey. I really love this plugin. I want to use it on my server. But I cant find a download for a .jar file. Could you please send me a link for it?
You have a cool idea? Write a comment!
It would be nice if it worked with logging tools like HawkEye and LogBlock.
It would be nice if mild explosion damage could blast the slime off a block without destroying the block. E.g. clean that dirty fortress by detonating TNT in it to wipe the slime off the walls.
Not sure about this: Give explosions a small chance to turn a stone brick into a cracked stone brick?
Explosions aren't covered add all yet. So if a creeper or TNT explodes near a sticky piston or any slimey object the item drops as a slimey item instead of splitting into its components
Explosions destroying slimey objects should break them the same way a player does. E.g. blasting an extended sticky piston should drop a retracted regular piston at the position of the piston base and a slime ball at the position of the extended sticky piston head.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.