Jump to content

What is need in if statement to check against all blocks


jamesscape2

Recommended Posts

I am trying to make my ship move in all directions

 

Which i can do but it will go through blocks

 

i am trying to add a if statement to check if a block is in that location and then if it is it will skip all the movement code. i got this so far but it doenst work

 

public boolean isSolid(Block block)

{

if (block != Block.blockID)

{

return false;

}else{

return true;

}

 

}

 

The other thing is there a method (where is it located, i will find the method just tell me where it is) where i can change which key is use to exit the ship and LShift is default

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.