Some more stuffs. ObjectHolder's replacement?

This commit is contained in:
cpw authored and LexManos committed 2018-09-05 11:58:31 -07:00
1 parent baa9dfe55a
commit 06b16aaa19
47 files changed
+987 -269

No files matched your search

@@ -19,18 +19,18 @@
package net.minecraftforge.fml.common;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Function;
import java.util.stream.Collectors;
import com.google.common.base.Joiner;
import net.minecraftforge.api.Side;
import net.minecraftforge.fml.SidedExecutor;
import net.minecraftforge.fml.SidedProvider;
import net.minecraftforge.fml.client.SplashProgress;
import org.apache.logging.log4j.message.MessageFormatMessage;
import org.apache.logging.log4j.message.StringFormattedMessage;
import org.lwjgl.LWJGLUtil;
import org.lwjgl.opengl.Display;
import static net.minecraftforge.fml.Logging.SPLASH;
import static net.minecraftforge.fml.Logging.fmlLog;
@@ -121,7 +121,7 @@ public class ProgressManager
public void step(Class<?> classToName, String... extra)
{
step(ClassNameUtils.shortName(classToName)+Joiner.on(' ').join(extra));
step(ClassNameUtils.shortName(classToName)+ Arrays.stream(extra).collect(Collectors.joining(" ")));
}
public void step(String message)
@@ -133,9 +133,8 @@ public class ProgressManager
fmlLog.debug(SPLASH,new MessageFormatMessage("Bar Step: {0} - {1} took {2,number,0.000}ms", getTitle(), getMessage(), (newTime - lastTime) / 1.0e6));
lastTime = newTime;
}
step++;
this.message = FMLCommonHandler.instance().stripSpecialChars(message);
FMLCommonHandler.instance().processWindowMessages();
step += 1;
this.message = SidedProvider.STRIPCHARS.<Function<String, String>>get().apply(message);
}
public String getTitle()
@@ -0,0 +1,31 @@
/*
* Minecraft Forge
* Copyright (c) 2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.fml.common.event;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.ModContainer;
public class FMLClientInitEvent extends ModLifecycleEvent
{
public FMLClientInitEvent(Minecraft mc, ModContainer container)
{
super(container);
}
}
@@ -0,0 +1,31 @@
/*
* Minecraft Forge
* Copyright (c) 2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.fml.common.event;
import net.minecraft.server.MinecraftServer;
import net.minecraftforge.fml.ModContainer;
public class FMLServerInitEvent extends ModLifecycleEvent
{
public FMLServerInitEvent(MinecraftServer server, ModContainer container)
{
super(container);
}
}