Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-04-18 11:12:12

SirSoul
Member
Joined: 2016-09-21
Posts: 43

[HELP] Detect if a block is under another block

Basically title again //forums.everybodyedits.com/img/smilies/tongue

Offline

#2 2017-04-18 12:09:15, last edited by 1448 (2017-04-18 12:09:29)

1448
Formerly alkazam1448
From: Numberland
Joined: 2015-04-12
Posts: 683
Website

Re: [HELP] Detect if a block is under another block

Use Processor's RoomData deserializer and check the co-ordinates like RoomData[0, x, y] to get the block at the co-ords you specified.

The GitHub page has a nice snippet of code on how to deserialize RoomData from "init".
Also, don't forget to add this line of code to case "b":

RoomData[e.GetInt(0), e.GetInt(1), e.GetInt(2)] = e.GetInt(3);

Offline

#3 2017-04-18 13:29:44

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: [HELP] Detect if a block is under another block

I don't know if you want to use movements or if you just want to check if a block is at a certain position.
Tell me how you want it, and I will help you.

Offline

#4 2017-04-18 13:42:08, last edited by SirSoul (2017-04-18 13:44:09)

SirSoul
Member
Joined: 2016-09-21
Posts: 43

Re: [HELP] Detect if a block is under another block

I want to be able to enter a x & y and get the block id of that block, regardless of layer.

Offline

#5 2017-04-18 14:50:04

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [HELP] Detect if a block is under another block

Do you already save all the world data?
For example through what 1448 said.

Offline

#6 2017-04-18 15:24:53, last edited by SirSoul (2017-04-18 16:22:40)

SirSoul
Member
Joined: 2016-09-21
Posts: 43

Re: [HELP] Detect if a block is under another block

https://pastebin.com/LU5Urt66 That's the code I have currently.

Edit: Issue solved //forums.everybodyedits.com/img/smilies/smile

Offline

SirSoul1492525493655296

Board footer

Powered by FluxBB

[ Started around 1714105083.4084 - Generated in 0.044 seconds, 11 queries executed - Memory usage: 1.4 MiB (Peak: 1.51 MiB) ]