mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fixed laser relays placement logic.
This commit is contained in:
parent
3634a3e71e
commit
0e1217b5d3
1 changed files with 8 additions and 7 deletions
|
@ -21,13 +21,7 @@ import de.ellpeck.actuallyadditions.mod.config.ConfigValues;
|
|||
import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
|
@ -35,6 +29,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.client.MainWindow;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
|
@ -94,6 +89,12 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements
|
|||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
return this.defaultBlockState().setValue(FACING, context.getClickedFace());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
|
|
Loading…
Reference in a new issue