- 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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -131,6 +132,25 @@ 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()) {
|
||||
|
|
|
@ -73,6 +73,20 @@ public class InfusionRecipes {
|
|||
.setTime(150)
|
||||
.build();
|
||||
|
||||
InfusionRecipe.Builder.create("crystalite_elytra")
|
||||
.setInput(Items.ELYTRA)
|
||||
.setOutput(EndItems.CRYSTALITE_ELYTRA)
|
||||
.addCatalyst(0, EndItems.AMBER_GEM)
|
||||
.addCatalyst(1, EndItems.CRYSTAL_SHARDS)
|
||||
.addCatalyst(2, EndItems.ENCHANTED_MEMBRANE)
|
||||
.addCatalyst(3, EndItems.CRYSTAL_SHARDS)
|
||||
.addCatalyst(4, EndItems.ENCHANTED_MEMBRANE)
|
||||
.addCatalyst(5, EndItems.CRYSTAL_SHARDS)
|
||||
.addCatalyst(6, EndItems.ENCHANTED_MEMBRANE)
|
||||
.addCatalyst(7, EndItems.CRYSTAL_SHARDS)
|
||||
.setTime(500)
|
||||
.build();
|
||||
|
||||
InfusionRecipe.Builder.create("enchanted_petal")
|
||||
.setInput(EndItems.HYDRALUX_PETAL)
|
||||
.setOutput(EndItems.ENCHANTED_PETAL)
|
||||
|
|
|
@ -74,8 +74,8 @@ public class EndItems extends ItemsRegistry {
|
|||
public static final Item CRYSTALITE_CHESTPLATE = registerEndItem("crystalite_chestplate", new CrystaliteChestplate());
|
||||
public static final Item CRYSTALITE_LEGGINGS = registerEndItem("crystalite_leggings", new CrystaliteLeggings());
|
||||
public static final Item CRYSTALITE_BOOTS = registerEndItem("crystalite_boots", new CrystaliteBoots());
|
||||
public static final Item ARMORED_ELYTRA = registerEndItem("elytra_armored", new ArmoredElytra("elytra_armored", EndArmorMaterial.AETERNIUM, Items.PHANTOM_MEMBRANE, 900, 0.96D, true));
|
||||
public static final Item CRYSTALITE_ELYTRA = registerEndItem("elytra_crystalite", new CrystaliteElytra(650, 0.98D));
|
||||
public static final Item ARMORED_ELYTRA = registerEndItem("elytra_armored", new ArmoredElytra("elytra_armored", EndArmorMaterial.AETERNIUM, Items.PHANTOM_MEMBRANE, 900, 0.975D, true));
|
||||
public static final Item CRYSTALITE_ELYTRA = registerEndItem("elytra_crystalite", new CrystaliteElytra(650, 0.99D));
|
||||
|
||||
// Tools //
|
||||
public static final TieredItem AETERNIUM_SHOVEL = registerEndTool("aeternium_shovel", new BaseShovelItem(EndToolMaterial.AETERNIUM, 1.5F, -3.0F, makeEndItemSettings().fireResistant()));
|
||||
|
|
|
@ -57,6 +57,8 @@ public class InfusionRitual implements Container {
|
|||
BlockEntity catalystEntity = world.getBlockEntity(checkPos);
|
||||
if (catalystEntity instanceof PedestalBlockEntity) {
|
||||
catalysts[i] = (PedestalBlockEntity) catalystEntity;
|
||||
} else {
|
||||
catalysts[i] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,6 +219,10 @@ public class InfusionRitual implements Container {
|
|||
}
|
||||
}
|
||||
|
||||
public void markDirty() {
|
||||
this.isDirty = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillValid(Player player) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue