-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
94 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
src/main/java/io/fabricatedatelier/mayor/api/StorageCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package io.fabricatedatelier.mayor.api; | ||
|
||
import io.fabricatedatelier.mayor.block.AbstractVillageContainerBlockEntity; | ||
import io.fabricatedatelier.mayor.block.entity.VillageContainerBlockEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
|
||
/** | ||
* If you want to listen to the {@link AbstractVillageContainerBlockEntity StorageBlockEntity} | ||
* If you want to listen to the {@link VillageContainerBlockEntity StorageBlockEntity} | ||
* {@link StorageCallback callbacks}, you will need to register the callback first.<br> | ||
* In the class, where you want to listen to those signals, implement the {@link StorageCallback} interface.<br> | ||
* Then wherever you get access to the current {@link AbstractVillageContainerBlockEntity StorageBlockEntity}, | ||
* call its {@link AbstractVillageContainerBlockEntity#registerCallback(StorageCallback) registerCallback()} method | ||
* Then wherever you get access to the current {@link VillageContainerBlockEntity StorageBlockEntity}, | ||
* call its {@link VillageContainerBlockEntity#registerCallback(StorageCallback) registerCallback()} method | ||
* with your current class's instance as the parameter (usually just a <code>this</code> call) | ||
*/ | ||
public interface StorageCallback { | ||
/** | ||
* Runs when the origin BlockPos of an {@link AbstractVillageContainerBlockEntity} has been changed. | ||
* Runs when the origin BlockPos of an {@link VillageContainerBlockEntity} has been changed. | ||
* @param blockEntity the BlockEntity which changed its listed origin BlockPos | ||
* @param oldPos the old listed entry of the origin BlockPos | ||
* @param newPos the new listed entry of the origin BlockPos | ||
*/ | ||
default void onOriginChanged(AbstractVillageContainerBlockEntity blockEntity, BlockPos oldPos, BlockPos newPos) { | ||
default void onOriginChanged(VillageContainerBlockEntity blockEntity, BlockPos oldPos, BlockPos newPos) { | ||
|
||
} | ||
|
||
/** | ||
* Runs when the connected blocks BlockPos list of an {@link AbstractVillageContainerBlockEntity} has been changed. | ||
* Runs when the connected blocks BlockPos list of an {@link VillageContainerBlockEntity} has been changed. | ||
* @param blockEntity the BlockEntity which changed its connected blocks BlockPos list | ||
*/ | ||
default void onConnectedBlocksChanged(AbstractVillageContainerBlockEntity blockEntity) { | ||
default void onConnectedBlocksChanged(VillageContainerBlockEntity blockEntity) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
src/main/java/io/fabricatedatelier/mayor/block/entity/LumberStorageBlockEntity.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
src/main/java/io/fabricatedatelier/mayor/block/entity/StoneStorageBlockEntity.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.