Skip to content

cyb0124/greg-emitters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

This was an early proof of concept of writing a mod entirely in Rust. The focus was to avoid using JVM languages as much as possible, while still being functionally indistinguishable from a typical Java mod. My later mod Curvy Pipes uses similar techniques but is implemented in a more practical style: it is more focused on quality and performance, and has significantly less native/VM crossings.

GregTech Placeable Emitters

This is a GregTech addon mod that makes the "Emitter" items placeable in-world. When powered, placed emitter blocks shoot beam that transfers energy to the block it hits.
Example
All tiers of emitters transfer at the rate of 1 A. When idling, they still drain 1 EU/t. There is currently no distance-based loss and no range limit, besides that beams stop at unloaded chunks.

The angle of placed emitters can be adjusted in its GUI. However, they can't bend more than 90° away from their default direction.
GUI

Implementation

This mod is written in an unconventional way: it is written in Rust. The Rust code is here. It uses JNI and JVMTI to interact with Java objects. The only Java code in this mod is for loading the compiled native binary into memory.

About

GregTech placeable emitters addon mod

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages