Code style changes, entities fixes
This commit is contained in:
parent
9d604b2d25
commit
44962e18b6
377 changed files with 5038 additions and 4914 deletions
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
|
@ -18,30 +15,32 @@ import ru.bclib.blocks.BlockProperties;
|
|||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RunedFlavolite extends BaseBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public RunedFlavolite(boolean unbreakable) {
|
||||
super(FabricBlockSettings.copyOf(EndBlocks.FLAVOLITE.polished)
|
||||
.strength(
|
||||
unbreakable ? -1 : 1,
|
||||
unbreakable ? Blocks.BEDROCK.getExplosionResistance() : Blocks.OBSIDIAN.getExplosionResistance()
|
||||
).luminance(state -> {
|
||||
return state.getValue(ACTIVATED) ? 8 : 0;
|
||||
}));
|
||||
.strength(
|
||||
unbreakable ? -1 : 1,
|
||||
unbreakable ? Blocks.BEDROCK.getExplosionResistance() : Blocks.OBSIDIAN.getExplosionResistance()
|
||||
).luminance(state -> {
|
||||
return state.getValue(ACTIVATED) ? 8 : 0;
|
||||
}));
|
||||
this.registerDefaultState(stateDefinition.any().setValue(ACTIVATED, false));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(ACTIVATED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean dropFromExplosion(Explosion explosion) {
|
||||
return !BlocksHelper.isInvulnerableUnsafe(this.defaultBlockState());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
if (BlocksHelper.isInvulnerableUnsafe(this.defaultBlockState())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue