Base blocks (WIP)
This commit is contained in:
parent
feb6c5172c
commit
c4a510bd2e
56 changed files with 4418 additions and 1 deletions
28
src/main/java/ru/bclib/blocks/BaseBlock.java
Normal file
28
src/main/java/ru/bclib/blocks/BaseBlock.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package ru.bclib.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
|
||||
public class BaseBlock extends Block implements BlockModelProvider {
|
||||
public BaseBlock(Properties settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
return getBlockModel(blockId, defaultBlockState());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue