mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 17:23:44 +01:00
Reorganize and simplify
- Remove AllMaterialSpecs#flwInit
This commit is contained in:
parent
74a147db30
commit
d3bbeb5a7a
5 changed files with 6 additions and 29 deletions
|
@ -20,7 +20,6 @@ import com.simibubi.create.foundation.config.AllConfigs;
|
|||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||
import com.simibubi.create.foundation.ponder.element.WorldSectionElement;
|
||||
import com.simibubi.create.foundation.render.AllMaterialSpecs;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.CreateContexts;
|
||||
import com.simibubi.create.foundation.render.SuperByteBufferCache;
|
||||
|
@ -65,7 +64,6 @@ public class CreateClient {
|
|||
modEventBus.addListener(CreateClient::clientInit);
|
||||
modEventBus.addListener(AllParticleTypes::registerFactories);
|
||||
modEventBus.addListener(CreateContexts::flwInit);
|
||||
modEventBus.addListener(AllMaterialSpecs::flwInit);
|
||||
modEventBus.addListener(ContraptionRenderDispatcher::gatherContext);
|
||||
|
||||
MODEL_SWAPPER.registerListeners(modEventBus);
|
||||
|
@ -83,7 +81,7 @@ public class CreateClient {
|
|||
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);
|
||||
|
||||
ShippedResourcePacks.extractFiles("Copper Legacy Pack");
|
||||
|
||||
|
||||
AllKeys.register();
|
||||
// AllFluids.assignRenderLayers();
|
||||
AllBlockPartials.init();
|
||||
|
|
|
@ -182,7 +182,7 @@ public class FlwContraption extends ContraptionRenderInfo {
|
|||
private final ContraptionInstanceManager tileInstanceManager;
|
||||
|
||||
public ContraptionInstanceWorld(FlwContraption parent) {
|
||||
switch (Backend.getInstance().getEngine()) {
|
||||
switch (Backend.getEngine()) {
|
||||
case INSTANCING -> {
|
||||
InstancingEngine<ContraptionProgram> engine = InstancingEngine.builder(CreateContexts.CWORLD)
|
||||
.setGroupFactory(ContraptionGroup.forContraption(parent))
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.foundation.render;
|
||||
|
||||
import com.jozufozu.flywheel.api.struct.StructType;
|
||||
import com.jozufozu.flywheel.event.GatherContextEvent;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.base.flwdata.BeltData;
|
||||
import com.simibubi.create.content.contraptions.base.flwdata.BeltType;
|
||||
|
@ -18,22 +17,12 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class AllMaterialSpecs {
|
||||
public static void init() {
|
||||
// noop, make sure the static field are loaded.
|
||||
}
|
||||
|
||||
public static final StructType<RotatingData> ROTATING = new RotatingType();
|
||||
public static final StructType<BeltData> BELTS = new BeltType();
|
||||
public static final StructType<ActorData> ACTORS = new ActorType();
|
||||
public static final StructType<FlapData> FLAPS = new FlapType();
|
||||
|
||||
public static void flwInit(GatherContextEvent event) {
|
||||
event.getBackend().register(Locations.ROTATING, ROTATING);
|
||||
event.getBackend().register(Locations.BELTS, BELTS);
|
||||
event.getBackend().register(Locations.ACTORS, ACTORS);
|
||||
event.getBackend().register(Locations.FLAPS, FLAPS);
|
||||
}
|
||||
|
||||
public static class Locations {
|
||||
public static final ResourceLocation ROTATING = Create.asResource("rotating");
|
||||
public static final ResourceLocation BELTS = Create.asResource("belts");
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.simibubi.create.foundation.render;
|
||||
|
||||
import com.jozufozu.flywheel.backend.GameStateRegistry;
|
||||
import com.jozufozu.flywheel.backend.source.FileResolution;
|
||||
import com.jozufozu.flywheel.backend.source.Resolver;
|
||||
import com.jozufozu.flywheel.core.GameStateRegistry;
|
||||
import com.jozufozu.flywheel.core.Templates;
|
||||
import com.jozufozu.flywheel.core.compile.ProgramCompiler;
|
||||
import com.jozufozu.flywheel.core.source.FileResolution;
|
||||
import com.jozufozu.flywheel.core.source.Resolver;
|
||||
import com.jozufozu.flywheel.event.GatherContextEvent;
|
||||
import com.jozufozu.flywheel.util.ResourceUtil;
|
||||
import com.simibubi.create.Create;
|
||||
|
|
|
@ -2,28 +2,18 @@ package com.simibubi.create.foundation.render;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.jozufozu.flywheel.core.compile.ShaderConstants;
|
||||
import com.jozufozu.flywheel.core.shader.GameStateProvider;
|
||||
import com.simibubi.create.Create;
|
||||
import com.jozufozu.flywheel.core.shader.ShaderConstants;
|
||||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public enum RainbowDebugStateProvider implements GameStateProvider {
|
||||
INSTANCE;
|
||||
public static final ResourceLocation NAME = Create.asResource("rainbow_debug");
|
||||
|
||||
@Override
|
||||
public boolean isTrue() {
|
||||
return KineticDebugger.isActive();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ResourceLocation getID() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void alterConstants(@Nonnull ShaderConstants constants) {
|
||||
constants.define("DEBUG_RAINBOW");
|
||||
|
|
Loading…
Reference in a new issue