Skip to content

Commit

Permalink
Cleanup some leftovers.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Nov 26, 2024
1 parent 0383862 commit 788ab31
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* @param z the Z-coordinate of the beam
* @param luminance the luminance of the beam
* @param level the world in which the beam is in
* @author LambdAurora, Akarys
* @version 4.0.0
* @since 4.0.0
*/
public record BeaconLightBehavior(int x, OptionalInt y, int z, @Range(from = 0, to = 15) int luminance, Level level) implements DynamicLightBehavior {
public BeaconLightBehavior(int x, int z, @Range(from = 0, to = 15) int luminance, Level level) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

package dev.lambdaurora.lambdynlights.api.behavior;

import org.jetbrains.annotations.NotNull;

/**
* Represents the dynamic lighting behavior manager,
* which provides the ability to add and remove custom dynamic lighting sources.
Expand All @@ -24,7 +26,7 @@ public interface DynamicLightBehaviorManager {
*
* @param source the source to add
*/
void add(DynamicLightBehavior source);
void add(@NotNull DynamicLightBehavior source);

/**
* Removes the given dynamic lighting source from the client world.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package dev.lambdaurora.lambdynlights.api.behavior;

import net.minecraft.util.math.MathHelper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Range;
import org.joml.Vector3d;

Expand Down Expand Up @@ -143,7 +144,7 @@ public boolean hasChanged() {
}

@Override
public BoundingBox getBoundingBox() {
public @NotNull BoundingBox getBoundingBox() {
return new BoundingBox(
MathHelper.floor(this.startPoint.x()),
MathHelper.floor(this.startPoint.y()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

import dev.lambdaurora.lambdynlights.api.behavior.BeaconLightBehavior;

/**
* Represents a beacon beam light source.
*
* @author LambdAurora
* @version 4.0.0
* @since 4.0.0
*/
public interface BeaconBlockEntityLightSource {
int lambdynlights$getLevels();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
import net.minecraft.world.entity.monster.Guardian;
import org.joml.Vector3d;

/**
* Represents a Guardian laser light source.
*
* @author LambdAurora
* @version 4.0.0
* @since 4.0.0
*/
public interface GuardianEntityLightSource {
LineLightBehavior lambdynlights$getDynamicLightBeam();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

package dev.lambdaurora.lambdynlights.echo;

import dev.lambdaurora.lambdynlights.LambDynLights;
import dev.lambdaurora.lambdynlights.api.behavior.DynamicLightBehavior;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity;
Expand All @@ -19,7 +18,11 @@
/**
* Represents an end gateway beam dynamic lighting behavior.
*
* @param gateway the End gateway block entity
* @param level the world in which the beam is in
* @author LambdAurora
* @version 4.0.0
* @since 4.0.0
*/
public record TheEndGatewayBeamLightBehavior(TheEndGatewayBlockEntity gateway, Level level) implements DynamicLightBehavior {
private int getWorldBottom() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import dev.lambdaurora.lambdynlights.api.behavior.DynamicLightBehavior;
import dev.lambdaurora.lambdynlights.api.behavior.DynamicLightBehaviorManager;
import dev.lambdaurora.lambdynlights.engine.source.DeferredDynamicLightSource;
import org.jetbrains.annotations.NotNull;

/**
* Represents the dynamic lighting behavior manager implementation.
Expand All @@ -29,7 +30,7 @@ public DynamicLightBehaviorSources(LambDynLights mod) {
}

@Override
public void add(DynamicLightBehavior source) {
public void add(@NotNull DynamicLightBehavior source) {
this.mod.addLightSource(new DeferredDynamicLightSource(source));
}

Expand Down

0 comments on commit 788ab31

Please sign in to comment.