Code style changes, entities fixes
This commit is contained in:
parent
9d604b2d25
commit
44962e18b6
377 changed files with 5038 additions and 4914 deletions
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -17,6 +15,8 @@ import net.minecraft.world.level.pathfinder.PathComputationType;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class MurkweedBlock extends EndPlantBlock {
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
@ -27,19 +27,19 @@ public class MurkweedBlock extends EndPlantBlock {
|
|||
double v = random.nextDouble() * 0.1;
|
||||
world.addParticle(ParticleTypes.ENTITY_EFFECT, x, y, z, v, v, v);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
|
||||
if (entity instanceof LivingEntity && !((LivingEntity) entity).hasEffect(MobEffects.BLINDNESS)) {
|
||||
((LivingEntity) entity).addEffect(new MobEffectInstance(MobEffects.BLINDNESS, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.SHADOW_GRASS);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue