NaturesAura/src/main/java/de/ellpeck/naturesaura/blocks/BlockGeneratorLimitRemover.java

38 lines
1.8 KiB
Java
Raw Normal View History

package de.ellpeck.naturesaura.blocks;
2020-01-28 18:08:56 +01:00
import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities;
2020-01-22 01:32:26 +01:00
import de.ellpeck.naturesaura.blocks.tiles.TileEntityGeneratorLimitRemover;
2020-01-23 19:20:47 +01:00
import de.ellpeck.naturesaura.blocks.tiles.render.RenderGeneratorLimitRemover;
2020-01-29 01:34:58 +01:00
import de.ellpeck.naturesaura.data.BlockStateGenerator;
import de.ellpeck.naturesaura.reg.ICustomBlockState;
2020-01-23 19:20:47 +01:00
import de.ellpeck.naturesaura.reg.ITESRProvider;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
2020-01-23 19:20:47 +01:00
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
2020-01-28 18:08:56 +01:00
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.tileentity.TileEntityType;
2020-01-23 19:20:47 +01:00
import net.minecraft.util.Tuple;
2020-01-28 18:08:56 +01:00
import java.util.function.Function;
import java.util.function.Supplier;
2020-01-28 18:08:56 +01:00
2020-01-29 01:34:58 +01:00
public class BlockGeneratorLimitRemover extends BlockContainerImpl implements ITESRProvider<TileEntityGeneratorLimitRemover>, ICustomBlockState {
public BlockGeneratorLimitRemover() {
2020-01-22 01:32:26 +01:00
super("generator_limit_remover", TileEntityGeneratorLimitRemover::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(2F).sound(SoundType.STONE));
}
2020-01-23 19:20:47 +01:00
@Override
public Tuple<TileEntityType<TileEntityGeneratorLimitRemover>, Supplier<Function<? super TileEntityRendererDispatcher, ? extends TileEntityRenderer<? super TileEntityGeneratorLimitRemover>>>> getTESR() {
return new Tuple<>(ModTileEntities.GENERATOR_LIMIT_REMOVER, () -> RenderGeneratorLimitRemover::new);
2020-01-23 19:20:47 +01:00
}
2020-01-29 01:34:58 +01:00
@Override
public void generateCustomBlockState(BlockStateGenerator generator) {
generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(),
generator.modLoc("block/" + this.getBaseName()),
generator.modLoc("block/" + this.getBaseName() + "_top"),
generator.modLoc("block/" + this.getBaseName() + "_top")));
}
}