Java Code Examples for net.minecraft.util.ResourceLocation

The following examples show how to use net.minecraft.util.ResourceLocation. These examples are extracted from open source projects.
Example 1
Project: MediaMod   File: DynamicTextureWrapper.java    License: GNU General Public License v3.0 6 votes vote down vote up
/**
 * Get resource location from url
 *
 * @param url - url to get the file from
 * @return ResourceLocation
 */
public static ResourceLocation getTexture(URL url) {
    init();
    if (!URL_TEXTURES.containsKey(url)) {
        URL_TEXTURES.put(url, new WrappedResource(null));
        queueImage(url);
    }

    WrappedResource wr = URL_TEXTURES.get(url);
    if (wr.location == null) {
        if (URL_IMAGES.get(url) != null && URL_IMAGES.get(url).image != null) {
            DynamicTexture texture = new DynamicTexture(URL_IMAGES.get(url).image);
            WrappedResource wr2 = new WrappedResource(FMLClientHandler.instance().getClient().getTextureManager().getDynamicTextureLocation(url.toString(), texture));
            URL_TEXTURES.put(url, wr2);
            return wr2.location;
        } else {
            return FULLY_TRANSPARENT_TEXTURE;
        }
    }

    return wr.location;
}
 
Example 2
Project: BigReactors   File: GuiReactorRedstonePort.java    License: MIT License 6 votes vote down vote up
public GuiReactorRedstonePort(Container container, TileEntityReactorRedstonePort tileentity) {
	super(container);
	_guiBackground = new ResourceLocation(BigReactors.GUI_DIRECTORY + "RedstonePort.png");
	port = tileentity;
	
	ySize = 204;
	
	btnMap = new HashMap<CircuitType, GuiSelectableButton>();
	outputLevel = tileentity.getOutputLevel();
	greaterThan = tileentity.getGreaterThan();
	activeOnPulse = tileentity.isInputActiveOnPulse();
	
	if(outputLevel < 0) {
		retract = true; 
		outputLevel = Math.abs(outputLevel);
	}
	else {
		retract = false;
	}
}
 
Example 3
Project: AgriCraft   File: IconHelper.java    License: MIT License 6 votes vote down vote up
@Nonnull
public static TextureAtlasSprite registerIcon(@Nonnull ResourceLocation texturePath) {
    // Validate parameters.
    Preconditions.checkNotNull(texturePath, "IconHelper cannot register an icon with a null texture path!");
    
    // The icon to be returned.
    TextureAtlasSprite ret = null;
    
    // Attempt to register the sprite to the MineCraft texture map.
    try {
        ret = Minecraft.getMinecraft().getTextureMapBlocks().registerSprite(texturePath);
    } catch (Exception e) {
        AgriCore.getLogger("agricraft").debug(e.getLocalizedMessage());
    }
    
    // Return the icon, or the default icon in the case that the icon was null.
    if (ret != null) {
        return ret;
    } else {
        return getDefaultIcon();
    }
}
 
Example 4
Project: NOVA-Core   File: NovaFolderResourcePack.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public Set<ResourceLocation> getLanguageFiles() {
	Pattern langPattern = Pattern.compile("^[a-zA-Z0-9-]+\\.lang$", Pattern.CASE_INSENSITIVE);

	Set<ResourceLocation> langFiles = new HashSet<>();

	for (String domain : getResourceDomains()) {
		findFileCaseInsensitive("assets/" + domain + "/lang/").filter(File::isDirectory).ifPresent(file -> {
			Arrays.stream(file.listFiles((dir, name) -> langPattern.asPredicate().test(name)))
				.map(File::getName)
				.forEach(name -> langFiles.add(new ResourceLocation(domain, name)));
		});
	}

	return langFiles;
}
 
Example 5
Project: YUNoMakeGoodMap   File: StructureLoader.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void generate(World world, BlockPos pos)
{
    PlacementSettings settings = new PlacementSettings();
    Template temp = null;
    String suffix = world.provider.getDimensionType().getSuffix();
    String opts = world.getWorldInfo().getGeneratorOptions() + suffix;

    if (!Strings.isNullOrEmpty(opts))
        temp = StructureUtil.loadTemplate(new ResourceLocation(opts), (WorldServer)world, true);
    if (temp == null)
        temp = StructureUtil.loadTemplate(new ResourceLocation("/config/", this.fileName + suffix), (WorldServer)world, !Strings.isNullOrEmpty(suffix));
    if (temp == null)
        return; //If we're not in the overworld, and we don't have a template...

    BlockPos spawn = StructureUtil.findSpawn(temp, settings);
    if (spawn != null)
    {
        pos = pos.subtract(spawn);
        world.setSpawnPoint(pos);
    }

    temp.addBlocksToWorld(world, pos, settings, 0); //Push to world, with no neighbor notifications!
    world.getPendingBlockUpdates(new StructureBoundingBox(pos, pos.add(temp.getSize())), true); //Remove block updates, so that sand doesn't fall!
}
 
Example 6
Project: GT-Classic   File: GTEventLootTableLoad.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@SubscribeEvent
public void onLootTableLoad(LootTableLoadEvent event) {
	/*
	 * Iterates both the stack array and resource location array to create a 2d
	 * table
	 */
	if (GTConfig.general.addLootItems) {
		for (ItemStack item : lootpool) {
			for (ResourceLocation table : loottable) {
				if (event.getName().equals(table)) {
					event.getTable().getPool("main").addEntry(new LootEntryItem(item.getItem(), 16, 0, new LootFunction[] {
							createCountFunction(1, 6) }, NO_CONDITIONS, getStackResourceName(item)));
				}
			}
		}
	}
}
 
Example 7
Project: enderutilities   File: EntityFallingBlockEU.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void writeEntityToNBT(NBTTagCompound compound)
{
    Block block = this.blockState != null ? this.blockState.getBlock() : Blocks.AIR;
    ResourceLocation rl = Block.REGISTRY.getNameForObject(block);
    compound.setString("Block", rl == null ? "" : rl.toString());
    compound.setByte("Data", this.blockState != null ? (byte) block.getMetaFromState(this.blockState) : 0);
    compound.setInteger("Time", this.fallTime);
    compound.setBoolean("DropItem", this.shouldDropItem);
    compound.setBoolean("HurtEntities", this.hurtEntities);
    compound.setFloat("FallHurtAmount", this.fallHurtAmount);
    compound.setInteger("FallHurtMax", this.fallHurtMax);

    if (this.tileEntityData != null)
    {
        compound.setTag("TileEntityData", this.tileEntityData);
    }
}
 
Example 8
Project: Hyperium   File: TabCompletionUtil.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
public static List<String> getListOfStringsMatchingLastWord(String[] p_175762_0_, Collection<?> p_175762_1_) {
    String s = p_175762_0_[p_175762_0_.length - 1];
    List<String> list = new ArrayList<>();
    if (!p_175762_1_.isEmpty()) {
        list = p_175762_1_.stream().map(Functions.toStringFunction()::apply).collect(Collectors.toList()).stream().filter(s2 ->
            doesStringStartWith(s, s2)).collect(Collectors.toList());

        if (list.isEmpty()) {
            for (Object object : p_175762_1_) {
                if (object instanceof ResourceLocation && doesStringStartWith(s, ((ResourceLocation) object).getResourcePath())) {
                    list.add(String.valueOf(object));
                }
            }
        }
    }

    return list;
}
 
Example 9
Project: enderutilities   File: TargetData.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
public boolean isTargetBlockUnchanged()
{
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (server == null)
    {
        return false;
    }

    World world = server.getWorld(this.dimension);
    if (world == null)
    {
        return false;
    }

    IBlockState iBlockState = world.getBlockState(this.pos);
    Block block = iBlockState.getBlock();
    ResourceLocation rl = ForgeRegistries.BLOCKS.getKey(block);
    int meta = block.getMetaFromState(iBlockState);

    // The target block unique name and metadata matches what we have stored
    return this.blockMeta == meta && rl != null && this.blockName.equals(rl.toString());
}
 
Example 10
Project: Production-Line   File: ItemPLRecord.java    License: MIT License 5 votes vote down vote up
public ItemPLRecord(String name, SoundEvent soundEvent) {
    super(name, soundEvent);
    this.name = name;
    this.setCreativeTab(ProductionLine.creativeTabPL);
    this.setUnlocalizedName(MOD_ID + "." + name);
    GameRegistry.<Item>register(this, new ResourceLocation(MOD_ID, name));
}
 
Example 11
Project: Wizardry   File: ModuleEffectFrost.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void renderSpell(World world, ModuleInstanceEffect instance, @Nonnull SpellData spell, @Nonnull SpellRing spellRing) {
	Vec3d position = spell.getTarget(world);

	if (position == null) return;

	ParticleBuilder glitter = new ParticleBuilder(1);
	glitter.setAlphaFunction(new InterpFloatInOut(0.0f, 0.1f));
	glitter.setRender(new ResourceLocation(Wizardry.MODID, NBTConstants.MISC.SPARKLE_BLURRED));
	glitter.enableMotionCalculation();
	glitter.setScaleFunction(new InterpScale(1, 0));
	glitter.setAcceleration(new Vec3d(0, -0.02, 0));
	glitter.setCollision(true);
	glitter.setCanBounce(true);
	ParticleSpawner.spawn(glitter, world, new StaticInterp<>(position), RandUtil.nextInt(5, 15), 0, (aFloat, particleBuilder) -> {
		double radius = 2;
		double theta = 2.0f * (float) Math.PI * RandUtil.nextFloat();
		double r = radius * RandUtil.nextFloat();
		double x = r * MathHelper.cos((float) theta);
		double z = r * MathHelper.sin((float) theta);
		glitter.setScale(RandUtil.nextFloat());
		glitter.setPositionOffset(new Vec3d(x, RandUtil.nextDouble(-2, 2), z));
		glitter.setLifetime(RandUtil.nextInt(50, 100));
		Vec3d direction = position.add(glitter.getPositionOffset()).subtract(position).normalize().scale(1 / 5);
		glitter.addMotion(direction.scale(RandUtil.nextDouble(0.5, 1)));
	});

}
 
Example 12
Project: enderutilities   File: ClientProxy.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
private static void registerItemModelWithNamePrefix(ItemEnderUtilities item, int meta, String namePrefix)
{
    if (item.isEnabled())
    {
        ResourceLocation rl = item.getRegistryName();
        ModelLoader.setCustomModelResourceLocation(item, meta,
                new ModelResourceLocation(rl.getNamespace() + ":" + namePrefix + rl.getPath(), "inventory"));
    }
}
 
Example 13
public MetaTileEntityItemCollector(ResourceLocation metaTileEntityId, int tier, int maxItemSuckingRange) {
    super(metaTileEntityId, tier);
    this.maxItemSuckingRange = maxItemSuckingRange;
    this.itemSuckingRange = maxItemSuckingRange;
    this.itemFilter = new ItemFilterContainer(this::markDirty);
    initializeInventory();
}
 
Example 14
Project: TFC2   File: RenderTiger.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
protected ResourceLocation getEntityTexture(EntityTiger entity) 
{
	if(entity.getTigerType() == TigerType.Snow)
		return texTigerSnow;
	return texTiger;
}
 
Example 15
Project: enderutilities   File: ItemBuildersWand.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
private TemplateEnderUtilities getTemplate(World world, EntityPlayer player, ItemStack stack, PlacementSettings placement)
{
    TemplateManagerEU templateManager = this.getTemplateManager();
    ResourceLocation rl = this.getTemplateResource(stack, player);
    TemplateEnderUtilities template = templateManager.getTemplate(rl);
    template.setPlacementSettings(placement);

    return template;
}
 
Example 16
Project: AdvancedMod   File: ResearchItem.java    License: GNU General Public License v3.0 5 votes vote down vote up
public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon)
{
	this.key = key;
	this.category = category;
	this.tags = tags;    	
    this.icon_resource = icon;
    this.icon_item = null;
    this.displayColumn = col;
    this.displayRow = row;
    this.complexity = complex;
    if (complexity < 1) this.complexity = 1;
    if (complexity > 3) this.complexity = 3;
}
 
Example 17
Project: Wizardry   File: ModuleEffectPoisonCloud.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void renderSpell(World world, ModuleInstanceEffect instance, @Nonnull SpellData spell, @Nonnull SpellRing spellRing) {
	Vec3d position = spell.getTarget(world);

	if (position == null) return;

	ParticleBuilder glitter = new ParticleBuilder(0);
	if (RandUtil.nextInt(5) != 0)
		glitter.setColor(instance.getPrimaryColor());
	else glitter.setColor(instance.getSecondaryColor());
	glitter.setRender(new ResourceLocation(Wizardry.MODID, NBTConstants.MISC.SMOKE));

	ParticleSpawner.spawn(glitter, world, new StaticInterp<>(position), 20, 0, (aFloat, particleBuilder) -> {
		particleBuilder.setLifetime(RandUtil.nextInt(10, 40));
		particleBuilder.setScale(RandUtil.nextFloat(5, 10));
		particleBuilder.setAlpha(RandUtil.nextFloat(0.3f, 0.5f));
		particleBuilder.setAlphaFunction(new InterpFloatInOut(0.3f, 0.4f));
		double area = spellRing.getAttributeValue(world, AttributeRegistry.AREA, spell);
		double theta = 2.0f * (float) Math.PI * RandUtil.nextFloat();
		double r = area * RandUtil.nextFloat();
		double x = r * MathHelper.cos((float) theta);
		double z = r * MathHelper.sin((float) theta);
		particleBuilder.setPositionOffset(new Vec3d(x, RandUtil.nextDouble(-r, r), z));
		particleBuilder.setMotion(new Vec3d(RandUtil.nextDouble(-0.01, 0.01), RandUtil.nextDouble(-0.01, 0.01), RandUtil.nextDouble(-0.01, 0.01)));
		//	particleBuilder.setAcceleration(new Vec3d(0, -0.015, 0));
	});
}
 
Example 18
Project: CommunityMod   File: RegUtil.java    License: GNU Lesser General Public License v2.1 5 votes vote down vote up
public static <T extends Item> T registerItem(IForgeRegistry<Item> reg, T item, String name) {
	item.setRegistryName(new ResourceLocation(CommunityGlobals.MOD_ID, name));
	item.setTranslationKey(CommunityGlobals.MOD_ID + '.' + name);
	item.setCreativeTab(CommunityGlobals.TAB);
	
	reg.register(item);
	
	return item;
}
 
Example 19
Project: NOVA-Core   File: FWBlockSound.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public SoundEvent getBreakSound() {
	return blockSound.getSound(BlockProperty.BlockSound.BlockSoundTrigger.BREAK)
		.map(sound -> (sound.domain.isEmpty() && !sound.name.contains(".")) ? "dig." + sound.name : sound.getID())
		.map(soundID -> SoundEvent.REGISTRY.getObject(new ResourceLocation(soundID)))
		.orElseGet(super::getBreakSound);
}
 
Example 20
Project: OpenModsLib   File: TexturedItemModel.java    License: MIT License 5 votes vote down vote up
private static IModel getModel(Optional<ResourceLocation> model) {
	if (model.isPresent()) {
		ResourceLocation location = model.get();
		return ModelLoaderRegistry.getModelOrLogError(location, "Couldn't load base-model dependency: " + location);
	} else {
		return ModelLoaderRegistry.getMissingModel();
	}
}
 
Example 21
Project: YUNoMakeGoodMap   File: GuiCustomizeWorld.java    License: Apache License 2.0 5 votes vote down vote up
public Info(int width, List<String> lines, ResourceLocation logoPath, Dimension logoDims)
{
    super(GuiCustomizeWorld.this.mc,
          width,
          GuiCustomizeWorld.this.height,
          32, GuiCustomizeWorld.this.height - 68 + 4,
          LIST_WIDTH + 20, 60,
          GuiCustomizeWorld.this.width,
          GuiCustomizeWorld.this.height);
    this.lines    = resizeContent(lines);
    this.logoPath = logoPath;
    this.logoDims = logoDims;

    this.setHeaderInfo(true, getHeaderHeight());
}
 
Example 22
Project: TofuCraftReload   File: RenderTofuCow.java    License: MIT License 5 votes vote down vote up
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityTofuCow entity) {
    if(entity.getVariant() == 1){
        return ZUNDACOW_TEXTURES;
    }else {
        return COW_TEXTURES;
    }
}
 
Example 23
Project: CommunityMod   File: BlockTraverseSapling.java    License: GNU Lesser General Public License v2.1 5 votes vote down vote up
public BlockTraverseSapling(String name, TraverseTreeGenerator generator) {
    super();
    this.generator = generator;
    setRegistryName(new ResourceLocation(TraverseConstants.MOD_ID, name + "_sapling"));
    setTranslationKey(getRegistryName().toString());
    setCreativeTab(TraverseTab.TAB);
    setSoundType(SoundType.PLANT);
    ShootingStar.registerModel(new ModelCompound(TraverseConstants.MOD_ID, this, "sapling", STAGE, TYPE));
}
 
Example 24
Project: Artifacts   File: ParticleUtils.java    License: MIT License 5 votes vote down vote up
public static ResourceLocation getParticleTexture()
{
	try
	{
		return (ResourceLocation)ReflectionHelper.getPrivateValue(EffectRenderer.class, null, new String[] { "particleTextures", "b", "field_110737_b" }); } catch (Exception e) {
		}
	return null;
}
 
Example 25
Project: enderutilities   File: BakedModelInserter.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public Collection<ResourceLocation> getTextures()
{
    List<ResourceLocation> textures = Lists.newArrayList();

    for (String name : this.getTextureMapping().values())
    {
        textures.add(new ResourceLocation(name));
    }

    return textures;
}
 
Example 26
Project: CodeChickenLib   File: TextureUtils.java    License: GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Colour[] loadTextureColours(ResourceLocation resource) {
    int[] idata = loadTextureData(resource);
    Colour[] data = new Colour[idata.length];
    for (int i = 0; i < data.length; i++)
        data[i] = new ColourARGB(idata[i]);
    return data;
}
 
Example 27
Project: Wizardry   File: ModuleShapeTouch.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void renderSpell(World world, ModuleInstanceShape instance, @Nonnull SpellData spell, @Nonnull SpellRing spellRing) {
	IShapeOverrides overrides = spellRing.getOverrideHandler().getConsumerInterface(IShapeOverrides.class);
	if (overrides.onRenderTouch(world, spell, spellRing)) return;

	Entity targetEntity = spell.getVictim(world);

	if (targetEntity == null) return;

	ParticleBuilder glitter = new ParticleBuilder(1);
	glitter.setRender(new ResourceLocation(Wizardry.MODID, NBTConstants.MISC.SPARKLE_BLURRED));
	ParticleSpawner.spawn(glitter, world, new InterpCircle(targetEntity.getPositionVector().add(0, targetEntity.height / 2.0, 0), new Vec3d(0, 1, 0), 1, 10), 50, RandUtil.nextInt(10, 15), (aFloat, particleBuilder) -> {
		if (RandUtil.nextBoolean()) {
			glitter.setColor(spellRing.getPrimaryColor());
			glitter.setMotion(new Vec3d(0, RandUtil.nextDouble(0.01, 0.1), 0));
		} else {
			glitter.setColor(spellRing.getSecondaryColor());
			glitter.setMotion(new Vec3d(0, RandUtil.nextDouble(-0.1, -0.01), 0));
		}
		glitter.setLifetime(RandUtil.nextInt(20, 30));
		glitter.setScale((float) RandUtil.nextDouble(0.3, 1));
		glitter.setAlphaFunction(new InterpFloatInOut(0.3f, (float) RandUtil.nextDouble(0.6, 1)));
		glitter.setLifetime(RandUtil.nextInt(10, 20));
		glitter.setScaleFunction(new InterpScale(1, 0));
	});
}
 
Example 28
Project: enderutilities   File: ItemBuildersWand.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
private ResourceLocation getTemplateResource(ItemStack stack, EntityPlayer player)
{
    int id = this.getSelectionIndex(stack);
    UUID uuid = NBTUtils.getUUIDFromItemStack(stack, WRAPPER_TAG_NAME, true);
    String name = NBTUtils.getOrCreateString(stack, WRAPPER_TAG_NAME, "player", player.getName());
    return new ResourceLocation(Reference.MOD_ID, name + "_" + uuid.toString() + "_" + id);
}
 
Example 29
Project: GregTech   File: SimpleOrientedCubeRenderer.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(TextureMap textureMap) {
    this.sprites = new TextureAtlasSprite[6];
    for (CubeSide cubeSide : CubeSide.values()) {
        String fullPath = String.format("blocks/%s/%s", basePath, cubeSide.name().toLowerCase());
        this.sprites[cubeSide.ordinal()] = textureMap.registerSprite(new ResourceLocation(GTValues.MODID, fullPath));
    }
}
 
Example 30
Project: PneumaticCraft   File: ResearchItem.java    License: GNU General Public License v3.0 5 votes vote down vote up
public ResearchItem(String key, String category, AspectList tags, int col, int row, int complex, ResourceLocation icon)
{
	this.key = key;
	this.category = category;
	this.tags = tags;    	
    this.icon_resource = icon;
    this.icon_item = null;
    this.displayColumn = col;
    this.displayRow = row;
    this.complexity = complex;
    if (complexity < 1) this.complexity = 1;
    if (complexity > 3) this.complexity = 3;
}
 
