Code Monkey home page Code Monkey logo

juicyraspberrypie's Introduction

JuicyRaspberryPie

Programming Minecraft with Python, Javascript, or any language!

JuicyRaspberryPie provides a modding API plugin/mod for Spigot(Bukkit) server or Minecraft Forge. It also includes a command server that makes programming Minecraft much easier. It's a great tool to teach kids programming.

Installation

For Spigot(Bukkit)

Download juicyraspberrypie-1.x.x.jar from releases and put it in your server plugins folder. Start the Spigot server.

A detailed installation walk-through video: https://youtu.be/6-bqPcMoZ8M

For Minecraft Forge

Download juicyraspberrypie-forge-1.x.x.jar from releases and put it in your Minecraft mods folder. Start Minecraft with Forge, choose SinglePlayer, then select a world.

A detailed installation walk-through video: https://youtu.be/WoTxVFbr7_s

Documentation

Below are detailed documentation, each has(will have) one or more instructional videos.

  1. How to use API on Spigot
  2. How to use API on Forge
  3. How to program command server on Spigot
  4. How to program command server on Forge
  5. Python API
  6. How to develop API
  7. How to develop Spigot API plugin (for contributors to JuicyRaspberryPie Spigot plugin)
  8. How to develop Forge API mod (for contributors to JuicyRaspberryPie Forge mod)

Info

JuicyRaspberryPie API is based on MinecraftPi modding API. Its Spigot/Bukkit plugin implementation is based on RaspberryJuice

juicy

juicyraspberrypie's People

Contributors

janezd avatar wensheng 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

juicyraspberrypie's Issues

Connect to remote server failed

I run this plugin in spigot at my vps. But when I use mc = Minecraft.create(address='(my server host)', port=4712) connect to it, it told me my remote server droped this connect. So how can I solve this problem?

ProjectileHitEvent does not include BlockFace

Problem:
ProjectileHitEvent does not include the face variable - from which direction a block was shot.
When parsing the ProjectileHitEvent with the Python mcpi API, this leads either to an exception if no entity was shot (because too few arguments were provided) or the shooter id is actually consumed by the face variable, which then looks like the entity shot was the shooter.

Location in code:

Solution:
Simply send the BlockFace after sending the location but before sending the player unique id.

Doesnt work

Please check screenshot. I have latest Java, Python 3.4
Minecraft 1.9.4
Spygot server 1.9.4
minecraft bug

vec3 returns wrong coordinate

Hi,
I a newbie.
I am following your guides through youtube.
whenever I run .getTilePos() function the vec3 values are different than the actual tile value showing on the screen when I press the F3. Am I missing a point here or this might be a bug.

python functions with /p in minecraft

I am a newbie for minecraft and python. And I have a question.

I notice on your youtube video, that some of the functions in examples.py had default arguments.
I also notice that using JuicyRasperrryPie plugin, that you can list the functions using /p command in minecraft.

I have two questions:

  1. Can I pass an argument to a function, essentially overriding the argument that is there? And if so, is it something like /p cube(size=50, typeId=2) ? or something else?
  2. can I have multiple python files in the pplugins and will the /p command get all the functions? And if so, does that mean that all functions, (no matter what file they are in), have to be named uniquely?

Thank you.
Jerry

setBlock set only 'Sandstone'

I run a spigot server and the JuiciyRaspberryPie Plugin in the Version 1.18.1 and i can only set 'Sandstone' Blocks. What's wrong here?

import mcpi.minecraft as minecraft
import mcpi.block

mc = minecraft.Minecraft.create('127.0.0.1')
x, y, z = mc.player.getTilePos()

mc.setBlock(x+2, y, z, mcpi.block.AIR.id)
mc.setBlock(x+2, y+1, z, mcpi.block.DOOR_WOOD.id, 8)
mc.setBlock(x+2, y, z, mcpi.block.DOOR_WOOD.id, 0)

Command Server Not Available

I am pretty consistently getting the error command server not available, although it does occasionally work with a fresh install of the plugin. Is it possibly a Python issue? I'm using python 3.10, spigot 1.14.2

1.19.2

Hi,

Any plans for mc 1.19.2 support? minecraft server refuses to start with the 1.18.2 version of the plugin.

setSign doesn't work

Hi,

Thanks for this excellect plugin!
Had a lot of fun with it already (rss-feed visible high in the sky and lots more).
Now I found that with the latest version, setSign doesn't work: the boards (e.g. oak_sign) stay empty, no text.

Plugin fails to load on Spigot 1.8.7

I'm getting this error when starting Spigot with the JuicyRaspberryPie plugin. This is on Ubuntu 15.04 using Java 7 (openjdk-7-jre). Please let me know if any other details would help for debugging.

[23:44:40 ERROR]: Could not load 'plugins/JuicyRaspberryPie.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/wensheng/plugins/JuicyRaspberryPie : Unsupported major.minor version 52.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:291) [spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:528) [spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79] Caused by: java.lang.UnsupportedClassVersionError: org/wensheng/plugins/JuicyRaspberryPie : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_79] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[?:1.7.0_79] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_79] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[?:1.7.0_79] at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[?:1.7.0_79] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.7.0_79] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_79] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_79] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_79] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_79] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_79] at java.lang.Class.forName0(Native Method) ~[?:1.7.0_79] at java.lang.Class.forName(Class.java:274) ~[?:1.7.0_79] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.7.jar:git-Spigot-44c59bf-1880a9c] ... 6 more

[praise] Great work wensheng!

Not an actual issue, just wanted to drop by and say thank you for your work @wensheng .

I'm using your bukkit/Spigot bindings in a docker image built from sources (spigot and JuicyRaspberryPie). Dockerfile and helper scripts here: https://github.com/t-lo/minecraft-docker/tree/main/juicyraspberrypie .
Feel free to reference this in your bukkit readme https://github.com/wensheng/JuicyRaspberryPie/blob/master/bukkit/README.md if you like; should help others to get started with JuicyRaspberryPie right away.

Wrong output type for mc.getBlock

Edit: this is my mistake as I used the pip mcpi package. It could be more explicitly mentioned within the README.

When trying to access a block through mc.getBlock(x,y,z), the server returns a wrong data type, causing this traceback:

Traceback (most recent call last): File "x", line 5, in <module> print(mc.getBlock(1, 1, 1)) File ".../site-packages/mcpi/minecraft.py", line 344, in getBlock return int(self.conn.sendReceive(b"world.getBlock", intFloor(args))) ValueError: invalid literal for int() with base 10: 'SPRUCE_LEAVES'

The error occurs because the mcpi module tries to coerce the string that the server returned into an int.

This can be fixed by changing how mcpi itself works, but I think that's not the point of this project. I'm not sure if this is maintained but I think I do know how to implement a fix on the Python side (that'd require a 'custom' mcpi version).

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.