Builder for Citizens2
Builder is a character plugin for the NPC plugin Citizens2. With Builder, A NPC can be given a mcedit/worldedit schematic file and build it block by block. Builder NPCs can also maintain an existing building, replacing changed blocks or removing new ones.
Features
Builde' NPCs can:
- Build MCEdit/Worldedit schematics, block by block.
- Rebuild an existing structure, fixing anything that has been changed.
- Require players to supply the building materials before starting to build.
Installation
- Install Citizens2 Please use Latest Dev Builds
- Unzip Builder.zip to your minecraft /plugins/ directory.
- This will install Builder jar, create the Builder/schematics/ folder and put house.schamatic in it.
- Start your server.
Usage
- Create a NPC with Citizens and give it the 'builder' trait.
/npc create Bob --trait builder
- Load a schematic with /builder load, Example:
/builder load house
- This will load the included example house.schematic file.
- Position the NPC in the center of the area in which it should build.
- Start the NPC building with:
/builder build
More detailed instructions and other commands can be found on the Citizens 2 Wiki
FAQ
Q: How can I use multiple builders on one project?
A: You can use up to 4 builders on one project by giving them all the same schematic and origin, but different build patterns. You can also manually split your schematic into multiple parts with WorldEdit or MCEdit.
Q: How can I make builders go faster?
A: Use the /builder timeout command to set the max time between blocks. You can also make the builder walk faster with "/npc speed"
You know what you should add is where 2 or more builders can build one structure together you know like link them to the same building.
@lunarixx
out of memory error. Are you trying to load a schematic? It might be too big for the amount of RAM allocated to your server.
What is this error? It works for one of my server, however on the second, it doesn't work.
org.bukkit.command.CommandException: Unhandled exception executing command 'builder' in plugin Builder v0.6.6b at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186) at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchCommand(CraftServer.java:510) at net.minecraft.server.v1_4_6.PlayerConnection.handleCommand(PlayerConnection.java:980) at net.minecraft.server.v1_4_6.PlayerConnection.chat(PlayerConnection.java:898) at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:853) at net.minecraft.server.v1_4_6.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290) at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112) at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39) at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:598) at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) Caused by: java.lang.OutOfMemoryError: Java heap space
Is there anyway to make it so multiple bots are building the same thing?
@gramoobi
If hes idle you should not get an error attempting to build again. If the problem comes up again, check his status before calling cancel or build and let me know exactly how it changes.
@jrbudda
It says Status: idle
@gramoobi
if you do /builder info what does it say the Status is?
My Builders work fine for a while but then they go into idle before the project is finished... i use /builder cancel and it tells me the builders not building, then i try builder build and it sais could not build already building.
@Sc1ro
set /trait builder to the npc
It says "That command must be performed by a Builder"
@Foroth
Check your versions. builder 0.6.3 does not work with craftbukkit 1.4.5r0.3, see the build compatibility on the wiki page.
For some reason the Builder Plugin is not working for me. I've double and triple checked everything, but it doesn't seem to be working. Whenever I try to launch my server with it, I get this error.
And yes, it is up to date.
Thanks in advance!
[SEVERE] Error occurred while enabling Builder v0.6.3 (Is it up to date?) java.lang.NoClassDefFoundError: net/minecraft/server/Packet at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getConstructor(Class.java:1657) at net.citizensnpcs.api.trait.TraitInfo.create(TraitInfo.java:39) at net.jrbudda.builder.Builder.onEnable(Builder.java:66) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_4_5.CraftServer.loadPlugin(CraftServer.java:270) at org.bukkit.craftbukkit.v1_4_5.CraftServer.enablePlugins(CraftServer.java:252) at net.minecraft.server.v1_4_5.MinecraftServer.j(MinecraftServer.java:320) at net.minecraft.server.v1_4_5.MinecraftServer.e(MinecraftServer.java:299) at net.minecraft.server.v1_4_5.MinecraftServer.a(MinecraftServer.java:258) at net.minecraft.server.v1_4_5.DedicatedServer.init(DedicatedServer.java:147) at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:398) at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856) Caused by: java.lang.ClassNotFoundException: net.minecraft.server.Packet at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:34) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 17 more
@fisherman77
I've tried this and hit some snags, the only way to honor protection is to require the NPC's owner to be a player and to be online during the entire build. Decided the limitations weren't worth it.
Nothing really the protection plugin devs can do, its just how bukkit is set up.
Maybe something will open up with the official API.
@jrbudda
So you don't think there will ever be an implementation of existing WorldGuard or Herostronghold build protections. Do you know of any simpler way around this? Could the plugin devs of the protection plugins do something?
@jrbudda
thanks for that works great, he did plant a seed on an un-tilled patch of dirt that caused the seed to eventualy break itself, but other then that worked perfectly.
makes it look pretty cool to have a farmer that actually plants :P thanks
@yurikoma
Turns out it was just a typo dealing with crops/seeds. And minecraft doesn't have different names for the wood and stone pressure plates, I've made it so players can now turn in either. New version available on the wiki.
@jrbudda
thats weird lol (the schematic was created in the world i have the builder in), well here it is, good luck
https://dl.dropbox.com/s/3txjo2hadoc9qsw/farm.schematic?dl=1
Edit: i also found out that stone and wood pressure plates aren't counted as the same thing, so some users get confused when he says he needs some pressure plates but won't take the opposite one. (need to add some way to tell them appart)
@yurikoma
That error would indicate there is a block in the schematic that does not exist in the version of minecraft you are running.
If you can upload the schematic to dropbox or sendspance and send me the link, I can see what it is.
hey, i am trying to make a builder that maintains a farm (replant when told to build)
but currently when i try to get it to build using /builder build or /builder build farm (farm is the schematic name) or /builder build linear
it results on me getting an internal error message ingame and this in my console
http://pastie.org/5452421
i have built something before and it worked fine, but not with this one, so please help with this
@craigfry
using wrong citizens2 for your bukkit version.