• Hey! Register here to create your account, engage with the community, and talk about what is new!

Is there a way to make a container completely inaccessible?

Jimmy_The_Knight

Well-known member
Joined
Dec 28, 2020
Messages
67
Reaction score
31
I know that you can use the 'cancel event' action for this, but the right-click event sometimes ignores it and opens the chest for the player anyways.
 
Solution
but the right-click event sometimes ignores it and opens the chest for the player anyways.
This is because you most likely used If Player: Is Looking At Block or something similar that get's the player's current target block. To make them completely inaccessible, you need to use If Game: Event Block Equals [ (blocks, in this case, a chest) ] or If Var: Equals [ Game Value: Event Block Location, (locations of the chests you want to prevent players from opening) ] to get the player's target block location at the event.

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
but the right-click event sometimes ignores it and opens the chest for the player anyways.
This is because you most likely used If Player: Is Looking At Block or something similar that get's the player's current target block. To make them completely inaccessible, you need to use If Game: Event Block Equals [ (blocks, in this case, a chest) ] or If Var: Equals [ Game Value: Event Block Location, (locations of the chests you want to prevent players from opening) ] to get the player's target block location at the event.
 
Solution

EvilsSouls

Forum adept
Overlord
Joined
Apr 16, 2021
Messages
208
Reaction score
18
Or you can just put a solid block on top of the container (will only work with a chest ;D)

(jk, but it does work ;D)
 

Jimmy_The_Knight

Well-known member
Joined
Dec 28, 2020
Messages
67
Reaction score
31
This is because you most likely used If Player: Is Looking At Block or something similar that get's the player's current target block. To make them completely inaccessible, you need to use If Game: Event Block Equals [ (blocks, in this case, a chest) ] or If Var: Equals [ Game Value: Event Block Location, (locations of the chests you want to prevent players from opening) ] to get the player's target block location at the event.
This is exactly what I was looking for, thanks so much!
 

Fghj240

Active member
Joined
Jun 5, 2021
Messages
53
Reaction score
8
Wanted to add that I saw on smutt's house "quantum physics simulator" if you right clicked on something that was supposed to react to one (door, fence gate, chest) it didn't open and shut really quickly. It never opened. It didn't even play a sound. Was this accomplished by hiding armor stands to block the right click or something?
 

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
Wanted to add that I saw on smutt's house "quantum physics simulator" if you right clicked on something that was supposed to react to one (door, fence gate, chest) it didn't open and shut really quickly. It never opened. It didn't even play a sound. Was this accomplished by hiding armor stands to block the right click or something?
Perhaps. Something like a slime would most likely be better, because of its small (or customizable size) cube hitbox. Also, the entity would most likely be hidden inside the player's head, not at the block, to lower the entity count and just make development more efficient.
 

Fghj240

Active member
Joined
Jun 5, 2021
Messages
53
Reaction score
8
Perhaps. Something like a slime would most likely be better, because of its small (or customizable size) cube hitbox. Also, the entity would most likely be hidden inside the player's head, not at the block, to lower the entity count and just make development more efficient.
oh that makes a lot of sence. Does the looking at block event still work through entities? If so it actually sounds like a really good way to stop players from flicking trapdoors they shouldn't be flicking.

Edit: Yep, a slime stops you from right clicking the stuff you want to right click. Also it lags a bit behind you when you walk. I guess you could make it even bigger to compensate but then it still stops all the good right clicks anways.
 
Last edited:
Top Bottom