More fixes
This commit is contained in:
parent
2f67212725
commit
d2ade23f36
6 changed files with 16 additions and 4 deletions
|
@ -64,7 +64,7 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
||||||
BlocksHelper.setWithoutUpdate(world, bpos, flower);
|
BlocksHelper.setWithoutUpdate(world, bpos, flower);
|
||||||
bpos.setY(bpos.getY() - 1);
|
bpos.setY(bpos.getY() - 1);
|
||||||
stem = world.getBlockState(bpos);
|
stem = world.getBlockState(bpos);
|
||||||
if (stem.isOf(BlockRegistry.END_LOTUS_STEM)) {
|
if (!stem.isOf(BlockRegistry.END_LOTUS_STEM)) {
|
||||||
stem = BlockRegistry.END_LOTUS_STEM.getDefaultState();
|
stem = BlockRegistry.END_LOTUS_STEM.getDefaultState();
|
||||||
if (!world.getBlockState(bpos.north()).getFluidState().isEmpty()) {
|
if (!world.getBlockState(bpos.north()).getFluidState().isEmpty()) {
|
||||||
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
|
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
|
||||||
|
|
|
@ -85,6 +85,9 @@ public class BoneMealItemMixin {
|
||||||
if (block == BlockRegistry.END_MOSS || block == BlockRegistry.END_MYCELIUM) {
|
if (block == BlockRegistry.END_MOSS || block == BlockRegistry.END_MYCELIUM) {
|
||||||
return world.random.nextBoolean() ? BlockRegistry.CREEPING_MOSS.getDefaultState() : BlockRegistry.UMBRELLA_MOSS.getDefaultState();
|
return world.random.nextBoolean() ? BlockRegistry.CREEPING_MOSS.getDefaultState() : BlockRegistry.UMBRELLA_MOSS.getDefaultState();
|
||||||
}
|
}
|
||||||
|
else if (block == BlockRegistry.CAVE_MOSS) {
|
||||||
|
return BlockRegistry.CAVE_GRASS.getDefaultState();
|
||||||
|
}
|
||||||
else if (block == BlockRegistry.CHORUS_NYLIUM) {
|
else if (block == BlockRegistry.CHORUS_NYLIUM) {
|
||||||
return BlockRegistry.CHORUS_GRASS.getDefaultState();
|
return BlockRegistry.CHORUS_GRASS.getDefaultState();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package ru.betterend.registry;
|
||||||
import net.fabricmc.fabric.api.tag.TagRegistry;
|
import net.fabricmc.fabric.api.tag.TagRegistry;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tag.BlockTags;
|
||||||
import net.minecraft.tag.Tag;
|
import net.minecraft.tag.Tag;
|
||||||
import net.minecraft.tag.Tag.Identified;
|
import net.minecraft.tag.Tag.Identified;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
@ -28,6 +29,7 @@ public class BlockTagRegistry {
|
||||||
addSurfaceBlock(BlockRegistry.CAVE_MOSS);
|
addSurfaceBlock(BlockRegistry.CAVE_MOSS);
|
||||||
|
|
||||||
TagHelper.addTag(GEN_TERRAIN, BlockRegistry.ENDER_ORE, BlockRegistry.FLAVOLITE.stone, BlockRegistry.VIOLECITE.stone);
|
TagHelper.addTag(GEN_TERRAIN, BlockRegistry.ENDER_ORE, BlockRegistry.FLAVOLITE.stone, BlockRegistry.VIOLECITE.stone);
|
||||||
|
TagHelper.addTag(BlockTags.NYLIUM, BlockRegistry.END_MOSS, BlockRegistry.END_MYCELIUM, BlockRegistry.CHORUS_NYLIUM, BlockRegistry.CAVE_MOSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addSurfaceBlock(Block block) {
|
public static void addSurfaceBlock(Block block) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class RoundCaveFeature extends DefaultFeature {
|
||||||
|
|
||||||
int radius = MHelper.randRange(10, 30, random);
|
int radius = MHelper.randRange(10, 30, random);
|
||||||
int bottom = BlocksHelper.upRay(world, new BlockPos(pos.getX(), 0, pos.getZ()), 32) + radius + 5;
|
int bottom = BlocksHelper.upRay(world, new BlockPos(pos.getX(), 0, pos.getZ()), 32) + radius + 5;
|
||||||
int top = world.getTopY(Heightmap.Type.WORLD_SURFACE, pos.getX(), pos.getZ()) - radius - 5;
|
int top = world.getTopY(Heightmap.Type.WORLD_SURFACE, pos.getX(), pos.getZ());
|
||||||
|
|
||||||
Mutable bpos = new Mutable();
|
Mutable bpos = new Mutable();
|
||||||
bpos.setX(pos.getX());
|
bpos.setX(pos.getX());
|
||||||
|
@ -48,6 +48,7 @@ public class RoundCaveFeature extends DefaultFeature {
|
||||||
while (top > bottom && !world.getBlockState(bpos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
while (top > bottom && !world.getBlockState(bpos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||||
bpos.setY(--top);
|
bpos.setY(--top);
|
||||||
}
|
}
|
||||||
|
top -= radius + 5;
|
||||||
|
|
||||||
if (top <= bottom) {
|
if (top <= bottom) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -185,5 +185,8 @@
|
||||||
|
|
||||||
"block.betterend.flavolite_runed": "Runed Flavolite",
|
"block.betterend.flavolite_runed": "Runed Flavolite",
|
||||||
"block.betterend.flavolite_runed_eternal": "Eternal Runed Flavolite",
|
"block.betterend.flavolite_runed_eternal": "Eternal Runed Flavolite",
|
||||||
"block.betterend.end_portal_block": "End Portal"
|
"block.betterend.end_portal_block": "End Portal",
|
||||||
|
"block.betterend.cave_moss": "Cave Moss",
|
||||||
|
"block.betterend.cave_grass": "Cave Grass",
|
||||||
|
"block.betterend.cave_bush": "Cave Bush"
|
||||||
}
|
}
|
|
@ -185,5 +185,8 @@
|
||||||
|
|
||||||
"block.betterend.flavolite_runed": "Рунный флаволит",
|
"block.betterend.flavolite_runed": "Рунный флаволит",
|
||||||
"block.betterend.flavolite_runed_eternal": "Вечный рунный флаволит",
|
"block.betterend.flavolite_runed_eternal": "Вечный рунный флаволит",
|
||||||
"block.betterend.end_portal_block": "Портал Края"
|
"block.betterend.end_portal_block": "Портал Края",
|
||||||
|
"block.betterend.cave_moss": "Пещерный мох",
|
||||||
|
"block.betterend.cave_grass": "Пещерная трава",
|
||||||
|
"block.betterend.cave_bush": "Пещерный куст"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue