Skip to content

Commit

Permalink
Add a comment, and make a thing nullible
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfieboy09 committed Oct 27, 2024
1 parent 559e56e commit 8588d30
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.neoforge.energy.EnergyStorage;
import net.neoforged.neoforge.items.ItemStackHandler;
import org.jetbrains.annotations.Nullable;

import java.util.Objects;

Expand Down Expand Up @@ -64,7 +65,8 @@ public boolean canReceive() {
return true;
}

public EnergyStorage getEnergyHandler(Direction side) {
public EnergyStorage getEnergyHandler(@Nullable Direction side) {
// Compatibility with Jade.
if (side == null) return this.getEnergyStorage();
Direction blockFacing = this.getBlockState().getValue(DiskAssemblerBlock.FACING);
return side == blockFacing.getOpposite() ? this.getEnergyStorage() : null;
Expand Down

0 comments on commit 8588d30

Please sign in to comment.