How to output redstone with a procedire

Started by Lualt on

Topic category: Help with modding (Java Edition)

Last seen on 12:29, 16. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to output redstone with a procedire

I can't find the block to make it work my block rn are

 

Event trigger
if item in main hand(event/targed  entity) = item(keycard)
do send to all players: "YES"

I want thatredstone activation in the place for that 'send to all' part and i want it to last 3 seconds.

And i don't want just a plane text answer i rather want a video that also show where al the blocks are

 

(btw i can't program in java so thats why it is in a procedure if i can't make it in a prcedure please give the code for java)

Last seen on 12:29, 16. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Im sorry i was writing this…
Wed, 06/10/2020 - 17:04

Im sorry i was writing this very fast without looking for mistakes sry for that

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you mean that you want it…
Wed, 06/10/2020 - 17:25

If you mean that you want it to send out a Redstone signal, like a Redstone block, that’s not possible yet with procedure block.

Last seen on 12:29, 16. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ye thats what a mean hwo can…
Wed, 06/10/2020 - 17:32

ye thats what a mean hwo can i make it without a procedure?

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean it’s not possible…
Wed, 06/10/2020 - 17:33

I mean it’s not possible without code yet.

And I don’t know how to code java so... 

Last seen on 12:29, 16. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
btw this is the java code if…
Wed, 06/10/2020 - 17:35

btw this is the java code if u want

package net.mcreator.keycard.procedures;

import net.minecraftforge.fml.server.ServerLifecycleHooks;

import net.minecraft.util.text.StringTextComponent;
import net.minecraft.server.MinecraftServer;
import net.minecraft.item.ItemStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.Entity;

import net.mcreator.keycard.item.KeycardItem;
import net.mcreator.keycard.KeycardModElements;

@KeycardModElements.ModElement.Tag
public class ScanningProcedure extends KeycardModElements.ModElement {
	public ScanningProcedure(KeycardModElements instance) {
		super(instance, 3);
	}

	public static void executeProcedure(java.util.HashMap<String, Object> dependencies) {
		if (dependencies.get("entity") == null) {
			System.err.println("Failed to load dependency entity for procedure Scanning!");
			return;
		}
		Entity entity = (Entity) dependencies.get("entity");
		if ((((entity instanceof LivingEntity) ? ((LivingEntity) entity).getHeldItemMainhand() : ItemStack.EMPTY)
				.getItem() == new ItemStack(KeycardItem.block, (int) (1)).getItem())) {
			{
				MinecraftServer mcserv = ServerLifecycleHooks.getCurrentServer();
				if (mcserv != null)
					mcserv.getPlayerList().sendMessage(new StringTextComponent("YES"));
			}
		}
	}
}

 

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just said that I don’t…
Wed, 06/10/2020 - 17:39

I just said that I don’t know how to code.

What do you think giving me your code is gonna do?

Last seen on 12:29, 16. Jun 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ye i know but maby other…
Wed, 06/10/2020 - 17:40

Ye i know but maby other people read this 

Last seen on 14:30, 23. Jul 2020
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And what's the code to…
Thu, 07/16/2020 - 17:44

And what's the code to output a redstone signal ?

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
We don’t know...
Thu, 07/16/2020 - 20:00

We don’t know...

Last seen on 14:43, 16. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm learning regular coding…
Mon, 03/08/2021 - 17:42

I'm learning regular coding rn, in 2 months i can tell you :)

Last seen on 11:38, 10. Apr 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had an issue with this…
Fri, 03/17/2023 - 20:55

I had an issue with this also. I found a way to make the powering happen using procedures only.

I went to Block Management, added: 

Update/notify Block at X Y Z.
and
Set Boolean property "waterlogged" of block at X Y Z to true.
and
Set Boolean property "waterlogged" of block at X Y Z to false.
Now change "waterlogged" to "powered" on both. Done.

I added this to a Projectile so when it is shot, a lightning bolt strikes the block powering any redstone nearby. Such as a Lightning Rod.

Hope this helps some people out there.