Merge branch '1.17' into 1.17

This commit is contained in:
MalekiRe 2021-07-11 15:05:23 -07:00 committed by GitHub
commit d8bfded9d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -24,7 +24,7 @@ public abstract class WaterLoggableBlockWithEntity extends BlockWithEntity imple
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
protected WaterLoggableBlockWithEntity(Settings settings) {
super(settings);
setDefaultState(this.getStateManager().getDefaultState().with(WATERLOGGED, false));
setDefaultState(this.stateManager.getDefaultState().with(WATERLOGGED, false));
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {

View file

@ -1,11 +1,14 @@
package org.dimdev.dimdoors.rift.targets;
import com.mojang.serialization.Codec;
import com.terraformersmc.modmenu.util.mod.Mod;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.EulerAngle;
import net.minecraft.util.math.Vec3d;
import org.dimdev.dimdoors.api.rift.target.EntityTarget;
import org.dimdev.dimdoors.api.util.TeleportUtil;
import org.dimdev.dimdoors.block.ModBlocks;
import org.dimdev.dimdoors.world.ModDimensions;
import net.minecraft.entity.Entity;
@ -20,7 +23,11 @@ public class LimboTarget extends VirtualTarget implements EntityTarget {
@Override
public boolean receiveEntity(Entity entity, Vec3d relativePos, EulerAngle relativeAngle, Vec3d relativeVelocity) {
TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, entity.getBlockPos().add(0, 255-entity.getBlockY(), 0), relativeAngle, relativeVelocity);
BlockPos teleportPos = entity.getBlockPos();
while(ModDimensions.LIMBO_DIMENSION.getBlockState(VirtualLocation.getTopPos(ModDimensions.LIMBO_DIMENSION, teleportPos)).getBlock() == ModBlocks.ETERNAL_FLUID) {
teleportPos = teleportPos.add(1, 0, 1);
}
TeleportUtil.teleport(entity, ModDimensions.LIMBO_DIMENSION, teleportPos.add(0, 255-entity.getBlockY(), 0), relativeAngle, relativeVelocity);
return true;
}