Mod

Js Turret

Quick rating

Js Turret

No reviews yet

A Turret which can be controlled by Javascript

Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Filter by exact patch versions
Loading exact versionsโ€ฆ
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your updated review is now pending. It has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Required

About

Project Details

Type
Mod
License
GNU General Public License v3.0 only
Latest Version
1.0.1
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Have you ever wanted to have a smart super lethal unbalance infinite ammo sentry? No? Well here it is.

With Js turretโ„ข you can now terrorise your friends in a way smarter and way more targetable manner. Just place one down write some simple code in java script insert the code into the turret and let her rip.

With one single barrel and a fire rate of sixty shots per minute which all do an untested amount of damage she's a real threat to anyone. All you have to do is to write some basic code to target that one friend and you're good to go (or just copy the code from below).

Code
for (const target of entities) {
    if (target.name === "YourFriend") {
        block.lookAt(target.position.x, target.position.y, target.position.z)
        block.shoot();
    }
}

The crafting recipie is this

the turrets crafting recipie

To insert the written code you can paste it into a book and quill and right click the turret block with it. All pages of the book will be combined and put one after the other.

Available Javascript functions

All of these functions are only available through the block structure.

lookAt(number x, number y, number z)

Makes the barrel look at a given coordinate.

Example:
block.lookAt(0, 1, 0);
shoot()

Shoots in the direction of the current facing.

Example:
block.shoot();
getPosition() -> Vec3dJS

Should return the position of the block with the Vec3dJS struct which contains x, y, z

Example:
const pos = block.getPosition();
rotatePitch(number degrees)

Rotates the turrets pitch by the given degrees.

Example:
block.rotatePitch(1);
rotateYaw(number degrees)

Rotates the turrets yaw by the given degrees.

Example:
block.rotateYaw(1);

In addition to these functions you have access to a list of near by entities with the entities const. The entities const is a list of MinecraftEntity which is a structure with these values:

Vec3dJS position

The position of the entity in the Vec3dJS struct which contains x, y, z

String type

The entity type. Example: entity.minecraft.player

String name

The name of the entity. This is either the player name or the entities name when renamed with a name tag. If neither of those are the case it is just the entity times name. Example: Squid or for items Slimeball or for players just the player name.

Screenshots

Gallery

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Reviews
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync