Search in sources :

Example 41 with Identifier

use of net.minecraft.util.Identifier in project bewitchment by MoriyaShiine.

the class BWSoundEvents method create.

private static SoundEvent create(String name) {
    Identifier id = new Identifier(Bewitchment.MODID, name);
    SoundEvent soundEvent = new SoundEvent(id);
    SOUND_EVENTS.put(soundEvent, id);
    return soundEvent;
}
Also used : SoundEvent(net.minecraft.sound.SoundEvent) Identifier(net.minecraft.util.Identifier)

Example 42 with Identifier

use of net.minecraft.util.Identifier in project bewitchment by MoriyaShiine.

the class DemonEntityRenderer method getTexture.

@Override
public Identifier getTexture(DemonEntity entity) {
    if (MALE_TEXTURES == null) {
        int variants = entity.getVariants();
        MALE_TEXTURES = new Identifier[variants];
        FEMALE_TEXTURES = new Identifier[variants];
        for (int i = 0; i < variants; i++) {
            MALE_TEXTURES[i] = new Identifier(Bewitchment.MODID, "textures/entity/living/demon/male_" + i + ".png");
            FEMALE_TEXTURES[i] = new Identifier(Bewitchment.MODID, "textures/entity/living/demon/female_" + i + ".png");
        }
    }
    int variant = entity.getDataTracker().get(BWHostileEntity.VARIANT);
    return entity.getDataTracker().get(DemonEntity.MALE) ? MALE_TEXTURES[variant] : FEMALE_TEXTURES[variant];
}
Also used : Identifier(net.minecraft.util.Identifier)

Example 43 with Identifier

use of net.minecraft.util.Identifier in project bewitchment by MoriyaShiine.

the class HellhoundEntityRenderer method getTexture.

@Override
public Identifier getTexture(HellhoundEntity entity) {
    if (TEXTURES == null) {
        int variants = entity.getVariants();
        TEXTURES = new Identifier[variants];
        for (int i = 0; i < variants; i++) {
            TEXTURES[i] = new Identifier(Bewitchment.MODID, "textures/entity/living/hellhound/" + i + ".png");
        }
    }
    return TEXTURES[entity.getDataTracker().get(BWHostileEntity.VARIANT)];
}
Also used : Identifier(net.minecraft.util.Identifier)

Example 44 with Identifier

use of net.minecraft.util.Identifier in project bewitchment by MoriyaShiine.

the class ToadEntityRenderer method getTexture.

@Override
public Identifier getTexture(ToadEntity entity) {
    if (TEXTURES == null) {
        int variants = entity.getVariants();
        TEXTURES = new Identifier[variants];
        for (int i = 0; i < variants; i++) {
            TEXTURES[i] = new Identifier(Bewitchment.MODID, "textures/entity/living/toad/" + i + ".png");
        }
    }
    return TEXTURES[entity.getDataTracker().get(BWTameableEntity.VARIANT)];
}
Also used : Identifier(net.minecraft.util.Identifier)

Example 45 with Identifier

use of net.minecraft.util.Identifier in project bewitchment by MoriyaShiine.

the class VampireEntityRenderer method getTexture.

@Override
public Identifier getTexture(VampireEntity entity) {
    if (TEXTURES == null) {
        int variants = entity.getVariants();
        TEXTURES = new Identifier[variants];
        for (int i = 0; i < variants; i++) {
            TEXTURES[i] = new Identifier(Bewitchment.MODID, "textures/entity/living/vampire/" + i + ".png");
        }
    }
    return TEXTURES[entity.getDataTracker().get(BWHostileEntity.VARIANT)];
}
Also used : Identifier(net.minecraft.util.Identifier)

Aggregations

Identifier (net.minecraft.util.Identifier)343 NbtList (net.minecraft.nbt.NbtList)36 ItemStack (net.minecraft.item.ItemStack)31 Item (net.minecraft.item.Item)28 NbtCompound (net.minecraft.nbt.NbtCompound)22 NbtElement (net.minecraft.nbt.NbtElement)22 Inject (org.spongepowered.asm.mixin.injection.Inject)22 IOException (java.io.IOException)18 Block (net.minecraft.block.Block)18 MinecraftClient (net.minecraft.client.MinecraftClient)15 BlockItem (net.minecraft.item.BlockItem)15 BlockPos (net.minecraft.util.math.BlockPos)15 Map (java.util.Map)12 BlockState (net.minecraft.block.BlockState)12 ArrayList (java.util.ArrayList)11 VertexConsumer (net.minecraft.client.render.VertexConsumer)11 ResourceManager (net.minecraft.resource.ResourceManager)11 SoundEvent (net.minecraft.sound.SoundEvent)11 ServerPlayerEntity (net.minecraft.server.network.ServerPlayerEntity)10 LiteralText (net.minecraft.text.LiteralText)10