Version change, small portal fix
This commit is contained in:
parent
933cb61edc
commit
0895260009
2 changed files with 15 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.9.5-pre
|
mod_version = 0.9.6-pre
|
||||||
maven_group = ru.betterend
|
maven_group = ru.betterend
|
||||||
archives_base_name = better-end
|
archives_base_name = better-end
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.world.entity.boss.enderdragon.EndCrystal;
|
import net.minecraft.world.entity.boss.enderdragon.EndCrystal;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.pattern.BlockPattern;
|
import net.minecraft.world.level.block.state.pattern.BlockPattern;
|
||||||
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
||||||
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
||||||
|
@ -70,7 +71,19 @@ public class EndDragonFightMixin {
|
||||||
List<EndCrystal> crystals = Lists.newArrayList();
|
List<EndCrystal> crystals = Lists.newArrayList();
|
||||||
BlockPos center = GeneratorOptions.getPortalPos().above(5);
|
BlockPos center = GeneratorOptions.getPortalPos().above(5);
|
||||||
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||||
List<EndCrystal> crystalList = level.getEntitiesOfClass(EndCrystal.class, new AABB(center.relative(dir, 4)));
|
BlockPos central = center.relative(dir, 4);
|
||||||
|
List<EndCrystal> crystalList = level.getEntitiesOfClass(EndCrystal.class, new AABB(central.below(10).south().west(), central.above(10).north().east()));
|
||||||
|
|
||||||
|
int count = crystalList.size();
|
||||||
|
for (int n = 0; n < count; n++) {
|
||||||
|
EndCrystal crystal = crystalList.get(n);
|
||||||
|
if (!level.getBlockState(crystal.blockPosition().below()).is(Blocks.BEDROCK)) {
|
||||||
|
crystalList.remove(n);
|
||||||
|
count--;
|
||||||
|
n--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (crystalList.isEmpty()) {
|
if (crystalList.isEmpty()) {
|
||||||
info.cancel();
|
info.cancel();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue