mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 22:14:32 +00:00
1.9.4 Update.
Major things to note: Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86 Tile Entities are now packed in the ChunkData packet. Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to! Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to! Added support for package-info.java's containing @Nullable information for all MC code base.
This commit is contained in:
1 parent
5d5c005aae
commit
b9ac73b0f1
257 files changed
+2398
-1919
No files matched your search
@@ -68,7 +68,7 @@ import net.minecraft.util.IThreadListener;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.storage.SaveFormatComparator;
|
||||
import net.minecraft.world.storage.WorldSummary;
|
||||
import net.minecraft.world.storage.SaveFormatOld;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
@@ -683,7 +683,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
return new File(client.mcDataDir, "saves");
|
||||
}
|
||||
public void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, SaveFormatComparator comparator)
|
||||
public void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, WorldSummary comparator)
|
||||
{
|
||||
File dir = new File(getSavesDir(), comparator.getFileName());
|
||||
NBTTagCompound leveldat;
|
||||
|
||||
@@ -366,7 +366,7 @@ public class FMLCommonHandler
|
||||
{
|
||||
for (ICrashCallable call: crashCallables)
|
||||
{
|
||||
category.addCrashSectionCallable(call.getLabel(), call);
|
||||
category.func_189529_a(call.getLabel(), call);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.common;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import net.minecraft.crash.ICrashReportDetail;
|
||||
|
||||
public interface ICrashCallable extends Callable<String>
|
||||
public interface ICrashCallable extends ICrashReportDetail<String>
|
||||
{
|
||||
String getLabel();
|
||||
}
|
||||
@@ -22,8 +22,8 @@ import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityTracker;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.SpawnListEntry;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
@@ -326,9 +326,9 @@ public class EntityRegistry
|
||||
* @param typeOfCreature Type of spawn
|
||||
* @param biomes List of biomes
|
||||
*/
|
||||
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
|
||||
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
|
||||
{
|
||||
for (BiomeGenBase biome : biomes)
|
||||
for (Biome biome : biomes)
|
||||
{
|
||||
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
|
||||
|
||||
@@ -358,7 +358,7 @@ public class EntityRegistry
|
||||
* @param biomes List of biomes
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
|
||||
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
|
||||
{
|
||||
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
|
||||
|
||||
@@ -374,9 +374,9 @@ public class EntityRegistry
|
||||
* @param typeOfCreature type of spawn
|
||||
* @param biomes Biomes to remove from
|
||||
*/
|
||||
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
|
||||
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, Biome... biomes)
|
||||
{
|
||||
for (BiomeGenBase biome : biomes)
|
||||
for (Biome biome : biomes)
|
||||
{
|
||||
Iterator<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature).iterator();
|
||||
|
||||
@@ -398,7 +398,7 @@ public class EntityRegistry
|
||||
* @param biomes Biomes to remove from
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
|
||||
public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, Biome... biomes)
|
||||
{
|
||||
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionType;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ public class ForgeRegistries
|
||||
public static final IForgeRegistry<Block> BLOCKS = GameRegistry.findRegistry(Block.class);
|
||||
public static final IForgeRegistry<Item> ITEMS = GameRegistry.findRegistry(Item.class);
|
||||
public static final IForgeRegistry<Potion> POTIONS = GameRegistry.findRegistry(Potion.class);
|
||||
public static final IForgeRegistry<BiomeGenBase> BIOMES = GameRegistry.findRegistry(BiomeGenBase.class);
|
||||
public static final IForgeRegistry<Biome> BIOMES = GameRegistry.findRegistry(Biome.class);
|
||||
public static final IForgeRegistry<SoundEvent> SOUND_EVENTS = GameRegistry.findRegistry(SoundEvent.class);
|
||||
public static final IForgeRegistry<PotionType> POTION_TYPES = GameRegistry.findRegistry(PotionType.class);
|
||||
public static final IForgeRegistry<Enchantment> ENCHANTMENTS = GameRegistry.findRegistry(Enchantment.class);
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.util.ObjectIntIdentityMap;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.registry.RegistryNamespaced;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.ModContainer;
|
||||
@@ -61,7 +61,7 @@ public class GameData
|
||||
iBlockRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BLOCKS, Block.class, new ResourceLocation("minecraft:air"), MIN_BLOCK_ID, MAX_BLOCK_ID, true, BlockCallbacks.INSTANCE, BlockCallbacks.INSTANCE, BlockCallbacks.INSTANCE);
|
||||
iItemRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.ITEMS, Item.class, null, MIN_ITEM_ID, MAX_ITEM_ID, true, ItemCallbacks.INSTANCE, ItemCallbacks.INSTANCE, ItemCallbacks.INSTANCE);
|
||||
iPotionRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.POTIONS, Potion.class, null, MIN_POTION_ID, MAX_POTION_ID, false, PotionCallbacks.INSTANCE, PotionCallbacks.INSTANCE, PotionCallbacks.INSTANCE);
|
||||
iBiomeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BIOMES, BiomeGenBase.class, null, MIN_BIOME_ID, MAX_BIOME_ID, false, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE);
|
||||
iBiomeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BIOMES, Biome.class, null, MIN_BIOME_ID, MAX_BIOME_ID, false, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE);
|
||||
iSoundEventRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.SOUNDEVENTS, SoundEvent.class, null, MIN_SOUND_ID, MAX_SOUND_ID, false, null, null, null);
|
||||
ResourceLocation WATER = new ResourceLocation("water");
|
||||
iPotionTypeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.POTIONTYPES, PotionType.class, WATER, MIN_POTIONTYPE_ID, MAX_POTIONTYPE_ID, false, null, null, null);
|
||||
@@ -71,7 +71,7 @@ public class GameData
|
||||
private final FMLControlledNamespacedRegistry<Block> iBlockRegistry;
|
||||
private final FMLControlledNamespacedRegistry<Item> iItemRegistry;
|
||||
private final FMLControlledNamespacedRegistry<Potion> iPotionRegistry;
|
||||
private final FMLControlledNamespacedRegistry<BiomeGenBase> iBiomeRegistry;
|
||||
private final FMLControlledNamespacedRegistry<Biome> iBiomeRegistry;
|
||||
private final FMLControlledNamespacedRegistry<SoundEvent> iSoundEventRegistry;
|
||||
private final FMLControlledNamespacedRegistry<PotionType> iPotionTypeRegistry;
|
||||
private final FMLControlledNamespacedRegistry<Enchantment> iEnchantmentRegistry;
|
||||
@@ -98,7 +98,7 @@ public class GameData
|
||||
|
||||
/** INTERNAL ONLY */
|
||||
@Deprecated
|
||||
public static FMLControlledNamespacedRegistry<BiomeGenBase> getBiomeRegistry() { return getMain().iBiomeRegistry; }
|
||||
public static FMLControlledNamespacedRegistry<Biome> getBiomeRegistry() { return getMain().iBiomeRegistry; }
|
||||
|
||||
/** INTERNAL ONLY */
|
||||
@Deprecated
|
||||
@@ -356,12 +356,12 @@ public class GameData
|
||||
// no op for the minute?
|
||||
}
|
||||
}
|
||||
private static class BiomeCallbacks implements IForgeRegistry.AddCallback<BiomeGenBase>,IForgeRegistry.ClearCallback<BiomeGenBase>,IForgeRegistry.CreateCallback<BiomeGenBase>
|
||||
private static class BiomeCallbacks implements IForgeRegistry.AddCallback<Biome>,IForgeRegistry.ClearCallback<Biome>,IForgeRegistry.CreateCallback<Biome>
|
||||
{
|
||||
static final BiomeCallbacks INSTANCE = new BiomeCallbacks();
|
||||
|
||||
@Override
|
||||
public void onAdd(BiomeGenBase potion, int id, Map<ResourceLocation, ?> slaves) {
|
||||
public void onAdd(Biome potion, int id, Map<ResourceLocation, ?> slaves) {
|
||||
// no op for the minute?
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import net.minecraft.command.ServerCommand;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
import net.minecraft.server.dedicated.PendingCommand;
|
||||
import net.minecraft.util.IThreadListener;
|
||||
import net.minecraft.util.text.translation.LanguageMap;
|
||||
import net.minecraft.world.storage.SaveFormatOld;
|
||||
@@ -183,7 +183,7 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
// rudimentary command processing, check for fml confirm/cancel and stop commands
|
||||
synchronized (dedServer.pendingCommandList)
|
||||
{
|
||||
for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext(); )
|
||||
for (Iterator<PendingCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, PendingCommand.class).iterator(); it.hasNext(); )
|
||||
{
|
||||
String cmd = it.next().command.trim().toLowerCase();
|
||||
|
||||
|
||||
Reference in new issue
Block a user