martinohanlon / canaryraspberryjuice Goto Github PK
View Code? Open in Web Editor NEWA canarymod plugin to replicate the minecraft: pi edition api
License: MIT License
A canarymod plugin to replicate the minecraft: pi edition api
License: MIT License
setBlock commands simply update blocks regardless of whether they need updating or not. Change RemoteSession to check the block type and data before updating the block.
As per the fork https://github.com/thouis/CanaryRaspberryJuice
Test raspberryjuice with Minecraft and Canarymod 1.8. Once this has been completed progress raspberryjuice to 1.3 and update plugins on canarymod forum.
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.
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?
Hi,
I was just reading through the code and noticed the tick()
method:
/** 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
Block properties were introduced in minecraft 1.8, these havent replaced block data but supplement it. Functions should be introduced / modified to work with block properties
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!
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'
When you call setPos and getPos it resets the players direction (pitch and yaw). The Pi api maintains the pitch and yaw when the player is moved.
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
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.