RedWire's Plugin is a thing that I've been using mostly to help with my own mod-making experience. Hopefully, some of the additions from this plugin will be useful to other people :)
Procedures:
Actions:
-
Copy properties of [block] onto [block] -- Copies all enum properties of the first blockstate onto the second blockstate
-
Deal [number] custom damage to [entity] localized as [text] (.player/.item) with custom source [damagesource] -- The old "deal custom damage" procedure block, except with a completely customizable death message and editable procedure. I am aware this is not very useful with the creation of damage sources, however... I still have some uses for this so.. yeah. Also, since the official block has been deleted as of 2024.1, I unofficially declare this its successor.
-
Execute command / [cmd] in the name of [entity] with permission level [number] -- Same thing as the regular "execute command" procedure block, except you can control how high the permissions can go. For example: If you have a command that executes a sub-command as a string, you can prevent players using /ban if they do not have OP privileges.
-
Execute command / [cmd] at [x] [y] [z] with permission level [number] -- same thing as #3, but from a position instead of from a player.
-
FORCE-add potion [potioneffect] with level [level] for [duration] ticks ambient [isambient] particles [showparticles] to [entity] - Allows you to give potion effects to entities that are normally immune to certain/all effects. In the instance of vanilla minecraft, you can apply whatever you want to the Wither and Ender dragon.
-
Set attack target of [entity] to nothing -- Resets the attack target. Yes, this also exists within procedures+ but... I've only used 2 procedures from that plugin so.. sorry marwinekk256 ;(
-
Set NoAI of [entity] to [boolean]
-
Get object from registry [builtinregistry] class type: [class] registry id: [stringid] (Var name: "_regobject") -- This is something more catered to my mod specifically. With this, you can get a specific object that matches the given stringid. This does not have to include the namespace (ex: "minecraft:sharpness" OR "sharpness"), however, you should beware if there are conflicting mods that share the same id of the same object.
-
Repeat [number] times as timedloopiterator with tick wait time [tick] -- Allows you to do something in a loop but have every action be delayed.
-
Break timed loop -- Simply breaks the loop for #9.
-
Set invulnerable time of [entity] to [number] ticks -- Sets the invincibility-frames (AKA I-Frames) to the given number.
-
For each text in [textToSplit] split as [Splitter] as stringiterator do [foreach] (or whole text if array is empty) -- Uses the string.split method, except the whole string will be used if there is nothing to be iterated over.
-
Un-tame [entity] -- Self-explanatory.
-
For each entity in the current world as entityiterator do [foreach] -- Didn't like the range limit with the given entity iterator for MCreator, so I made my own version.
- Set ticks in timed loop to [number] -- Changes the tick wait time in #9 while the iteration is occurring.
Data:
-
Get (display) name of [blockstate]
-
Is sound played same as [soundevent] (any sound played event)
-
Get string id of dimension [entity] is in -- (example: minecraft:nether or minecraft:overworld)
-
Get permission level of [entity] -- Always is 0 for non-player entities
-
Has [entity] No AI
-
Get distance between [entity] and [sourceentity] -- If sourceentity is null, returns -1
-
Get distance between [x1] [y1] [z1] and [x2] [y2] [z2]
-
Get entity from UUID [stringUUID] -- also exists within procedures+. I'm not stealing ideas i swear
-
Get invulnerable time of [entity] in ticks
-
Get display name of mod from id [modid] -- This applies only to currently active mods in your mod folder.
-
Get version string of mod from id [modid] -- This applies only to currently active mods in your mod folder.
-
Is [entity] moving - Requested by someone in the NeoToolKit discord.
-
Get string id of the current worlds dimension
-
Can [entity] find [sourceentity] -- Checks if sourceentity isn't obscured from entity behind blocks. Always returns false if the distance is greater than 128 (this is not my doing, just something that is part of the method I used)
- Create a clone of [entity]
Event-specific Actions:
-
Set damage to [amount] (before entity is hurt)
-
Set output to [itemstack] (On anvil updated)
-
Set break chance to [number] (Item output taken from anvil)
-
Set break speed to [breakspeed] (Player block speed tick) -- Changes your break speed of the block to the given number
-
Set canHarvest of block to [boolean] (Player harvest block tick) -- Whether or not the block being mined should drop its loot (does not act as the "silk touch" enchantment, so breaking a glass block with an item without the enchantment will still drop nothing)
-
Set level cost to [amount] (On anvil updated) -- The level XP needed to upgrade an anvil item. The minimum amount needed is 1. Setting it to 0 will make it impossible to take the anvil output.
-
Set material cost to [amount] (On anvil updated) -- The stack of items needed in item slot 2 to upgrade the item in slot 1
- Change sound to [soundevent] (Any sound played event)
Global triggers:
- Enderman teleports
- On anvil updated
- Item output taken from anvil
- Player harvest block tick -- does not fire for unbreakable blocks, such as bedrock.
- Player block speed tick -- does not fire for unbreakable blocks, such as bedrock. The breakspeed number variable represents your break speed, not the blocks hardness.
- Sound played at position
- Sound played from entity -- (Some sounds - from both sound events - cannot be changed unfortunately. Some of these i've noticed are block breaking sounds and the glass shattering sound when throwing a potion)
- Player starts using item
Changelog
for the full list of changes, check this file
v 1.2.4
- Fixed x,y,z errors for both sound played events (copying straight from the "enderman teleported" code was a bad idea)
- Added x,y,z dependencies for both anvil events (Anvil block position)
v 1.2.3
- Fixed actions tab collapsing (FOR REAL THIS TIME I SWEAR)
v 1.2.2
- Fixed x,y,z values for "Player harvest check tick" giving errors when on NeoForge 1.20.4
v 1.2.1
- Slightly changed the "timed loop iterator" and "repeat wait with tick wait time" procedure blocks to (hopefully) further prevent actions tab collapsing
v 1.2.0
- Fixed Actions tab collapsing in 2023.4
- Fixed both sound played events not being usable in NeoForge 1.20.4
- Added "volume" and "pitch" dependencies for both sound played events
- Added a "Player starts using item" global trigger
- Re-added support for the older 2024.1 version if you don't want the bugfix version.. for some reason
P.S. I'm not downgrading this plugin. Anyone is allowed to as long as I am credited but I won't be doing it myself.
Yo, you have get entity from uuid, would you mind adding get uuid from entity? would be super helpful to get them.