Sapling fixes & lotus log recipe

This commit is contained in:
paulevsGitch 2020-11-02 03:15:09 +03:00
parent 28f2ac03a9
commit b8d0a1d93f
5 changed files with 37 additions and 0 deletions

View file

@ -1,7 +1,11 @@
package ru.betterend.blocks;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldView;
import net.minecraft.world.gen.feature.Feature;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class BlockDragonTreeSapling extends BlockFeatureSapling {
@ -13,4 +17,9 @@ public class BlockDragonTreeSapling extends BlockFeatureSapling {
protected Feature<?> getFeature() {
return EndFeatures.DRAGON_TREE.getFeature();
}
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isOf(EndBlocks.SHADOW_GRASS);
}
}

View file

@ -1,7 +1,11 @@
package ru.betterend.blocks;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldView;
import net.minecraft.world.gen.feature.Feature;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class BlockLacugroveSapling extends BlockFeatureSapling {
@ -13,4 +17,9 @@ public class BlockLacugroveSapling extends BlockFeatureSapling {
protected Feature<?> getFeature() {
return EndFeatures.LACUGROVE.getFeature();
}
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isOf(EndBlocks.END_MOSS) || world.getBlockState(pos.down()).isOf(EndBlocks.ENDSTONE_DUST);
}
}

View file

@ -1,7 +1,11 @@
package ru.betterend.blocks;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldView;
import net.minecraft.world.gen.feature.Feature;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
@ -13,4 +17,9 @@ public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
protected Feature<?> getFeature() {
return EndFeatures.MOSSY_GLOWSHROOM.getFeature();
}
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isOf(EndBlocks.END_MOSS) || world.getBlockState(pos.down()).isOf(EndBlocks.END_MYCELIUM);
}
}

View file

@ -1,7 +1,11 @@
package ru.betterend.blocks;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldView;
import net.minecraft.world.gen.feature.Feature;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class BlockPythadendronSapling extends BlockFeatureSapling {
@ -13,4 +17,9 @@ public class BlockPythadendronSapling extends BlockFeatureSapling {
protected Feature<?> getFeature() {
return EndFeatures.PYTHADENDRON_TREE.getFeature();
}
@Override
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isOf(EndBlocks.CHORUS_NYLIUM);
}
}

View file

@ -91,6 +91,7 @@ public class CraftingRecipes {
GridRecipe.make("paper", Items.PAPER).setShape("###").addMaterial('#', EndItems.END_LILY_LEAF_DRIED).setOutputCount(3).build();
GridRecipe.make("aurora_block", EndBlocks.AURORA_CRYSTAL).setShape("##", "##").addMaterial('#', EndItems.CRYSTAL_SHARDS).build();
GridRecipe.make("lotus_block", EndBlocks.END_LOTUS.log).setShape("##", "##").addMaterial('#', EndBlocks.END_LOTUS_STEM).build();
}
public static void registerPedestal(String name, Block pedestal, Block slab, Block pillar) {