-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ned-resource Remove resource type mode in device GUIs
- Loading branch information
Showing
70 changed files
with
705 additions
and
1,106 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
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
24 changes: 9 additions & 15 deletions
24
...n/java/com/refinedmods/refinedstorage2/platform/api/resource/filter/FilteredResource.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,34 +1,28 @@ | ||
package com.refinedmods.refinedstorage2.platform.api.resource.filter; | ||
|
||
import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; | ||
|
||
import java.util.List; | ||
import javax.annotation.Nullable; | ||
|
||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import net.minecraft.nbt.CompoundTag; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.entity.player.Player; | ||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.0") | ||
public interface FilteredResource { | ||
void writeToPacket(FriendlyByteBuf buf); | ||
|
||
CompoundTag toTag(); | ||
|
||
public interface FilteredResource<T> { | ||
void render(PoseStack poseStack, int x, int y, int z); | ||
|
||
Object getValue(); | ||
T getValue(); | ||
|
||
long getAmount(); | ||
FilteredResource<T> withAmount(long newAmount); | ||
|
||
FilteredResource withAmount(long newAmount); | ||
long getAmount(); | ||
|
||
long getMaxAmount(); | ||
|
||
String getFormattedAmount(); | ||
String getDisplayedAmount(); | ||
|
||
ResourceType getType(); | ||
List<Component> getTooltip(); | ||
|
||
List<Component> getTooltipLines(@Nullable Player player); | ||
PlatformStorageChannelType<T> getStorageChannelType(); | ||
} |
11 changes: 11 additions & 0 deletions
11
...com/refinedmods/refinedstorage2/platform/api/resource/filter/FilteredResourceFactory.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 com.refinedmods.refinedstorage2.platform.api.resource.filter; | ||
|
||
import java.util.Optional; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.6") | ||
public interface FilteredResourceFactory { | ||
Optional<FilteredResource<?>> create(ItemStack stack, boolean tryAlternatives); | ||
} |
20 changes: 0 additions & 20 deletions
20
.../main/java/com/refinedmods/refinedstorage2/platform/api/resource/filter/ResourceType.java
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.