mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 00:07:37 +00:00
Add method to clear static textures on world unload
This commit is contained in:
1 parent
ea103bcc80
commit
d726351abc
2 files changed
+14
-2
No files matched your search
@@ -345,7 +345,12 @@ public enum TextureType {
|
||||
}
|
||||
}
|
||||
|
||||
public ISubmapManager createManagerFor(ICarvingVariation variation, String texturePath) {
|
||||
public static void clearStatics() {
|
||||
theRenderBlocksCTM = null;
|
||||
theRenderBlocksColumn = null;
|
||||
}
|
||||
|
||||
public ISubmapManager createManagerFor(ICarvingVariation variation, String texturePath) {
|
||||
return new SubmapManagerDefault(this, variation, texturePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.api.carving.IChiselMode;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.google.common.collect.Queues;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
@@ -26,7 +27,6 @@ import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.render.SubmapManagerSpecialMaterial;
|
||||
import team.chisel.utils.General;
|
||||
|
||||
public final class ChiselController {
|
||||
@@ -163,4 +163,11 @@ public final class ChiselController {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload event) {
|
||||
if (event.world.isRemote) {
|
||||
TextureType.clearStatics();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user