mcapibridge 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mc/minecraft.py CHANGED
@@ -41,8 +41,10 @@ class BlockHit:
41
41
  self.pos = Vec3(x, y, z)
42
42
  self.face = face
43
43
  self.entityId = entityId
44
- self.action = action # 1=Left,2=Right
45
- self.type = "RIGHT_CLICK" if action == 2 else "LEFT_CLICK"
44
+ self.action = action # 1=Left,2=Right,101-105:Keyboard Action
45
+ if action == 1: self.type = "LEFT_CLICK"
46
+ elif action == 2: self.type = "RIGHT_CLICK"
47
+ elif action > 100: self.type = f"KEY_MACRO_{action - 100}"
46
48
 
47
49
  class Minecraft:
48
50
  def __init__(self, host="localhost", port=4711):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcapibridge
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python libary for MCAPIBridge
5
5
  Author: TaotianZhufang
6
6
  License: MIT License
@@ -133,7 +133,7 @@ Sets the text on a sign block.
133
133
 
134
134
  #### `getOnlinePlayers()`
135
135
  Get players' name online.
136
- * **return**: Dict: `[{'name': 'Steve', 'id': 123}, ...]`。
136
+ * **return**: Dict: `[{'name': 'Steve', 'id': 123}, ...]`.
137
137
 
138
138
  #### `getPlayerPos(target="")`
139
139
  Get player's position and yaw and pitch.
@@ -245,7 +245,7 @@ Get click events.
245
245
  * Double z
246
246
  * **face**: Int click face.
247
247
  * **entityId**: Int ID of clicking on entity.
248
- * **action**: Int action type:1--left click,2--right click.(Left click event is only affected by player clicking where which can reach)
248
+ * **action**: Int action type:1--left click,2--right click,101-105--Keyboard pressed.(Bind keys at Minecraft settings)
249
249
  * **type**: String action:"LEFT_CLICK" or "RIGHT_CLICK"
250
250
 
251
251
  #### `pollChatPosts()`
@@ -274,7 +274,7 @@ Represents a 3D vector/coordinate.
274
274
  * **length()**: Returns vector length.
275
275
 
276
276
  #### `PlayerPos`
277
- **Inherits Vec3.**Represents player position with rotation.
277
+ **Inherits Vec3** Represents player position with rotation.
278
278
  * **properties**: `x`,`y`,`z`,`yaw`,`pitch`.
279
279
  * **Methods**:
280
280
  * **forward(distance=1.0)**: Returns a new `Vec3` position at `distance` blocks ahead of the player's view.
@@ -0,0 +1,7 @@
1
+ mc/__init__.py,sha256=6TuAOkHXMgtW0yNeyMAcVxiqRR8BTMekzrkDnNqQ93k,172
2
+ mc/minecraft.py,sha256=MjWX1AWcCjO9177HSo7OEei3KkolwFkY9s5oH_UUdlg,12135
3
+ mcapibridge-0.1.2.dist-info/licenses/LICENSE,sha256=tg_NYNbCG6JoE2a-Y6UDqKyr7eRAVOwSsSY8IzO9Cqw,1092
4
+ mcapibridge-0.1.2.dist-info/METADATA,sha256=dZhC-7DJLpj_OyoAnANPIiL5L-nd_iOiBTHhDGUDUnw,8887
5
+ mcapibridge-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
+ mcapibridge-0.1.2.dist-info/top_level.txt,sha256=mNvdbMTKH8yVJh_OZ544RPTdOb3iE8wpsosgMq2V_cM,3
7
+ mcapibridge-0.1.2.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- mc/__init__.py,sha256=6TuAOkHXMgtW0yNeyMAcVxiqRR8BTMekzrkDnNqQ93k,172
2
- mc/minecraft.py,sha256=04hoiMjnYTjRCr9511fjiV4RoX0nuTHV05Gh3-OzlXE,12008
3
- mcapibridge-0.1.1.dist-info/licenses/LICENSE,sha256=tg_NYNbCG6JoE2a-Y6UDqKyr7eRAVOwSsSY8IzO9Cqw,1092
4
- mcapibridge-0.1.1.dist-info/METADATA,sha256=m4uSCW0K8gZRAhavBYNSUcABMawAzCaNNk8zZEkuWfc,8906
5
- mcapibridge-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
- mcapibridge-0.1.1.dist-info/top_level.txt,sha256=mNvdbMTKH8yVJh_OZ544RPTdOb3iE8wpsosgMq2V_cM,3
7
- mcapibridge-0.1.1.dist-info/RECORD,,