Code Monkey home page Code Monkey logo

canaryraspberryjuice's People

Contributors

martinohanlon 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canaryraspberryjuice's Issues

New method to allow players on server to be retreived

To supplement the multiplayer functions it would be useful to have a call which returns the players on a server.

First thoughts are it should be something like world.getPlayers(), which would return all the players registered on a server, should probably return entityId, name, world.

mc.getBlockWithData() results in value error

Looks like it is trying to cast a java toString() into int.

block_type = mc.getBlockWithData(pos.x, pos.y - 1 , pos.z)
File "C:\Python27\lib\site-packages\mcpi\minecraft.py", line 136, in getBlockWithData
    return Block(*map(int, ans.split(",")))
ValueError: invalid literal for int() with base 10: 'net.canarymod.api.world.blocks.BlockType@3b24d1f0'

Implement "entity" functions

The Pi api supports "entity" function which allows you to call the same .getPos .setPos (etc) functions are player but passing in an entity id. This should be included in RaspberryJuice

[minecraft 1.8] setBlock() not working

Hello Martin, thanx for your work! It's realy help me to study Python and Java!
Tested with CanaryMod-Bleeding #121(120, 119) (stable) + CanaryRaspberryJuice 1.0.2 + minecraft 1.8
world.setBlock() - not working, no error in console..
Maybe it's happened because in minecraft 1.8:
Block ID numbers (such as 1 for stone), are being replaced by ID names (such as minecraft:stone)

It's bug of CanaryRaspberryJuice or CanaryMod?

No events recieved

G'day Martin. Thanks for this book and CanaryRaspberryJuice. I'm running through the book using CanaryRaspberryJuice and Minecraft 1.8 (CanaryMod) on Linux to familiarise myself with the workflow and results before handing it over to three eager kids.

Everything has been working great until I hit Adventure 4 and blockHit.py. As best as I've been able to determine, no matter which sword I use, I am not being returned event data.

My code is here:
https://git.mcwhirter.io/craige/MyAdventures/blob/master/blockHit.py

I've also run your version from "Code Files" and neither version are returning any block hit events.

At different points I have also tried adding print statements, to print the event position but nothing is ever printed.

The code all runs without error but unfortunately also without any event data.

Do you have any ideas on where I could be digging to resolve this one?

Thanks!

Question about perf considerations in `tick()`

Hi,

I was just reading through the code and noticed the tick() method:

https://github.com/martinohanlon/CanaryRaspberryJuice/blob/master/src/com/stuffaboutcode/canaryraspberryjuice/RemoteSession.java#L109

    /** called from the server main thread */
    public void tick() {

        if (origin == null) this.origin = plugin.getSpawnLocation();
        int processedCount = 0;
        String message;
        while ((message = inQueue.poll()) != null) {
            handleLine(message);
            processedCount++;
            if (processedCount >= maxCommandsPerTick) {
                plugin.getLogman().warn("Over " + maxCommandsPerTick +
                    " commands were queued - deferring " + inQueue.size() + " to next tick");
                break;
            }
        }

        if (!running && inQueue.size() <= 0) {
            pendingRemoval = true;
        }
    }

Would you mind explaining some of the findings that led to this implementation? In particular, what are your observations about the behavior of the server at various maxCommandsPerTick thresholds?

Regards,
Steve

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.