mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-18 12:39:09 +00:00
DataWatcher idextender API
This commit is contained in:
2 files changed
+20
-1
No files matched your search
@@ -25,7 +25,7 @@ If you notice any problems when opening NEID worlds with EndlessIDs, please open
|
||||
| Entity IDs | 256 | 256 | 256 | 32,768 |
|
||||
| Potion IDs | 32 | 32 | 32 | 65,536 |
|
||||
| Enchantment IDs | 256 | 256 | 256 | 32,768 |
|
||||
| DataWatcher IDs | 32 | 127 (Broken) | 127 (Broken) | 65,536 |
|
||||
| DataWatcher IDs | 32 | 127 (Broken) | 127 | 65,536 |
|
||||
| Dimension IDs | Theoretically unlimited, 4,294,967,295 in practice | Same | Same | Same |
|
||||
|
||||
## Mod compat
|
||||
@@ -135,6 +135,9 @@ if (Loader.isModLoaded("idextender")){
|
||||
}
|
||||
```
|
||||
|
||||
The `idextender.DataWatcher` class also exposes the extended DataWatcher count (used for entity data syncing over network)
|
||||
in a similar fashion.
|
||||
|
||||
Note that these values CAN be identical to the vanilla values if the ID Extension mod implementing it has a config to
|
||||
toggle itself, existence of the IDExtender class does not guarantee a fixed increase, and you should check that the
|
||||
returned value is large enough for your needs.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package idextender;
|
||||
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
|
||||
public class DataWatcher {
|
||||
public static int maxWatchableID() {
|
||||
return GeneralConfig.extendDataWatcher ? ExtendedConstants.maxWatchableID : VanillaConstants.maxWatchableID;
|
||||
}
|
||||
|
||||
public static int watchableBits() {
|
||||
return GeneralConfig.extendDataWatcher ? ExtendedConstants.watchableBits : VanillaConstants.watchableBits;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user