Example 31
Project: VanillaFix   File: VanillaModelWrapper.java    License: MIT License 5 votes vote down vote up
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    if (!Attributes.moreSpecific(format, Attributes.DEFAULT_BAKED_FORMAT)) {
        throw new IllegalArgumentException("can't bake vanilla models to the format that doesn't fit into the default one: " + format);
    }
    ModelBlock model = this.model;

    if (model == null) {
        return BuiltinLoader.WRAPPED_MODEL_MISSING.bake(BuiltinLoader.WRAPPED_MODEL_MISSING.getDefaultState(), format, bakedTextureGetter);
    }

    List<TRSRTransformation> newTransforms = Lists.newArrayList();
    for (int i = 0; i < model.getElements().size(); i++) {
        BlockPart part = model.getElements().get(i);
        newTransforms.add(animation.getPartTransform(state, part, i));
    }

    ItemCameraTransforms transforms = model.getAllTransforms();
    Map<ItemCameraTransforms.TransformType, TRSRTransformation> tMap = Maps.newEnumMap(ItemCameraTransforms.TransformType.class);
    tMap.putAll(PerspectiveMapWrapper.getTransforms(transforms));
    tMap.putAll(PerspectiveMapWrapper.getTransforms(state));
    IModelState perState = new SimpleModelState(ImmutableMap.copyOf(tMap));

    if (hasItemModel(model)) {
        return new ItemLayerModel(model).bake(perState, format, bakedTextureGetter);
    }

    if (isCustomRenderer(model)) {
        return new BuiltInModel(transforms, model.createOverrides());
    }

    return bakeNormal(model, perState, state, newTransforms, format, bakedTextureGetter, uvlock);
}
 
Example 32
Project: customstuff4   File: DamageableShapelessOreRecipe.java    License: GNU General Public License v3.0 4 votes vote down vote up
private DamageableShapelessOreRecipe(@Nullable ResourceLocation group, int[] damageAmounts, NonNullList<Ingredient> input, @Nonnull ItemStack result)
{
    super(group, input, result);
    this.damageAmounts = damageAmounts;
    invSlots = new int[damageAmounts.length];
}
 
Example 33
Project: GT-Classic   File: GTContainerBufferLarge.java    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public ResourceLocation getTexture() {
	return TEXTURE;
}
 
Example 34
Project: Wizardry   File: FairyTaskController.java    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
@Nonnull
public ResourceLocation getLocation() {
	return location;
}
 
Example 35
Project: TFC2   File: RenderElk.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
protected ResourceLocation getEntityTexture(EntityElk entity) 
{
	return tex;
}
 
Example 36
Project: Chisel-2   File: StaffRod.java    License: GNU General Public License v2.0 4 votes vote down vote up
public StaffRod(String tag, int capacity, ItemStack item, int craftCost,
		IWandRodOnUpdate onUpdate, ResourceLocation texture) {
	super(tag+"_staff", capacity, item, craftCost, onUpdate, texture);
}
 
Example 37
Project: PneumaticCraft   File: ModelAssemblyController.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public ResourceLocation getModelTexture(TileEntity tile){
    return Textures.MODEL_ASSEMBLY_CONTROLLER;
}
 
Example 38
Project: ToroQuest   File: EntityRainbowGuard.java    License: GNU General Public License v3.0 4 votes vote down vote up
public static void init(int entityId) {
	EntityRegistry.registerModEntity(new ResourceLocation(ToroQuest.MODID, NAME), EntityRainbowGuard.class, NAME, entityId, ToroQuest.INSTANCE,
			90, 2, true, 0xffffff, 0x909090);
}
 
Example 39
Project: ToroQuest   File: RenderShopkeeper.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
protected ResourceLocation getEntityTexture(EntityShopkeeper entity) {
	return entity.getProfessionForge().getSkin();
}
 
Example 40
Project: GregTech   File: MultiblockInfoCategory.java    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
public MultiblockInfoCategory(IJeiHelpers helpers) {
    this.background = helpers.getGuiHelper().createBlankDrawable(176, 166);
    ResourceLocation iconLocation = new ResourceLocation(GTValues.MODID, "textures/gui/icon/coke_oven.png");
    this.icon = helpers.getGuiHelper().createDrawable(iconLocation, 0, 0, 16, 16, 16, 16);
}