<jupyter_start><jupyter_text>Scene Basic* Author: <NAME>* Scene for McThings framework: https://github.com/juntosdesdecasa/mcthings (0.50.0)* License: ASL 2.0* Description of the scene: The first scene in McThings history<jupyter_code># Install McThings to create the Scene

!pip install mcthings_extra --upgrade
# Import definition of blocks
import mcpi.block

# Import Vec3 for defining positions
from mcpi.vec3 import Vec3

# Be sure to use the last version
import importlib
import mcthings
importlib.reload(mcthings)

# Import Scene and Server
from mcthings.renderers.raspberry_pi import RaspberryPi
from mcthings.scene import Scene
from mcthings.world import World

# Import the Things used in the Scene
from mcthings.bridge import Bridge
from mcthings.house import House
from mcthings.river import River
from mcthings.schematic import Schematic
# Connect to the Minecraft server and send a testing message to chat

MC_SEVER_HOST = "localhost"
MC_SEVER_PORT = 4711

World.renderer = RaspberryPi(MC_SEVER_HOST, MC_SEVER_PORT)
World.renderer.post_to_chat("Building a Basic Scene")

server = World.renderer.server.mc
# Get the initial position to create the scene
BUILDER_NAME = "ElasticExplorer"

pos = World.renderer.get_pos(BUILDER_NAME)

pos.x += 1

World.renderer.post_to_chat("Building the Scene at %s %s %s " % (pos.x, pos.y, pos.z))<jupyter_output><empty_output><jupyter_text>The order in which the scene will be built* Create House* Create River* Create Bridge* Create House<jupyter_code># Commons params for the Scene

river_width = 10
house_to_river = 5
house_width = 5
# The first house
house = House(pos)
house.mirror = True
house.width = house_width
house.build()
# Create a river between the houses
pos.x += house_to_river + 1
river = River(pos)
river.width = river_width
river.build()
# Create a bridge over the river
pos.x -= 1
bridge = Bridge(pos)
bridge.large = river_width + 2
bridge.block = mcpi.block.STONE
bridge.build()
# The last house
pos.x = river.end_position.x + 1 + house_to_river
house = House(pos)
house.width = house_width
house.build()
# Let's persist the scene
World.scenes[0].save("mct/scene_basic.mct")
# Let's save it to a Schematic
World.scenes[0].to_schematic("schematics/scene_basic.schematic")
# Let's load the Schematic to test it
schematic = Schematic(Vec3(pos.x + 2, pos.y, pos.z))
schematic.file_path = "schematics/scene_basic.schematic"
schematic.build()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09042334566378955, 'fraction_numerical': 0.010686395396629675, 'mean_word_length': 5.405263157894737, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '63867', 'license': 'Apache-2.0', 'n_tokens_mistral': 849, 'n_tokens_neox': 811, 'n_words': 254, 'path': 'notebooks/scene_basic.ipynb', 'repo_name': 'juntosdesdecasa/mcthings_scenes', 'size': '2446'}