本文整理汇总了Java中co.aikar.timings.Timings.getBlockEntityTiming方法的典型用法代码示例。如果您正苦于以下问题:Java Timings.getBlockEntityTiming方法的具体用法?Java Timings.getBlockEntityTiming怎么用?Java Timings.getBlockEntityTiming使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类co.aikar.timings.Timings
的用法示例。
在下文中一共展示了Timings.getBlockEntityTiming方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BlockEntity
import co.aikar.timings.Timings; //导入方法依赖的package包/类
public BlockEntity(FullChunk chunk, CompoundTag nbt) {
if (chunk == null || chunk.getProvider() == null) {
throw new ChunkException("Invalid garbage Chunk given to Block Entity");
}
this.timing = Timings.getBlockEntityTiming(this);
this.server = chunk.getProvider().getLevel().getServer();
this.chunk = chunk;
this.setLevel(chunk.getProvider().getLevel());
this.namedTag = nbt;
this.name = "";
this.lastUpdate = System.currentTimeMillis();
this.id = BlockEntity.count++;
this.x = this.namedTag.getInt("x");
this.y = this.namedTag.getInt("y");
this.z = this.namedTag.getInt("z");
this.movable = this.namedTag.getBoolean("isMovable");
this.chunk.addBlockEntity(this);
this.getLevel().addBlockEntity(this);
}
示例2: BlockEntity
import co.aikar.timings.Timings; //导入方法依赖的package包/类
public BlockEntity(FullChunk chunk, CompoundTag nbt) {
if (chunk == null || chunk.getProvider() == null) {
throw new ChunkException("Invalid garbage Chunk given to Block Entity");
}
this.timing = Timings.getBlockEntityTiming(this);
this.server = chunk.getProvider().getLevel().getServer();
this.chunk = chunk;
this.setLevel(chunk.getProvider().getLevel());
this.namedTag = nbt;
this.name = "";
this.lastUpdate = System.currentTimeMillis();
this.id = BlockEntity.count++;
this.x = this.namedTag.getInt("x");
this.y = this.namedTag.getInt("y");
this.z = this.namedTag.getInt("z");
this.chunk.addBlockEntity(this);
this.getLevel().addBlockEntity(this);
}