Skip to content

Commit d8e4c5d

Browse files
committed
update minecraft-data and add effects and version to the api
1 parent 3cddfdf commit d8e4c5d

5 files changed

Lines changed: 44 additions & 2 deletions

File tree

doc/api.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,34 @@ windows indexed by name
9494

9595
unindexed windows
9696

97+
## Effects
98+
99+
### effects
100+
101+
effects indexed by id
102+
103+
### effects_name
104+
105+
effects indexed by name
106+
107+
### effects_list
108+
109+
unindexed effects
110+
111+
## Version
112+
113+
### minecraftVersion
114+
115+
For example 1.8.8
116+
117+
### version
118+
119+
The protocol version, for example 47
120+
121+
### majorVersion
122+
123+
The minecraft-data major version, for example 1.8
124+
97125
## Functions
98126

99127
### find_item_or_block

example.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@
1515
from minecraft_data.v1_9 import recipes as recipes2
1616

1717
print(recipes2["5"][0])
18+
19+
20+
from minecraft_data.v1_8 import effects_name
21+
22+
print(effects_name["Haste"])
23+
24+
25+
from minecraft_data.v1_8 import version
26+
27+
print(version)

minecraft_data/tools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def convert(dir):
2525
'windows': _by_id(data['windows']),
2626
'windows_name': _by_name(data['windows']),
2727
'windows_list': data['windows'],
28+
'effects': _by_id(data['effects']),
29+
'effects_name': _by_name(data['effects']),
30+
'effects_list': data['effects'],
31+
'version': data['version']
2832
}
2933

3034
def find_item_or_block(find):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
version='0.3.4',
1111
maintainer='Romain Beaumont',
1212
maintainer_email='romain.rom1@gmail.com',
13-
url='https://github.com/rom1504/python-minecraft-data',
13+
url='https://github.com/SpockBotMC/python-minecraft-data',
1414
packages=find_packages(),
1515
package_data={'minecraft_data': ["data/data/*/*.json"]},
1616
install_requires=[

0 commit comments

Comments
 (0)