Additional compiler fixes
This commit is contained in:
parent
4f053c161a
commit
e541763ada
10 changed files with 19 additions and 17 deletions
|
@ -15,7 +15,6 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
|
|
@ -126,8 +126,8 @@ public class EternalPedestal extends PedestalBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new EternalPedestalEntity();
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new EternalPedestalEntity(blockPos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -150,7 +150,7 @@ public class SilkMothNestBlock extends BaseBlock implements IRenderTyped {
|
|||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (hand == InteractionHand.MAIN_HAND) {
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (stack.getItem().is(FabricToolTags.SHEARS) && state.getValue(ACTIVE) && state.getValue(FULLNESS) == 3) {
|
||||
if (stack.is(FabricToolTags.SHEARS) && state.getValue(ACTIVE) && state.getValue(FULLNESS) == 3) {
|
||||
BlocksHelper.setWithUpdate(world, pos, state.setValue(FULLNESS, 0));
|
||||
Direction dir = state.getValue(FACING);
|
||||
double px = pos.getX() + dir.getStepX() + 0.5;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -9,6 +7,7 @@ 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.FeaturePlaceContext;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
@ -17,6 +16,8 @@ import ru.betterend.blocks.basis.EndPlantBlock;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SmallAmaranitaBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 10, 12);
|
||||
|
||||
|
@ -29,7 +30,7 @@ public class SmallAmaranitaBlock extends EndPlantBlock {
|
|||
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
|
||||
BlockPos bigPos = growBig(world, pos);
|
||||
if (bigPos != null) {
|
||||
if (EndFeatures.GIGANTIC_AMARANITA.getFeature().place(world, null, random, bigPos, null)) {
|
||||
if (EndFeatures.GIGANTIC_AMARANITA.getFeature().place(new FeaturePlaceContext<>(world, null, random, bigPos, null))) {
|
||||
replaceMushroom(world, bigPos);
|
||||
replaceMushroom(world, bigPos.south());
|
||||
replaceMushroom(world, bigPos.east());
|
||||
|
@ -37,7 +38,7 @@ public class SmallAmaranitaBlock extends EndPlantBlock {
|
|||
}
|
||||
return;
|
||||
}
|
||||
EndFeatures.LARGE_AMARANITA.getFeature().place(world, null, random, pos, null);
|
||||
EndFeatures.LARGE_AMARANITA.getFeature().place(new FeaturePlaceContext<>(world, null, random, pos, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.world.level.block.Blocks;
|
|||
import net.minecraft.world.level.block.BonemealableBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
|
@ -99,6 +100,6 @@ public class SmallJellyshroomBlock extends BaseAttachedBlock implements IRenderT
|
|||
@Override
|
||||
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
|
||||
BlocksHelper.setWithUpdate(world, pos, Blocks.AIR);
|
||||
EndFeatures.JELLYSHROOM.getFeature().place(world, null, random, pos, null);
|
||||
EndFeatures.JELLYSHROOM.getFeature().place(new FeaturePlaceContext<>(world, null, random, pos, null));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ import ru.bclib.client.models.ModelsHelper;
|
|||
import ru.betterend.blocks.EndBlockProperties;
|
||||
import ru.betterend.blocks.EndBlockProperties.PedestalState;
|
||||
import ru.betterend.blocks.InfusionPedestal;
|
||||
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import ru.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
|
|
@ -3,14 +3,15 @@ package ru.betterend.blocks.entities;
|
|||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
public class EternalPedestalEntity extends PedestalBlockEntity {
|
||||
private EternalRitual linkedRitual;
|
||||
|
||||
public EternalPedestalEntity() {
|
||||
super(EndBlockEntities.ETERNAL_PEDESTAL);
|
||||
public EternalPedestalEntity(BlockPos blockPos, BlockState blockState) {
|
||||
super(EndBlockEntities.ETERNAL_PEDESTAL, blockPos, blockState);
|
||||
}
|
||||
|
||||
public boolean hasRitual() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue