Search in sources :

Example 1 with ExpandableAtlas

use of net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas in project StationAPI by ModificationStation.

the class TextureListener method registerTextures.

@EventListener
public void registerTextures(TextureRegisterEvent event) {
    ExpandableAtlas terrain = Atlases.getTerrain();
    TEST_BLOCK.get().texture = terrain.addTexture(of(MODID, "blocks/testBlock")).index;
    TEST_ANIMATED_BLOCK.get().texture = terrain.addTexture(of(MODID, "blocks/testAnimatedBlock")).index;
    FREEZER.get().texture = terrain.addTexture(of(MODID, "blocks/FreezerTop")).index;
    FREEZER.get(BlockFreezer.class).sideTexture = terrain.addTexture(of(MODID, "blocks/FreezerSide")).index;
    altarTextures[Direction.DOWN.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_bottom")).index;
    altarTextures[Direction.UP.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_top")).index;
    altarTextures[Direction.EAST.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_east")).index;
    altarTextures[Direction.WEST.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_west")).index;
    altarTextures[Direction.NORTH.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_north")).index;
    altarTextures[Direction.SOUTH.ordinal()] = terrain.addTexture(of(MODID, "blocks/altar_south")).index;
    ItemListener.testNBTItem.setTexture(of(MODID, "items/nbtItem"));
    ItemListener.testItem.setTexture(of(MODID, "items/highres"));
    // ItemListener.testPickaxe.setAnimationBinder("/assets/sltest/stationapi/textures/items/testPickaxe.png", 1, of(MODID, "items/testItem"));
    ItemListener.testPickaxe.setTexture(of(MODID, "items/testPickaxe"));
    // SquareAtlas.GUI_ITEMS.addAnimationBinder("/assets/sltest/textures/items/testPickaxe.png", 1, 0);
    TEST_ATLAS = new ExpandableAtlas(of(SLTest.MODID, "test_atlas"));
    TEST_ATLAS.addTexture(of(MODID, "items/testItem"));
    TEST_ATLAS.addTexture(of(MODID, "blocks/testBlock"));
    TEST_ATLAS.addTexture(of(MODID, "blocks/testAnimatedBlock"));
    TEST_ATLAS.addTexture(of(MODID, "items/testPickaxe"));
    TEST_ATLAS.addTexture(of(MODID, "items/nbtItem"));
    TEST_ATLAS.addTexture(of(MODID, "blocks/FreezerTop"));
    TEST_ATLAS.addTexture(of(MODID, "blocks/FreezerSide"));
// farlandsBlockModel = JsonUnbakedModel.get(of(MODID, "farlandsBlock"));
// testItemModel = JsonUnbakedModel.get(of(MODID, "item/testItem"));
}
Also used : ExpandableAtlas(net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas) EventListener(net.mine_diver.unsafeevents.listener.EventListener)

Example 2 with ExpandableAtlas

use of net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas in project StationAPI by ModificationStation.

the class Arsenic method registerTextures.

private static void registerTextures(TextureRegisterEvent event) {
    ExpandableAtlas terrain = Atlases.getTerrain();
    ExpandableAtlas guiItems = Atlases.getGuiItems();
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FLOWING_WATER.texture), ArsenicStillWater::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FLOWING_WATER.texture + 1), ArsenicFlowingWater::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FLOWING_LAVA.texture), ArsenicStillLava::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FLOWING_LAVA.texture + 1), ArsenicFlowingLava::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FIRE.texture), ArsenicFire::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.FIRE.texture + 16), ArsenicFire::new);
    terrain.addTextureBinder(terrain.getTexture(BlockBase.PORTAL.texture), ArsenicPortal::new);
    guiItems.addTextureBinder(guiItems.getTexture(ItemBase.compass.getTexturePosition(0)), ArsenicCompass::new);
    guiItems.addTextureBinder(guiItems.getTexture(ItemBase.clock.getTexturePosition(0)), ArsenicClock::new);
}
Also used : ExpandableAtlas(net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas) ArsenicFlowingWater(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFlowingWater) ArsenicStillLava(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicStillLava) ArsenicFire(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFire) ArsenicPortal(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicPortal) ArsenicStillWater(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicStillWater) ArsenicCompass(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicCompass) ArsenicClock(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicClock) ArsenicFlowingLava(net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFlowingLava)

Example 3 with ExpandableAtlas

use of net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas in project StationAPI by ModificationStation.

the class StationRenderImpl method init.

@EventListener(priority = ListenerPriority.HIGH)
private static void init(TextureRegisterEvent event) {
    TERRAIN = new ExpandableAtlas(Atlases.GAME_ATLAS_TEXTURE);
    GUI_ITEMS = new ExpandableAtlas(of("textures/atlas/gui/items.png"));
    TERRAIN.addSpritesheet("/terrain.png", 16, TerrainHelper.INSTANCE);
    GUI_ITEMS.addSpritesheet("/gui/items.png", 16, GuiItemsHelper.INSTANCE);
}
Also used : ExpandableAtlas(net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas) EventListener(net.mine_diver.unsafeevents.listener.EventListener)

Aggregations

ExpandableAtlas (net.modificationstation.stationapi.api.client.texture.atlas.ExpandableAtlas)3 EventListener (net.mine_diver.unsafeevents.listener.EventListener)2 ArsenicClock (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicClock)1 ArsenicCompass (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicCompass)1 ArsenicFire (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFire)1 ArsenicFlowingLava (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFlowingLava)1 ArsenicFlowingWater (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicFlowingWater)1 ArsenicPortal (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicPortal)1 ArsenicStillLava (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicStillLava)1 ArsenicStillWater (net.modificationstation.stationapi.impl.client.arsenic.renderer.render.binder.ArsenicStillWater)1