Lantern woods structures, block translations & fixes

This commit is contained in:
paulevsGitch 2021-03-17 16:16:45 +03:00
parent c3ce436fe0
commit 406cc8f900
16 changed files with 95 additions and 3 deletions

View file

@ -321,7 +321,7 @@ public class EndBlocks {
public static final Block HYDRALUX_PETAL_BLOCK = registerBlock("hydralux_petal_block", new HydraluxPetalBlock()); public static final Block HYDRALUX_PETAL_BLOCK = registerBlock("hydralux_petal_block", new HydraluxPetalBlock());
public static final ColoredMaterial HYDRALUX_PETAL_BLOCK_COLORED = new ColoredMaterial(HydraluxPetalColoredBlock::new, HYDRALUX_PETAL_BLOCK, true); public static final ColoredMaterial HYDRALUX_PETAL_BLOCK_COLORED = new ColoredMaterial(HydraluxPetalColoredBlock::new, HYDRALUX_PETAL_BLOCK, true);
public static final Block POND_ANEMONE = registerBlock("pond_anemone", new BubbleCoralBlock()); public static final Block POND_ANEMONE = registerBlock("pond_anemone", new PondAnemoneBlock());
public static final Block FLAMAEA = registerBlock("flamaea", new FlamaeaBlock()); public static final Block FLAMAEA = registerBlock("flamaea", new FlamaeaBlock());

View file

@ -148,6 +148,8 @@ public class EndFeatures {
public static final EndFeature SMALL_JELLYSHROOM_WALL = new EndFeature("small_jellyshroom_wall", new WallPlantFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 4); public static final EndFeature SMALL_JELLYSHROOM_WALL = new EndFeature("small_jellyshroom_wall", new WallPlantFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 4);
public static final EndFeature SMALL_JELLYSHROOM_WOOD = new EndFeature("small_jellyshroom_wood", new WallPlantOnLogFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 8); public static final EndFeature SMALL_JELLYSHROOM_WOOD = new EndFeature("small_jellyshroom_wood", new WallPlantOnLogFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 8);
public static final EndFeature JUNGLE_FERN_WOOD = new EndFeature("jungle_fern_wood", new WallPlantOnLogFeature(EndBlocks.JUNGLE_FERN, 3), 12); public static final EndFeature JUNGLE_FERN_WOOD = new EndFeature("jungle_fern_wood", new WallPlantOnLogFeature(EndBlocks.JUNGLE_FERN, 3), 12);
public static final EndFeature RUSCUS = new EndFeature("ruscus", new WallPlantFeature(EndBlocks.RUSCUS, 6), 10);
public static final EndFeature RUSCUS_WOOD = new EndFeature("ruscus_wood", new WallPlantOnLogFeature(EndBlocks.RUSCUS, 6), 10);
// Sky plants // Sky plants
public static final EndFeature FILALUX = new EndFeature("filalux", new FilaluxFeature(), 1); public static final EndFeature FILALUX = new EndFeature("filalux", new FilaluxFeature(), 1);

View file

@ -0,0 +1,61 @@
package ru.betterend.registry;
import java.util.Random;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.ShapeContext;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
public class PondAnemoneBlock extends UnderwaterPlantBlock {
private static final VoxelShape SHAPE = Block.createCuboidShape(2, 0, 2, 14, 14, 14);
public PondAnemoneBlock() {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.CORAL)
.breakByHand(true)
.luminance(13)
.noCollision());
}
@Override
public AbstractBlock.OffsetType getOffsetType() {
return AbstractBlock.OffsetType.NONE;
}
@Environment(EnvType.CLIENT)
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
double x = pos.getX() + random.nextDouble();
double y = pos.getY() + random.nextDouble() * 0.5F + 0.5F;
double z = pos.getZ() + random.nextDouble();
world.addParticle(ParticleTypes.BUBBLE, x, y, z, 0.0D, 0.0D, 0.0D);
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
return SHAPE;
}
@Override
public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) {
return false;
}
@Override
public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) {
return false;
}
}

View file

@ -29,6 +29,8 @@ public class LanternWoodsBiome extends EndBiome {
.addFeature(EndFeatures.POND_ANEMONE) .addFeature(EndFeatures.POND_ANEMONE)
.addFeature(EndFeatures.CHARNIA_ORANGE) .addFeature(EndFeatures.CHARNIA_ORANGE)
.addFeature(EndFeatures.CHARNIA_RED) .addFeature(EndFeatures.CHARNIA_RED)
.addFeature(EndFeatures.RUSCUS)
.addFeature(EndFeatures.RUSCUS_WOOD)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY) .addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2)); .addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
} }

View file

@ -798,5 +798,12 @@
"block.betterend.lucernia_stairs": "Lucernia Stairs", "block.betterend.lucernia_stairs": "Lucernia Stairs",
"block.betterend.lucernia_stripped_bark": "Stripped Lucernia Bark", "block.betterend.lucernia_stripped_bark": "Stripped Lucernia Bark",
"block.betterend.lucernia_stripped_log": "Stripped Lucernia Log", "block.betterend.lucernia_stripped_log": "Stripped Lucernia Log",
"block.betterend.lucernia_trapdoor": "Lucernia Trapdoor" "block.betterend.lucernia_trapdoor": "Lucernia Trapdoor",
"block.betterend.aurant_polypore": "Aurant Polypore",
"block.betterend.bolux_mushroom": "Bolux Mushroom",
"block.betterend.flamaea": "Flamaea",
"block.betterend.pond_anemone": "Pond Anemone",
"block.betterend.ruscus": "Ruscus",
"item.betterend.bolux_mushroom_cooked": "Cooked Bolux Mushroom"
} }

View file

@ -818,5 +818,12 @@
"block.betterend.lucernia_stairs": "Ступени из люцернии", "block.betterend.lucernia_stairs": "Ступени из люцернии",
"block.betterend.lucernia_stripped_bark": "Обтёсанная кора люцернии", "block.betterend.lucernia_stripped_bark": "Обтёсанная кора люцернии",
"block.betterend.lucernia_stripped_log": "Обтёсанное бревно люцернии", "block.betterend.lucernia_stripped_log": "Обтёсанное бревно люцернии",
"block.betterend.lucernia_trapdoor": "Люцерниевый люк" "block.betterend.lucernia_trapdoor": "Люцерниевый люк",
"block.betterend.aurant_polypore": "Аурантовый трутовик",
"block.betterend.bolux_mushroom": "Болюкс",
"block.betterend.flamaea": "Фламея",
"block.betterend.pond_anemone": "Озёрный анемон",
"block.betterend.ruscus": "Рускус",
"item.betterend.bolux_mushroom_cooked": "Приготовленный болюкс"
} }

View file

@ -0,0 +1,13 @@
{
"structures": [
{ "nbt": "cabin", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "light_1", "offsetY": 0, "terrainMerge": "object" },
{ "nbt": "log_1", "offsetY": 0, "terrainMerge": "object" },
{ "nbt": "log_2", "offsetY": 0, "terrainMerge": "object" },
{ "nbt": "ruins_1", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "ruins_2", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "stump_1", "offsetY": 0, "terrainMerge": "object" },
{ "nbt": "stump_2", "offsetY": 0, "terrainMerge": "surface" },
{ "nbt": "stump_3", "offsetY": 0, "terrainMerge": "surface" }
]
}