NaturesAura/src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityPickupStopper.java

23 lines
615 B
Java
Raw Normal View History

package de.ellpeck.naturesaura.blocks.tiles;
2021-12-08 00:31:29 +01:00
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;
2021-12-04 15:40:09 +01:00
public class BlockEntityPickupStopper extends BlockEntityImpl {
2021-12-08 00:31:29 +01:00
public BlockEntityPickupStopper(BlockPos pos, BlockState state) {
2021-12-19 15:32:45 +01:00
super(ModBlockEntities.PICKUP_STOPPER, pos, state);
2020-01-21 23:02:39 +01:00
}
public float getRadius() {
return this.redstonePower / 2F;
}
2019-01-27 13:57:34 +01:00
@Override
2019-03-19 17:21:06 +01:00
public void onRedstonePowerChange(int newPower) {
super.onRedstonePowerChange(newPower);
2021-12-04 15:40:09 +01:00
if (!this.level.isClientSide)
2019-01-27 13:57:34 +01:00
this.sendToClients();
}
}