More compiler fixes
This commit is contained in:
parent
cfa765437c
commit
4f053c161a
20 changed files with 84 additions and 67 deletions
|
@ -94,7 +94,7 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
if (exitPos == null) return;
|
||||
if (entity instanceof ServerPlayer && ((ServerPlayer) entity).isCreative()) {
|
||||
((ServerPlayer) entity).teleportTo(destination, exitPos.getX() + 0.5, exitPos.getY(),
|
||||
exitPos.getZ() + 0.5, entity.yRot, entity.xRot);
|
||||
exitPos.getZ() + 0.5, entity.getYRot(), entity.getXRot());
|
||||
} else {
|
||||
((TeleportingEntity) entity).be_setExitPos(exitPos);
|
||||
Optional<Entity> teleported = Optional.ofNullable(entity.changeDimension(destination));
|
||||
|
@ -114,7 +114,7 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
|
||||
private BlockPos findExitPos(ServerLevel currentWorld, ServerLevel targetWorld, BlockPos currentPos, Entity entity) {
|
||||
if (targetWorld == null) return null;
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess().dimensionTypes();
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess().registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
|
||||
ResourceLocation targetWorldId = targetWorld.dimension().location();
|
||||
ResourceLocation currentWorldId = currentWorld.dimension().location();
|
||||
double targetMultiplier = Objects.requireNonNull(registry.get(targetWorldId)).coordinateScale();
|
||||
|
|
|
@ -79,7 +79,7 @@ public class HelixTreeLeavesBlock extends BaseBlock implements IColorProvider {
|
|||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null) {
|
||||
if (tool.getItem().is(FabricToolTags.SHEARS) || tool.isCorrectToolForDrops(state) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
if (tool.is(FabricToolTags.SHEARS) || tool.isCorrectToolForDrops(state) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
int fortune = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.BLOCK_FORTUNE, tool);
|
||||
|
|
|
@ -108,8 +108,8 @@ public class HydrothermalVentBlock extends BaseBlockNotFull implements EntityBlo
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new BlockEntityHydrothermalVent();
|
||||
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||
return new BlockEntityHydrothermalVent(pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,8 +44,8 @@ public class InfusionPedestal extends PedestalBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new InfusionPedestalEntity();
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new InfusionPedestalEntity(blockPos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class NeedlegrassBlock extends EndPlantBlock {
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null && tool.getItem().is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
if (tool != null && tool.is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -89,7 +89,7 @@ public class SilkMothHiveBlock extends BaseBlock {
|
|||
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(FULLNESS) == 3) {
|
||||
if (stack.is(FabricToolTags.SHEARS) && 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;
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SmallJellyshroomBlock extends BaseAttachedBlock implements IRenderT
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null && tool.getItem().is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
if (tool != null && tool.is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
|
@ -9,9 +10,12 @@ import net.minecraft.core.BlockPos;
|
|||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
|
@ -38,9 +42,9 @@ public class VentBubbleColumnBlock extends Block implements BucketPickup, Liquid
|
|||
}
|
||||
|
||||
@Override
|
||||
public Fluid takeLiquid(LevelAccessor world, BlockPos pos, BlockState state) {
|
||||
public ItemStack pickupBlock(LevelAccessor world, BlockPos pos, BlockState state) {
|
||||
world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11);
|
||||
return Fluids.WATER;
|
||||
return new ItemStack(Items.WATER_BUCKET);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -120,4 +124,11 @@ public class VentBubbleColumnBlock extends Block implements BucketPickup, Liquid
|
|||
public FluidState getFluidState(BlockState state) {
|
||||
return Fluids.WATER.getSource(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Optional<SoundEvent> getPickupSound() {
|
||||
return Fluids.WATER.getPickupSound();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class FurBlock extends BaseAttachedBlock implements IRenderTyped {
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null && tool.getItem().is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
if (tool != null && tool.is(FabricToolTags.SHEARS) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
else if (dropChance < 1 || MHelper.RANDOM.nextInt(dropChance) == 0) {
|
||||
|
|
|
@ -355,8 +355,8 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new PedestalBlockEntity();
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new PedestalBlockEntity(blockPos, blockState);
|
||||
}
|
||||
|
||||
public boolean hasUniqueEntity() {
|
||||
|
@ -440,7 +440,7 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
|||
|
||||
@Nullable
|
||||
protected static <E extends BlockEntity, A extends BlockEntity> BlockEntityTicker<A> createTickerHelper(BlockEntityType<A> blockEntityType, BlockEntityType<E> blockEntityType2, BlockEntityTicker<? super E> blockEntityTicker) {
|
||||
return blockEntityType2 == blockEntityType ? blockEntityTicker : null;
|
||||
return blockEntityType2 == blockEntityType ? (BlockEntityTicker<A>) blockEntityTicker : null;
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
|
@ -3,6 +3,7 @@ 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.InfusionRitual;
|
||||
|
||||
|
@ -10,13 +11,21 @@ public class InfusionPedestalEntity extends PedestalBlockEntity {
|
|||
|
||||
private InfusionRitual linkedRitual;
|
||||
|
||||
public InfusionPedestalEntity() {
|
||||
super(EndBlockEntities.INFUSION_PEDESTAL);
|
||||
public InfusionPedestalEntity(BlockPos blockPos, BlockState blockState) {
|
||||
super(EndBlockEntities.INFUSION_PEDESTAL, blockPos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(Level world){
|
||||
super.setLevel(world);
|
||||
if (hasRitual()) {
|
||||
linkedRitual.setLocation(world, this.getBlockPos());
|
||||
} else {
|
||||
linkRitual(new InfusionRitual(this, world, this.getBlockPos()));
|
||||
}
|
||||
}
|
||||
|
||||
public void setLevelAndPosition(Level world, BlockPos pos) {
|
||||
super.setLevelAndPosition(world, pos);
|
||||
if (hasRitual()) {
|
||||
linkedRitual.setLocation(world, pos);
|
||||
} else {
|
||||
|
@ -37,11 +46,11 @@ public class InfusionPedestalEntity extends PedestalBlockEntity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
protected void tick(Level tickLevel, BlockPos tickPos, BlockState tickState){
|
||||
if (hasRitual()) {
|
||||
linkedRitual.tick();
|
||||
}
|
||||
super.tick();
|
||||
super.tick(tickLevel, tickPos, tickState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,7 @@ public class PedestalBlockEntity extends BlockEntity implements Container, Block
|
|||
private final int maxAge = 314;
|
||||
private int age;
|
||||
|
||||
public PedestalBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
public PedestalBlockEntity(BlockEntityType<?> blockEntityType, BlockPos blockPos, BlockState blockState) {
|
||||
super(EndBlockEntities.PEDESTAL, blockPos, blockState);
|
||||
}
|
||||
|
||||
|
@ -132,12 +132,16 @@ public class PedestalBlockEntity extends BlockEntity implements Container, Block
|
|||
}
|
||||
}
|
||||
|
||||
public static void tick(Level tickLevel, BlockPos tickPos, BlockState tickState, PedestalBlockEntity blockEntity) {
|
||||
if (!blockEntity.isEmpty()) {
|
||||
blockEntity.age++;
|
||||
if (blockEntity.age > blockEntity.maxAge) {
|
||||
blockEntity.age = 0;
|
||||
protected void tick(Level tickLevel, BlockPos tickPos, BlockState tickState){
|
||||
if (!this.isEmpty()) {
|
||||
this.age++;
|
||||
if (this.age > this.maxAge) {
|
||||
this.age = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void tick(Level tickLevel, BlockPos tickPos, BlockState tickState, PedestalBlockEntity blockEntity) {
|
||||
blockEntity.tick(tickLevel, tickPos, tickState);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndItems;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class PedestalItemRenderer<T extends PedestalBlockEntity> extends BlockEntityRenderer<T> {
|
||||
public class PedestalItemRenderer<T extends PedestalBlockEntity> implements BlockEntityRenderer<T> {
|
||||
|
||||
public PedestalItemRenderer(BlockEntityRenderDispatcher dispatcher) {
|
||||
super(dispatcher);
|
||||
|
|
|
@ -91,7 +91,7 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getBucketItemStack() {
|
||||
public ItemStack getBucketItemStack() {
|
||||
ItemStack bucket = EndItems.BUCKET_CUBOZOA.getDefaultInstance();
|
||||
CompoundTag tag = bucket.getOrCreateTag();
|
||||
tag.putByte("Variant", entityData.get(VARIANT));
|
||||
|
|
|
@ -6,11 +6,8 @@ import java.util.Random;
|
|||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.entity.AgeableMob;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.MobSpawnType;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.*;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.ai.control.FlyingMoveControl;
|
||||
|
@ -21,6 +18,8 @@ import net.minecraft.world.entity.ai.goal.FollowParentGoal;
|
|||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation;
|
||||
import net.minecraft.world.entity.ai.navigation.PathNavigation;
|
||||
import net.minecraft.world.entity.ai.util.AirAndWaterRandomPos;
|
||||
import net.minecraft.world.entity.ai.util.HoverRandomPos;
|
||||
import net.minecraft.world.entity.ai.util.RandomPos;
|
||||
import net.minecraft.world.entity.animal.Animal;
|
||||
import net.minecraft.world.entity.animal.FlyingAnimal;
|
||||
|
@ -98,18 +97,18 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean makeFlySound() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier) {
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMovementNoisy() {
|
||||
return false;
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.EVENTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlying() {
|
||||
return !this.onGround;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -168,11 +167,11 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
private Vec3 getRandomLocation() {
|
||||
int h = BlocksHelper.downRay(DragonflyEntity.this.level, DragonflyEntity.this.blockPosition(), 16);
|
||||
Vec3 rotation = DragonflyEntity.this.getViewVector(0.0F);
|
||||
Vec3 airPos = RandomPos.getAboveLandPos(DragonflyEntity.this, 8, 7, rotation, 1.5707964F, 2, 1);
|
||||
Vec3 airPos = HoverRandomPos.getPos(DragonflyEntity.this, 8, 7, rotation.x, rotation.z, 1.5707964F, 3, 1);
|
||||
if (airPos != null) {
|
||||
if (isInVoid(airPos)) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
airPos = RandomPos.getAboveLandPos(DragonflyEntity.this, 16, 7, rotation, MHelper.PI2, 2, 1);
|
||||
airPos = HoverRandomPos.getPos(DragonflyEntity.this, 16, 7, rotation.x, rotation.z, MHelper.PI2, 3, 1);
|
||||
if (airPos != null && !isInVoid(airPos)) {
|
||||
return airPos;
|
||||
}
|
||||
|
@ -184,7 +183,7 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
return airPos;
|
||||
}
|
||||
return RandomPos.getAirPos(DragonflyEntity.this, 8, 4, -2, rotation, 1.5707963705062866D);
|
||||
return AirAndWaterRandomPos.getPos(DragonflyEntity.this, 8, 4, -2, rotation.x, rotation.z, 1.5707963705062866D);
|
||||
}
|
||||
|
||||
private boolean isInVoid(Vec3 pos) {
|
||||
|
|
|
@ -88,7 +88,7 @@ public class EndFishEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getBucketItemStack() {
|
||||
public ItemStack getBucketItemStack() {
|
||||
ItemStack bucket = EndItems.BUCKET_END_FISH.getDefaultInstance();
|
||||
CompoundTag tag = bucket.getOrCreateTag();
|
||||
tag.putByte("variant", entityData.get(VARIANT));
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.entity.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -16,11 +17,6 @@ import net.minecraft.server.level.ServerLevel;
|
|||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.AgeableMob;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.MobSpawnType;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.ai.control.FlyingMoveControl;
|
||||
|
@ -142,18 +138,18 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean makeFlySound() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier) {
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMovementNoisy() {
|
||||
return false;
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.EVENTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlying() {
|
||||
return !this.onGround;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,8 +7,6 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.client.rendering.v1.ArmorRenderingRegistry.ModelProvider;
|
||||
import net.fabricmc.fabric.api.client.rendering.v1.ArmorRenderingRegistry.TextureProvider;
|
||||
import net.minecraft.client.model.HumanoidModel;
|
||||
import net.minecraft.client.player.AbstractClientPlayer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -20,7 +18,7 @@ import ru.betterend.item.CrystaliteArmor;
|
|||
import ru.betterend.registry.EndItems;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class CrystaliteArmorProvider implements ModelProvider, TextureProvider {
|
||||
public class CrystaliteArmorProvider /*implements ModelProvider, TextureProvider*/ {
|
||||
private final static ResourceLocation FIRST_LAYER = new ResourceLocation("textures/models/armor/crystalite_layer_1.png");
|
||||
private final static ResourceLocation SECOND_LAYER = new ResourceLocation("textures/models/armor/crystalite_layer_2.png");
|
||||
private final static CrystaliteHelmetModel HELMET_MODEL = new CrystaliteHelmetModel(1.0F);
|
||||
|
|
|
@ -2,7 +2,6 @@ package ru.betterend.registry;
|
|||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.client.rendering.v1.ArmorRenderingRegistry;
|
||||
import ru.betterend.item.model.CrystaliteArmorProvider;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
@ -11,7 +10,8 @@ public class EndModelProviders {
|
|||
public final static CrystaliteArmorProvider CRYSTALITE_PROVIDER = new CrystaliteArmorProvider();
|
||||
|
||||
public final static void register() {
|
||||
ArmorRenderingRegistry.registerModel(CRYSTALITE_PROVIDER, CRYSTALITE_PROVIDER.getRenderedItems());
|
||||
ArmorRenderingRegistry.registerTexture(CRYSTALITE_PROVIDER, CRYSTALITE_PROVIDER.getRenderedItems());
|
||||
throw new RuntimeException("Needs Fix for 1.17");
|
||||
//ArmorRenderingRegistry.registerModel(CRYSTALITE_PROVIDER, CRYSTALITE_PROVIDER.getRenderedItems());
|
||||
//ArmorRenderingRegistry.registerTexture(CRYSTALITE_PROVIDER, CRYSTALITE_PROVIDER.getRenderedItems());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ public class EternalRitual {
|
|||
private BlockPos findPortalPos(int portalId) {
|
||||
MinecraftServer server = world.getServer();
|
||||
ServerLevel targetWorld = (ServerLevel) getTargetWorld(portalId);
|
||||
Registry<DimensionType> registry = Objects.requireNonNull(server).registryAccess().dimensionTypes();
|
||||
Registry<DimensionType> registry = Objects.requireNonNull(server).registryAccess().registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
|
||||
double multiplier = Objects.requireNonNull(registry.get(targetWorldId)).coordinateScale();
|
||||
BlockPos.MutableBlockPos basePos = center.mutable().set(center.getX() / multiplier, center.getY(), center.getZ() / multiplier);
|
||||
BlockPos framePos = findFrame(targetWorld, basePos.mutable());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue