mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-05-06 01:14:12 +00:00
Deprecate IPocketAccess.getUpgrades
I think this left over from CCTweaks or Peripheral++. It doesn't really make sense as an API - if/when we add multiple upgrades, we'll want a different API for this.
This commit is contained in:
parent
9eabb29999
commit
1977556da4
@ -80,7 +80,10 @@ public interface IPocketAccess {
|
|||||||
void updateUpgradeNBTData();
|
void updateUpgradeNBTData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the current peripheral and create a new one. You may wish to do this if the methods available change.
|
* Remove the current peripheral and create a new one.
|
||||||
|
* <p>
|
||||||
|
* You may wish to do this if the methods available change, for instance when the {@linkplain #getEntity() owning
|
||||||
|
* entity} changes.
|
||||||
*/
|
*/
|
||||||
void invalidatePeripheral();
|
void invalidatePeripheral();
|
||||||
|
|
||||||
@ -88,6 +91,8 @@ public interface IPocketAccess {
|
|||||||
* Get a list of all upgrades for the pocket computer.
|
* Get a list of all upgrades for the pocket computer.
|
||||||
*
|
*
|
||||||
* @return A collection of all upgrade names.
|
* @return A collection of all upgrade names.
|
||||||
|
* @deprecated This is a relic of a previous API, which no longer makes sense with newer versions of ComputerCraft.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
Map<ResourceLocation, IPeripheral> getUpgrades();
|
Map<ResourceLocation, IPeripheral> getUpgrades();
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,7 @@ public class PocketServerComputer extends ServerComputer implements IPocketAcces
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public Map<ResourceLocation, IPeripheral> getUpgrades() {
|
public Map<ResourceLocation, IPeripheral> getUpgrades() {
|
||||||
return upgrade == null ? Collections.emptyMap() : Collections.singletonMap(upgrade.getUpgradeID(), getPeripheral(ComputerSide.BACK));
|
return upgrade == null ? Collections.emptyMap() : Collections.singletonMap(upgrade.getUpgradeID(), getPeripheral(ComputerSide.BACK));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user