openScreen(PlayerEntity)   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
package de.pewpewproject.lasertag.block.entity;
2
3
import de.pewpewproject.lasertag.entity.Entities;
4
import net.minecraft.block.BlockState;
5
import net.minecraft.block.entity.BlockEntity;
6
import net.minecraft.entity.player.PlayerEntity;
7
import net.minecraft.util.math.BlockPos;
8
9
/**
10
 * Block entity for the game manager block
11
 *
12
 * @author Étienne Muser
13
 */
14
public class LasertagGameManagerBlockEntity extends BlockEntity {
15
16
    public LasertagGameManagerBlockEntity(BlockPos pos, BlockState state) {
17
        super(Entities.LASERTAG_GAME_MANAGER_BLOCK_ENTITY, pos, state);
18
    }
19
20
    public void openScreen(PlayerEntity player) {
21
        if (player.getEntityWorld().isClient) {
22
            player.openLasertagGameManagerScreen(player);
23
        }
24
    }
25
}
26