Package commoble.morered.wires

# Class WireBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
commoble.morered.wires.WireBlockEntity

All Implemented Interfaces:
  `net.minecraftforge.common.capabilities.ICapabilityProvider`, `net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>`, `net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>`, `net.minecraftforge.common.extensions.IForgeBlockEntity`, `net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>`

Direct Known Subclasses:
  `ColoredCableBlockEntity`

public class WireBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity

## Nested Class Summary

## Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

`net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int[]`
`power`
`static final String`
`POWER`

### Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

`level, remove, worldPosition`

### Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

`INFINITE_EXTENT_AABB`

## Constructor Summary

Constructors
Constructor
Description
`WireBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)`
`WireBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends WireBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getPower(int side)`
`int`
`getPower(net.minecraft.core.Direction direction)`
`net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket`
`getUpdatePacket()`
`net.minecraft.nbt.CompoundTag`
`getUpdateTag()`
`void`
`load(net.minecraft.nbt.CompoundTag compound)`
`void`
`onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)`
`void`
`saveAdditional(net.minecraft.nbt.CompoundTag compound)`
`boolean`
`setPower(int side, int newPower)`
Sets the power on a given interior face
`boolean`
`setPower(net.minecraft.core.Direction direction, int newPower)`
Sets the power on a given interior face
`void`
`setPowerRaw(int[] power)`
Sets a power array without causing updates

### Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

`addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent`

### Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

`areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

`getCapability, getCapability`

### Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

`deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onLoad, requestModelDataUpdate, serializeNBT`

## Field Details

### POWER

public static final String POWER

See Also:
  - Constant Field Values

### power

protected int[] power

## Constructor Details

### WireBlockEntity

public WireBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)

### WireBlockEntity

public WireBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<? extends WireBlockEntity> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)

## Method Details

### setPower

public boolean setPower(int side, int newPower)
Sets the power on a given interior face

Parameters:
  `side` - The ordinal of the attachment direction of the subwire to set the power of
  `newPower` - The power value to set the subwire's power to
Returns:
  True if the power changed, false if it didn't

### setPowerRaw

public void setPowerRaw(int[] power)
Sets a power array without causing updates

Parameters:
  `power` - array of power values (be wary of reference-type problems)

### setPower

public boolean setPower(net.minecraft.core.Direction direction, int newPower)
Sets the power on a given interior face

Parameters:
  `direction` - The attachment direction of the subwire to set the power of
  `newPower` - The power value to set the subwire's power to
Returns:
  True if the power changed, false if it didn't

### getPower

public int getPower(net.minecraft.core.Direction direction)

### getPower

public int getPower(int side)

### saveAdditional

public void saveAdditional(net.minecraft.nbt.CompoundTag compound)

Overrides:
  `saveAdditional` in class `net.minecraft.world.level.block.entity.BlockEntity`

### load

public void load(net.minecraft.nbt.CompoundTag compound)

Overrides:
  `load` in class `net.minecraft.world.level.block.entity.BlockEntity`

### getUpdateTag

public net.minecraft.nbt.CompoundTag getUpdateTag()

Overrides:
  `getUpdateTag` in class `net.minecraft.world.level.block.entity.BlockEntity`

### getUpdatePacket

public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()

Overrides:
  `getUpdatePacket` in class `net.minecraft.world.level.block.entity.BlockEntity`

### onDataPacket

public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)