ModsJava
Fredashay's Utility Mass Insert
Java mod listed for Minecraft 1.16. Downloads from the MC Java Mods app on Android.
⬇ Download on SpigotThis plugin does a mass insert (sometimes called a mail-merge).
Why would anyone need a mail-merge in Minecraft?
Well, ever need to duplicate a lot of similar code segments or methods but with a slight difference (such as the event name) between each one?
I recently had to do this -- create a plugin with a crapton of nearly identical event handlers for a bunch of different event names that I copied directly from the Javadocs.
So what does it do, exactly?
Wherever it sees a "$" in the template file, it'll make a copy of that file and replace each "$" with the line from the list file and write that to output, then it'll go to the next line in the list and do the same thing again, and again, and again...
I chose "$" because that's the only character that's not an operator in Java.
Issue /INSERT [LISTFILE] [TEMPLATEFILE] [OUTPUTFILE]
For example, given this as LISTFILE.TXT:
BlockBreakEvent
BlockBurnEvent
BlockDamageEvent
BlockDispenseEvent
BlockExplodeEvent
BlockFadeEvent
BlockFormEvent
BlockFromToEvent
BlockGrowEvent
BlockIgniteEvent
BlockMultiPlaceEvent
BlockPhysicsEvent
BlockPistonEvent
BlockPistonExtendEvent
BlockPistonRetractEvent
BlockPlaceEvent
BlockSpreadEvent
And given is as TEMPLATE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void my$Handler ($ event) {
// TODO put code here...
}
If you issue /INSERT LISTFILE.TXT TEMPLATE.TXT OUTFILE.TXT , you'll get this in OUTFILE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBreakEventHandler (BlockBreakEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBurnEventHandler (BlockBurnEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockDamageEventHandler (BlockDamageEvent event) {
// TODO put code here...
}
etc.
etc.
etc.
All 3 parameters are required.
To install this plugin, copy the plugin JAR file to your server's plugins folder.
Why would anyone need a mail-merge in Minecraft?
Well, ever need to duplicate a lot of similar code segments or methods but with a slight difference (such as the event name) between each one?
I recently had to do this -- create a plugin with a crapton of nearly identical event handlers for a bunch of different event names that I copied directly from the Javadocs.
So what does it do, exactly?
Wherever it sees a "$" in the template file, it'll make a copy of that file and replace each "$" with the line from the list file and write that to output, then it'll go to the next line in the list and do the same thing again, and again, and again...
I chose "$" because that's the only character that's not an operator in Java.
Issue /INSERT [LISTFILE] [TEMPLATEFILE] [OUTPUTFILE]
For example, given this as LISTFILE.TXT:
BlockBreakEvent
BlockBurnEvent
BlockDamageEvent
BlockDispenseEvent
BlockExplodeEvent
BlockFadeEvent
BlockFormEvent
BlockFromToEvent
BlockGrowEvent
BlockIgniteEvent
BlockMultiPlaceEvent
BlockPhysicsEvent
BlockPistonEvent
BlockPistonExtendEvent
BlockPistonRetractEvent
BlockPlaceEvent
BlockSpreadEvent
And given is as TEMPLATE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void my$Handler ($ event) {
// TODO put code here...
}
If you issue /INSERT LISTFILE.TXT TEMPLATE.TXT OUTFILE.TXT , you'll get this in OUTFILE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBreakEventHandler (BlockBreakEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBurnEventHandler (BlockBurnEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockDamageEventHandler (BlockDamageEvent event) {
// TODO put code here...
}
etc.
etc.
etc.
All 3 parameters are required.
To install this plugin, copy the plugin JAR file to your server's plugins folder.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.16
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
Fredashay's Utility Mass Insert is a free Minecraft Java mod. Compatible with Minecraft 1.16. Downloaded 207 times (via Spigot). Download it and open it directly in the game.