Fixes
This commit is contained in:
parent
6f1077eea7
commit
26ae92bc4c
5 changed files with 16 additions and 8 deletions
|
@ -23,6 +23,7 @@ import net.minecraft.server.world.ServerWorld;
|
|||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
@ -83,7 +84,8 @@ public class BlockVine extends BlockBaseNotFull implements IRenderTypeable, Fert
|
|||
}
|
||||
|
||||
protected boolean isSupport(BlockState state, WorldView world, BlockPos pos) {
|
||||
return world.getBlockState(pos.up()).getBlock() == this || sideCoversSmallSquare(world, pos.up(), Direction.UP);
|
||||
BlockState up = world.getBlockState(pos.up());
|
||||
return up.isOf(this) || up.isIn(BlockTags.LEAVES) || sideCoversSmallSquare(world, pos.up(), Direction.UP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,9 +51,9 @@ public class EndFeatures {
|
|||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3);
|
||||
|
||||
public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 10), 10);
|
||||
public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 2);
|
||||
public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 4);
|
||||
public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(10), 10);
|
||||
public static final EndFeature END_LILY_RARE = new EndFeature("end_lily_rare", new EndLilyFeature(3), 1);
|
||||
public static final EndFeature END_LILY_RARE = new EndFeature("end_lily_rare", new EndLilyFeature(3), 4);
|
||||
public static final EndFeature END_LOTUS = new EndFeature("end_lotus", new EndLotusFeature(7), 5);
|
||||
public static final EndFeature END_LOTUS_LEAF = new EndFeature("end_lotus_leaf", new EndLotusLeafFeature(20), 25);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.fabricmc.fabric.impl.tool.attribute.ToolManagerImpl;
|
|||
import net.fabricmc.fabric.impl.tool.attribute.handlers.ModdedToolsVanillaBlocksToolHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
|
@ -19,6 +20,7 @@ import net.minecraft.world.biome.Biome.Category;
|
|||
import net.minecraft.world.gen.surfacebuilder.SurfaceConfig;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.BlockTerrain;
|
||||
import ru.betterend.blocks.basis.BlockSimpleLeaves;
|
||||
import ru.betterend.util.TagHelper;
|
||||
|
||||
public class EndTags {
|
||||
|
@ -51,6 +53,9 @@ public class EndTags {
|
|||
addSurfaceBlock(block);
|
||||
TagHelper.addTag(BlockTags.NYLIUM, block);
|
||||
}
|
||||
else if (block instanceof LeavesBlock || block instanceof BlockSimpleLeaves) {
|
||||
TagHelper.addTag(BlockTags.LEAVES, block);
|
||||
}
|
||||
});
|
||||
|
||||
TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone);
|
||||
|
|
|
@ -24,10 +24,11 @@ public class BiomeMegalakeGrove extends EndBiome {
|
|||
.addStructureFeature(EndStructures.MEGALAKE)
|
||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||
.addFeature(EndFeatures.LACUGROVE)
|
||||
.addFeature(EndFeatures.DENSE_VINE)
|
||||
.addFeature(EndFeatures.END_LOTUS)
|
||||
.addFeature(EndFeatures.END_LOTUS_LEAF)
|
||||
.addFeature(EndFeatures.BUBBLE_CORAL)
|
||||
.addFeature(EndFeatures.END_LILY)
|
||||
.addFeature(EndFeatures.BUBBLE_CORAL_RARE)
|
||||
.addFeature(EndFeatures.END_LILY_RARE)
|
||||
.addFeature(EndFeatures.UMBRELLA_MOSS)
|
||||
.addFeature(EndFeatures.CREEPING_MOSS)
|
||||
.addMobSpawn(EndEntities.DRAGONFLY, 20, 1, 3)
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class InvertedScatterFeature extends DefaultFeature {
|
|||
|
||||
@Override
|
||||
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos center, DefaultFeatureConfig featureConfig) {
|
||||
int maxY = world.getTopY(Heightmap.Type.WORLD_SURFACE_WG, center.getX(), center.getZ());
|
||||
int maxY = world.getTopY(Heightmap.Type.WORLD_SURFACE, center.getX(), center.getZ());
|
||||
int minY = BlocksHelper.upRay(world, new BlockPos(center.getX(), 0, center.getZ()), maxY);
|
||||
for (int y = maxY; y > minY; y--) {
|
||||
POS.set(center.getX(), y, center.getZ());
|
||||
|
@ -38,9 +38,9 @@ public abstract class InvertedScatterFeature extends DefaultFeature {
|
|||
float x = pr * (float) Math.cos(theta);
|
||||
float z = pr * (float) Math.sin(theta);
|
||||
|
||||
POS.set(center.getX() + x, center.getY() - 5, center.getZ() + z);
|
||||
POS.set(center.getX() + x, center.getY() - 7, center.getZ() + z);
|
||||
int up = BlocksHelper.upRay(world, POS, 16);
|
||||
if (up > 10) continue;
|
||||
if (up > 14) continue;
|
||||
POS.setY(POS.getY() + up);
|
||||
|
||||
if (canGenerate(world, random, center, POS, r)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue