[Tutorial] Custom Pressure Plates - does not require additional coding

Started by __SK__ on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] Custom Pressure Plates - does not require additional coding
Mon, 01/10/2022 - 19:48 (edited)

Option #1

 

Step one:

  • Go to Blockbench and create a distracting block.
  • make sure it is minimum 16Lx16Wx(any height)
  • Go to Display, and set everything however you like, except the Frame section.
  • The Rotation - change it to -90, 0, 0
  • In the frame section, make the scale 2, (whatever number), 2
  • The translation, change it to cover the picture frame, and align it with the box.
  • Save texture and export model, then import it as block in MCreator.

 

That was a long and yet easy step one.

Now run the Client, and follow the animation.

 

Pay close attention to that pixel between the plate and the block. Place a picture frame there. Now, step on the pressure plate to place the model/block. If you want to rotate the model/block, just right click it. You can create as many models as you like, but they must be added as blocks.

 

Option #2

 

Another way to go with these custom/cloaked/hidden pressure plates is:

  1. In MCreator add a block, let's call it test123 make it a pressure plate
  2. change the properties, triggers, etc - you could also disable the sound
  3. once done, save it
  4. now, lock the code
  5. go to your workspace resource pack and look in models folder
  6. open the model test123 and test123_down (both are *.json) in Blockbench
  7. create a model just like the one I explained before - make your own (no need to do the frame section portion)
  8. save the texture then the model for test123 and use the same model for test123_down
  9. go back to MCreator - But DO NOT unlock that code for the 123test

  10. Run the client and see the results

 You will have a custom pressure plate created with MCreator without requiring additional coding.

Have fun.

Edited by __SK__ on Mon, 01/10/2022 - 19:48
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Or you could go to this…
Tue, 01/11/2022 - 03:40

Or you could go to this website: Minecraft model animator (vberlier.github.io)

Animate your block. Make 3 blocks. 1 without pressed, 2 pressed and 3 the animation, make block number 2 emit redstone power and when something steps on block 1 it replaces it with 3 and when 3 finishes animation replace to 2. Then when 2 has no one on top replace to 1 again.

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there a way to make a…
Tue, 02/21/2023 - 12:56

is there a way to make a custom hitbox too ?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Possibly, it depends on what…
Wed, 02/22/2023 - 02:43

Possibly, it depends on what you are trying to create. Basically, that tutorial was an early attempt to make custom pressure plates because I wanted to conceal them. Adding a custom hitbox to a block is creating a bounding box. For the pressure plate you could try changing the code, create a new model for it,  and adding something like the following inside the class (you should compare the size with your Blockbench model).

	@Override//EXAMPLE CODE 
	public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {

		return Shapes.or(box(0, 0, 0, 16, 2, 16), box(0, 0, 0, 2, 16, 16));
	}

And then lock the code.