Jump to content

[1.16.1] How to power redstone wire?


Pickle_Face5

Recommended Posts

Hello.

I'm making an enchantment that when walking over redstone, It fully powers it, but I can't find anything for powering a wire.

Here's my code:

package com.pickleface.redstone.enchants;

import com.pickleface.redstone.Redstone;
import net.minecraft.block.Blocks;
import net.minecraft.block.RedstoneWireBlock;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

public class Energy extends Enchantment {
    protected Energy() {
        super(Rarity.RARE, EnchantmentType.ARMOR_FEET, new EquipmentSlotType[] {EquipmentSlotType.FEET});
    }

    @Mod.EventBusSubscriber(modid = Redstone.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
    public static class Event {
        @SubscribeEvent
        public static void onBootsEquipped(TickEvent.PlayerTickEvent event) {
            PlayerEntity player = event.player;

            if (player.getBlockState() == Blocks.REDSTONE_WIRE.getDefaultState()) {
                player.getBlockState().(power redstone wire here, cant find anything)
            }
        }
    }
}

Any help is appreciated.

Have some lorem ispum.

Link to comment
Share on other sites

Just now, diesieben07 said:

You'd have to replace the block with your own version of redstone wire, but one that does not require a power source.

There is no way to make redstone wire emit a signal without it having a source.

Oh, okay, I thought there was an override I could do to set it to full power.

Have some lorem ispum.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.