mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
1 parent
2ab2ced589
commit
f1702495ef
5 files changed
+47
-27
No files matched your search
@@ -7,6 +7,8 @@ package net.minecraftforge.server;
|
||||
|
||||
import static net.minecraftforge.fml.Logging.CORE;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -35,7 +37,6 @@ import net.minecraftforge.fml.ModLoadingStage;
|
||||
import net.minecraftforge.fml.ModLoadingWarning;
|
||||
import net.minecraftforge.network.ConnectionType;
|
||||
import net.minecraftforge.network.NetworkConstants;
|
||||
import net.minecraftforge.network.ServerStatusPing;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
import net.minecraftforge.network.NetworkRegistry;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
@@ -62,7 +63,6 @@ import net.minecraftforge.event.server.ServerStartedEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.event.server.ServerStoppedEvent;
|
||||
import net.minecraftforge.event.server.ServerStoppingEvent;
|
||||
import net.minecraftforge.fml.loading.FileUtils;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.GameData;
|
||||
@@ -79,7 +79,13 @@ public class ServerLifecycleHooks
|
||||
private static Path getServerConfigPath(final MinecraftServer server)
|
||||
{
|
||||
final Path serverConfig = server.getWorldPath(SERVERCONFIG);
|
||||
FileUtils.getOrCreateDirectory(serverConfig, "serverconfig");
|
||||
if (!Files.isDirectory(serverConfig)) {
|
||||
try {
|
||||
Files.createDirectories(serverConfig);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return serverConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ import org.joml.Quaternionf;
|
||||
/**
|
||||
* This mod is testing the use of {@link RenderLevelStageEvent} and is a modifaction of a pre-existing test mod that used the old
|
||||
* {@link RenderLevelLastEvent}. To restore the old behavior, set {@link #USE_LEVEL_RENDERER_STAGE} to false.
|
||||
*
|
||||
*
|
||||
* When you enter a world, there should be 6 sugar gliders rendering at (0, 120, 0) that test the various stages in {@link RenderLevelStageEvent}.
|
||||
* From left to right (with the sugar gliders facing you) they represent {@link Stage#AFTER_SKY}, {@link Stage#AFTER_SOLID_BLOCKS},
|
||||
* {@link Stage#AFTER_TRANSLUCENT_BLOCKS}, {@link Stage#AFTER_TRIPWIRE_BLOCKS}, {@link Stage#AFTER_PARTICLES}, and {@link Stage#AFTER_WEATHER}.
|
||||
* {@link Stage#AFTER_TRANSLUCENT_BLOCKS}, {@link Stage#AFTER_TRIPWIRE_BLOCKS}, {@link Stage#AFTER_PARTICLES}, and {@link Stage#AFTER_WEATHER}.
|
||||
* Due to how weather modifies the projection matrix, it's sugar glider will be positioned weirdly. Below each sugar gliders is a render of
|
||||
* blue stained glass to test translucency with fabulous graphics. {@link Stage#AFTER_PARTICLES} will render the stained glass using
|
||||
* {@link ForgeRenderTypes#TRANSLUCENT_ON_PARTICLES_TARGET}.
|
||||
@@ -63,7 +63,7 @@ public class RenderableTest
|
||||
public static final String MODID = "renderable_test";
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
public static final boolean ENABLED = true; // Renders at (0, 120, 0)
|
||||
public static final boolean ENABLED = false; // Renders at (0, 120, 0)
|
||||
public static final boolean USE_LEVEL_RENDERER_STAGE = true; // True when using RenderLevelStageEvent. False when using RenderLevelLastEvent
|
||||
|
||||
public RenderableTest()
|
||||
|
||||
Reference in new issue
Block a user