Poertals can transfer items, possibility to build portal structure in the Overworld in Creative

This commit is contained in:
Aleksey 2020-10-30 22:03:01 +03:00
parent 98fbd6cc23
commit 37cd89d3f2
2 changed files with 25 additions and 12 deletions

View file

@ -64,7 +64,7 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTypeable
@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
if (world instanceof ServerWorld && entity instanceof LivingEntity && !entity.hasVehicle() && !entity.hasPassengers() && entity.canUsePortals()) {
if (world instanceof ServerWorld && !entity.hasVehicle() && !entity.hasPassengers() && entity.canUsePortals()) {
TeleportingEntity teleEntity = TeleportingEntity.class.cast(entity);
if (teleEntity.hasCooldown()) return;
boolean isOverworld = world.getRegistryKey().equals(World.OVERWORLD);