Example #1
0
 def __init__(self, count: int = 1):
     super().__init__("minecraft:stone", item_id_map["minecraft:stone"], 0)
     self.block_runtime_id: int = block_map.get_runtime_id(
         "minecraft:stone", self.meta)
     self.count: int = count
     self.is_creative_item: bool = True
     self.entry_id: int = 0
Example #2
0
 def to_server_chunk(chunk_in: object) -> object:
     cnv_chunk: object = server_chunk(chunk_in.x, chunk_in.z)
     for x in range(0, 16):
         for z in range(0, 16):
             for y in range(0, chunk_in.get_highest_block_at(x, z) + 1):
                 block_id: int = chunk_in.get_block_id(x, y, z) & 0xff
                 meta: int = chunk_in.get_data(x, y, z) & 0xff
                 block_name: str = list(block_id_map.keys())[list(
                     block_id_map.values()).index(block_id)]
                 try:
                     runtime_id: int = block_map.get_runtime_id(
                         block_name, meta)
                 except KeyError:
                     runtime_id: int = block_map.get_runtime_id(
                         block_name, 0)
                 cnv_chunk.set_block_runtime_id(x, y, z, runtime_id)
     return cnv_chunk
Example #3
0
 def __init__(self, name: int, meta: int, hardness: float,
              blast_resistance: float) -> None:
     self.name: str = name
     self.meta: int = meta
     self.hardness: float = hardness
     self.blast_resistance: float = blast_resistance
     self.runtime_id: int = block_map.get_runtime_id(name, meta)
     self.network_id: int = item_id_map[name]
     self.stack_size: int = 0
     self.tool: int = tool.none
     self.luminant: bool = False
     self.transparent: bool = False
     self.flammable: bool = False
     self.catches_fire_from_lava: bool = False
     self.creates_sources: bool = False
     self.flow_distance: int = 0
     self.flow_speed: int = 0