[TUTORIAL] How to use Gun Maker Procedures (>= v.1.2.2)

Started by hacker_E303 on

Topic category: Plugins and third-party tools

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to use Gun Maker Procedures (>= v.1.2.2)
Sat, 08/30/2025 - 17:40 (edited)

Gun Maker Procedures Plugin (from 1.2.2 on-wards)

 

This plugin adds to MCreator a set of procedures dedicated to firearm creation and handling of entities capable of shooting like a player.
 


-Shoot projectile

“Shoot <Snowball> projectile-type from <entity> with speed <10> and set inaccuracy accumulation to <3> recoil to <5> recovery time (in ticks) to <20>”

The main shooting procedure.

- Spawns the projectile with speed, inaccuracy, recoil and recovery time.

- Includes internal cooldown logic.

- Inaccuracy accumulates each shoot.

Use only in tick-based events/procedures (like “On item in inventory tick”), not in one-shot events, otherwise cooldowns and recovery logic will not work correctly.
 


-Set invulnerable time

“Set <entity> invulnerable time to <0>”

Sets entity invulnerability in ticks (minimum damage interval). If you want the projectiles you fire to deal damage quickly, you will need to set it to 0.
 


-Get invulnerable time 

“Get invulnerable time of <entity>”

Returns current invulnerability time.
 


-Set ammunition

“Set ammunition of <item> to <30>”

Sets the ammo count of a weapon.
 


-Get ammunition

“Get ammunition of <item>”

Returns the current ammo count.
 


-Set recovery time

“Set recovery time of <item> (in ticks) to <20>”

Sets weapon recovery time between shots.
 


-Get recovery time

“Get recovery time of <item>”

Returns current recovery time.
 


-Get inaccuracy accumulation

"Get inaccuracy accumulation of <item>"

Returns the weapon’s current inaccuracy accumulation.
 


-Is mouse key pressed

”Is mouse key <Right> pressed”

Returns true/false if left/right mouse button is pressed.
 


-Check for mouse key pressed (to shoot)

“Check for mouse key <Left> pressed for <entity> (to shoot)”

Ready-to-use block to bind mouse input to shooting.
 


-Can shoot

“Can <item> shoot”

Checks if weapon can currently fire.
 


-Is shooting

“Is <item> shooting”

True/false if weapon is currently firing.
 


-Is reloading

“Is <item> reloading”

True/false if weapon is reloading.
 


-Geckolib animation

“With geo-item <item> play animations shoot <shoot_animation> if <true> reload <reload_animation> if <true>”

Handles Geckolib shooting and reload animations. Requires Needy's Geckolib plugin.


-Allow item to shoot 

“If <entity> allow <item> to shoot (for all entities)”

Enables or blocks an entity from using a weapon.
 


-Get projectile owner

“Get owner of <projectile>”

Returns who fired the projectile.
 


-AI attack tag

“Make <mob> attack entities tagged as <target_tag> with priority <1>”

Lets mobs attack with firearms, simulating player-like behavior.
 


-Is keyboard key pressed

“Is keyboard key <R> pressed”

True/false if chosen keyboard key (A–Z) is pressed. Perfect for reload, fire mode change, etc.

Edited by hacker_E303 on Sat, 08/30/2025 - 17:40