Use new canAccept/canProvide methods
This commit is contained in:
parent
df974ef5da
commit
aa18079315
23 changed files with 317 additions and 343 deletions
|
@ -86,7 +86,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
|||
public void onSteppedOn(final World worldIn, final BlockPos pos, final Entity entityIn) {
|
||||
super.onSteppedOn(worldIn, pos, entityIn);
|
||||
if (worldIn.getBlockEntity(pos) instanceof FusionControlComputerBlockEntity) {
|
||||
if (((FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos)).crafingTickTime != 0
|
||||
if (((FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos)).craftingTickTime != 0
|
||||
&& ((FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos)).isMultiblockValid()) {
|
||||
entityIn.damage(new FusionDamageSource(), 200F);
|
||||
}
|
||||
|
|
|
@ -122,10 +122,10 @@ public class LampBlock extends BaseBlockEntityProvider {
|
|||
@Nullable
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext context) {
|
||||
for (Direction enumfacing : context.getPlacementDirections()) {
|
||||
BlockState iblockstate = this.getDefaultState().with(FACING, enumfacing.getOpposite());
|
||||
if (iblockstate.canPlaceAt(context.getWorld(), context.getBlockPos())) {
|
||||
return iblockstate;
|
||||
for (Direction facing : context.getPlacementDirections()) {
|
||||
BlockState state = this.getDefaultState().with(FACING, facing.getOpposite());
|
||||
if (state.canPlaceAt(context.getWorld(), context.getBlockPos())) {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue