Coder Social home page Coder Social logo

py2command's Introduction

py2command

py2command is a Minecraft command block wrapper for Python. It provides a simple way to write long command block chains while maintaining the ability to see multiple "command blocks" at once. It can also generate working NBT data for you, making it much easier to use correct syntax.

Usage:

A pip package for py2command is coming soon, when the project is more developed.

If you would like to test py2command early, simply put the py2command.py file in the same folder as your python script, and import it! (it is recommended to import py2command like: import py2command as p2c to avoid typing as many characters).

Read the docs to see the full list of supported commands and features!

Example:

Here's a comparison of the same exact command (give unbreakable named knockback stick with mending, knockback 15, and lore) written in game vs. in py2command.

In game: give @p minecraft:stick{display:{Name:'[{"text":"Knockback Stick","italic":false}]',Lore:['[{"text":"A stick with extreme knockback","italic":false}]']},Enchantments:[{id:"minecraft:knockback",lvl:15},{id:"minecraft:mending",lvl:1}],Unbreakable:1b} 1

With py2command: p2c.give('@p', 'stick', ['Name=Knockback Stick,A stick with extreme knockback', 'Enchant=knockback:15,mending:1', 'Unbreakable'], 1)

py2command takes the command and automatically parses and converts it into something you can paste into Minecraft. Think of it as multiple command generators built-in to one Python module, with a system to automagically convert them to command blocks.

py2command's People

Contributors

tbukfrc avatar

Watchers

 avatar

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.