Coder Social home page Coder Social logo

enginehub / craftbook Goto Github PK

View Code? Open in Web Editor NEW
302.0 18.0 160.0 21.27 MB

๐Ÿ”ง Machines, ICs, PLCs, and more!

Home Page: https://enginehub.org/craftbook/

License: GNU General Public License v3.0

Java 100.00%
java craftbook minecraft redstone worldedit gradle ics gameplay mechanics plugin

craftbook's Introduction

CraftBook

CraftBook is a heavily customizable plugin adding exciting new gameplay elements and advanced redstone functions!

  • Modular, and extremely light on your server.
  • Enable features that you need, disable ones that you don't. Even tweak features to your liking!
  • Redstone ICs (AND/OR gates, lightning striker gates)
  • Elevators for your server so people can jump between floors quickly (Or smoothly, if you choose so)
  • Working cauldrons so players can cook inside them
  • Your own custom crafting recipes
  • Hidden switches for players
  • Minecart booster blocks and more
  • Togglable areas and bridges
  • Chairs you can sit on
  • Working pipes that can transfer items from place to place!
  • Footprints where your players walk!
  • Mobs and players drop their heads.
  • The ability to bind commands to items, with cool-downs, permissions and timers.
  • And much more!

An extensive list of features is available on the docs!

Compiling

See COMPILING.md for a guide on compiling CraftBook.

Contributing

We happily accept contributions, especially through pull requests on GitHub. Submissions must be licensed under the GNU Lesser General Public License v3.

Please read CONTRIBUTING.md for important guidelines to follow.

Links

Supporters

BeastNode Logo

BeastNode offers premier hosting for a great price!

YourKit Logo

YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

craftbook's People

Contributors

billygalbreath avatar coderjo avatar darkarc avatar dddeeefff avatar delphianmc avatar dumptruckman avatar erythrocraft avatar fredghosn avatar goosewoman avatar lymia avatar me4502 avatar moo0 avatar mrnerdhair avatar nickmcski avatar nicofuma avatar ntroutman avatar oddstr13 avatar olegbl avatar philipu avatar phoenix616 avatar purpleposeidon avatar raineth avatar scoreunder avatar silthus avatar sindreij avatar sk89q avatar sturmeh avatar tom-ski avatar warpfork avatar wizjany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craftbook's Issues

Add more datatypes to Perlstone

Only having 1-bit datatypes is highly limiting. With more datatypes, you would of course need more opcodes, eg:

  • add 8-bit datatype
  • opcode to add/subtract/multiply/divide from the stack
  • opcode to compare numbers from the stack, pushing true/false as the result (greater/less/equal)

If you had these...I think I could build my wanted Counter IC without resorting to Java :)

Wrong pins order for 3ISO ICs facing to F=1 or F=3

