real-itu / Evocraft-py

A Python interface for Minecraft built on gRPC
123 stars 16 forks source link

Issue with orientation of Observers #8

Open schrum2 opened 2 years ago

schrum2 commented 2 years ago

It does not appear to be possible to orient Observer blocks in an UP or DOWN orientation. Here is some code, and a screenshot of the resulting in-world placement:

import grpc

import minecraft_pb2_grpc
from minecraft_pb2 import *

channel = grpc.insecure_channel('localhost:5001')
client = minecraft_pb2_grpc.MinecraftServiceStub(channel)

client.fillCube(FillCubeRequest(  # Clear a 20x10x20 working area
    cube=Cube(
        min=Point(x=-10, y=4, z=-10),
        max=Point(x=10, y=14, z=10)
    ),
    type=AIR
))
client.spawnBlocks(Blocks(blocks=[  
    Block(position=Point(x=1, y=5, z=1), type=OBSERVER, orientation=NORTH),
    Block(position=Point(x=3, y=5, z=1), type=OBSERVER, orientation=SOUTH),
    Block(position=Point(x=5, y=5, z=1), type=OBSERVER, orientation=EAST),
    Block(position=Point(x=7, y=5, z=1), type=OBSERVER, orientation=WEST),
    Block(position=Point(x=9, y=5, z=1), type=OBSERVER, orientation=UP),
    Block(position=Point(x=11, y=5, z=1), type=OBSERVER, orientation=DOWN)
]))

image

Both of the last two blocks (UP and DOWN) seem to be oriented toward the NORTH.

However, I can orient Observers vertically when I place them within the game world as a player.

djole commented 2 years ago

Hi, this seeems to be an issue with the version of Sponge. There are few artefacts that have this problem. Unfortunately, updating Sponge is not at all trivial, so it's a todo for now.