py2hackCraft2 1.1.43__tar.gz → 1.1.44__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py2hackCraft2
3
- Version: 1.1.43
3
+ Version: 1.1.44
4
4
  Summary: Python client library for hackCraft2
5
5
  Home-page: https://github.com/0x48lab/hackCraft2-python
6
6
  Author: masafumi_t
@@ -527,7 +527,7 @@ class Inventory:
527
527
  item = inventory.get_item(0)
528
528
  print(f"アイテム: {item.name}, 数量: {item.amount}")
529
529
  """
530
- self.client.send_call(self.entity_uuid, "getInventoryItem", [self.location.x, self.location.y, self.location.z, slot])
530
+ self.client.send_call(self.entity_uuid, "getInventoryItem", [self.location.x, self.location.y, self.location.z, slot, self.location.cord])
531
531
  item_stack = ItemStack(** json.loads(self.client.result))
532
532
  return item_stack
533
533
 
@@ -567,7 +567,7 @@ class Inventory:
567
567
  # スロット0と1のアイテムを入れ替え
568
568
  inventory.swap_items(0, 1)
569
569
  """
570
- self.client.send_call(self.entity_uuid, "swapInventoryItem", [self.location.x, self.location.y, self.location.z, slot1, slot2])
570
+ self.client.send_call(self.entity_uuid, "swapInventoryItem", [self.location.x, self.location.y, self.location.z, slot1, slot2, self.location.cord])
571
571
 
572
572
  def move_item(self, from_slot: int, to_slot: int):
573
573
  """
@@ -583,7 +583,7 @@ class Inventory:
583
583
  # スロット0のアイテムをスロット5に移動
584
584
  inventory.move_item(0, 5)
585
585
  """
586
- self.client.send_call(self.entity_uuid, "moveInventoryItem", [self.location.x, self.location.y, self.location.z, from_slot, to_slot])
586
+ self.client.send_call(self.entity_uuid, "moveInventoryItem", [self.location.x, self.location.y, self.location.z, from_slot, to_slot, self.location.cord])
587
587
 
588
588
  def retrieve_to_self(self, from_slot: int, to_slot: int):
589
589
  """
@@ -599,7 +599,7 @@ class Inventory:
599
599
  # チェストのスロット0のアイテムを自分のスロット5に取り出す
600
600
  inventory.retrieve_from_self(0, 5)
601
601
  """
602
- self.client.send_call(self.entity_uuid, "retrieveInventoryItem", [self.location.x, self.location.y, self.location.z, to_slot, from_slot])
602
+ self.client.send_call(self.entity_uuid, "retrieveInventoryItem", [self.location.x, self.location.y, self.location.z, to_slot, from_slot, self.location.cord])
603
603
 
604
604
  def store_from_self(self, from_slot: int, to_slot: int):
605
605
  """
@@ -615,7 +615,7 @@ class Inventory:
615
615
  # 自分のスロット0のアイテムをチェストのスロット5に格納
616
616
  inventory.store_to_self(0, 5)
617
617
  """
618
- self.client.send_call(self.entity_uuid, "storeInventoryItem", [self.location.x, self.location.y, self.location.z, from_slot, to_slot])
618
+ self.client.send_call(self.entity_uuid, "storeInventoryItem", [self.location.x, self.location.y, self.location.z, from_slot, to_slot, self.location.cord])
619
619
 
620
620
  class Volume:
621
621
  """
@@ -2126,7 +2126,7 @@ class Entity:
2126
2126
  def livestock_herd(self, animal_uuid: str, x: float, y: float, z: float, cord: str = "^", speed: float = 1.0) -> None:
2127
2127
  """
2128
2128
  動物を指定座標に誘導
2129
-
2129
+
2130
2130
  Args:
2131
2131
  animal_uuid (str): 動物のUUID
2132
2132
  x (float): 目標X座標
@@ -2134,11 +2134,11 @@ class Entity:
2134
2134
  z (float): 目標Z座標
2135
2135
  cord (str): 座標系("": 絶対座標, "~": 相対座標, "^": ローカル座標、デフォルト: "^")
2136
2136
  speed (float): 移動速度(0.5-2.0、デフォルト1.0)
2137
-
2137
+
2138
2138
  Example:
2139
2139
  >>> entity.livestock_herd(cow_uuid, 100, 64, 200, "^", 1.0)
2140
2140
  """
2141
- self.client.send_call(animal_uuid, "livestockHerd", [x, y, z, cord, speed])
2141
+ self.client.send_call(self.uuid, "livestockHerd", [animal_uuid, x, y, z, cord, speed])
2142
2142
  result = json.loads(self.client.result)
2143
2143
  if not result.get('success', False):
2144
2144
  raise Exception(f"Herd operation failed: {result.get('message', 'Unknown error')}")
@@ -2198,7 +2198,7 @@ class Entity:
2198
2198
  >>> except Exception as e:
2199
2199
  >>> print(f"Cannot shear: {e}")
2200
2200
  """
2201
- self.client.send_call(sheep_uuid, "livestockShear", [])
2201
+ self.client.send_call(self.uuid, "livestockShear", [sheep_uuid])
2202
2202
  result = json.loads(self.client.result)
2203
2203
  if not result.get('success', False):
2204
2204
  raise Exception(f"Shear operation failed: {result.get('message', 'Unknown error')}")
@@ -2224,7 +2224,7 @@ class Entity:
2224
2224
  >>> except Exception as e:
2225
2225
  >>> print(f"Cannot milk: {e}")
2226
2226
  """
2227
- self.client.send_call(cow_uuid, "livestockMilk", [])
2227
+ self.client.send_call(self.uuid, "livestockMilk", [cow_uuid])
2228
2228
  result = json.loads(self.client.result)
2229
2229
  if not result.get('success', False):
2230
2230
  raise Exception(f"Milk operation failed: {result.get('message', 'Unknown error')}")
@@ -2241,7 +2241,7 @@ class Entity:
2241
2241
  Example:
2242
2242
  >>> entity.livestock_feed(cow_uuid, "wheat")
2243
2243
  """
2244
- self.client.send_call(animal_uuid, "livestockFeed", [food_type])
2244
+ self.client.send_call(self.uuid, "livestockFeed", [animal_uuid, food_type])
2245
2245
  result = json.loads(self.client.result)
2246
2246
  if not result.get('success', False):
2247
2247
  raise Exception(f"Feed operation failed: {result.get('message', 'Unknown error')}")
@@ -2261,7 +2261,7 @@ class Entity:
2261
2261
  >>> print(f"Health: {info['health']}/{info['maxHealth']}")
2262
2262
  >>> print(f"Can breed: {info['canBreed']}")
2263
2263
  """
2264
- self.client.send_call(animal_uuid, "livestockInfo", [])
2264
+ self.client.send_call(self.uuid, "livestockInfo", [animal_uuid])
2265
2265
  result = json.loads(self.client.result)
2266
2266
  if not result.get('success', False):
2267
2267
  raise Exception(f"Get info operation failed: {result.get('message', 'Unknown error')}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py2hackCraft2
3
- Version: 1.1.43
3
+ Version: 1.1.44
4
4
  Summary: Python client library for hackCraft2
5
5
  Home-page: https://github.com/0x48lab/hackCraft2-python
6
6
  Author: masafumi_t
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="py2hackCraft2",
5
- version="1.1.43",
5
+ version="v1.1.44",
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  "websocket-client>=1.6.0",
File without changes
File without changes