Steps to reproduce:

  1. Start CraftBukkit with WorldEdit and CraftBook (I used craftbukkit-1.2.5-r4.0, WorldEdit 5.3 and CraftBook-r507).
  2. Place 4 MC3036 as shown here: http://www.shareurpic.com/images/1782012_06_10_22.36.31.png (sorry, don't know how to attach file here).
  3. Turn on pins CLOCK and D (according to craftbook wiki, it's central and left pins) for all 4 MC3036s.

Expected result: all 4 MC3036s must have 1 on their outputs.
Actual result: ICs facing to F=1 and F=3 will have 0 on their outputs. However, they will switch to 1 if you'll turn on pin 3 and turn off pin 2 ( http://www.shareurpic.com/images/5232012_06_10_22.36.48.png ).

This works for every 3ISO facing to F=1 or F=3, not only MC3036 - they work as if input 2 were on the right, and input 3 were on the left of the IC sign.

P.S. Sorry for my English, my native language is Russian.

How do you build a 3I3O?

There's nothing anywhere about how to build a 3I3O. Not in the wiki, not in the code. Please fix, or at least describe how to build it here. Thanks!

Exception in VehicleListener while calling VEHICLE_POSITIONCHANGE

Minecraft Server v0.2.8
Minecraft Client Alpha v1.2.6
Hey0 Server Mod Build 131
CraftBook version dev-f07b4ba

When a mine-cart collides with a chest, the following exception is thrown.

Exception while calling plugin function in 'class VehicleListener' while calling hook: 'VEHICLE_POSITIONCHANGE'.
java.lang.NullPointerException
    at Item.<init>(Item.java:247)
    at Chest.getContents(Chest.java:59)
    at NearbyChestBlockBag.addSingleSourcePosition(NearbyChestBlockBag.java:199)
    at VehicleListener.onVehiclePositionChange(VehicleListener.java:529)
    at PluginLoader.callHook(PluginLoader.java:619)
    at jo.g(jo.java:425)
    at jo.b_(jo.java:308)
    at eq.a(SourceFile:1068)
    at ex.a(SourceFile:37)
    at eq.f(SourceFile:1044)
    at eq.c(SourceFile:1023)
    at net.minecraft.server.MinecraftServer.h(SourceFile:268)
    at net.minecraft.server.MinecraftServer.run(SourceFile:210)
    at bx.run(SourceFile:484)

Add some ICs, improve some, and Bugfixes

CHANGELOG:

  • edit the risingEdge check to XNOR (everywhere, where nessessarry)
  • renamed TimeControl to SimpleTimeControl
  • edited XOR and XNOR gate, so that they take 3 inputs and evaluate them!
  • added new IC's:
    • MC1263 ( RainSensor )
    • MC1264 ( ThunderSensor )
    • MC1205 ( SetBlockAbove )
    • MC1206 ( SetBlockBelow )
    • MC1420 ( DivideByN )
    • MC2020 ( Random3Bit )
    • MC3231 ( TimeControl )
    • MC3232 ( WeatherControl )
    • MC4000 ( FullAdder )
    • MC4010 ( HalfAdder )
    • MC4100 ( FullSubtractor )
    • MC4110 ( HalfSubtractor )
    • MC4200 ( Dispatcher )
    • MC0263 ( RainSensorST )
    • MC0264 ( ThunderSensorST )

Still there are some problems with the family3ISO and 3I3O, because the inputs are sometimes not checked right (in my enviroment)
(I dont know how to upload files here, so i uploaded them on my webspace... sorry :) )
http://cookiesoft.de/craftbook/circuits/

Allow functions of the Vehicles Component to be turned off

CRAFTBOOK-2202 - Reported by Dark_Arc

Sk89q recently added the craftbook vehicles module to vincent (the vanilla server) and we've been going through several issues trying to get him to finish setting it up.
While trying to give us permission to create the control signs for the vehicle stuff, he accidentally disabled the signs entirely. Through testing, we discovered that the sort sign still functions even when it has been disabled. It continues to sort minecarts properly and send them in the right direction.

-- Originally added by kaitoyuuki

Teleport block error

When I create telepor blocks and attempt to use one, the following error appears on the terminal:

19:10:14 [GRAVE] Could not pass event VEHICLE_MOVE to CraftBookVehicles
java.lang.NoSuchMethodError: com.sk89q.worldedit.bukkit.BukkitUtil.center(Lorg/bukkit/Location;)Lorg/bukkit/Location;
at com.sk89q.craftbook.cart.CartTeleporter.impact(CartTeleporter.java:50)
at com.sk89q.craftbook.cart.MinecartManager.impact(MinecartManager.java:50)
at com.sk89q.craftbook.bukkit.VehiclesPlugin$CraftBookVehicleListener.onVehicleMove(VehiclesPlugin.java:105)
at org.bukkit.plugin.java.JavaPluginLoader$80.execute(JavaPluginLoader.java:804)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
at net.minecraft.server.EntityMinecart.m_(EntityMinecart.java:564)
at net.minecraft.server.World.entityJoinedWorld(World.java:1198)
at net.minecraft.server.WorldServer.vehicleEnteredWorld(WorldServer.java:53)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:236)
at net.minecraft.server.Packet10Flying.a(SourceFile:126)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

I have WorldEdit installed and other blocks, such as boosters and stations, work correctly.

Minecart Feature Requests

You asked me to post them here as a list, so without further ado:

  1. Make a powered launcher launch continousley, and not only once
    1.a Create a way, a dispensed cart starts moving immediately (this cooincides with the launcher, as that could make it so)
  2. Devise a system to hold a cart on a certain block for a certain amount of time (as defined on a sign). Can be the station block with the amount to hold for on the fourth or so line.
  3. Make a block-type that either removes the minecart entitiy if it passes over it and is empty, or give chests the options if theyre placed next to tracks (with some distance maybe if possible) to collect empty carts.

4.Make a block-type that holds the cart with player on it and "ask" the player to type out where he wants to go eg. /left,/right,/up,/down. (I dont really like that, I want to keep commands away from players, but has been requested by a player)

