Merge branch '1.19' of github.com:quiqueck/BetterEnd into 1.19
Conflicts: src/main/java/org/betterx/betterend/integration/EnderscapeIntegration.java
This commit is contained in:
commit
34fd95ac11
420 changed files with 6494 additions and 5302 deletions
|
@ -46,9 +46,8 @@ dependencies {
|
|||
} else {
|
||||
modImplementation "com.github.quiqueck:BCLib:${project.bclib_version}"
|
||||
}
|
||||
|
||||
// useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||
//useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
|
||||
}
|
||||
|
||||
def useOptional(String dep) {
|
||||
|
|
|
@ -19,5 +19,5 @@ archives_base_name=better-end
|
|||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
|
||||
patchouli_version = 55-FABRIC-SNAPSHOT
|
||||
bclib_version = 1.19-SNAPSHOT
|
||||
rei_version = 9.0.458
|
||||
bclib_version = 2.0.1
|
||||
rei_version = 9.0.472
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package org.betterx.betterend;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
import org.betterx.bclib.api.v2.WorldDataAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.util.Logger;
|
||||
|
@ -21,6 +15,12 @@ import org.betterx.betterend.util.LootTableUtil;
|
|||
import org.betterx.betterend.world.generator.GeneratorOptions;
|
||||
import org.betterx.betterend.world.generator.TerrainGenerator;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public class BetterEnd implements ModInitializer {
|
||||
public static final String MOD_ID = "betterend";
|
||||
public static final Logger LOGGER = new Logger(MOD_ID);
|
||||
|
@ -60,8 +60,10 @@ public class BetterEnd implements ModInitializer {
|
|||
|
||||
if (GeneratorOptions.useNewGenerator()) {
|
||||
org.betterx.bclib.api.v2.generator.GeneratorOptions.setFarEndBiomes(GeneratorOptions.getIslandDistBlock());
|
||||
org.betterx.bclib.api.v2.generator.GeneratorOptions.setEndLandFunction((pos) -> TerrainGenerator.isLand(pos.x,
|
||||
pos.y));
|
||||
org.betterx.bclib.api.v2.generator.GeneratorOptions.setEndLandFunction((pos) -> TerrainGenerator.isLand(
|
||||
pos.x,
|
||||
pos.y
|
||||
));
|
||||
}
|
||||
|
||||
BiomeAPI.registerEndBiomeModification((biomeID, biome) -> {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
|
||||
import org.betterx.bclib.items.BaseAnvilItem;
|
||||
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
|
||||
import org.betterx.betterend.item.material.EndToolMaterial;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
|
||||
public class AeterniumAnvil extends EndAnvilBlock {
|
||||
public AeterniumAnvil() {
|
||||
super(EndBlocks.AETERNIUM_BLOCK.defaultMaterialColor(), EndToolMaterial.AETERNIUM.getLevel());
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.CustomItemProvider;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
|
@ -9,9 +12,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.CustomItemProvider;
|
||||
|
||||
public class AeterniumBlock extends BaseBlock implements CustomItemProvider {
|
||||
public AeterniumBlock() {
|
||||
super(FabricBlockSettings
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
public class AmaranitaCapBlock extends BaseBlock implements AddMineableAxe {
|
||||
public AmaranitaCapBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).sound(SoundType.WOOD));
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class AmaranitaHymenophoreBlock extends BaseBlock implements RenderLayerProvider, AddMineableAxe {
|
||||
public AmaranitaHymenophoreBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).sound(SoundType.WOOD));
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
|
||||
|
||||
public class AmaranitaStemBlock extends BaseRotatedPillarBlock {
|
||||
public AmaranitaStemBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).mapColor(MaterialColor.COLOR_LIGHT_GREEN));
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
public class AmberBlock extends BaseBlock {
|
||||
public AmberBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).mapColor(MaterialColor.COLOR_YELLOW));
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -16,12 +22,6 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableHammer;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -21,14 +30,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableHammer;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -50,10 +51,12 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements RenderLaye
|
|||
|
||||
@Override
|
||||
@Deprecated
|
||||
public VoxelShape getVisualShape(BlockState blockState,
|
||||
public VoxelShape getVisualShape(
|
||||
BlockState blockState,
|
||||
BlockGetter blockGetter,
|
||||
BlockPos blockPos,
|
||||
CollisionContext collisionContext) {
|
||||
CollisionContext collisionContext
|
||||
) {
|
||||
return this.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.UpDownPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.UpDownPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlueVineBlock extends UpDownPlantBlock {
|
||||
public static final EnumProperty<BlockProperties.TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
|
@ -14,11 +19,6 @@ import net.minecraft.world.level.material.Material;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlueVineLanternBlock extends BaseBlock implements AddMineableAxe {
|
||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||
|
||||
|
@ -37,12 +37,14 @@ public class BlueVineLanternBlock extends BaseBlock implements AddMineableAxe {
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
@ -14,6 +7,13 @@ import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
|||
import org.betterx.betterend.blocks.basis.FurBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
public BlueVineSeedBlock() {
|
||||
super(p -> p.offsetType(BlockBehaviour.OffsetType.NONE));
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -13,8 +16,6 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
|||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -19,11 +24,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class BrimstoneBlock extends BaseBlock {
|
||||
|
@ -40,11 +40,13 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world,
|
||||
public void setPlacedBy(
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
BlockState state,
|
||||
@Nullable LivingEntity placer,
|
||||
ItemStack itemStack) {
|
||||
ItemStack itemStack
|
||||
) {
|
||||
if (world.isClientSide()) {
|
||||
updateChunks((ClientLevel) world, pos);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -17,9 +20,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class BubbleCoralBlock extends EndUnderwaterPlantBlock implements AddMineableShears {
|
||||
|
||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 14, 16);
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -8,11 +14,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.betterend.blocks.basis.EndLanternBlock;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -17,13 +25,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.betterend.blocks.basis.EndLanternBlock;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
|
||||
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements CustomColorProvider {
|
||||
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
|
@ -14,6 +7,13 @@ import org.betterx.bclib.util.BlocksHelper;
|
|||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -15,12 +21,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -14,10 +18,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
||||
public CavePumpkinVineBlock() {
|
||||
super(p -> p.offsetType(BlockBehaviour.OffsetType.NONE));
|
||||
|
@ -56,12 +56,14 @@ public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
state = super.updateShape(state, facing, neighborState, world, pos, neighborPos);
|
||||
if (state.is(this) && state.getValue(BlockProperties.AGE) > 1) {
|
||||
BlockState down = world.getBlockState(pos.below());
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
|
@ -18,12 +25,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
@ -77,9 +78,11 @@ public class ChandelierBlock extends BaseAttachedBlock implements RenderLayerPro
|
|||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId,
|
||||
public UnbakedModel getModelVariant(
|
||||
ResourceLocation stateId,
|
||||
BlockState blockState,
|
||||
Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
Map<ResourceLocation, UnbakedModel> modelCache
|
||||
) {
|
||||
String state = "_wall";
|
||||
BlockModelRotation rotation = BlockModelRotation.X0_Y0;
|
||||
switch (blockState.getValue(FACING)) {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
public class CharcoalBlock extends BaseBlock {
|
||||
public CharcoalBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.COAL_BLOCK));
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class CharniaBlock extends EndUnderwaterPlantBlock {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class ChorusGrassBlock extends EndPlantBlock {
|
||||
public ChorusGrassBlock() {
|
||||
super(true);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
|
@ -10,10 +14,6 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
public class DenseSnowBlock extends BaseBlock {
|
||||
public DenseSnowBlock() {
|
||||
super(FabricBlockSettings.of(Material.SNOW).strength(0.2F).sound(SoundType.SNOW));
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class DragonTreeSaplingBlock extends PottableFeatureSapling {
|
||||
public DragonTreeSaplingBlock() {
|
||||
super((state) -> EndFeatures.DRAGON_TREE);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -23,10 +27,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -42,12 +42,14 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements RenderLayer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void playerDestroy(Level world,
|
||||
public void playerDestroy(
|
||||
Level world,
|
||||
Player player,
|
||||
BlockPos pos,
|
||||
BlockState state,
|
||||
@Nullable BlockEntity blockEntity,
|
||||
ItemStack stack) {
|
||||
ItemStack stack
|
||||
) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
||||
if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
||||
if (world.dimensionType().ultraWarm()) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
|
||||
import net.minecraft.util.StringRepresentable;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
|
||||
public class EndBlockProperties extends BlockProperties {
|
||||
public static final EnumProperty<HydraluxShape> HYDRALUX_SHAPE = EnumProperty.create("shape", HydraluxShape.class);
|
||||
public static final EnumProperty<PedestalState> PEDESTAL_STATE = EnumProperty.create("state", PedestalState.class);
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -27,13 +35,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -51,12 +52,14 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock implements AddMineable
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return state.getValue(SHAPE) == TripleShape.TOP
|
||||
? Blocks.AIR.defaultBlockState()
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, RandomSource random, BlockPos pos) {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -16,9 +20,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -22,14 +30,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLotusLeafBlock extends BaseBlockNotFull implements RenderLayerProvider {
|
||||
public static final EnumProperty<Direction> HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -8,12 +14,6 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, RandomSource random, BlockPos pos) {
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -20,12 +27,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -84,12 +85,14 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction direction,
|
||||
BlockState newState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos posFrom) {
|
||||
BlockPos posFrom
|
||||
) {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.interfaces.TeleportingEntity;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -31,14 +39,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.interfaces.TeleportingEntity;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -91,12 +91,14 @@ public class EndPortalBlock extends NetherPortalBlock implements RenderLayerProv
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction direction,
|
||||
BlockState newState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos posFrom) {
|
||||
BlockPos posFrom
|
||||
) {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -136,10 +138,12 @@ public class EndPortalBlock extends NetherPortalBlock implements RenderLayerProv
|
|||
return BCLRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
private BlockPos findExitPos(ServerLevel currentWorld,
|
||||
private BlockPos findExitPos(
|
||||
ServerLevel currentWorld,
|
||||
ServerLevel targetWorld,
|
||||
BlockPos currentPos,
|
||||
Entity entity) {
|
||||
Entity entity
|
||||
) {
|
||||
if (targetWorld == null) return null;
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess()
|
||||
.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
|
||||
|
@ -149,7 +153,8 @@ public class EndPortalBlock extends NetherPortalBlock implements RenderLayerProv
|
|||
double currentMultiplier = Objects.requireNonNull(registry.get(currentWorldId)).coordinateScale();
|
||||
double multiplier = targetMultiplier > currentMultiplier ? 1.0 / targetMultiplier : currentMultiplier;
|
||||
MutableBlockPos basePos = currentPos.mutable()
|
||||
.set(currentPos.getX() * multiplier,
|
||||
.set(
|
||||
currentPos.getX() * multiplier,
|
||||
currentPos.getY(),
|
||||
currentPos.getZ() * multiplier
|
||||
);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockWithEntity;
|
||||
import org.betterx.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
|
@ -33,9 +37,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BaseBlockWithEntity;
|
||||
import org.betterx.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import org.betterx.betterend.registry.EndBlockEntities;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -56,12 +57,14 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
if (world.isClientSide) {
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
|
@ -170,9 +173,11 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level,
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(
|
||||
Level level,
|
||||
BlockState blockState,
|
||||
BlockEntityType<T> blockEntityType) {
|
||||
BlockEntityType<T> blockEntityType
|
||||
) {
|
||||
return level.isClientSide() ? null : createTickerHelper(
|
||||
blockEntityType,
|
||||
EndBlockEntities.END_STONE_SMELTER,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
|
@ -11,8 +13,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
public class EnderBlock extends BaseBlock {
|
||||
|
||||
public EnderBlock() {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShovel;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
@ -15,11 +20,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShovel;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.EternalPedestalEntity;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Registry;
|
||||
|
@ -20,11 +26,6 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.EternalPedestalEntity;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndPortals;
|
||||
import org.betterx.betterend.rituals.EternalRitual;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -75,12 +76,14 @@ public class EternalPedestal extends PedestalBlock {
|
|||
|
||||
@Override
|
||||
@Deprecated
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction direction,
|
||||
BlockState newState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos posFrom) {
|
||||
BlockPos posFrom
|
||||
) {
|
||||
BlockState updated = super.updateShape(state, direction, newState, world, pos, posFrom);
|
||||
if (!updated.is(this)) return updated;
|
||||
if (!this.isPlaceable(updated)) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
|
||||
public class FilaluxBlock extends BaseVineBlock {
|
||||
public FilaluxBlock() {
|
||||
super(15, true, p -> p.offsetType(BlockBehaviour.OffsetType.NONE));
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
public class FilaluxLanternBlock extends BaseBlock implements AddMineableAxe {
|
||||
public FilaluxLanternBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -13,10 +18,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.interfaces.CustomItemProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
|
@ -20,9 +24,6 @@ import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.interfaces.CustomItemProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -12,10 +16,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class FlammalixBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.models.BasePatterns;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.models.ModelsHelper.MultiPartBuilder;
|
||||
import org.betterx.bclib.client.models.PatternsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.PostInitable;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.JsonFactory;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.PottableLeavesBlock;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.interfaces.PottableTerrain;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Transformation;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
|
@ -38,25 +58,6 @@ import com.google.common.collect.Lists;
|
|||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.mojang.math.Transformation;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.models.BasePatterns;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.models.ModelsHelper.MultiPartBuilder;
|
||||
import org.betterx.bclib.client.models.PatternsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.PostInitable;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.JsonFactory;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.PottableLeavesBlock;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.interfaces.PottableTerrain;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
@ -104,12 +105,14 @@ public class FlowerPotBlock extends BaseBlockNotFull implements RenderLayerProvi
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
int plantID = state.getValue(PLANT_ID);
|
||||
if (plantID < 1 || plantID > plants.length || plants[plantID - 1] == null) {
|
||||
return state.getValue(POT_LIGHT) > 0 ? state.setValue(POT_LIGHT, 0) : state;
|
||||
|
@ -205,12 +208,14 @@ public class FlowerPotBlock extends BaseBlockNotFull implements RenderLayerProvi
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level level,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
if (level.isClientSide) {
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
|
@ -295,9 +300,11 @@ public class FlowerPotBlock extends BaseBlockNotFull implements RenderLayerProvi
|
|||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId,
|
||||
public UnbakedModel getModelVariant(
|
||||
ResourceLocation stateId,
|
||||
BlockState blockState,
|
||||
Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
Map<ResourceLocation, UnbakedModel> modelCache
|
||||
) {
|
||||
MultiPartBuilder model = MultiPartBuilder.create(stateDefinition);
|
||||
model.part(new ModelResourceLocation(stateId.getNamespace(), stateId.getPath(), "inventory")).add();
|
||||
Transformation offset = new Transformation(new Vector3f(0, 7.5F / 16F, 0), null, null, null);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
public class GlowingHymenophoreBlock extends BaseBlock implements AddMineableAxe {
|
||||
public GlowingHymenophoreBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
@ -7,9 +10,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class GlowingMossBlock extends EndPlantBlock {
|
||||
public GlowingMossBlock(int light) {
|
||||
super(light);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
|
@ -15,10 +19,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class GlowingPillarLuminophorBlock extends BaseBlock implements AddMineableShears {
|
||||
public static final BooleanProperty NATURAL = EndBlockProperties.NATURAL;
|
||||
|
||||
|
@ -39,12 +39,14 @@ public class GlowingPillarLuminophorBlock extends BaseBlock implements AddMineab
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.blocks.UpDownPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -11,11 +16,6 @@ import net.minecraft.world.level.block.state.properties.EnumProperty;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.blocks.UpDownPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class GlowingPillarRootsBlock extends UpDownPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,14 +20,6 @@ import net.minecraft.world.level.material.Material;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class GlowingPillarSeedBlock extends EndPlantWithAgeBlock implements AddMineableShears {
|
||||
|
||||
public GlowingPillarSeedBlock() {
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.NamedBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BaseLeavesBlock;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -16,17 +27,6 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.NamedBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BaseLeavesBlock;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvider, AddMineableShears {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class HelixTreeSaplingBlock extends PottableFeatureSapling {
|
||||
public HelixTreeSaplingBlock() {
|
||||
super((state) -> EndFeatures.HELIX_TREE);
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.HydraluxShape;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -19,13 +27,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.HydraluxShape;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -84,8 +85,10 @@ public class HydraluxBlock extends UnderwaterPlantBlock implements AddMineableSh
|
|||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
HydraluxShape shape = state.getValue(SHAPE);
|
||||
if (shape == HydraluxShape.FLOWER_BIG_BOTTOM || shape == HydraluxShape.FLOWER_SMALL_BOTTOM) {
|
||||
return Lists.newArrayList(new ItemStack(EndItems.HYDRALUX_PETAL,
|
||||
MHelper.randRange(1, 4, MHelper.RANDOM_SOURCE)));
|
||||
return Lists.newArrayList(new ItemStack(
|
||||
EndItems.HYDRALUX_PETAL,
|
||||
MHelper.randRange(1, 4, MHelper.RANDOM_SOURCE)
|
||||
));
|
||||
} else if (shape == HydraluxShape.ROOTS) {
|
||||
return Lists.newArrayList(new ItemStack(
|
||||
EndBlocks.HYDRALUX_SAPLING,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
@ -10,9 +13,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
|
||||
public class HydraluxPetalBlock extends BaseBlock implements AddMineableAxe {
|
||||
public HydraluxPetalBlock() {
|
||||
this(
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
|
@ -10,11 +15,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
|
||||
import java.util.Optional;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -7,11 +12,6 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
|
@ -31,13 +38,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -81,12 +81,14 @@ public class HydrothermalVentBlock extends BaseBlockNotFull implements EntityBlo
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.WATER.defaultBlockState();
|
||||
} else if (state.getValue(WATERLOGGED) && facing == Direction.UP && neighborState.is(Blocks.WATER)) {
|
||||
|
@ -123,11 +125,13 @@ public class HydrothermalVentBlock extends BaseBlockNotFull implements EntityBlo
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world,
|
||||
public void setPlacedBy(
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
BlockState state,
|
||||
@Nullable LivingEntity placer,
|
||||
ItemStack itemStack) {
|
||||
ItemStack itemStack
|
||||
) {
|
||||
if (world instanceof ServerLevel && state.getValue(WATERLOGGED) && world.getBlockState(pos.above())
|
||||
.is(Blocks.WATER)) {
|
||||
tick(state, (ServerLevel) world, pos, world.random);
|
||||
|
@ -147,9 +151,11 @@ public class HydrothermalVentBlock extends BaseBlockNotFull implements EntityBlo
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level,
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(
|
||||
Level level,
|
||||
BlockState blockState,
|
||||
BlockEntityType<T> blockEntityType) {
|
||||
BlockEntityType<T> blockEntityType
|
||||
) {
|
||||
return BlockEntityHydrothermalVent::tick;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import org.betterx.betterend.rituals.InfusionRitual;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
@ -13,10 +17,6 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
|||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import org.betterx.betterend.rituals.InfusionRitual;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -79,9 +79,11 @@ public class InfusionPedestal extends PedestalBlock {
|
|||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level,
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(
|
||||
Level level,
|
||||
BlockState blockState,
|
||||
BlockEntityType<T> blockEntityType) {
|
||||
BlockEntityType<T> blockEntityType
|
||||
) {
|
||||
return InfusionPedestalEntity::tickEnity;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
|
@ -21,15 +31,6 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.client.models.Patterns;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class LacugroveSaplingBlock extends PottableFeatureSapling {
|
||||
public LacugroveSaplingBlock() {
|
||||
super((state) -> EndFeatures.LACUGROVE);
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.PentaShape;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -13,12 +19,6 @@ import net.minecraft.world.level.block.state.properties.EnumProperty;
|
|||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.PentaShape;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -50,12 +50,14 @@ public class LanceleafBlock extends EndPlantBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.PentaShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
@ -14,6 +7,13 @@ import org.betterx.bclib.util.MHelper;
|
|||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class LanceleafSeedBlock extends EndPlantWithAgeBlock {
|
||||
public LanceleafSeedBlock() {
|
||||
super(p -> p.offsetType(OffsetType.NONE));
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -17,12 +23,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class LargeAmaranitaBlock extends EndPlantBlock implements AddMineableShears {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape SHAPE_BOTTOM = Block.box(4, 0, 4, 12, 14, 12);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class LucerniaSaplingBlock extends PottableFeatureSapling {
|
||||
public LucerniaSaplingBlock() {
|
||||
super((state) -> EndFeatures.LUCERNIA);
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -20,22 +29,15 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableAxe;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class LumecornBlock extends BaseBlockNotFull implements RenderLayerProvider, AddMineableAxe {
|
||||
public static final EnumProperty<EndBlockProperties.LumecornShape> SHAPE = EnumProperty.create("shape",
|
||||
EndBlockProperties.LumecornShape.class);
|
||||
public static final EnumProperty<EndBlockProperties.LumecornShape> SHAPE = EnumProperty.create(
|
||||
"shape",
|
||||
EndBlockProperties.LumecornShape.class
|
||||
);
|
||||
private static final VoxelShape SHAPE_BOTTOM = Block.box(6, 0, 6, 10, 16, 10);
|
||||
private static final VoxelShape SHAPE_TOP = Block.box(6, 0, 6, 10, 8, 10);
|
||||
|
||||
|
@ -73,12 +75,14 @@ public class LumecornBlock extends BaseBlockNotFull implements RenderLayerProvid
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -8,10 +12,6 @@ import net.minecraft.world.level.levelgen.feature.Feature;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class LumecornSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
@ -28,7 +28,8 @@ public class LumecornSeedBlock extends EndPlantWithAgeBlock {
|
|||
null,
|
||||
random,
|
||||
pos,
|
||||
null));
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.FluidTags;
|
||||
|
@ -21,10 +26,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Queue;
|
||||
|
||||
|
@ -44,12 +45,14 @@ public class MengerSpongeBlock extends BaseBlockNotFull implements RenderLayerPr
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (absorbWater(world, pos)) {
|
||||
return EndBlocks.MENGER_SPONGE_WET.defaultBlockState();
|
||||
}
|
||||
|
@ -114,10 +117,12 @@ public class MengerSpongeBlock extends BaseBlockNotFull implements RenderLayerPr
|
|||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState blockState,
|
||||
public VoxelShape getShape(
|
||||
BlockState blockState,
|
||||
BlockGetter blockGetter,
|
||||
BlockPos blockPos,
|
||||
CollisionContext collisionContext) {
|
||||
CollisionContext collisionContext
|
||||
) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
|
@ -23,12 +29,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class MengerSpongeWetBlock extends BaseBlockNotFull implements RenderLayerProvider {
|
||||
public MengerSpongeWetBlock() {
|
||||
|
@ -119,10 +119,12 @@ public class MengerSpongeWetBlock extends BaseBlockNotFull implements RenderLaye
|
|||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState blockState,
|
||||
public VoxelShape getShape(
|
||||
BlockState blockState,
|
||||
BlockGetter blockGetter,
|
||||
BlockPos blockPos,
|
||||
CollisionContext collisionContext) {
|
||||
CollisionContext collisionContext
|
||||
) {
|
||||
return EndBlocks.MENGER_SPONGE.getShape(blockState, blockGetter, blockPos, collisionContext);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
public class MissingTileBlock extends BaseBlock {
|
||||
public MissingTileBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE));
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -17,9 +20,6 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.NamedMineableTags;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
|
@ -12,11 +17,6 @@ import net.minecraft.world.level.material.Material;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.NamedMineableTags;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MossyGlowshroomCapBlock extends BaseBlock implements TagProvider {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class MossyGlowshroomSaplingBlock extends PottableFeatureSapling {
|
||||
public MossyGlowshroomSaplingBlock() {
|
||||
super(7, (state) -> EndFeatures.MOSSY_GLOWSHROOM);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -17,8 +19,6 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -15,9 +18,6 @@ import net.minecraft.world.level.pathfinder.PathComputationType;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class MurkweedBlock extends EndPlantBlock {
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
@ -16,10 +21,6 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.LitPillarBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.LitPillarBlock;
|
||||
|
||||
public class NeonCactusBlock extends LitPillarBlock {
|
||||
public NeonCactusBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.CACTUS).luminance(15));
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.CactusBottom;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -29,17 +41,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.CactusBottom;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
|
@ -106,12 +107,14 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction direction,
|
||||
BlockState newState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos posFrom) {
|
||||
BlockPos posFrom
|
||||
) {
|
||||
world.scheduleTick(pos, this, 2);
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||
|
@ -235,11 +238,13 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate
|
|||
}
|
||||
}
|
||||
|
||||
private boolean growIteration(WorldGenLevel world,
|
||||
private boolean growIteration(
|
||||
WorldGenLevel world,
|
||||
MutableBlockPos pos,
|
||||
RandomSource random,
|
||||
List<MutableBlockPos> ends,
|
||||
int length) {
|
||||
int length
|
||||
) {
|
||||
BlockState state = world.getBlockState(pos);
|
||||
if (!state.is(this)) {
|
||||
return false;
|
||||
|
@ -278,11 +283,13 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate
|
|||
return true;
|
||||
}
|
||||
|
||||
private Direction getSideDirection(WorldGenLevel world,
|
||||
private Direction getSideDirection(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
BlockState iterState,
|
||||
Direction dir,
|
||||
RandomSource random) {
|
||||
RandomSource random
|
||||
) {
|
||||
MutableBlockPos iterPos = pos.mutable();
|
||||
Direction startDir = dir;
|
||||
Direction lastDir = null;
|
||||
|
@ -312,10 +319,12 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState blockState,
|
||||
public boolean isPathfindable(
|
||||
BlockState blockState,
|
||||
BlockGetter blockGetter,
|
||||
BlockPos blockPos,
|
||||
PathComputationType pathComputationType) {
|
||||
PathComputationType pathComputationType
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -17,10 +21,6 @@ import net.minecraft.world.phys.BlockHitResult;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PallidiumBlock extends EndTerrainBlock {
|
||||
|
@ -41,12 +41,14 @@ public class PallidiumBlock extends EndTerrainBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level level,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
if (nextLevel == null) {
|
||||
return InteractionResult.PASS;
|
||||
} else if (level.isClientSide) {
|
||||
|
@ -66,9 +68,11 @@ public class PallidiumBlock extends EndTerrainBlock {
|
|||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId,
|
||||
public UnbakedModel getModelVariant(
|
||||
ResourceLocation stateId,
|
||||
BlockState blockState,
|
||||
Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
Map<ResourceLocation, UnbakedModel> modelCache
|
||||
) {
|
||||
return this.getBlockModel(stateId, blockState);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -16,9 +19,6 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShears;
|
||||
import org.betterx.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class PondAnemoneBlock extends EndUnderwaterPlantBlock implements AddMineableShears {
|
||||
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class PythadendronSaplingBlock extends PottableFeatureSapling {
|
||||
public PythadendronSaplingBlock() {
|
||||
super((state) -> EndFeatures.PYTHADENDRON_TREE);
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.betterend.particle.InfusionParticleType;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -32,17 +44,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.betterend.particle.InfusionParticleType;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -82,11 +83,13 @@ public class RespawnObeliskBlock extends BaseBlock implements CustomColorProvide
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world,
|
||||
public void setPlacedBy(
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
BlockState state,
|
||||
@Nullable LivingEntity placer,
|
||||
ItemStack itemStack) {
|
||||
ItemStack itemStack
|
||||
) {
|
||||
state = this.defaultBlockState();
|
||||
BlocksHelper.setWithUpdate(world, pos, state.setValue(SHAPE, TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithUpdate(world, pos.above(), state.setValue(SHAPE, TripleShape.MIDDLE));
|
||||
|
@ -95,12 +98,14 @@ public class RespawnObeliskBlock extends BaseBlock implements CustomColorProvide
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
TripleShape shape = state.getValue(SHAPE);
|
||||
if (shape == TripleShape.BOTTOM) {
|
||||
if (world.getBlockState(pos.above()).is(this)) {
|
||||
|
@ -164,12 +169,14 @@ public class RespawnObeliskBlock extends BaseBlock implements CustomColorProvide
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
ItemStack itemStack = player.getItemInHand(hand);
|
||||
boolean canActivate = itemStack.getItem() == EndItems.AMBER_GEM && itemStack.getCount() > 5;
|
||||
if (hand != InteractionHand.MAIN_HAND || !canActivate) {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
@ -12,10 +17,6 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableCropBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
@ -7,10 +11,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableCropBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class ShadowBerryBlock extends PottableCropBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(1, 0, 1, 15, 8, 15);
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -12,11 +17,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ShadowGrassBlock extends EndTerrainBlock implements TagProvider {
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.entity.SilkMothEntity;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -29,14 +37,6 @@ import net.minecraft.world.phys.Vec3;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.entity.SilkMothEntity;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
public class SilkMothHiveBlock extends BaseBlock {
|
||||
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||
public static final IntegerProperty FULLNESS = EndBlockProperties.FULLNESS;
|
||||
|
@ -98,12 +98,14 @@ public class SilkMothHiveBlock extends BaseBlock {
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
if (hand == InteractionHand.MAIN_HAND) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (BaseShearsItem.isShear(stack) && state.getValue(FULLNESS) == 3) {
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.entity.SilkMothEntity;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -33,16 +43,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.entity.SilkMothEntity;
|
||||
import org.betterx.betterend.registry.EndEntities;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -87,12 +87,14 @@ public class SilkMothNestBlock extends BaseBlock implements RenderLayerProvider
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state,
|
||||
public BlockState updateShape(
|
||||
BlockState state,
|
||||
Direction facing,
|
||||
BlockState neighborState,
|
||||
LevelAccessor world,
|
||||
BlockPos pos,
|
||||
BlockPos neighborPos) {
|
||||
BlockPos neighborPos
|
||||
) {
|
||||
if (!state.getValue(ACTIVE)) {
|
||||
if (canSupportCenter(world, pos.above(), Direction.DOWN) || world.getBlockState(pos.above())
|
||||
.is(BlockTags.LEAVES)) {
|
||||
|
@ -163,12 +165,14 @@ public class SilkMothNestBlock extends BaseBlock implements RenderLayerProvider
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state,
|
||||
public InteractionResult use(
|
||||
BlockState state,
|
||||
Level world,
|
||||
BlockPos pos,
|
||||
Player player,
|
||||
InteractionHand hand,
|
||||
BlockHitResult hit) {
|
||||
BlockHitResult hit
|
||||
) {
|
||||
if (hand == InteractionHand.MAIN_HAND) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (BaseShearsItem.isShear(stack) && state.getValue(ACTIVE) && state.getValue(FULLNESS) == 3) {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,18 +13,11 @@ import net.minecraft.world.level.Level;
|
|||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class SmallAmaranitaBlock extends EndPlantBlock {
|
||||
|
@ -35,7 +33,14 @@ public class SmallAmaranitaBlock extends EndPlantBlock {
|
|||
BlockPos bigPos = growBig(world, pos);
|
||||
if (bigPos != null) {
|
||||
if (EndFeatures.GIGANTIC_AMARANITA.getFeature()
|
||||
.place(new FeaturePlaceContext<>(Optional.empty(), world, null, random, bigPos, null))) {
|
||||
.place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
null,
|
||||
random,
|
||||
bigPos,
|
||||
null
|
||||
))) {
|
||||
replaceMushroom(world, bigPos);
|
||||
replaceMushroom(world, bigPos.south());
|
||||
replaceMushroom(world, bigPos.east());
|
||||
|
@ -49,7 +54,8 @@ public class SmallAmaranitaBlock extends EndPlantBlock {
|
|||
null,
|
||||
random,
|
||||
pos,
|
||||
null));
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -29,14 +38,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.items.tool.BaseShearsItem;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.interfaces.PottablePlant;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
|
@ -110,7 +111,8 @@ public class SmallJellyshroomBlock extends BaseAttachedBlock implements RenderLa
|
|||
null,
|
||||
random,
|
||||
pos,
|
||||
null));
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.betterend.blocks.basis.LitPillarBlock;
|
||||
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.betterend.blocks.basis.LitPillarBlock;
|
||||
|
||||
public class SmaragdantCrystalBlock extends LitPillarBlock implements AddMineablePickaxe {
|
||||
public SmaragdantCrystalBlock() {
|
||||
super(FabricBlockSettings.of(Material.GLASS)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
|
@ -22,10 +27,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -26,13 +34,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineablePickaxe;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -13,12 +19,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.interfaces.CustomColorProvider;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
|
||||
public class TenaneaFlowersBlock extends BaseVineBlock implements CustomColorProvider {
|
||||
public static final Vec3i[] COLORS;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
|
||||
public class TenaneaSaplingBlock extends PottableFeatureSapling {
|
||||
public TenaneaSaplingBlock() {
|
||||
super((state) -> EndFeatures.TENANEA);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
public class TerrainPlantBlock extends EndPlantBlock {
|
||||
private final Block[] ground;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue