本文整理汇总了Java中net.minecraftforge.fml.common.FMLLog.fine方法的典型用法代码示例。如果您正苦于以下问题:Java FMLLog.fine方法的具体用法?Java FMLLog.fine怎么用?Java FMLLog.fine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.FMLLog
的用法示例。
在下文中一共展示了FMLLog.fine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: revertToFrozen
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public static void revertToFrozen()
{
if (!PersistentRegistry.FROZEN.isPopulated())
{
FMLLog.warning("Can't revert to frozen GameData state without freezing first.");
return;
}
else
{
FMLLog.fine("Reverting to frozen data state.");
}
for (Map.Entry<ResourceLocation, FMLControlledNamespacedRegistry<?>> r : PersistentRegistry.ACTIVE.registries.entrySet())
{
final Class<? extends IForgeRegistryEntry> registrySuperType = PersistentRegistry.ACTIVE.getRegistrySuperType(r.getKey());
loadRegistry(r.getKey(), PersistentRegistry.FROZEN, PersistentRegistry.ACTIVE, registrySuperType);
}
// the id mapping has reverted, fire remap events for those that care about id changes
Loader.instance().fireRemapEvent(ImmutableMap.<ResourceLocation, Integer[]>of(), ImmutableMap.<ResourceLocation, Integer[]>of(), true);
// the id mapping has reverted, ensure we sync up the object holders
ObjectHolderRegistry.INSTANCE.applyObjectHolders();
FMLLog.fine("Frozen state restored.");
}
示例2: fromBytes
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buffer)
{
serverProtocolVersion = buffer.readByte();
// Extended dimension support during login
if (serverProtocolVersion > 1)
{
overrideDimension = buffer.readInt();
FMLLog.fine("Server FML protocol version %d, 4 byte dimension received %d", serverProtocolVersion, overrideDimension);
}
else
{
FMLLog.info("Server FML protocol version %d, no additional data received", serverProtocolVersion);
}
}
示例3: userEventTriggered
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
{
S state = ctx.attr(fmlHandshakeState).get();
FMLLog.fine(stateType.getSimpleName() + ": null->" + state.getClass().getName().substring(state.getClass().getName().lastIndexOf('.')+1)+":"+state);
S newState = state.accept(ctx, null);
FMLLog.fine(" Next: " + newState.name());
ctx.attr(fmlHandshakeState).set(newState);
}
示例4: findModDirMods
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public void findModDirMods(File modsDir, File[] supplementalModFileCandidates)
{
File[] modList = FileListHelper.sortFileList(modsDir, null);
modList = FileListHelper.sortFileList(ObjectArrays.concat(modList, supplementalModFileCandidates, File.class));
for (File modFile : modList)
{
// skip loaded coremods
if (CoreModManager.getIgnoredMods().contains(modFile.getName()))
{
FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
}
else if (modFile.isDirectory())
{
FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
addCandidate(new ModCandidate(modFile, modFile, ContainerType.DIR));
}
else
{
Matcher matcher = zipJar.matcher(modFile.getName());
if (matcher.matches())
{
FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
addCandidate(new ModCandidate(modFile, modFile, ContainerType.JAR));
}
else
{
FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
}
}
}
}
示例5: discover
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
@Override
public List<ModContainer> discover(ModCandidate candidate, ASMDataTable table)
{
this.table = table;
List<ModContainer> found = Lists.newArrayList();
FMLLog.fine("Examining directory %s for potential mods", candidate.getModContainer().getName());
exploreFileSystem("", candidate.getModContainer(), found, candidate, null);
for (ModContainer mc : found)
{
table.addContainer(mc);
}
return found;
}
示例6: doModEntityRegistration
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
private void doModEntityRegistration(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod);
EntityRegistration er = new EntityRegistration(mc, entityClass, entityName, id, trackingRange, updateFrequency, sendsVelocityUpdates);
try
{
entityClassRegistrations.put(entityClass, er);
entityNames.put(entityName, mc);
if (!EntityList.CLASS_TO_NAME.containsKey(entityClass))
{
String entityModName = String.format("%s.%s", mc.getModId(), entityName);
EntityList.CLASS_TO_NAME.put(entityClass, entityModName);
EntityList.NAME_TO_CLASS.put(entityModName, entityClass);
FMLLog.finer("Automatically registered mod %s entity %s as %s", mc.getModId(), entityName, entityModName);
}
else
{
FMLLog.fine("Skipping automatic mod %s entity registration for already registered class %s", mc.getModId(), entityClass.getName());
}
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.WARN, e, "The mod %s tried to register the entity (name,class) (%s,%s) one or both of which are already registered", mc.getModId(), entityName, entityClass.getName());
return;
}
entityRegistrations.put(mc, er);
}
示例7: registerEgg
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
/**
* Registers a spawn egg for the specified entity class.
* The class must already be registered in the EntityList.classToStringMapping.
* This can be done either by using the global ID system, or preferably the registerModEntity functions above.
* Once registered mob eggs can be created by using minecraft:spawn_egg with NBT entry 'entity_name' with
* value of the name this class is registered in the classToStringMapping with.
*
* @param entityClass The entity class
* @param primary Primary egg color
* @param secondary Secondary egg color
*
* @throws IllegalArgumentException if entityClass is not registered in classToStringMapping.
*
*/
public static void registerEgg(Class<? extends Entity> entityClass, int primary, int secondary)
{
if (EntityList.CLASS_TO_NAME.containsKey(entityClass))
{
String name = EntityList.CLASS_TO_NAME.get(entityClass);
EntityList.ENTITY_EGGS.put(name, new EntityList.EntityEggInfo(name, primary, secondary));
FMLLog.fine("Registering entity egg '%s' for %s", name, entityClass);
}
else
{
FMLLog.fine("Failed registering entity egg %s (No entity found)", entityClass.getName());
}
}
示例8: freezeData
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public static void freezeData()
{
FMLLog.fine("Freezing block and item id maps");
for (Map.Entry<ResourceLocation, FMLControlledNamespacedRegistry<?>> r : PersistentRegistry.ACTIVE.registries.entrySet())
{
// This has to be performed prior to invoking the method so the compiler can precompute the type bounds for the method
final Class<? extends IForgeRegistryEntry> registrySuperType = PersistentRegistry.ACTIVE.getRegistrySuperType(r.getKey());
loadRegistry(r.getKey(), PersistentRegistry.ACTIVE, PersistentRegistry.FROZEN, registrySuperType);
}
forAllRegistries(PersistentRegistry.FROZEN, ValidateRegistryFunction.OPERATION);
}
示例9: freezeVanilla
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public static void freezeVanilla()
{
FMLLog.fine("Creating vanilla freeze snapshot");
for (Map.Entry<ResourceLocation, FMLControlledNamespacedRegistry<?>> r : PersistentRegistry.ACTIVE.registries.entrySet())
{
// This has to be performed prior to invoking the method so the compiler can precompute the type bounds for the method
final Class<? extends IForgeRegistryEntry> registrySuperType = PersistentRegistry.ACTIVE.getRegistrySuperType(r.getKey());
loadRegistry(r.getKey(), PersistentRegistry.ACTIVE, PersistentRegistry.VANILLA, registrySuperType);
}
forAllRegistries(PersistentRegistry.VANILLA, ValidateRegistryFunction.OPERATION);
FMLLog.fine("Vanilla freeze snapshot created");
}
示例10: loadDummied
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public void loadDummied(Set<ResourceLocation> dummied)
{
if (DEBUG && dummied.size() > 0)
{
FMLLog.fine("Registry Dummy Load: [%s]", Joiner.on(", ").join(dummied));
}
this.dummiedLocations.addAll(dummied);
}
示例11: loadIds
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public void loadIds(Map<ResourceLocation, Integer> ids, Map<ResourceLocation, Integer> missingIds, Map<ResourceLocation, Integer[]> remappedIds, FMLControlledNamespacedRegistry<I> currentRegistry, ResourceLocation registryName)
{
for (Map.Entry<ResourceLocation, Integer> entry : ids.entrySet())
{
ResourceLocation itemName = entry.getKey();
int newId = entry.getValue();
int currId = currentRegistry.getId(itemName);
if (currId == -1)
{
FMLLog.info("Found a missing id from the world %s", itemName);
missingIds.put(entry.getKey(), newId);
continue; // no block/item -> nothing to add
}
else if (currId != newId)
{
FMLLog.fine("Fixed %s id mismatch %s: %d (init) -> %d (map).", registryName, itemName, currId, newId);
remappedIds.put(itemName, new Integer[] {currId, newId});
}
I obj = currentRegistry.getRaw(itemName);
I sub = obj;
// If we have an object in the originals set, we use that for initial adding - substitute activation will readd the substitute if neceessary later
if (currentRegistry.substitutionOriginals.containsKey(itemName))
{
obj = currentRegistry.substitutionOriginals.get(itemName);
}
add(newId, itemName, obj);
if (currentRegistry.substitutionOriginals.containsKey(itemName) && substitutionCallback != null)
{
substitutionCallback.onSubstituteActivated(slaves, sub, obj, itemName);
}
}
}
示例12: sortCraftManager
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public static void sortCraftManager()
{
bake();
FMLLog.fine("Sorting recipes");
warned.clear();
Collections.sort(CraftingManager.getInstance().getRecipeList(), INSTANCE);
}
示例13: getPriority
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
private static int getPriority(IRecipe recipe)
{
Class<?> cls = recipe.getClass();
Integer ret = priorities.get(cls);
if (ret == null)
{
if (!warned.contains(cls))
{
FMLLog.bigWarning("Unknown recipe class! %s Modders need to register their recipe types with %s", cls.getName(), RecipeSorter.class.getName());
warned.add(cls);
}
cls = cls.getSuperclass();
while (cls != Object.class)
{
ret = priorities.get(cls);
if (ret != null)
{
priorities.put(recipe.getClass(), ret);
FMLLog.fine(" Parent Found: %d - %s", ret, cls.getName());
return ret;
}
}
}
return ret == null ? 0 : ret;
}
示例14: loadData
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public static void loadData(ASMDataTable data)
{
FMLLog.fine("Loading @Config anotation data");
for (ASMData target : data.getAll(Config.class.getName()))
{
String modid = (String)target.getAnnotationInfo().get("modid");
Multimap<Config.Type, ASMData> map = asm_data.get(modid);
if (map == null)
{
map = ArrayListMultimap.create();
asm_data.put(modid, map);
}
EnumHolder tholder = (EnumHolder)target.getAnnotationInfo().get("type");
Config.Type type = tholder == null ? Config.Type.INSTANCE : Config.Type.valueOf(tholder.getValue());
map.put(type, target);
}
}
示例15: setOverrideDimension
import net.minecraftforge.fml.common.FMLLog; //导入方法依赖的package包/类
public void setOverrideDimension(int overrideDim) {
this.overrideLoginDim = overrideDim;
FMLLog.fine("Received override dimension %d", overrideDim);
}