Continue mapping migration

This commit is contained in:
Aleksey 2021-04-12 21:38:22 +03:00
parent 99ade39404
commit f03fd03bd0
499 changed files with 12567 additions and 12723 deletions

View file

@ -4,16 +4,16 @@ import java.util.Random;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.pathing.NavigationType;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.pathfinder.PathComputationType;
import ru.betterend.blocks.basis.EndPlantBlock;
import ru.betterend.registry.EndBlocks;
@ -27,21 +27,21 @@ 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).hasMobEffect(MobEffects.BLINDNESS)) {
((LivingEntity) entity).addMobEffect(new MobEffectInstance(MobEffects.BLINDNESS, 50));
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 canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, PathComputationType type) {
return false;
}
}