Reorganized Imports/Packages
This commit is contained in:
parent
a8beba9196
commit
770a5b4046
854 changed files with 42775 additions and 41811 deletions
64
src/main/java/org/betterx/betterend/blocks/FlamaeaBlock.java
Normal file
64
src/main/java/org/betterx/betterend/blocks/FlamaeaBlock.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PlaceOnWaterBlockItem;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.interfaces.CustomItemProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FlamaeaBlock extends EndPlantBlock implements CustomItemProvider, AddMineableShears {
|
||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 1, 16);
|
||||
|
||||
public FlamaeaBlock() {
|
||||
//TODO: 1.19 Test if we can remove dynamic shape and offsetType
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.dynamicShape()
|
||||
.offsetType(BlockBehaviour.OffsetType.NONE));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(Blocks.WATER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBePotted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockItem getCustomItem(ResourceLocation resourceLocation, FabricItemSettings fabricItemSettings) {
|
||||
return new PlaceOnWaterBlockItem(this, fabricItemSettings);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue