2020-05-08 22:58:16 +02:00
|
|
|
package de.ellpeck.prettypipes.terminal;
|
|
|
|
|
2021-12-02 22:00:00 +01:00
|
|
|
import de.ellpeck.prettypipes.Registry;
|
2021-12-02 16:55:04 +01:00
|
|
|
import net.minecraft.core.BlockPos;
|
2021-12-02 22:00:00 +01:00
|
|
|
import net.minecraft.world.level.Level;
|
2022-06-30 16:00:33 +02:00
|
|
|
import net.minecraft.world.level.block.BaseEntityBlock;
|
2021-12-02 16:55:04 +01:00
|
|
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
2021-12-02 22:00:00 +01:00
|
|
|
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
|
|
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
2021-12-02 16:55:04 +01:00
|
|
|
import net.minecraft.world.level.block.state.BlockState;
|
2020-05-08 22:58:16 +02:00
|
|
|
|
|
|
|
public class CraftingTerminalBlock extends ItemTerminalBlock {
|
|
|
|
|
|
|
|
@Override
|
2021-12-02 16:55:04 +01:00
|
|
|
public @org.jetbrains.annotations.Nullable BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
|
|
|
return new CraftingTerminalBlockEntity(pos, state);
|
2020-05-08 22:58:16 +02:00
|
|
|
}
|
2020-05-09 01:00:59 +02:00
|
|
|
|
2021-12-02 22:00:00 +01:00
|
|
|
@org.jetbrains.annotations.Nullable
|
|
|
|
@Override
|
|
|
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> type) {
|
2022-06-30 16:00:33 +02:00
|
|
|
return BaseEntityBlock.createTickerHelper(type, Registry.craftingTerminalBlockEntity, ItemTerminalBlockEntity::tick);
|
2021-12-02 22:00:00 +01:00
|
|
|
}
|
2020-05-08 22:58:16 +02:00
|
|
|
}
|