Use for setup of state that depends on view frustum.
30 | */
31 | @FunctionalInterface
32 | public interface FrustumSetupListener {
33 | void afterFrustumSetup(WorldRenderContext context);
34 |
35 | static void register(FrustumSetupListener listener) {
36 | FrustumSetupListenerImpl.register(listener);
37 | }
38 |
39 | /**
40 | * Must be called by renderer implementations if they
41 | * disable the hooks implemented by FREX.
42 | */
43 | static void invoke(WorldRenderContext context) {
44 | FrustumSetupListenerImpl.invoke(context);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/fabric/src/main/java/io/vram/frex/fabric/mixin/MixinSpriteFinderHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FREX and is licensed to the project under
3 | * terms that are compatible with the GNU Lesser General Public License.
4 | * See the NOTICE file distributed with this work for additional information
5 | * regarding copyright ownership and licensing.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Lesser General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public License
18 | * along with this program. If not, see Use to draw overlays that handle GL state management independently or to tear
29 | * down transient state in event handlers or as a hook that precedes hand/held item
30 | * and GUI rendering.
31 | */
32 | @FunctionalInterface
33 | public interface WorldRenderPostListener {
34 | void afterWorldRender(WorldRenderContext context);
35 |
36 | static void register(WorldRenderPostListener listener) {
37 | WorldRenderPostListenerImpl.register(listener);
38 | }
39 |
40 | /**
41 | * Must be called by renderer implementations if they
42 | * disable the hooks implemented by FREX.
43 | */
44 | static void invoke(WorldRenderContext context) {
45 | WorldRenderPostListenerImpl.invoke(context);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/common/src/main/java/io/vram/frex/api/model/provider/SubModelLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FREX and is licensed to the project under
3 | * terms that are compatible with the GNU Lesser General Public License.
4 | * See the NOTICE file distributed with this work for additional information
5 | * regarding copyright ownership and licensing.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Lesser General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public License
18 | * along with this program. If not, see Render chunks and other render-related object instances will be made null
31 | * or invalid after this event so do not use it to capture dependent state.
32 | * Instead, use it to invalidate state and reinitialize lazily.
33 | */
34 | @FunctionalInterface
35 | public interface RenderReloadListener {
36 | void onRenderReload();
37 |
38 | static void register(RenderReloadListener listener) {
39 | RenderReloadListenerImpl.register(listener);
40 | }
41 |
42 | /**
43 | * For use by renderer implementations.
44 | */
45 | static void invoke() {
46 | RenderReloadListenerImpl.invoke();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/common/src/main/java/io/vram/frex/api/model/EntityModel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FREX and is licensed to the project under
3 | * terms that are compatible with the GNU Lesser General Public License.
4 | * See the NOTICE file distributed with this work for additional information
5 | * regarding copyright ownership and licensing.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Lesser General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public License
18 | * along with this program. If not, see