This repository has been archived by the owner on May 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
77917dc
commit c841025
Showing
13 changed files
with
76 additions
and
58 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
4 changes: 4 additions & 0 deletions
4
...de-api/src/main/java/dev/compactmods/machines/api/room/upgrade/IRoomUpgradeInventory.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.compactmods.machines.api.room.upgrade; | ||
|
||
public interface IRoomUpgradeInventory { | ||
} |
9 changes: 4 additions & 5 deletions
9
room-upgrade-api/src/main/java/dev/compactmods/machines/api/room/upgrade/RoomUpgrade.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,15 +1,14 @@ | ||
package dev.compactmods.machines.api.room.upgrade; | ||
|
||
import com.mojang.serialization.Codec; | ||
import net.minecraft.core.Registry; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.tags.TagKey; | ||
import net.minecraft.world.item.Item; | ||
|
||
import static dev.compactmods.machines.api.Constants.MOD_ID; | ||
|
||
public interface RoomUpgrade { | ||
|
||
ResourceKey<Registry<RoomUpgrade>> REGISTRY_KEY = ResourceKey.createRegistryKey(new ResourceLocation(MOD_ID, "room_upgrades")); | ||
TagKey<Item> ITEM_TAG = TagKey.create(Registries.ITEM, new ResourceLocation(MOD_ID, "room_upgrade")); | ||
|
||
Codec<? extends RoomUpgrade> codec(); | ||
} |
25 changes: 0 additions & 25 deletions
25
...pgrade-api/src/main/java/dev/compactmods/machines/api/room/upgrade/RoomUpgradeHelper.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.../src/main/java/dev/compactmods/machines/api/room/upgrade/UpgradeAppliedEventListener.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.../src/main/java/dev/compactmods/machines/api/room/upgrade/UpgradeRemovedEventListener.java
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
.../java/dev/compactmods/machines/api/room/upgrade/components/AfterUsedUpgradeComponent.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.compactmods.machines.api.room.upgrade.components; | ||
|
||
public interface AfterUsedUpgradeComponent { | ||
} |
4 changes: 4 additions & 0 deletions
4
...java/dev/compactmods/machines/api/room/upgrade/components/ItemDamageUpgradeComponent.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.compactmods.machines.api.room.upgrade.components; | ||
|
||
public class ItemDamageUpgradeComponent implements AfterUsedUpgradeComponent { | ||
} |
6 changes: 4 additions & 2 deletions
6
...rade/LevelLoadedUpgradeEventListener.java → ...ents/LevelLoadedUpgradeEventListener.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
6 changes: 4 additions & 2 deletions
6
...de/LevelUnloadedUpgradeEventListener.java → ...ts/LevelUnloadedUpgradeEventListener.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
15 changes: 15 additions & 0 deletions
15
...in/java/dev/compactmods/machines/api/room/upgrade/events/UpgradeAppliedEventListener.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.compactmods.machines.api.room.upgrade.events; | ||
|
||
import dev.compactmods.machines.api.room.RoomInstance; | ||
import dev.compactmods.machines.api.room.upgrade.RoomUpgrade; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
@FunctionalInterface | ||
public interface UpgradeAppliedEventListener { | ||
|
||
/** | ||
* Called when an upgrade is first applied to a room. | ||
*/ | ||
void onAdded(ServerLevel level, RoomInstance room, ItemStack upgradeItem); | ||
} |
15 changes: 15 additions & 0 deletions
15
...in/java/dev/compactmods/machines/api/room/upgrade/events/UpgradeRemovedEventListener.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.compactmods.machines.api.room.upgrade.events; | ||
|
||
import dev.compactmods.machines.api.room.RoomInstance; | ||
import dev.compactmods.machines.api.room.upgrade.RoomUpgrade; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
@FunctionalInterface | ||
public interface UpgradeRemovedEventListener { | ||
|
||
/** | ||
* Called when an update is removed from a room. | ||
*/ | ||
void onRemoved(ServerLevel level, RoomInstance room, ItemStack upgradeItem); | ||
} |
11 changes: 11 additions & 0 deletions
11
...ain/java/dev/compactmods/machines/api/room/upgrade/events/UpgradeTickedEventListener.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package dev.compactmods.machines.api.room.upgrade.events; | ||
|
||
import dev.compactmods.machines.api.room.RoomInstance; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
@FunctionalInterface | ||
public interface UpgradeTickedEventListener { | ||
|
||
void onRemoved(ServerLevel level, RoomInstance room, ItemStack upgradeItem); | ||
} |