마인크래프트를 실행하고 순간이동하고 채팅하는 방법에 대해서 알아보겠는데요~ㅎㅎ 순간이동은 /tp 명령어를 이용해도 되는데 문자열을 이용해서도 할 수 있는데요! 좀 더 원천적인 방법인 문자열을 이용한 텔레포트하기에 대해서 알아보겠습니다.
https://krmcchick.tistory.com/7
사칙연산과 str함수를 사용해서 텔레포트를 간편히 할 수 있습니다. 마인크래프트 상의 좌표를 파이썬에서의 좌표값으로 바꾸었을 때 값을 더하거나 빼는 연산을 하기위해 우리는 +
혹은 -
를 사용했습니다. 이처럼 두 값을 연산하는 역할을 하는 기호를 연산자라고 합니다.
앞에서 배운 수치 자료형의 연산자는 우리가 흔히 알고 있는 사칙연산 외에도 다른 연산자도 존재합니다. 하나씩 살펴보도록 합시다!
-사칙연산자
a = 5
b = 3
sum = a + b
print(“a와 b의 합” + str(sum))
subtract = a – b
print(“a와 b의 합” + str(substract))
-나머지 연산자과 몫 연산자
a = 100
b = 7
q = a // b
r = a % b
print(“a를 b로 나눈 몫은 ” + str(q))
print(“a를 b로 나눈 나머지는 ” + str(r))
-제곱&할당 연산자
from mcpi.minecraft import Minecraft
mc = Minecraft.create() # 마인크래프트에 연결
x = 10 # x 변수(정수형)에 설정할 x 좌표 값 담기
y = 70
z = 12
mc.player.setTilePos(x, y, z) # 사용자의 위치 지정
pos = mc.player.getTilePos() # 사용자의 위치 가져옴
print(pos) # 파이썬 상에서 좌표값 출력
pos.x -= 112 # 마인크래프트 상에서의 좌표값으로 변환
pos.y += 66
pos.z -= 240
print(“realpos: “, pos.x,pos.y,pos.z) # 마인크래프트 상에서의 좌표값 출력


-문자열을 이용하여 채팅창에 출력해보자
-문자열을 이용한 채팅창 소스코드
from mcpi.minecraft import Minecraft # 마인크래프트에 연결
mc = Minecraft.create()
string = “Hello” # string이라는 변수에 Hello라는 값 지정
mc.postToChat(string) # string에 담긴 값을 마인크래프트 채팅창에 출력
-연산자
-연산자를 이용한 채팅창 소스코드
from mcpi.minecraft import Minecraft # 마인크래프트에 연결
mc = Minecraft.create()
name = input(“사용자의 아이디를 입력해주세요: ” )
string = input(“어떤 말을 출력할까? “)
mc.postToChat(name+ “: “+string) # 채팅창에 출력
>사용자의 아이디를 입력해주세요: nezsof
>어떤 말을 출력할까? Hello
-형 변환
from mcpi.minecraft import Minecraft # 마인크래프트에 연결
mc = Minecraft.create()
string = input(“어떤 말을 출력할까?: ” ) # 문자열을 입력받아 string변수에 저장
mc.postToChat(string) # 채팅창에 출력
print(type(string)) # 입력받은 값 자료형 확인
string = int(string) # 자료형(문자열 -> 정수형) 변경
print(type(string)) # 바뀐 자료형 확인

Finasteride does not appear to affect circulating concentrations of cortisol, estradiol, prolactin, thyroid stimulating hormone, thyroxine or cholesterol medicamento priligy estudios clinicos However, based on the risk of adverse effects including thromboembolic events, endometrial cancer, and cataracts, the task force determined that the benefits of these medications were no greater than small in women with no risk factors
[url=https://fastpriligy.top/]priligy dapoxetina 30mg nos eua[/url] yay congratulations