Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update util.py for python 3.11 compatability #4

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
7 changes: 4 additions & 3 deletions mcpi_e/entity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Entity:
'''Minecraft PI entity description. Can be sent to Minecraft.spawnEntity'''

def __init__(self, id, name = None):
def __init__(self, id, name=None):
self.id = id
self.name = name

Expand All @@ -19,7 +19,8 @@ def __iter__(self):
return iter((self.id,))

def __repr__(self):
return 'Entity(%d)'%(self.id)
return 'Entity(%d)' % (self.id)


EXPERIENCE_ORB = Entity(2, "EXPERIENCE_ORB")
AREA_EFFECT_CLOUD = Entity(3, "AREA_EFFECT_CLOUD")
Expand Down Expand Up @@ -99,4 +100,4 @@ def __repr__(self):
LLAMA_SPIT = Entity(104, "LLAMA_SPIT")
PARROT = Entity(105, "PARROT")
VILLAGER = Entity(120, "VILLAGER")
ENDER_CRYSTAL = Entity(200, "ENDER_CRYSTAL")
ENDER_CRYSTAL = Entity(200, "ENDER_CRYSTAL")
Loading