Time Rewind API
allows rewinding of blocks,items,enitites,etc with /rewind [ticks] [radius] can be used as an api for projects using time rewinding, this was created for the lack of time rewinding mods for this version, can be easily used.
介绍
TimeRewindAPI
TimeRewindAPI is a Forge 1.20.1 library for rewinding players, entities, projectiles, blocks, inventories, fluids, and world state.
Features
Player Rewind
- Position
- Velocity
- Health
- Hunger
- Saturation
- Air supply
- Fire status
- Fall distance
- Experience
- Inventory
- Armor
- Offhand
- Potion effects
- Dimension
- Death rewind
- Respawn rewind
Entity Rewind
- Living entities
- Health
- Position
- Velocity
- Rotation
- Fire state
- Air supply
Projectile Rewind
- Arrows
- Tridents
- Snowballs
- Eggs
- Other projectile entities
Item Entity Rewind
- Dropped items
- Position
- Velocity
- Stack contents
World Rewind
- Block placement
- Block breaking
- TNT explosions
- Creeper explosions
- End Crystal explosions
- Fluid placement
- Water
- Lava
Block Entity Rewind
- Chests
- Barrels
- Furnaces
- Blast Furnaces
- Smokers
- Hoppers
- Shulker Boxes
- Most modded block entities
Installation
Add TimeRewindAPI as a dependency to your Forge 1.20.1 mod.
Import:
import com.kin.timerewindapi.rewind.api.TimeRewindAPI;
Forge Dependencies:
dependencies {
implementation fg.deobf("com.kin:timerewindapi:1.0.0")
}
API Usage
Rewind a Player
TimeRewindAPI.rewindPlayer(
player,
200
);
Rewinds a player by 200 ticks.
Rewind an Entity
TimeRewindAPI.rewindEntity(
entity,
100
);
Rewinds a living entity by 100 ticks.
Rewind a Projectile
TimeRewindAPI.rewindProjectile(
projectile,
40
);
Rewinds an arrow, trident, snowball, or other projectile.
Rewind an Item Entity
TimeRewindAPI.rewindItemEntity(
itemEntity,
100
);
Rewinds a dropped item.
Rewind World State
TimeRewindAPI.rewindWorld(
level,
player.blockPosition(),
600,
100
);
Parameters:
- level = ServerLevel
- center = center position
- ticks = rewind duration
- radius = affected radius
This rewinds:
- Blocks
- Block Entities
- Fluids
within the radius.
Example Ability
TimeRewindAPI.rewindPlayer(
player,
200
);
TimeRewindAPI.rewindWorld(
player.serverLevel(),
player.blockPosition(),
200,
50
);
Rewinds the player and nearby world by 10 seconds.
Default Values
History Length: 600 ticks
Default Radius: 100 blocks
Recording Interval: 5 ticks
Command Examples
/rewind
Rewind yourself.
/rewind 200
Rewind yourself by 200 ticks.
/rewind 600 100
Rewind players, entities, projectiles, blocks, fluids, and block entities within 100 blocks.
Version
Current Version:
1.0.0
Notes
TimeRewindAPI is designed for:
- Time powers
- RPG abilities
- Boss mechanics
- Checkpoint systems
- Save-state systems
- Adventure maps
- PvP abilities
- Custom dimensions
常见问题
Time Rewind API 支持哪些 Minecraft 版本?
Time Rewind API 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Time Rewind API 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
评论
登录后评论和评分