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 lasertag credits block
11
 *
12
 * @author Étienne Muser
13
 */
14
public class LasertagCreditsButtonBlockEntity extends BlockEntity {
15
    public LasertagCreditsButtonBlockEntity(BlockPos pos, BlockState state) {
16
        super(Entities.LASERTAG_CREDITS_BLOCK_ENTITY, pos, state);
17
    }
18
19
    public void openScreen(PlayerEntity player) {
20
        if (player.getEntityWorld().isClient) {
21
            player.openLasertagCreditsScreen(player);
22
        }
23
    }
24
}
25