- Crystalite Elytra recipe;
- Elytras speed tweak; - Addition Infusion structure fix
This commit is contained in:
parent
030ede58d3
commit
ddc8edee67
5 changed files with 48 additions and 5 deletions
|
@ -1,8 +1,11 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
@ -71,7 +74,7 @@ public class InfusionPedestal extends PedestalBlock {
|
|||
}
|
||||
return super.getShape(state, world, pos, context);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
VoxelShape basinUp = Block.box(2, 3, 2, 14, 4, 14);
|
||||
VoxelShape basinDown = Block.box(0, 0, 0, 16, 3, 16);
|
||||
|
|
|
@ -44,12 +44,13 @@ import ru.bclib.client.models.ModelsHelper;
|
|||
import ru.betterend.blocks.BlockProperties;
|
||||
import ru.betterend.blocks.BlockProperties.PedestalState;
|
||||
import ru.betterend.blocks.InfusionPedestal;
|
||||
import ru.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.rituals.InfusionRitual;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"deprecation", "unused"})
|
||||
public class PedestalBlock extends BlockBaseNotFull implements EntityBlock {
|
||||
public final static EnumProperty<PedestalState> STATE = BlockProperties.PEDESTAL_STATE;
|
||||
public static final BooleanProperty HAS_ITEM = BlockProperties.HAS_ITEM;
|
||||
|
@ -130,7 +131,26 @@ public class PedestalBlock extends BlockBaseNotFull implements EntityBlock {
|
|||
}
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void destroy(LevelAccessor levelAccessor, BlockPos blockPos, BlockState blockState) {
|
||||
MutableBlockPos posMutable = new MutableBlockPos();
|
||||
for (Point point: InfusionRitual.getMap()) {
|
||||
posMutable.set(blockPos).move(point.x, 0, point.y);
|
||||
BlockState state = levelAccessor.getBlockState(posMutable);
|
||||
if (state.getBlock() instanceof InfusionPedestal) {
|
||||
BlockEntity blockEntity = levelAccessor.getBlockEntity(posMutable);
|
||||
if (blockEntity instanceof InfusionPedestalEntity) {
|
||||
InfusionPedestalEntity pedestal = (InfusionPedestalEntity) blockEntity;
|
||||
if (pedestal.hasRitual()) {
|
||||
pedestal.getRitual().markDirty();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkRitual(Level world, BlockPos pos) {
|
||||
MutableBlockPos posMutable = new MutableBlockPos();
|
||||
for (Point point: InfusionRitual.getMap()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue