What is Python Code Mod
Python Code Mod addresses the question of coding Python stuff in Minecraft by adding a Python Block and movable Python Hand which can be programmed with Python. The code of course can be edited in game using standard writeable books. This sounds not really appealing, so there is an alternative extended book which provides more space, cursor and mouse control, syntax checking and some other features.
What can you do with Python Code Mod?
After successfully created the Python Block or Hand you can write some Python code in a Writeable Book (or the superior Python Code Book), right click it on a the Python Hand or Block and have that code be run.
If you want to delay the running of your code you can put all the code in a run() function
That function will then be run only when you right click the Python Wand on the hand or block.
Also, Python Blocks may have other events that they handle:
- Redstone Power
- If you define a powerOn() or powerOff() function these will be called when the block receives, or loses redstone power (eg from redstone wiring, or just a button placed on the block.)
- Time Passsing
- If you define a tick() function this will be called about 20 times per second.
Python Wands are used to create Python Code Books and interact with Python Blocks and Python Hands:
Python Blocks sit in the world and can do stuff:
Python Hands can move around in the world and can do stuff.
Python Code Book is a superior editable book that will also check your Python code for syntax errors:
The Hand and Block share a bunch of functionality. For example, to make a message appear in the in-game chat, you would use:
From this point on, I will refer to the block name, but you can also use the “hand” name here too:
- The world that the block or hand belongs to.
- The block-space position of the block or hand. Block space uses only integer (whole) numbers to locate things in the world using X (East/West), Y (Up/Down) and Z (North/South) coordinates. You can get a new pos by adding or moving the block’s pos around, like:
pos.up() pos.east() pos.add(1, 0, 4) # East/X 1, Up/Y 0 and North/Z 4
- The player that loaded code into the block or hand.
- Holds all of the blocks in the game, for example:
blocks.STONE blocks.COBBLESTONE blocks.BED blocks.LADDER blocks.TORCH
- Holds all of the items in the game, for example:
items.TORCH items.IRON_SHOVEL items.WATER_BUCKET
- This lists some of the entities in the game, allowing them to be spawned:
entities.ZOMBIE entities.CREEPER entities.SKELETON
- Have the message appear in the in-game chat.
- Have a water source be created at the position, for example
water(pos.up()). This will only work if the target position is clear.
- Have a water source be created at the position. This will only work if the target position is clear.
- Clear the block at the position nominated.
Note: using clear with the Python Block position will remove the block!
Both Python Blocks and Python Hands may define a
run() function that will be invoked when the block or hand is activated (right-clicked) with the Python Wand. For example, on a block:
def run(): block.firework()
block.powered (boolean) block.firework() block.spawn(entities.CREEPER) (ZOMBIE, SKELETON)
def powerOn(): # invoked when a redstone signal powers block def powerOff(): # invoked when redstone signal stops powering block def tick(): # invoked every server tick (20 times a second?)
def powerOn(): block.firework()
def powerOn(): block.spawn(entities.ZOMBIE)
hand.forward() hand.forward(10) hand.backward(5) hand.reverse() hand.left() hand.right() hand.face(‘north’) (south, east, west) hand.move(x, y, z) hand.water() # only if clear hand.lava() # only if clear hand.clear() hand.put(blocks.COBBLESTONE) hand.line(5, blocks.STONE) hand.circle(5, blocks.STONE, False) // filled hand.ellipse(5, 10, blocks.STONE, True) hand.door(blocks.OAK_DOOR) hand.ladder(8, blocks.LADDER)
A more complete example which creates a little two-storey tower with a door, bed and ladder from ground up to the roof:
def run(): for i in range(8): hand.ellipse(5, 5, blocks.STONE, i in (3, 7)) if i in (0, 4): hand.put(blocks.TORCH) if i == 4: hand.left() hand.put(blocks.BED) hand.right() hand.up() hand.down(8) hand.backward(6) hand.put(blocks.OAK_DOOR) hand.forward(9) hand.ladder(8, blocks.LADDER)
Invokes run() in the hand or block, if that function is defined.
Python Code Mod installing instruction:
- Download and install Minecraft Forge
- Download the mod.
- Head to %appdata%.
- Head to .minecraft/mods folder.
- Drag and put the downloaded jar (zip) file into it.
- If it does not exist, you can create one.
Download Python Code Mod
Mod for Minecraft 1.7.10: updating…
Mods for Minecraft 1.8: updating…
Mods for Minecraft 1.9: updating…
For minecraft 1.9.4: updating…
Mods For minecraft 1.10: updating…
Mods For Minecraft 1.11: updating…
Have you a channel youtube about minecraft?
Do you want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mod, which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/revozincom or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!