Help making a block that will allow you to place another block through it, if possible

Started by justinp on

Topic category: Help with MCreator software

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help making a block that will allow you to place another block through it, if possible
Mon, 07/17/2023 - 05:53 (edited)

So I've been playing MC for years, and within the last year started a city with mods and some texture packs, trying to make it look as real as possible. I do most of my own textures and what not, here recently I started working on making some traffic light poles and my lights won't attach close to them. My lights are from a mod made by somebody else but the actual pole and stuff is all what I made. So in a nut shell I want to know is it possible to make a block in Mcreator to allow my lights to go through them, so it appears as if they are actual attached to the block? I've thought about moving the pole and stuff out of the main block area further north out of the grid but if I ever want to attach signs then I have another whole problem because the bounding box markers would still be in the orignal location which would be behind the pole itself. I'll attach a file from the test client, the grass block will be where the traffic light ends up now, as you see the bounding boxes around the arm of the traffic light pole is where I want the light to be able to "snap" to the arm, so it's almost like an overlay, don't even know that's possible for the game any way other than moving my pole out of the bounding box. Advice anyone? Thanks

 

Picture link from free online host >>>>> https://ibb.co/t3tP4Yv

Edited by justinp on Mon, 07/17/2023 - 05:53
Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If it's really a complicated…
Tue, 07/18/2023 - 01:15

If it's really a complicated overlay, and you don't have access to all the models, my advice would be to use entities of some sort, since they don't have the same placement requirements as blocks. Make an entity with your desired model that has code to snap it to the desired block at the desired position. (Just have its only code be to set its position to the nearest block of that type, + the desired offset from the bottom corner.)

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the reply, so I…
Tue, 07/18/2023 - 01:33

Thanks for the reply, so I can't modify the traffic lights because they are somebody else's mod, but I got full control over the pole arm that swings out over the street, so could i code that so the lights would snap to it? or would that require me to code the lights? If I'm not misaking they snap to the arm that comes with the mod, im guessing i need to open the mod up and see what i can find out?

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you're trying to make an…
Tue, 07/18/2023 - 01:39

If you're trying to make an arm that swings out over the street, you could code that seperately from the lights, but you would definitely need to make it an entity. You'd probably want to write a procedure to snap it to the base of the traffic light, and another procedure to change the yaw to make it raise and lower smoothly. 

If you just want the pole to be static, you could probably code it to snap to the traffic lights- though it would be substantially more difficult if the lights are from another mod. If that's the case, you're probably better off just making an entity with your pole model that you can raise or lower to fit the traffic light; just make an entity, give it a pole-shaped model, and make sure it doesn't take suffocation damage, doesn't interact with other entities, and doesn't move. You could then lower it into the ground in order to make a pole with an adjustable height.

...Or, alternatively, it should be possible to make a block model that extends outside the normal bounding box of a block. You'd just need to do more tinkering with the positioning. Are you using blockbench?

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Blockbench yes, and I…
Tue, 07/18/2023 - 01:44

Blockbench yes, and I thought about moving the whole model out from the bounding box area, just was thinking ahead if i ever wanted to place signs on it then I would be in another situation. and i checked the mod and the lights don't snap to anything, he actually doesn't have anything for the lights, its just a real good working mod with a full controler that actually works for my version which is 1.18.2 so that is why I'm using this mod for my traffic light. But as far as making the pole arm a entity, could you send me some videos on that to explain better?

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry, I don't think I'm…
Tue, 07/18/2023 - 02:24

I'm sorry, I don't think I'm totally clear on what you're trying to do. Just to clarify: You're using a traffic light block from another mod, and need to  make a vertical pole to hold it up. Is that correct?

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well it would be horizontal…
Tue, 07/18/2023 - 02:33

Well it would be horizontal at the point of contact, the arm that would swing over the road.

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Like this   ==========||====…
Tue, 07/18/2023 - 02:34

Like this

 

==========||========

 

= - Arm

|| - Traffic Light

 

Hope that helps! LOL!

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not what I thought, but the…
Tue, 07/18/2023 - 02:41

Not what I thought, but the same principle applies. Just make custom blocks for each segment of your pole, and have the ones that connect to the traffic light extend outside their bounding boxes in one direction. If each segment is more or less the size of a block, you can create different types of segments for different situations. (Connected to a traffic light, connected to the ground, connected to a sign, etc.) Sort of like vanilla walls. If you don't want to deal with a bunch of different block configurations while you're building, you could make procedures to change the block configuration depending on what it's next to.

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So basically just shift all…
Tue, 07/18/2023 - 02:47

So basically just shift all the blocks ahead or behind the box area is what your saying?

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make multiple blocks, with…
Tue, 07/18/2023 - 03:03

Make multiple blocks, with different configurations depending on where you need to put them. For example, you could make:

  • A normal, 1-block long pole.
  • A pole with a model that's longer than 1 block, and can thus intersect with the traffic light block.
  • A pole with a place to put a sign on it,
  • ...And so on, depending on how many different types you need.

Then choose which blocks you need while you're building, depending on where you want to put traffic lights, signs, etc.

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok I get you, that was an…
Tue, 07/18/2023 - 03:07

ok I get you, that was an idea I floated around, just wasn't sure if there was a simple trick on Mcreator that I might of been overlooking since I'm new to all of this modding and stuff! But hey thank you for your time and replies! I really appericate it!

Last seen on 11:41, 17. May 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No trouble! Often times with…
Tue, 07/18/2023 - 03:20

No trouble! Often times with modding, the first seemingly silly workaround that you think of turns out to be the best option...

Last seen on 13:38, 27. Jul 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your right, I'm starting to…
Tue, 07/18/2023 - 03:59

Your right, I'm starting to see that myself! :)