Create/src/main/java/com/simibubi/create/foundation/ResourceReloadHandler.java

27 lines
832 B
Java
Raw Normal View History

2020-05-23 14:02:38 +02:00
package com.simibubi.create.foundation;
2020-05-23 14:02:38 +02:00
import com.simibubi.create.CreateClient;
import com.simibubi.create.foundation.block.render.SpriteShifter;
import com.simibubi.create.foundation.utility.render.FastContraptionRenderer;
import net.minecraft.client.resources.ReloadListener;
import net.minecraft.profiler.IProfiler;
import net.minecraft.resources.IResourceManager;
public class ResourceReloadHandler extends ReloadListener<Object> {
@Override
protected Object prepare(IResourceManager resourceManagerIn, IProfiler profilerIn) {
return new Object();
}
@Override
protected void apply(Object $, IResourceManager resourceManagerIn, IProfiler profilerIn) {
SpriteShifter.reloadUVs();
CreateClient.bufferCache.invalidate();
CreateClient.kineticRenderer.invalidate();
FastContraptionRenderer.invalidateAll();
}
}