Fixes
This commit is contained in:
parent
e41de0ed74
commit
04eb5f9dff
6 changed files with 6 additions and 7 deletions
|
@ -34,7 +34,8 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
||||||
TripleShape shape = (height == 0) ? TripleShape.TOP : TripleShape.MIDDLE;
|
TripleShape shape = (height == 0) ? TripleShape.TOP : TripleShape.MIDDLE;
|
||||||
Direction dir = BlocksHelper.randomHorizontal(random);
|
Direction dir = BlocksHelper.randomHorizontal(random);
|
||||||
BlockPos leafCenter = bpos.toImmutable().offset(dir);
|
BlockPos leafCenter = bpos.toImmutable().offset(dir);
|
||||||
if (hasLeaf(world, leafCenter)) {
|
boolean hasLeaf = hasLeaf(world, leafCenter);
|
||||||
|
if (hasLeaf) {
|
||||||
generateLeaf(world, leafCenter);
|
generateLeaf(world, leafCenter);
|
||||||
BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(BlockEndLotusStem.SHAPE, shape).with(BlockEndLotusStem.FACING, dir));
|
BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(BlockEndLotusStem.SHAPE, shape).with(BlockEndLotusStem.FACING, dir));
|
||||||
}
|
}
|
||||||
|
@ -69,6 +70,10 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
||||||
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
|
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasLeaf) {
|
||||||
|
stem = stem.with(BlockEndLotusStem.LEAF, true).with(BlockEndLotusStem.FACING, dir);
|
||||||
|
}
|
||||||
|
|
||||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP));
|
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Random;
|
||||||
import net.fabricmc.api.EnvType;
|
import net.fabricmc.api.EnvType;
|
||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.betterend.blocks;
|
package ru.betterend.blocks;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
@ -9,7 +8,6 @@ import net.minecraft.state.StateManager;
|
||||||
import net.minecraft.state.property.BooleanProperty;
|
import net.minecraft.state.property.BooleanProperty;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.registry.BlockRegistry;
|
import ru.betterend.registry.BlockRegistry;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlocksHelper;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.world.TeleportTarget;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldProperties;
|
import net.minecraft.world.WorldProperties;
|
||||||
import net.minecraft.world.biome.source.BiomeAccess;
|
import net.minecraft.world.biome.source.BiomeAccess;
|
||||||
|
|
||||||
import ru.betterend.interfaces.TeleportingEntity;
|
import ru.betterend.interfaces.TeleportingEntity;
|
||||||
|
|
||||||
@Mixin(ServerPlayerEntity.class)
|
@Mixin(ServerPlayerEntity.class)
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.StructureWorldAccess;
|
import net.minecraft.world.StructureWorldAccess;
|
||||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.gen.feature.Feature;
|
import net.minecraft.world.gen.feature.Feature;
|
||||||
|
|
||||||
import ru.betterend.blocks.EndPortalBlock;
|
import ru.betterend.blocks.EndPortalBlock;
|
||||||
import ru.betterend.blocks.RunedFlavolite;
|
import ru.betterend.blocks.RunedFlavolite;
|
||||||
import ru.betterend.registry.BlockRegistry;
|
import ru.betterend.registry.BlockRegistry;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package ru.betterend.world.features;
|
||||||
|
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
|
|
||||||
import ru.betterend.blocks.RunedFlavolite;
|
import ru.betterend.blocks.RunedFlavolite;
|
||||||
|
|
||||||
public class EndPortalFeature extends EndFeature {
|
public class EndPortalFeature extends EndFeature {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue