[TUTORIAL] add Binoculars/Telescope in 1.18117

Started by TiberiumTree on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] add Binoculars/Telescope in 1.18117
Fri, 06/11/2021 - 19:39 (edited)

 

1.create a potion

When potion applied: execute command /  in the name of Event/target entity

attribute @s minecraft:generic.movement_speed modifier add 3d952521-d8be-4e6d-9906-d1fb22ca3156 vps_binoculars -1 add

When potion expires: execute command /  in the name of Event/target entity

attribute @s minecraft:generic.movement_speed modifier remove 3d952521-d8be-4e6d-9906-d1fb22ca3156

 

2.create an item/tool

When right clicked in air: add potion with level for 5 ticks ambient  false particles false to Event/target entity type CUSTOM:BinocularsFakeEffect.

Higher ticks results in a slower reaction after release the right click, lower ticks results in zooming in and out repeatedly.

 

3.create an overlay

Draw a circle with an eraser on a black background and use this as an overlay image.

Display overlay in-game: Get remaining ticks of  Event/target entity potion: CUSTOM:BinocularsFakeEffect > 0


Better Procedures plugin seemed not to work on Version:2021.1.18117, and neither the Trigger: On player stopped using, so there I chose a pretty classical way.

It does not really zoom in much, and the player cannot move when using; a sort of alternative to real binoculars.

UUIDs here are not fixed, you can use random UUIDs in step 1, but make sure the UUID added and removed are the same.

 

 

 

Edited by TiberiumTree on Fri, 06/11/2021 - 19:39
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you tell we the number…
Sat, 04/30/2022 - 16:48

Can you tell we the number refer to what ?

Otherwise thanks for your Tutorial, it's have help me.

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there any way to change…
Mon, 10/16/2023 - 01:56

is there any way to change the zoom amount?

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nevermind, i just wasnt…
Mon, 10/16/2023 - 02:12

nevermind, i just wasnt changing the number before the 'add' at the end of the command :/

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevernevermind, is there a…
Mon, 10/16/2023 - 02:33

Nevernevermind, is there a way to zoom in as much as the spyglass?

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that doesnt really solve the…
Thu, 03/21/2024 - 21:38

that doesnt really solve the problem of how to get to that zoom level.

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then you would use something…
Mon, 03/25/2024 - 16:44

then you would use something like the "get player FOV" block and some other calculations

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
a few problems,  I couldn't…
Fri, 03/29/2024 - 16:56

a few problems, 

  1. I couldn't find a block that could get the players FOV.
  2. The value you pass for the command gives diminishing returns, the more I increase the number passed, the less the FOV changes.
  3. I dont know the relation between the number passed, and the resulting FOV.