5.Create a IC (SISO) that generates a clock when inputs goes into high state. (also a request from a player, cannot say if its feasible)

Thank you!

EffectData validation for Particle Effect with effectId = 2001

Steps to reproduce:

  1. Start craftbukkit with WorldEdit and Craftbook (I used craftbukkit-1.2.5-r4.0, WorldEdit 5.3 and craftbook-r594).
  2. Create IC with the following text:

[MC1210]
2001:256
1
  1. Place a wall button to power it up (i.e. like this: http://www.shareurpic.com/images/8832012_07_01_13.19.32.png ).
  2. Push the button.

Actual result: client will instantly crash.
Expected result: nothing bad should happen.

I think this issue is serious. Consider somebody placing powered MC0210 with effect 2001:256 (or any other effectData value larger than 255) near the spawn area. Players will not be able to log in and get out of this IC, and even OPs will not be able to turn off that IC, unless the server admin will disable craftbook and destroy the IC.

Quick workaround may look like this (after try-catch code block getting effectData from IC sign):

if (effectId == org.bukkit.Effects.STEP_SOUND && effectData > 255) effectData = 0;

Beta version: Self-triggering receiver

In your dev version for beta your self-triggering receiver (MC0111) will only change to the transmitter's (MC1110) state if the receiver is on the same block level as the transmitter, otherwise it defaults to on.

Add jump opcode to Perlstone

Instead of requring matched [ and ] opcodes, also give us an arbitrary jump opcode. Maybe something like
j## where ## is the label number, and then a separate opcode l## which does nothing except create a location to jump to.

To make it really useful, also add conditional jumps:
jz## -- pop the value from the stack, if it's zero, jump to label ##, else do nothing
jnz## -- pop the value from the stack, if it's non-zero, jump to label ##, else do nothing

New type of pressure plate.

Feature request:
Pressure plate that checks who/what is on it (stone only would be the best option) and turns connected redstone only on if it matches the type/name that is on the third line (for example type Player or type Zombie or name Kutagh). In terms of sign layout it would be similar to a wireless transmitter/receiver, might need a clock as input as well.

Infinite Loop can be caused by three not gates

If you connect the outputs of three not gates together using only one redstone wire piece per connection, the server freezes. If you use longer chains of redstone it adds slight delay and will often cause the gates to get into a state where they are stuck in an impossible state where two gates in a row are on, this stops the runaway loop. The server I am on has decided to not use craftbook till this kind of breaking of server is fixed.

Minecart dispenser loses items

The minecart dispenser does not move items contained in a cart into the chest, but instead just loses all of the items in a storage cart, as well as the chest used to make the storage cart.

Please document the build process for craftbook

I'd like to help out by adding ICs or maybe other small enhancements. But I'm not sure on the build process -- I added the hey0 hmod & mc server JARs to the classpath, but then I get errors about missing WorldEdit classes. I then tried to compile WorldEdit...but I get errors about missing JNBT classes. I'm afraid every time I try to get a dependency it'll require more things down the line.

If you could document what is needed to compile, that would be great. (Providing an ant build.xml would be awesome, but I could create that if I knew what was needed)

Debugging mode

Add a debugging mode that prints out verbose message to figure out why certain features don't work on some servers.

Can't toggle glass --> lightstone off in config

CRAFTBOOK-2200 - Reported by Dark_Arc

The option to toggle it off in config does not work, ive tried everything related to "light" just in case...
ive tried to edit it several time, when the server were online, offline and everything.. still working.
also, the feature should be off as default, Mojang added lamps for a reason ;)

-- Originally added by Glacksy

Idea: command-triggered ic

My idea: command-triggered ic's
Signs could be like this:
command-ic
[MCxxxx]
startic
5

Then it would be triggered by /mctrigger startic, and give a pulse of (in this case) 5 ticks.

Sorry for my github-failure, I still don't know where to put ideas.

Dispenser malfunction

2010-12-22 22:23:10 [SEVERE] Exception while calling plugin function in 'class VehicleListener' while calling hook: 'VEHICLE_POSITIONCHANGE'.
java.lang.NullPointerException
at Item.(Item.java:247)
at Chest.getContents(Chest.java:59)
at NearbyChestBlockBag.addSingleSourcePosition(NearbyChestBlockBag.java:199)
at VehicleListener.onVehiclePositionChange(VehicleListener.java:529)
at PluginLoader.callHook(PluginLoader.java:619)
at jo.g(jo.java:425)
at jo.b_(jo.java:308)
at eq.a(SourceFile:1068)
at ex.a(SourceFile:37)
at eq.f(SourceFile:1044)
at eq.c(SourceFile:1023)
at net.minecraft.server.MinecraftServer.h(SourceFile:268)
at net.minecraft.server.MinecraftServer.run(SourceFile:210)
at bx.run(SourceFile:484)

