mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Sealed records
- Convert IHaveCustomOverlayIcon into a sealed interface that is used through IHaveGoggleInformation or IHaveHoveringInformation
This commit is contained in:
parent
7795ee8191
commit
ef7a05d5e6
3 changed files with 3 additions and 6 deletions
|
@ -5,10 +5,7 @@ import com.simibubi.create.AllItems;
|
|||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
/**
|
||||
* Implement this interface on the {@link BlockEntity} that wants to change the icon on the goggle overlay
|
||||
*/
|
||||
public interface IHaveCustomOverlayIcon {
|
||||
public sealed interface IHaveCustomOverlayIcon permits IHaveGoggleInformation, IHaveHoveringInformation {
|
||||
/**
|
||||
* This method will be called when looking at a {@link BlockEntity} that implements this interface
|
||||
* <p>
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraftforge.fluids.capability.IFluidHandler;
|
|||
/**
|
||||
* Implement this interface on the {@link BlockEntity} that wants to add info to the goggle overlay
|
||||
*/
|
||||
public interface IHaveGoggleInformation {
|
||||
public non-sealed interface IHaveGoggleInformation extends IHaveCustomOverlayIcon {
|
||||
/**
|
||||
* This method will be called when looking at a {@link BlockEntity} that implements this interface
|
||||
*
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
|||
/**
|
||||
* Implement this interface on the {@link BlockEntity} that wants to add info to the goggle overlay
|
||||
*/
|
||||
public interface IHaveHoveringInformation {
|
||||
public non-sealed interface IHaveHoveringInformation extends IHaveCustomOverlayIcon{
|
||||
/**
|
||||
* This method will be called when looking at a {@link BlockEntity} that implements this interface
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue