New textures
This commit is contained in:
parent
ee60f73e53
commit
b73f0f9972
14 changed files with 77 additions and 3 deletions
|
@ -4,6 +4,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Material;
|
import net.minecraft.block.Material;
|
||||||
|
@ -28,6 +29,7 @@ public class BlockHelixTreeLeaves extends BlockBase implements IColorProvider {
|
||||||
public BlockHelixTreeLeaves() {
|
public BlockHelixTreeLeaves() {
|
||||||
super(FabricBlockSettings.of(Material.LEAVES)
|
super(FabricBlockSettings.of(Material.LEAVES)
|
||||||
.strength(0.2F)
|
.strength(0.2F)
|
||||||
|
.breakByTool(FabricToolTags.SHEARS)
|
||||||
.sounds(BlockSoundGroup.GRASS)
|
.sounds(BlockSoundGroup.GRASS)
|
||||||
.materialColor(MaterialColor.ORANGE));
|
.materialColor(MaterialColor.ORANGE));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package ru.betterend.blocks;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
|
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||||
|
import net.minecraft.block.Material;
|
||||||
|
import net.minecraft.block.MaterialColor;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
|
|
||||||
|
public class BlockHelixTreeLuminophor extends BlockBase {
|
||||||
|
public BlockHelixTreeLuminophor() {
|
||||||
|
super(FabricBlockSettings.of(Material.LEAVES)
|
||||||
|
.materialColor(MaterialColor.ORANGE)
|
||||||
|
.breakByTool(FabricToolTags.SHEARS)
|
||||||
|
.sounds(BlockSoundGroup.GRASS)
|
||||||
|
.strength(0.2F)
|
||||||
|
.luminance(15));
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,7 @@ import ru.betterend.blocks.BlockEndLotusStem;
|
||||||
import ru.betterend.blocks.BlockEndstoneDust;
|
import ru.betterend.blocks.BlockEndstoneDust;
|
||||||
import ru.betterend.blocks.BlockGlowingMoss;
|
import ru.betterend.blocks.BlockGlowingMoss;
|
||||||
import ru.betterend.blocks.BlockHelixTreeLeaves;
|
import ru.betterend.blocks.BlockHelixTreeLeaves;
|
||||||
|
import ru.betterend.blocks.BlockHelixTreeLuminophor;
|
||||||
import ru.betterend.blocks.BlockHelixTreeSapling;
|
import ru.betterend.blocks.BlockHelixTreeSapling;
|
||||||
import ru.betterend.blocks.BlockHydralux;
|
import ru.betterend.blocks.BlockHydralux;
|
||||||
import ru.betterend.blocks.BlockHydraluxPetal;
|
import ru.betterend.blocks.BlockHydraluxPetal;
|
||||||
|
@ -157,6 +158,7 @@ public class EndBlocks {
|
||||||
|
|
||||||
public static final Block HELIX_TREE_SAPLING = registerBlock("helix_tree_sapling", new BlockHelixTreeSapling());
|
public static final Block HELIX_TREE_SAPLING = registerBlock("helix_tree_sapling", new BlockHelixTreeSapling());
|
||||||
public static final Block HELIX_TREE_LEAVES = registerBlock("helix_tree_leaves", new BlockHelixTreeLeaves());
|
public static final Block HELIX_TREE_LEAVES = registerBlock("helix_tree_leaves", new BlockHelixTreeLeaves());
|
||||||
|
public static final Block HELIX_TREE_LUMINOPHOR = registerBlock("helix_tree_luminophor", new BlockHelixTreeLuminophor());
|
||||||
public static final WoodenMaterial HELIX_TREE = new WoodenMaterial("helix_tree", MaterialColor.GRAY, MaterialColor.ORANGE);
|
public static final WoodenMaterial HELIX_TREE = new WoodenMaterial("helix_tree", MaterialColor.GRAY, MaterialColor.ORANGE);
|
||||||
|
|
||||||
// Small Plants //
|
// Small Plants //
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class HelixTreeFeature extends DefaultFeature {
|
||||||
@Override
|
@Override
|
||||||
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
|
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
|
||||||
if (!world.getBlockState(pos.down()).getBlock().isIn(EndTags.END_GROUND)) return false;
|
if (!world.getBlockState(pos.down()).getBlock().isIn(EndTags.END_GROUND)) return false;
|
||||||
|
BlocksHelper.setWithoutUpdate(world, pos, AIR);
|
||||||
|
|
||||||
float angle = random.nextFloat() * MHelper.PI2;
|
float angle = random.nextFloat() * MHelper.PI2;
|
||||||
float radiusRange = MHelper.randRange(4.5F, 6F, random);
|
float radiusRange = MHelper.randRange(4.5F, 6F, random);
|
||||||
|
@ -137,9 +138,9 @@ public class HelixTreeFeature extends DefaultFeature {
|
||||||
|
|
||||||
Mutable bPos = new Mutable();
|
Mutable bPos = new Mutable();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
|
bPos.set(x + pos.getX(), y + pos.getY(), z + pos.getZ());
|
||||||
int color = MHelper.floor((float) i / (float) count * 7F + 0.5F) + offset;
|
int color = MHelper.floor((float) i / (float) count * 7F + 0.5F) + offset;
|
||||||
color = MathHelper.clamp(color, 0, 7);
|
color = MathHelper.clamp(color, 0, 7);
|
||||||
bPos.set(x + pos.getX(), y + pos.getY(), z + pos.getZ());
|
|
||||||
if (world.getBlockState(bPos).getMaterial().isReplaceable()) {
|
if (world.getBlockState(bPos).getMaterial().isReplaceable()) {
|
||||||
BlocksHelper.setWithoutUpdate(world, bPos, state.with(BlockHelixTreeLeaves.COLOR, color));
|
BlocksHelper.setWithoutUpdate(world, bPos, state.with(BlockHelixTreeLeaves.COLOR, color));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "betterend:block/helix_tree_luminophor"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -455,5 +455,6 @@
|
||||||
"block.betterend.helix_tree_trapdoor": "Helix Tree Trapdoor",
|
"block.betterend.helix_tree_trapdoor": "Helix Tree Trapdoor",
|
||||||
"block.betterend.lanceleaf": "Lanceleaf",
|
"block.betterend.lanceleaf": "Lanceleaf",
|
||||||
"block.betterend.lanceleaf_seed": "Lanceleaf Seed",
|
"block.betterend.lanceleaf_seed": "Lanceleaf Seed",
|
||||||
"block.betterend.hydralux": "Hydralux"
|
"block.betterend.hydralux": "Hydralux",
|
||||||
|
"block.betterend.helix_tree_luminophor": "Helix Tree Luminophor"
|
||||||
}
|
}
|
|
@ -457,5 +457,6 @@
|
||||||
"block.betterend.helix_tree_trapdoor": "Люк из закрученного дерева",
|
"block.betterend.helix_tree_trapdoor": "Люк из закрученного дерева",
|
||||||
"block.betterend.lanceleaf": "Ланцелист",
|
"block.betterend.lanceleaf": "Ланцелист",
|
||||||
"block.betterend.lanceleaf_seed": "Семечко ланцелиста",
|
"block.betterend.lanceleaf_seed": "Семечко ланцелиста",
|
||||||
"block.betterend.hydralux": "Гидралюкс"
|
"block.betterend.hydralux": "Гидралюкс",
|
||||||
|
"block.betterend.helix_tree_luminophor": "Люминофор закрученного дерева"
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"defaultMaterial": "betterend:waving_floor"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"defaultMaterial": "betterend:glow_all"
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"defaultMap": {
|
||||||
|
"spriteMap": [
|
||||||
|
{
|
||||||
|
"sprite": "betterend:block/lanceleaf_stem",
|
||||||
|
"material": "betterend:waving_floor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sprite": "betterend:block/lanceleaf_leaf_bottom",
|
||||||
|
"material": "betterend:waving"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sprite": "betterend:block/lanceleaf_leaf_middle",
|
||||||
|
"material": "betterend:waving"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sprite": "betterend:block/lanceleaf_leaf_pre_top",
|
||||||
|
"material": "betterend:waving"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sprite": "betterend:block/lanceleaf_leaf_top",
|
||||||
|
"material": "betterend:waving"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"defaultMaterial": "betterend:waving_floor"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "betterend:block/cube_noshade",
|
||||||
|
"textures": {
|
||||||
|
"texture": "betterend:block/helix_tree_luminophor"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 261 B |
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Loading…
Add table
Add a link
Reference in a new issue