MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / writeLocalDateTime

Method writeLocalDateTime

common/buildcraft/lib/misc/NBTUtils.java:319–328  ·  view source on GitHub ↗
(LocalDateTime localDateTime)

Source from the content-addressed store, hash-verified

317 }
318
319 public static NBTTagCompound writeLocalDateTime(LocalDateTime localDateTime) {
320 NBTTagCompound nbt = new NBTTagCompound();
321 nbt.setInteger("year", localDateTime.getYear());
322 nbt.setInteger("month", localDateTime.getMonthValue());
323 nbt.setInteger("day", localDateTime.getDayOfMonth());
324 nbt.setInteger("hour", localDateTime.getHour());
325 nbt.setInteger("minute", localDateTime.getMinute());
326 nbt.setInteger("second", localDateTime.getSecond());
327 return nbt;
328 }
329
330 public static LocalDateTime readLocalDateTime(NBTTagCompound nbt) {
331 int year = nbt.getInteger("year");

Callers 2

writeToNBTMethod · 0.95
writeEntryToStackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected