Working on the ticking stuff
This commit is contained in:
parent
55d252b657
commit
b6b5955404
16 changed files with 308 additions and 191 deletions
|
@ -33,12 +33,14 @@ import net.minecraft.src.NetworkManager;
|
|||
import net.minecraft.src.Packet1Login;
|
||||
import net.minecraft.src.Packet250CustomPayload;
|
||||
import net.minecraft.src.Packet3Chat;
|
||||
import net.minecraft.src.StringTranslate;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.WorldType;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IFMLSidedHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.ModContainer.TickType;
|
||||
import cpw.mods.fml.common.modloader.ModLoaderModContainer;
|
||||
|
||||
/**
|
||||
|
@ -133,19 +135,31 @@ public class FMLClientHandler implements IFMLSidedHandler
|
|||
/**
|
||||
* Every tick just before world and other ticks occur
|
||||
*/
|
||||
public void onPreTick()
|
||||
public void onPreWorldTick()
|
||||
{
|
||||
FMLCommonHandler.instance().gameTickStart();
|
||||
FMLCommonHandler.instance().worldTickStart();
|
||||
}
|
||||
|
||||
/**
|
||||
* Every tick just after world and other ticks occur
|
||||
*/
|
||||
public void onPostTick()
|
||||
public void onPostWorldTick()
|
||||
{
|
||||
FMLCommonHandler.instance().gameTickEnd();
|
||||
FMLCommonHandler.instance().worldTickEnd();
|
||||
}
|
||||
|
||||
public void onRenderTickStart(float partialTickTime) {
|
||||
for (ModContainer mod : Loader.getModList()) {
|
||||
mod.tickStart(TickType.RENDER, partialTickTime);
|
||||
}
|
||||
}
|
||||
|
||||
public void onRenderTickEnd(float partialTickTime) {
|
||||
for (ModContainer mod : Loader.getModList()) {
|
||||
mod.tickEnd(TickType.RENDER, partialTickTime);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Get the server instance
|
||||
*
|
||||
|
@ -506,4 +520,13 @@ public class FMLClientHandler implements IFMLSidedHandler
|
|||
{
|
||||
return client;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see cpw.mods.fml.common.IFMLSidedHandler#getCurrentLanguage()
|
||||
*/
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
return StringTranslate.func_20162_a().func_44024_c();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
/*
|
||||
* The FML Forge Mod Loader suite. Copyright (C) 2012 cpw
|
||||
*
|
||||
|
@ -12,7 +13,6 @@ package net.minecraft.src;
|
|||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -33,21 +33,22 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
* @param minecraftInstance
|
||||
* @return
|
||||
*/
|
||||
public final boolean doTickInGame(float clock, Object minecraftInstance)
|
||||
public final boolean doTickInGame(Object minecraftInstance, Object... data)
|
||||
{
|
||||
Minecraft mc = (Minecraft)minecraftInstance;
|
||||
Minecraft mc = (Minecraft) minecraftInstance;
|
||||
if (mc.field_6324_e != null)
|
||||
{
|
||||
return onTickInGame(mc);
|
||||
return onTickInGame((Float) data[0], mc);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public final boolean doTickInGui(float clock, Object minecraftInstance)
|
||||
|
||||
public final boolean doTickInGui(Object minecraftInstance, Object... data)
|
||||
{
|
||||
Minecraft mc = (Minecraft)minecraftInstance;
|
||||
Minecraft mc = (Minecraft) minecraftInstance;
|
||||
if (mc.field_40007_r != null)
|
||||
{
|
||||
return onTickInGUI(clock, mc, mc.field_6313_p);
|
||||
return onTickInGUI((Float)data[0], mc, mc.field_6313_p);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -55,25 +56,27 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
@Override
|
||||
public final void onCrafting(Object... craftingParameters)
|
||||
{
|
||||
takenFromCrafting((EntityPlayer)craftingParameters[0], (ItemStack)craftingParameters[1], (IInventory)craftingParameters[2]);
|
||||
takenFromCrafting((EntityPlayer) craftingParameters[0], (ItemStack) craftingParameters[1], (IInventory) craftingParameters[2]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onSmelting(Object... smeltingParameters)
|
||||
{
|
||||
takenFromFurnace((EntityPlayer)smeltingParameters[0], (ItemStack)smeltingParameters[1]);
|
||||
takenFromFurnace((EntityPlayer) smeltingParameters[0], (ItemStack) smeltingParameters[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean dispense(double x, double y, double z, byte xVelocity, byte zVelocity, Object... data)
|
||||
{
|
||||
return dispenseEntity((World)data[0], x, y, z, xVelocity, zVelocity, (ItemStack)data[1]);
|
||||
return dispenseEntity((World) data[0], x, y, z, xVelocity, zVelocity, (ItemStack) data[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onChat(Object... data)
|
||||
{
|
||||
return onChatMessageReceived((EntityPlayer)data[1], (Packet3Chat)data[0]);
|
||||
return onChatMessageReceived((EntityPlayer) data[1], (Packet3Chat) data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onPlayerLogin(Object player)
|
||||
{
|
||||
|
@ -83,19 +86,19 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
@Override
|
||||
public void onPlayerLogout(Object player)
|
||||
{
|
||||
onClientLogout((EntityPlayer)player);
|
||||
onClientLogout((EntityPlayer) player);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPlayerChangedDimension(Object player)
|
||||
{
|
||||
onClientDimensionChanged((EntityPlayer)player);
|
||||
onClientDimensionChanged((EntityPlayer) player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onPacket250Packet(Object... data)
|
||||
{
|
||||
onPacket250Received((EntityPlayer)data[1], (Packet250CustomPayload)data[0]);
|
||||
onPacket250Received((EntityPlayer) data[1], (Packet250CustomPayload) data[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -130,9 +133,12 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// BASEMOD API
|
||||
/**
|
||||
* Override if you wish to provide a fuel item for the furnace and return the fuel value of the item
|
||||
* Override if you wish to provide a fuel item for the furnace and return
|
||||
* the fuel value of the item
|
||||
*
|
||||
* @param id
|
||||
* @param metadata
|
||||
* @return
|
||||
|
@ -142,11 +148,15 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
return 0;
|
||||
}
|
||||
|
||||
public void addRenderer(Map<Class<? extends Entity>, Render> renderers) {
|
||||
|
||||
public void addRenderer(Map<Class<? extends Entity>, Render> renderers)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Override if you wish to perform some action other than just dispensing the item from the dispenser
|
||||
* Override if you wish to perform some action other than just dispensing
|
||||
* the item from the dispenser
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
|
@ -163,6 +173,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Override if you wish to generate Nether (Hell biome) blocks
|
||||
*
|
||||
* @param world
|
||||
* @param random
|
||||
* @param chunkX
|
||||
|
@ -174,6 +185,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Override if you wish to generate Overworld (not hell or the end) blocks
|
||||
*
|
||||
* @param world
|
||||
* @param random
|
||||
* @param chunkX
|
||||
|
@ -185,6 +197,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Return the name of your mod. Defaults to the class name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName()
|
||||
|
@ -194,6 +207,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Get your mod priorities
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getPriorities()
|
||||
|
@ -203,6 +217,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Return the version of your mod
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract String getVersion();
|
||||
|
@ -210,9 +225,11 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
/**
|
||||
* Load your mod
|
||||
*/
|
||||
public void keyboardEvent(KeyBinding event) {
|
||||
|
||||
public void keyboardEvent(KeyBinding event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public abstract void load();
|
||||
|
||||
/**
|
||||
|
@ -224,6 +241,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Handle item pickup
|
||||
*
|
||||
* @param player
|
||||
* @param item
|
||||
*/
|
||||
|
@ -232,11 +250,14 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
}
|
||||
|
||||
/**
|
||||
* Ticked every game tick if you have subscribed to tick events through {@link ModLoader#setInGameHook(BaseMod, boolean, boolean)}
|
||||
* @param minecraftServer the server
|
||||
* Ticked every game tick if you have subscribed to tick events through
|
||||
* {@link ModLoader#setInGameHook(BaseMod, boolean, boolean)}
|
||||
*
|
||||
* @param minecraftServer
|
||||
* the server
|
||||
* @return true to continue receiving ticks
|
||||
*/
|
||||
public boolean onTickInGame(Minecraft minecraftInstance)
|
||||
public boolean onTickInGame(float time, Minecraft minecraftInstance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -245,36 +266,46 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #onChatMessageReceived(EntityPlayer, Packet3Chat)}
|
||||
*
|
||||
* @param text
|
||||
*/
|
||||
public void receiveChatPacket(String text)
|
||||
{
|
||||
//TODO
|
||||
// TODO
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #onPacket250Received(EntityPlayer, Packet250CustomPayload)}
|
||||
*
|
||||
* @param packet
|
||||
*/
|
||||
public void receiveCustomPacket(Packet250CustomPayload packet)
|
||||
{
|
||||
//TODO
|
||||
// TODO
|
||||
}
|
||||
|
||||
public void registerAnimation(Minecraft game) {
|
||||
|
||||
public void registerAnimation(Minecraft game)
|
||||
{
|
||||
|
||||
}
|
||||
public void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID) {
|
||||
|
||||
|
||||
public void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID)
|
||||
{
|
||||
|
||||
}
|
||||
public boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID) {
|
||||
|
||||
public boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)
|
||||
{
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when someone crafts an item from a crafting table
|
||||
*
|
||||
* @param player
|
||||
* @param item
|
||||
* @param matrix
|
||||
|
@ -285,7 +316,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Called when someone takes a smelted item from a furnace
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @param item
|
||||
*/
|
||||
|
@ -304,7 +335,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
|
||||
/**
|
||||
* Called when a 250 packet is received on a channel registered to this mod
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @param payload
|
||||
*/
|
||||
|
@ -313,10 +344,13 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
}
|
||||
|
||||
/**
|
||||
* Called when a chat message is received. Return true to stop further processing
|
||||
* Called when a chat message is received. Return true to stop further
|
||||
* processing
|
||||
*
|
||||
* @param source
|
||||
* @param chat
|
||||
* @return true if you want to consume the message so it is not available for further processing
|
||||
* @return true if you want to consume the message so it is not available
|
||||
* for further processing
|
||||
*/
|
||||
public boolean onChatMessageReceived(EntityPlayer source, Packet3Chat chat)
|
||||
{
|
||||
|
@ -326,7 +360,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
/**
|
||||
* Called when a new client logs in.
|
||||
*
|
||||
* @param player
|
||||
* @param player
|
||||
*/
|
||||
public void onClientLogin(EntityPlayer player)
|
||||
{
|
||||
|
@ -339,7 +373,7 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
*/
|
||||
public void onClientLogout(EntityPlayer player)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -350,6 +384,6 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
|||
*/
|
||||
public void onClientDimensionChanged(EntityPlayer player)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ package net.minecraft.src;
|
|||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -25,7 +26,9 @@ import net.minecraft.client.Minecraft;
|
|||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer.TickType;
|
||||
import cpw.mods.fml.common.ReflectionHelper;
|
||||
import cpw.mods.fml.common.modloader.ModLoaderHelper;
|
||||
import cpw.mods.fml.common.modloader.ModLoaderModContainer;
|
||||
|
||||
public class ModLoader
|
||||
|
@ -822,17 +825,13 @@ public class ModLoader
|
|||
*/
|
||||
public static void setInGameHook(BaseMod mod, boolean enable, boolean useClock)
|
||||
{
|
||||
ModLoaderModContainer mlmc = (ModLoaderModContainer) ModLoaderModContainer.findContainerFor(mod);
|
||||
mlmc.setTicking(enable);
|
||||
mlmc.setClockTicks(useClock);
|
||||
ModLoaderHelper.updateStandardTicks(mod, enable, useClock);
|
||||
}
|
||||
|
||||
|
||||
public static void setInGUIHook(BaseMod mod, boolean enable, boolean useClock)
|
||||
{
|
||||
ModLoaderModContainer mlmc = (ModLoaderModContainer) ModLoaderModContainer.findContainerFor(mod);
|
||||
mlmc.setGUITicking(enable);
|
||||
mlmc.setGUIClockTicks(useClock);
|
||||
ModLoaderHelper.updateGUITicks(mod, enable, useClock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,22 +75,22 @@ public class FMLCommonHandler
|
|||
/**
|
||||
* Pre-tick the mods
|
||||
*/
|
||||
public void gameTickStart()
|
||||
public void worldTickStart()
|
||||
{
|
||||
for (ModContainer mod : Loader.getModList())
|
||||
{
|
||||
mod.tickStart();
|
||||
mod.tickStart(ModContainer.TickType.WORLD,0.0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Post-tick the mods
|
||||
*/
|
||||
public void gameTickEnd()
|
||||
public void worldTickEnd()
|
||||
{
|
||||
for (ModContainer mod : Loader.getModList())
|
||||
{
|
||||
mod.tickEnd();
|
||||
mod.tickEnd(ModContainer.TickType.WORLD,0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ public class FMLCommonHandler
|
|||
}
|
||||
langPack.put(key,value);
|
||||
|
||||
if (StringTranslate.func_20162_a().func_44024_c().equals(lang)) {
|
||||
if (sidedDelegate.getCurrentLanguage().equals(lang)) {
|
||||
handleLanguageLoad(langPack, lang);
|
||||
}
|
||||
}
|
||||
|
@ -317,4 +317,20 @@ public class FMLCommonHandler
|
|||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public boolean isServer()
|
||||
{
|
||||
return sidedDelegate.isServer();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public boolean isClient()
|
||||
{
|
||||
return sidedDelegate.isClient();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,13 +92,13 @@ public class FMLModContainer implements ModContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void tickStart()
|
||||
public void tickStart(TickType type, Object ... data)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickEnd()
|
||||
public void tickEnd(TickType type, Object ... data)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
|
|
@ -12,4 +12,5 @@ public interface IFMLSidedHandler
|
|||
boolean isServer();
|
||||
boolean isClient();
|
||||
Object getMinecraftInstance();
|
||||
String getCurrentLanguage();
|
||||
}
|
||||
|
|
|
@ -55,20 +55,14 @@ public interface ModContainer
|
|||
* @return
|
||||
*/
|
||||
String getName();
|
||||
/**
|
||||
* Should the mod tick
|
||||
* @param clock
|
||||
* @return
|
||||
*/
|
||||
boolean shouldTick(float clock);
|
||||
/**
|
||||
* A tick has started
|
||||
*/
|
||||
void tickStart(float clock);
|
||||
void tickStart(TickType tick, Object ... data);
|
||||
/**
|
||||
* A tick has ended
|
||||
*/
|
||||
void tickEnd(float clock);
|
||||
void tickEnd(TickType tick, Object ... data);
|
||||
/**
|
||||
* Does this mod match the supplied mod?
|
||||
* @param mod
|
||||
|
@ -175,4 +169,8 @@ public interface ModContainer
|
|||
boolean wantsPlayerTracking();
|
||||
|
||||
IPlayerTracker getPlayerTracker();
|
||||
|
||||
public enum TickType {
|
||||
WORLD, RENDER, GUI, WORLDGUI;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* The FML Forge Mod Loader suite.
|
||||
* Copyright (C) 2012 cpw
|
||||
*
|
||||
* 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; either version 2.1 of the License, or any later version.
|
||||
*
|
||||
* 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 cpw.mods.fml.common.modloader;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.src.BaseMod;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ModContainer.TickType;
|
||||
|
||||
/**
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public class ModLoaderHelper
|
||||
{
|
||||
private static Map<BaseMod, ModLoaderModContainer> tickers=new HashMap<BaseMod, ModLoaderModContainer>();
|
||||
|
||||
public static void updateStandardTicks(BaseMod mod, boolean enable, boolean useClock)
|
||||
{
|
||||
ModLoaderModContainer mlmc=(ModLoaderModContainer) ModLoaderModContainer.findContainerFor(mod);
|
||||
if (mlmc==null) {
|
||||
mlmc=tickers.get(mod);
|
||||
if (mlmc==null) {
|
||||
mlmc=new ModLoaderModContainer(mod);
|
||||
tickers.put(mod, mlmc);
|
||||
}
|
||||
}
|
||||
EnumSet<TickType> ticks = mlmc.getTickTypes();
|
||||
// If we're enabled and we don't want clock ticks we get render ticks
|
||||
if (enable && !useClock && FMLCommonHandler.instance().isClient()) {
|
||||
ticks.add(TickType.RENDER);
|
||||
} else {
|
||||
ticks.remove(TickType.RENDER);
|
||||
}
|
||||
// If we're enabled but we want clock ticks, or we're server side we get world ticks
|
||||
if (enable && (useClock || FMLCommonHandler.instance().isServer())) {
|
||||
ticks.add(TickType.WORLD);
|
||||
} else {
|
||||
ticks.remove(TickType.WORLD);
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateGUITicks(BaseMod mod, boolean enable, boolean useClock)
|
||||
{
|
||||
ModLoaderModContainer mlmc=(ModLoaderModContainer) ModLoaderModContainer.findContainerFor(mod);
|
||||
if (mlmc==null) {
|
||||
mlmc=tickers.get(mod);
|
||||
if (mlmc==null) {
|
||||
mlmc=new ModLoaderModContainer(mod);
|
||||
tickers.put(mod, mlmc);
|
||||
}
|
||||
}
|
||||
EnumSet<TickType> ticks = mlmc.getTickTypes();
|
||||
// If we're enabled and we don't want clock ticks we get render ticks
|
||||
if (enable && !useClock && FMLCommonHandler.instance().isClient()) {
|
||||
ticks.add(TickType.GUI);
|
||||
} else {
|
||||
ticks.remove(TickType.GUI);
|
||||
}
|
||||
// If we're enabled but we want clock ticks, or we're server side we get world ticks
|
||||
if (enable && (useClock || FMLCommonHandler.instance().isServer())) {
|
||||
ticks.add(TickType.WORLDGUI);
|
||||
} else {
|
||||
ticks.remove(TickType.WORLDGUI);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,10 @@ import java.io.IOException;
|
|||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
|
@ -37,26 +40,29 @@ import cpw.mods.fml.common.IWorldGenerator;
|
|||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.LoaderException;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.ModContainer.TickType;
|
||||
|
||||
public class ModLoaderModContainer implements ModContainer
|
||||
{
|
||||
private Class <? extends BaseMod > modClazz;
|
||||
private BaseMod mod;
|
||||
private boolean isTicking;
|
||||
private File modSource ;
|
||||
private EnumSet<TickType> ticks;
|
||||
private File modSource;
|
||||
private ArrayList<String> dependencies;
|
||||
private ArrayList<String> preDependencies;
|
||||
private ArrayList<String> postDependencies;
|
||||
private boolean clockTicks;
|
||||
private boolean guiTicks;
|
||||
private boolean guiClockTicks;
|
||||
private long lastClock;
|
||||
public ModLoaderModContainer(Class <? extends BaseMod > modClazz, File modSource)
|
||||
{
|
||||
this.modClazz = modClazz;
|
||||
this.modSource = modSource;
|
||||
this.ticks = EnumSet.noneOf(TickType.class);
|
||||
}
|
||||
|
||||
ModLoaderModContainer(BaseMod instance) {
|
||||
this.mod=instance;
|
||||
this.ticks = EnumSet.noneOf(TickType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wantsPreInit()
|
||||
{
|
||||
|
@ -282,36 +288,19 @@ public class ModLoaderModContainer implements ModContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTick(float clock)
|
||||
public void tickStart(TickType tick, Object ... data)
|
||||
{
|
||||
if (isTicking && (!clockTicks || clock != lastClock))
|
||||
{
|
||||
return true;
|
||||
if (ticks.contains(tick) && tick==TickType.WORLD) {
|
||||
mod.doTickInGame(FMLCommonHandler.instance().getMinecraftInstance(), data);
|
||||
}
|
||||
if (guiTicks && (!guiClockTicks || clock != lastClock))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickStart(float clock)
|
||||
public void tickEnd(TickType tick, Object ... data)
|
||||
{
|
||||
Object inst = FMLCommonHandler.instance().getMinecraftInstance();
|
||||
if (isTicking)
|
||||
{
|
||||
isTicking = mod.doTickInGame(clock, inst);
|
||||
if (ticks.contains(tick) && tick!=TickType.WORLD) {
|
||||
mod.doTickInGame(FMLCommonHandler.instance().getMinecraftInstance(), data);
|
||||
}
|
||||
if (guiTicks)
|
||||
{
|
||||
guiTicks = mod.doTickInGui(clock, inst);
|
||||
}
|
||||
lastClock = clock;
|
||||
}
|
||||
@Override
|
||||
public void tickEnd(float clock)
|
||||
{
|
||||
// NOOP for modloader
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -339,9 +328,9 @@ public class ModLoaderModContainer implements ModContainer
|
|||
return modClazz.isInstance(mod);
|
||||
}
|
||||
|
||||
public void setTicking(boolean enable)
|
||||
public void setTickType(EnumSet<TickType> type)
|
||||
{
|
||||
isTicking = enable;
|
||||
this.ticks=EnumSet.copyOf(type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -551,26 +540,10 @@ public class ModLoaderModContainer implements ModContainer
|
|||
}
|
||||
|
||||
/**
|
||||
* @param useClock
|
||||
* @return
|
||||
*/
|
||||
public void setClockTicks(boolean useClock)
|
||||
public EnumSet<TickType> getTickTypes()
|
||||
{
|
||||
this.clockTicks=useClock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enable
|
||||
*/
|
||||
public void setGUITicking(boolean enable)
|
||||
{
|
||||
this.guiTicks=enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param useClock
|
||||
*/
|
||||
public void setGUIClockTicks(boolean useClock)
|
||||
{
|
||||
this.guiClockTicks=useClock;
|
||||
return ticks;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,19 +25,29 @@
|
|||
this.func_6250_c("Startup");
|
||||
this.field_6286_O = new OpenGlCapsChecker();
|
||||
this.field_6301_A.func_340_a(this.field_6304_y);
|
||||
@@ -1340,6 +1344,7 @@
|
||||
@@ -745,7 +749,9 @@
|
||||
}
|
||||
|
||||
Profiler.func_40661_c("gameRenderer");
|
||||
+ FMLClientHandler.instance().onRenderTickStart(this.field_9237_P.field_1378_c);
|
||||
this.field_9243_r.func_4136_b(this.field_9237_P.field_1378_c);
|
||||
+ FMLClientHandler.instance().onRenderTickEnd(this.field_9237_P.field_1378_c);
|
||||
Profiler.func_40662_b();
|
||||
}
|
||||
|
||||
@@ -1340,6 +1346,7 @@
|
||||
this.func_28001_B();
|
||||
}
|
||||
|
||||
+ FMLClientHandler.instance().onPreTick();
|
||||
+ FMLClientHandler.instance().onPreWorldTick();
|
||||
Profiler.func_40663_a("stats");
|
||||
this.field_25001_G.func_27178_d();
|
||||
Profiler.func_40661_c("gui");
|
||||
@@ -1730,6 +1735,7 @@
|
||||
@@ -1730,6 +1737,7 @@
|
||||
}
|
||||
|
||||
Profiler.func_40662_b();
|
||||
+ FMLClientHandler.instance().onPostTick();
|
||||
+ FMLClientHandler.instance().onPostWorldTick();
|
||||
this.field_6287_N = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
{
|
||||
Tessellator var5 = Tessellator.field_1512_a;
|
||||
int var6 = this.field_1772_a.func_602_e(p_22331_2_, p_22331_3_, p_22331_4_);
|
||||
@@ -313,7 +344,7 @@
|
||||
@@ -310,7 +341,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@
|
|||
{
|
||||
p_40730_1_.func_213_a(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F);
|
||||
this.func_1228_k(p_40730_1_, p_40730_2_, p_40730_3_, p_40730_4_);
|
||||
@@ -387,7 +418,7 @@
|
||||
@@ -384,7 +415,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@
|
|||
{
|
||||
this.func_1228_k(p_40728_1_, p_40728_2_, p_40728_3_, p_40728_4_);
|
||||
Tessellator var5 = Tessellator.field_1512_a;
|
||||
@@ -470,7 +501,7 @@
|
||||
@@ -467,7 +498,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@
|
|||
{
|
||||
int var5 = this.field_1772_a.func_602_e(p_22332_2_, p_22332_3_, p_22332_4_);
|
||||
int var6 = var5 & 3;
|
||||
@@ -563,7 +594,7 @@
|
||||
@@ -557,7 +588,7 @@
|
||||
this.field_1773_d = false;
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@
|
|||
{
|
||||
int var6 = this.field_1772_a.func_602_e(p_31074_2_, p_31074_3_, p_31074_4_);
|
||||
boolean var7 = p_31074_5_ || (var6 & 8) != 0;
|
||||
@@ -676,7 +707,7 @@
|
||||
@@ -660,7 +691,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@
|
|||
{
|
||||
int var16 = 108;
|
||||
|
||||
@@ -699,7 +730,7 @@
|
||||
@@ -683,7 +714,7 @@
|
||||
var19.func_983_a(p_31076_3_, p_31076_7_, p_31076_11_, var24, var26);
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@
|
|||
{
|
||||
int var16 = 108;
|
||||
|
||||
@@ -722,7 +753,7 @@
|
||||
@@ -706,7 +737,7 @@
|
||||
var19.func_983_a(p_31081_3_, p_31081_7_, p_31081_11_, var24, var26);
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@
|
|||
{
|
||||
int var16 = 108;
|
||||
|
||||
@@ -752,7 +783,7 @@
|
||||
@@ -736,7 +767,7 @@
|
||||
this.field_1773_d = false;
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@
|
|||
{
|
||||
int var6 = this.field_1772_a.func_602_e(p_31080_2_, p_31080_3_, p_31080_4_);
|
||||
int var7 = BlockPistonExtension.func_31050_c(var6);
|
||||
@@ -2728,7 +2759,7 @@
|
||||
@@ -2707,7 +2738,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@
|
|||
{
|
||||
int var5 = 0;
|
||||
float var6 = 0.0F;
|
||||
@@ -3260,7 +3291,7 @@
|
||||
@@ -3239,7 +3270,7 @@
|
||||
var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 2);
|
||||
this.func_1220_c(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27);
|
||||
|
||||
|
@ -324,7 +324,7 @@
|
|||
{
|
||||
this.field_22351_H *= p_22330_5_;
|
||||
this.field_22350_I *= p_22330_5_;
|
||||
@@ -3383,7 +3414,7 @@
|
||||
@@ -3362,7 +3393,7 @@
|
||||
var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 3);
|
||||
this.func_1225_d(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 3));
|
||||
|
||||
|
@ -333,7 +333,7 @@
|
|||
{
|
||||
this.field_22351_H *= p_22330_5_;
|
||||
this.field_22350_I *= p_22330_5_;
|
||||
@@ -3506,7 +3537,7 @@
|
||||
@@ -3485,7 +3516,7 @@
|
||||
var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 4);
|
||||
this.func_1231_e(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27);
|
||||
|
||||
|
@ -342,7 +342,7 @@
|
|||
{
|
||||
this.field_22351_H *= p_22330_5_;
|
||||
this.field_22350_I *= p_22330_5_;
|
||||
@@ -3629,7 +3660,7 @@
|
||||
@@ -3608,7 +3639,7 @@
|
||||
var27 = p_22330_1_.func_211_a(this.field_1772_a, p_22330_2_, p_22330_3_, p_22330_4_, 5);
|
||||
this.func_1236_f(p_22330_1_, (double)p_22330_2_, (double)p_22330_3_, (double)p_22330_4_, var27);
|
||||
|
||||
|
@ -351,7 +351,7 @@
|
|||
{
|
||||
this.field_22351_H *= p_22330_5_;
|
||||
this.field_22350_I *= p_22330_5_;
|
||||
@@ -3653,7 +3684,7 @@
|
||||
@@ -3632,7 +3663,7 @@
|
||||
return var8;
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@
|
|||
{
|
||||
if (p_35924_1_ == 0)
|
||||
{
|
||||
@@ -3735,7 +3766,7 @@
|
||||
@@ -3714,7 +3745,7 @@
|
||||
var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 2);
|
||||
this.func_1220_c(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28);
|
||||
|
||||
|
@ -369,7 +369,7 @@
|
|||
{
|
||||
var8.func_987_a(var18 * p_4152_5_, var21 * p_4152_6_, var24 * p_4152_7_);
|
||||
this.func_1220_c(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38);
|
||||
@@ -3751,7 +3782,7 @@
|
||||
@@ -3730,7 +3761,7 @@
|
||||
var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 3);
|
||||
this.func_1225_d(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28);
|
||||
|
||||
|
@ -378,7 +378,7 @@
|
|||
{
|
||||
var8.func_987_a(var18 * p_4152_5_, var21 * p_4152_6_, var24 * p_4152_7_);
|
||||
this.func_1225_d(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38);
|
||||
@@ -3767,7 +3798,7 @@
|
||||
@@ -3746,7 +3777,7 @@
|
||||
var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 4);
|
||||
this.func_1231_e(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28);
|
||||
|
||||
|
@ -387,7 +387,7 @@
|
|||
{
|
||||
var8.func_987_a(var19 * p_4152_5_, var22 * p_4152_6_, var25 * p_4152_7_);
|
||||
this.func_1231_e(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38);
|
||||
@@ -3783,7 +3814,7 @@
|
||||
@@ -3762,7 +3793,7 @@
|
||||
var28 = p_4152_1_.func_211_a(this.field_1772_a, p_4152_2_, p_4152_3_, p_4152_4_, 5);
|
||||
this.func_1236_f(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, var28);
|
||||
|
||||
|
@ -396,7 +396,7 @@
|
|||
{
|
||||
var8.func_987_a(var19 * p_4152_5_, var22 * p_4152_6_, var25 * p_4152_7_);
|
||||
this.func_1236_f(p_4152_1_, (double)p_4152_2_, (double)p_4152_3_, (double)p_4152_4_, 38);
|
||||
@@ -5291,6 +5322,10 @@
|
||||
@@ -5270,6 +5301,10 @@
|
||||
|
||||
p_1227_1_.func_213_a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -407,7 +407,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -5347,6 +5382,17 @@
|
||||
@@ -5326,6 +5361,17 @@
|
||||
|
||||
public static boolean func_1219_a(int p_1219_0_)
|
||||
{
|
||||
|
|
|
@ -1,56 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/src/WorldType.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft/net/minecraft/src/WorldType.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
+import static net.minecraft.src.BiomeGenBase.*;
|
||||
+
|
||||
+import java.util.Arrays;
|
||||
+import java.util.List;
|
||||
+
|
||||
public class WorldType
|
||||
{
|
||||
public static final WorldType[] field_48637_a = new WorldType[16];
|
||||
@@ -10,6 +15,8 @@
|
||||
private final int field_48632_f;
|
||||
private boolean field_48633_g;
|
||||
private boolean field_48638_h;
|
||||
+
|
||||
+ private BiomeGenBase[] biomesForWorldType;
|
||||
|
||||
private WorldType(int p_i1080_1_, String p_i1080_2_)
|
||||
{
|
||||
@@ -22,6 +29,15 @@
|
||||
this.field_48632_f = p_i1081_3_;
|
||||
this.field_48633_g = true;
|
||||
field_48637_a[p_i1081_1_] = this;
|
||||
+ switch(p_i1081_1_)
|
||||
+ {
|
||||
+ case 8:
|
||||
+ biomesForWorldType = new BiomeGenBase[]{field_4249_h, field_4253_d, field_35483_e, field_4255_b, field_35485_c, field_4250_g};
|
||||
+ break;
|
||||
+ default:
|
||||
+ biomesForWorldType = new BiomeGenBase[]{field_4249_h, field_4253_d, field_35483_e, field_4255_b, field_35485_c, field_4250_g, field_48416_w};
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
public String func_48628_a()
|
||||
@@ -78,4 +94,17 @@
|
||||
@@ -78,4 +78,11 @@
|
||||
|
||||
return null;
|
||||
}
|
||||
+
|
||||
+ public BiomeGenBase[] getBiomesForWorldType()
|
||||
+ {
|
||||
+ return biomesForWorldType;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /**
|
||||
+ * @param biome
|
||||
+ */
|
||||
+ public void addNewBiome(BiomeGenBase biome)
|
||||
+ {
|
||||
+ List<BiomeGenBase> biomes = Arrays.asList(biomesForWorldType);
|
||||
+ biomes.add(biome);
|
||||
+ biomesForWorldType = biomes.toArray(new BiomeGenBase[0]);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft_server/net/minecraft/src/StringTranslate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src-work/minecraft_server/net/minecraft/src/StringTranslate.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -139,4 +139,8 @@
|
||||
String var3 = this.field_25081_b.getProperty(p_25078_1_, p_25078_1_);
|
||||
return String.format(var3, p_25078_2_);
|
||||
}
|
||||
+
|
||||
+ public String getCurrentLanguage() {
|
||||
+ return this.field_44012_d;
|
||||
+ }
|
||||
}
|
|
@ -35,6 +35,7 @@ import net.minecraft.src.Packet1Login;
|
|||
import net.minecraft.src.Packet250CustomPayload;
|
||||
import net.minecraft.src.Packet3Chat;
|
||||
import net.minecraft.src.ServerRegistry;
|
||||
import net.minecraft.src.StringTranslate;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.WorldType;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
@ -134,7 +135,7 @@ public class FMLServerHandler implements IFMLSidedHandler
|
|||
*/
|
||||
public void onPreTick()
|
||||
{
|
||||
FMLCommonHandler.instance().gameTickStart();
|
||||
FMLCommonHandler.instance().worldTickStart();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,7 +143,7 @@ public class FMLServerHandler implements IFMLSidedHandler
|
|||
*/
|
||||
public void onPostTick()
|
||||
{
|
||||
FMLCommonHandler.instance().gameTickEnd();
|
||||
FMLCommonHandler.instance().worldTickEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -556,4 +557,13 @@ public class FMLServerHandler implements IFMLSidedHandler
|
|||
{
|
||||
return server;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see cpw.mods.fml.common.IFMLSidedHandler#getCurrentLanguage()
|
||||
*/
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
return StringTranslate.func_25079_a().getCurrentLanguage();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import cpw.mods.fml.common.IWorldGenerator;
|
|||
public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDispenseHandler, ICraftingHandler, INetworkHandler, IConsoleHandler, IPlayerTracker
|
||||
{
|
||||
// CALLBACK MECHANISMS
|
||||
public boolean doTickInGame(Object minecraftInstance)
|
||||
public boolean doTickInGame(Object minecraftInstance, Object ... data)
|
||||
{
|
||||
return onTickInGame((MinecraftServer)minecraftInstance);
|
||||
}
|
||||
|
|
|
@ -12,13 +12,16 @@
|
|||
*/
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer.TickType;
|
||||
import cpw.mods.fml.common.ReflectionHelper;
|
||||
import cpw.mods.fml.common.modloader.ModLoaderHelper;
|
||||
import cpw.mods.fml.common.modloader.ModLoaderModContainer;
|
||||
import cpw.mods.fml.server.FMLServerHandler;
|
||||
|
||||
|
@ -521,8 +524,7 @@ public class ModLoader
|
|||
*/
|
||||
public static void setInGameHook(BaseMod mod, boolean enable, boolean useClock)
|
||||
{
|
||||
ModLoaderModContainer mlmc = (ModLoaderModContainer) ModLoaderModContainer.findContainerFor(mod);
|
||||
mlmc.setTicking(enable);
|
||||
ModLoaderHelper.updateStandardTicks(mod, enable, useClock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue