Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yarn.js

Yarnwrap helper functions. This module has a Java dependency of Yarnwrap.

Installation

Using pully

/pully install yarn

Require as Dependency

{
  "dependencies": {
    "yarn": "0.1.0"
  }
}

Manual Install

  1. Download yarn.
  2. Unzip file content to .minecraft/config/jscore/modules/yarn/

The folder should look like this

.minecraft/config/jscore/
└── modules/
    └── yarn/
        └── package.json

Getters

Identifier Type Description
yarn.client() MinecraftClient Instance of MinecarftClient
yarn.clientPlayer() ClientPlayerEntity Current player
yarn.player() PlayerEntity Current player
yarn.playerLiving() LivingEntity Current player
yarn.playerEntity() Entity Current player

"One day I'll figure out how to determine whether one Minecraft class inherits another."

A list of all Fabric API events imports can be found in events.js.

Check the events index page on the Fabric wiki for more info.

Library Functions

yarn.to(target: Class, input: JavaObjectA) → JavaObjectB

Attempt to cast input to the target (Java) class, would throw an error if failed.

yarn.to(target: Class) → F

where F: (input: JavaObject A) → JavaObjectB

Returns a function which casts input to the target (Java) class.

yarn.toPlayerEntity(input: JavaObject) → PlayerEntity

Attempts to convert to PlayerEntity.

yarn.toLivingEntity(input: JavaObject) → LivingEntity

Attempts to convert to LivingEntity.

yarn.toEntity(input: JavaObject) → Entity

Attempts to convert to Entity.

About

Helper functions for yarnwrap.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages