RedWire's Plugin

Supported MCreator versions
2023.4
2024.1
Tags / plugin type
Procedures
Pixel art of a blocky head winking wearing a rainbow beanie
Downloads:
715
Upvotes: 18
About the plugin

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 :)

I'm not downgrading this plugin/supporting lower versions. Anyone is allowed to as long as I am credited but I won't be doing it myself.
 

Current versions: Forge 1.20.1, NeoForge 1.20.4


Procedures:


Actions:

  1.  Copy properties of [block] onto [block] -- Copies all enum properties of the first blockstate onto the second blockstate

     

  2. 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.

     

  3. 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.

     

  4. Execute command / [cmd] at [x] [y] [z] with permission level [number] -- same thing as #3, but from a position instead of from a player.

     

  5. 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.

     

  6. 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 ;(

     

  7. Set NoAI of [entity] to [boolean]

     

  8. 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.

     

  9. Repeat [number] times as timedloopiterator with tick wait time [tick] -- Allows you to do something in a loop but have every action be delayed.

     

  10. (Break out/Continue with next iteration) of timed loop -- The normal break out/continue with next iteration block won't work with the timed loop block because the procedure uses a recursive call instead of an actual loop.

     

  11. Set invulnerable time of [entity] to [number] ticks -- Sets the invincibility-frames (AKA I-Frames) to the given number.

     

  12. For each text in [textToSplit] split as [Splitter] as stringiterator do [foreach] (or whole text if array is empty) -- The String.split method, but for mcreator use

     

  13. Un-tame [entity] -- Self-explanatory.

     

  14. 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.

     

  15. Set ticks in timed loop to [number] -- Changes the tick wait time in #9 while the iteration is occurring.

Data:

  1. Get (display) name of [blockstate]

     

  2. Is sound played same as [soundevent] (any sound played event)

     

  3. Get string id of dimension [entity] is in -- (example: minecraft:nether or minecraft:overworld)

     

  4. Get permission level of [entity] -- Always is 0 for non-player entities

     

  5. Has [entity] No AI

     

  6. Get distance between [entity] and [sourceentity] -- If sourceentity is null, returns -1

     

  7. Get distance between [x1] [y1] [z1] and [x2] [y2] [z2]

     

  8. Get entity from UUID [stringUUID] -- also exists within procedures+. I'm not stealing ideas i swear

     

  9. Get invulnerable time of [entity] in ticks

     

  10. Get display name of mod from id [modid] -- This applies only to currently active mods in your mod folder.

     

  11. Get version string of mod from id [modid] -- This applies only to currently active mods in your mod folder.

     

  12. Is [entity] moving - Requested by someone in the NeoToolKit discord.

     

  13. Get string id of the current worlds dimension

     

  14. 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)

     

  15. Create a clone of [entity]

Event-specific Actions:

  1. Set damage to [amount] (before entity is hurt)

     

  2. Set output to [itemstack] (On anvil updated)

     

  3. Set break chance to [number] (Item output taken from anvil)

     

  4. Set break speed to [breakspeed] (Player block speed tick) -- Changes your break speed of the block to the given number

     

  5. 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)

     

  6. 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.

     

  7. Set material cost to [amount] (On anvil updated) -- The stack of items needed in item slot 2 to upgrade the item in slot 1

     

  8. Change sound to [soundevent] (Any sound played event)

Global triggers:

  1. Enderman teleports
  2. On anvil updated
  3. Item output taken from anvil
  4. Player harvest block tick -- does not fire for unbreakable blocks, such as bedrock.
  5. 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.
  6. Sound played at position
  7. 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)
  8. Player starts using item

Changelog

for the full list of changes, check this file

v1.3.1

  • Fixed build error that sometimes appears when using "continue with next iteration of timed loop"

v 1.3.0

  • Improved timed loop breaking
  •  Changed "break out of timed loop" procedure block to either break out or continue with the next iteration of the timed loop
  • Changed the current and total variables in the timed loop procedure block from double to int
  • Fixed minor bug when using the timed loop iterator block with the "create text with" block

Plugin downloads
v1.3.1 - redwiresplugin_1.zipUploaded on: 05/19/2024 - 01:32   File size: 62.69 KB

Comments

[JavaFX Application Thread/INFO] [Launcher] [JFX JS bridge] [undefined: 651] TypeError: Invalid block definition for type: string_iterator
that error line in log was gone while i moved plugins folder away
perhaps this one?

Your plugin page says that it supports MCreator 2024.1, but when I load workspace with the plugin, the plugin does not work

I don't expect you to want to do this but I figured I'd ask, is a backport through 1.19.2 - 1.19.4 possible?

When updating to 1.1.0 all the procedures under action all meshed together in the selection and it won't let me use any of them

Do you mean like loading it without it then loading with it again?
Also I figured out I can still access things through the search so I've been using the page as reference and just searching up things when I needed them
Also just wanted to say love your profile picture

Heya, feature request: something similar to that of checking whether the player or some other entity is looking at a specific entity or player?
Anyway, great plugin! This'll certainly come in handy!