use of net.minecraft.nbt.NbtElement in project meteor-client by MeteorDevelopment.
the class SettingGroup method fromTag.
@Override
public SettingGroup fromTag(NbtCompound tag) {
sectionExpanded = tag.getBoolean("sectionExpanded");
NbtList settingsTag = tag.getList("settings", 10);
for (NbtElement t : settingsTag) {
NbtCompound settingTag = (NbtCompound) t;
Setting<?> setting = get(settingTag.getString("name"));
if (setting != null)
setting.fromTag(settingTag);
}
return this;
}
use of net.minecraft.nbt.NbtElement in project meteor-client by MeteorDevelopment.
the class Settings method fromTag.
@Override
public Settings fromTag(NbtCompound tag) {
NbtList groupsTag = tag.getList("groups", 10);
for (NbtElement t : groupsTag) {
NbtCompound groupTag = (NbtCompound) t;
SettingGroup sg = getGroup(groupTag.getString("name"));
if (sg != null)
sg.fromTag(groupTag);
}
return this;
}
use of net.minecraft.nbt.NbtElement in project meteor-client by MeteorDevelopment.
the class ItemListSetting method load.
@Override
public List<Item> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("value", 8);
for (NbtElement tagI : valueTag) {
Item item = Registry.ITEM.get(new Identifier(tagI.asString()));
if (bypassFilterWhenSavingAndLoading || (filter == null || filter.test(item)))
get().add(item);
}
return get();
}
use of net.minecraft.nbt.NbtElement in project meteor-client by MeteorDevelopment.
the class Modules method fromTag.
@Override
public Modules fromTag(NbtCompound tag) {
disableAll();
NbtList modulesTag = tag.getList("modules", 10);
for (NbtElement moduleTagI : modulesTag) {
NbtCompound moduleTag = (NbtCompound) moduleTagI;
Module module = get(moduleTag.getString("name"));
if (module != null)
module.fromTag(moduleTag);
}
return this;
}
use of net.minecraft.nbt.NbtElement in project meteor-client by MeteorDevelopment.
the class StringListSetting method load.
@Override
public List<String> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("value", 8);
for (NbtElement tagI : valueTag) {
get().add(tagI.asString());
}
return get();
}
Aggregations