CraftBook version dev-aa69442

Minecarts Suddenly Stopping

Happens on large tracks with boosters. I believe its due to the speed being boosted past a certain threshold. Boost a track with many gold blocks in series to duplicate.

WorldEdit..jar not found

Im getting this issue when trying to use /savearea. I do have WorldEdit, and it is enabled. I've tried using both stable and github versions of craftbooks and worldedit.

Repeater IC - Feature request

Feature request.

Forwarding this from an admin...

[20:35] <+MMJazende> to make a IC for repeaters, so it only uses 1 block height instead of 2 :p

Item duplication with nearby-chest

If you toggle a bridge and it runs out of wood while building, you can open the chest, take the wood out (it did use it to build the bridge, but it didn't remove it from the chest), and put it back in. Then you can toggle the bridge again, which removes it, and you gain these additional pieces of wood.

Toggle Areas failing with beta build

Just thought I'd let you know.
I have WorldEdit 2.3.2 and CraftBook beta branch built successfully.
Everything works in CraftBook so far, except Toggle Areas.

After I select an area, and type /savearea cactii, it shows this:
WorldEdit..jar does not exist in plugins/.
(yes with two periods after WorldEdit)

I believe it has to do with loading the plugin within getRegionPoint() in WorldEditBridge.java for WorldEdit. That's as much as I know.

But it could be that a directory doesn't exist. I don't know. Hopefully you can figure it out. Just trying to give a head start. :)

Anyways, glad the beta branch is moreover successful.

Counter IC

I'd like an IC that counts down. I tried building one myself, but I'm not sure on the process of setting up a build system for compiling the plugin. There's not ant XML or makefile or anything included that I could see.

Here's the code I wrote (completely untested):
http://davr.org/uploads/MC3101.java

Basically my goal is to be able to time processes which happen in the world, or perhaps have a button you click and then something turns on for a while, or delayed reaction, etc, without having to create a bunch of redstone torch inverters to introduce delay loops.

See the comments at the top of the JAVA file for explanation of how I mean it to work (again...untested)

NullPointerException caused by furnace in cauldron-recipe.

When you have a recipe including a furnace (I guess it'll hapen with workbenches/dispensers/chests too), and all the necessary blocks are placed, and you then rightclick the cauldron to "activate" the recipe you will get disconnected with a NullPointerException. If you, however, rightclick any other block, it will work.
In both cases the cauldron will get emptied and you will get the result of the recipe.

The cauldron recipe I used to test it:

3_planks+3_fire+1_furnace=1_burning furnace

bFurnace:5_3,51_3,61_1:62_1

The error I get: http://pastebin.com/7YAbmgyt

java.lang.ClassNotFoundException: de.schlichtherle.io.File

Craftbook build #356, Bukkit build #1933. Looks like a class dependency was added but not checked in or included with the actual deployed artifact?

2012-02-12 04:36:47 [SEVERE] Could not pass event org.bukkit.event.player.PlayerInteractEvent to CraftBookMechanisms
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:187)
at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:283)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
at net.minecraft.server.Packet15Place.handle(SourceFile:39)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:552)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
... 13 more
Caused by: java.lang.NoClassDefFoundError: de/schlichtherle/io/File
at com.sk89q.craftbook.mech.Bookcase$Factory.detect(Bookcase.java:177)
at com.sk89q.craftbook.mech.Bookcase$Factory.detect(Bookcase.java:166)
at com.sk89q.craftbook.MechanicManager.detect(MechanicManager.java:349)
at com.sk89q.craftbook.MechanicManager.load(MechanicManager.java:267)
at com.sk89q.craftbook.MechanicManager.dispatchBlockRightClick(MechanicManager.java:172)
at com.sk89q.craftbook.bukkit.MechanicListenerAdapter$MechanicPlayerListener.onPlayerInteract(MechanicListenerAdapter.java:97)
... 17 more
Caused by: java.lang.ClassNotFoundException: de.schlichtherle.io.File
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
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)
... 23 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.