mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-10 14:26:10 +01:00
eb8dc6bc07
- Combine InstanceFactories and FlywheelRendered into InstancingControllers - Store these controllers directly in the BlockEntity/Entity type instead of a map for efficiency - Redo InstancedRenderRegistry to fit these changes - Rename all tile to block entity - Remove all interface I prefixes - Organize imports - Bump version to 0.5.1
41 lines
1.6 KiB
Java
41 lines
1.6 KiB
Java
package com.jozufozu.flywheel;
|
|
|
|
import com.jozufozu.flywheel.backend.Backend;
|
|
import com.jozufozu.flywheel.core.Contexts;
|
|
import com.jozufozu.flywheel.core.Materials;
|
|
import com.jozufozu.flywheel.core.PartialModel;
|
|
import com.jozufozu.flywheel.core.StitchedSprite;
|
|
import com.jozufozu.flywheel.mixin.PausedPartialTickAccessor;
|
|
import com.jozufozu.flywheel.vanilla.VanillaInstances;
|
|
|
|
import net.minecraftforge.eventbus.api.IEventBus;
|
|
import net.minecraftforge.fml.CrashReportCallables;
|
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
|
|
|
public class FlywheelClient {
|
|
|
|
public static void clientInit() {
|
|
CrashReportCallables.registerCrashCallable("Flywheel Backend", () ->
|
|
Backend.getInstance().getBackendDescriptor());
|
|
|
|
Backend.init();
|
|
IEventBus modEventBus = FMLJavaModLoadingContext.get()
|
|
.getModEventBus();
|
|
|
|
modEventBus.addListener(Contexts::flwInit);
|
|
modEventBus.addListener(Materials::flwInit);
|
|
modEventBus.addListener(PartialModel::onModelRegistry);
|
|
modEventBus.addListener(PartialModel::onModelBake);
|
|
modEventBus.addListener(StitchedSprite::onTextureStitchPre);
|
|
modEventBus.addListener(StitchedSprite::onTextureStitchPost);
|
|
|
|
VanillaInstances.init();
|
|
|
|
// https://github.com/Jozufozu/Flywheel/issues/69
|
|
// Weird issue with accessor loading.
|
|
// Only thing I've seen that's close to a fix is to force the class to load before trying to use it.
|
|
// From the SpongePowered discord:
|
|
// https://discord.com/channels/142425412096491520/626802111455297538/675007581168599041
|
|
Flywheel.LOGGER.info("Successfully loaded {}", PausedPartialTickAccessor.class.getName());
|
|
}
|
|
}
|