Start migration
This commit is contained in:
parent
6630ce0cab
commit
47ed597358
491 changed files with 12045 additions and 11953 deletions
|
@ -4,11 +4,11 @@ import java.util.List;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.VineBlock;
|
||||
|
@ -20,28 +20,27 @@ public class BulbVineBlock extends VineBlock {
|
|||
public BulbVineBlock() {
|
||||
super(15, true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
|
||||
if (state.get(SHAPE) == TripleShape.BOTTOM) {
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
if (state.getValue(SHAPE) == TripleShape.BOTTOM) {
|
||||
return Lists.newArrayList(new ItemStack(EndItems.GLOWING_BULB));
|
||||
}
|
||||
else if (MHelper.RANDOM.nextInt(8) == 0) {
|
||||
} else if (MHelper.RANDOM.nextInt(8) == 0) {
|
||||
return Lists.newArrayList(new ItemStack(EndBlocks.BULB_VINE_SEED));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
boolean canPlace = super.canPlaceAt(state, world, pos);
|
||||
return (state.isOf(this) && state.get(SHAPE) == TripleShape.BOTTOM) ? canPlace : canPlace && world.getBlockState(pos.down()).isOf(this);
|
||||
return (state.is(this) && state.getValue(SHAPE) == TripleShape.BOTTOM) ? canPlace
|
||||
: canPlace && world.getBlockState(pos.below()).is(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue