SteamPowered/src/main/java/com/teammoeg/steampowered/content/cogwheel/MetalCogwheelBlock.java
2022-03-26 21:09:37 -07:00

59 lines
2.2 KiB
Java

/*
* Copyright (c) 2021 TeamMoeg
*
* This file is part of Steam Powered.
*
* Steam Powered is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* Steam Powered is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Steam Powered. If not, see <https://www.gnu.org/licenses/>.
*/
package com.teammoeg.steampowered.content.cogwheel;
import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity;
import com.simibubi.create.content.contraptions.relays.elementary.CogWheelBlock;
import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity;
import com.teammoeg.steampowered.registrate.SPTiles;
import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
import net.minecraft.world.phys.BlockHitResult;
public class MetalCogwheelBlock extends CogWheelBlock {
protected MetalCogwheelBlock(boolean large, Properties properties) {
super(large, properties);
}
public BlockEntityType<? extends SimpleKineticTileEntity> getTileEntityType() {
return SPTiles.METAL_COGWHEEL.get();
}
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult ray) {
return InteractionResult.PASS;
}
public static MetalCogwheelBlock small(Properties properties) {
return new MetalCogwheelBlock(false, properties);
}
public static MetalCogwheelBlock large(Properties properties) {
return new MetalCogwheelBlock(true, properties);
}
}