Skip to content

Commit

Permalink
Javadoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal-Spider committed Jun 25, 2024
1 parent ab2efa9 commit fa9fb65
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

import java.util.Optional;

/**
* Injects into {@link Entity} to implement {@link EntityPortal}.
*/
@Mixin(Entity.class)
public abstract class EntityMixin implements EntityPortal {
/**
Expand All @@ -23,12 +26,22 @@ public abstract class EntityMixin implements EntityPortal {

/**
* Shadowed {@link Entity#getRelativePortalPosition(Direction.Axis, BlockUtil.FoundRectangle)}.
*
* @param axis portal alignment (X or Z).
* @param rectangle portal frame.
* @return relative portal position.
*/
@Shadow
protected abstract Vec3 getRelativePortalPosition(Direction.Axis axis, BlockUtil.FoundRectangle rectangle);

/**
* Shadowed {@link Entity#getExitPortal(ServerLevel, BlockPos, boolean, WorldBorder)}.
*
* @param destination dimension.
* @param pos position.
* @param destIsNether whether the destination is the Nether.
* @param worldBorder world border.
* @return optional portal frame.
*/
@Shadow
protected abstract Optional<BlockUtil.FoundRectangle> getExitPortal(ServerLevel destination, BlockPos pos, boolean destIsNether, WorldBorder worldBorder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public abstract class FabricEntityMixin {

/**
* Shadowed {@link Entity#level}.
*
* @return level.
*/
@Shadow
public abstract Level level();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
public abstract class ForgeEntityMixin implements EntityPortal {
/**
* Shadowed {@link Entity#level()}.
*
* @return level.
*/
@Shadow
public abstract Level level();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
public abstract class NeoForgeEntityMixin implements EntityPortal {
/**
* Shadowed {@link Entity#level()}.
*
* @return level.
*/
@Shadow
public abstract Level level();
Expand Down

0 comments on commit fa9fb65

Please sign in to comment.