use of net.minecraft.util.Identifier in project meteor-client by MeteorDevelopment.
the class ChatHudMixin method drawIcon.
private void drawIcon(MatrixStack matrices, String line, int y, float opacity) {
if (METEOR_PREFIX_REGEX.matcher(line).find()) {
RenderSystem.setShaderTexture(0, METEOR_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 0);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
} else if (BARITONE_PREFIX_REGEX.matcher(line).find()) {
RenderSystem.setShaderTexture(0, BARITONE_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 10);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
}
Identifier skin = getMessageTexture(line);
if (skin != null) {
RenderSystem.setShaderColor(1, 1, 1, opacity);
RenderSystem.setShaderTexture(0, skin);
DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 8.0F, 8.0F, 8, 8, 64, 64);
DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 40.0F, 8.0F, 8, 8, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
}
}
use of net.minecraft.util.Identifier in project meteor-client by MeteorDevelopment.
the class StorageBlockListSetting method load.
@Override
public List<BlockEntityType<?>> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("value", 8);
for (NbtElement tagI : valueTag) {
BlockEntityType<?> type = Registry.BLOCK_ENTITY_TYPE.get(new Identifier(tagI.asString()));
if (type != null)
get().add(type);
}
return get();
}
use of net.minecraft.util.Identifier in project meteor-client by MeteorDevelopment.
the class ParticleTypeListSetting method load.
@Override
public List<ParticleType<?>> load(NbtCompound tag) {
get().clear();
NbtList valueTag = tag.getList("value", 8);
for (NbtElement tagI : valueTag) {
ParticleType<?> particleType = Registry.PARTICLE_TYPE.get(new Identifier(tagI.asString()));
if (particleType != null)
get().add(particleType);
}
return get();
}
use of net.minecraft.util.Identifier in project meteor-client by MeteorDevelopment.
the class ParticleTypeListSetting method save.
@Override
public NbtCompound save(NbtCompound tag) {
NbtList valueTag = new NbtList();
for (ParticleType<?> particleType : get()) {
Identifier id = Registry.PARTICLE_TYPE.getId(particleType);
if (id != null)
valueTag.add(NbtString.of(id.toString()));
}
tag.put("value", valueTag);
return tag;
}
use of net.minecraft.util.Identifier in project meteor-client by MeteorDevelopment.
the class SoundEventListSetting method save.
@Override
public NbtCompound save(NbtCompound tag) {
NbtList valueTag = new NbtList();
for (SoundEvent sound : get()) {
Identifier id = Registry.SOUND_EVENT.getId(sound);
if (id != null)
valueTag.add(NbtString.of(id.toString()));
}
tag.put("value", valueTag);
return tag;
}
Aggregations