mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 15:33:18 +00:00
Remove all references to ModLoader
This commit is contained in:
1 parent
03b3017e51
commit
66b60bc85e
4 files changed
+81
-72
No files matched your search
@@ -2,6 +2,8 @@ package net.minecraftforge.common;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import net.minecraft.src.*;
|
||||
import net.minecraftforge.event.entity.living.*;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.*;
|
||||
@@ -19,7 +21,7 @@ public class ForgeHooks
|
||||
this.metadata = meta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static class SeedEntry extends WeightedRandomItem
|
||||
{
|
||||
public final ItemStack seed;
|
||||
@@ -31,7 +33,7 @@ public class ForgeHooks
|
||||
}
|
||||
static final List<GrassEntry> grassList = new ArrayList<GrassEntry>();
|
||||
static final List<SeedEntry> seedList = new ArrayList<SeedEntry>();
|
||||
|
||||
|
||||
public static void plantGrass(World world, int x, int y, int z)
|
||||
{
|
||||
GrassEntry grass = (GrassEntry)WeightedRandom.getRandomItem(world.rand, grassList);
|
||||
@@ -51,12 +53,12 @@ public class ForgeHooks
|
||||
}
|
||||
return entry.seed.copy();
|
||||
}
|
||||
|
||||
|
||||
private static boolean toolInit = false;
|
||||
static HashMap<Item, List> toolClasses = new HashMap<Item, List>();
|
||||
static HashMap<List, Integer> toolHarvestLevels = new HashMap<List, Integer>();
|
||||
static HashSet<List> toolEffectiveness = new HashSet<List>();
|
||||
|
||||
|
||||
public static boolean canHarvestBlock(Block block, EntityPlayer player, int metadata)
|
||||
{
|
||||
if (block.blockMaterial.isHarvestable())
|
||||
@@ -121,7 +123,7 @@ public class ForgeHooks
|
||||
}
|
||||
return toolEffectiveness.contains(Arrays.asList(block, metadata, (String)toolClass.get(0)));
|
||||
}
|
||||
|
||||
|
||||
static void initTools()
|
||||
{
|
||||
if (toolInit)
|
||||
@@ -213,7 +215,7 @@ public class ForgeHooks
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
{
|
||||
grassList.add(new GrassEntry(Block.plantYellow, 0, 20));
|
||||
@@ -221,7 +223,7 @@ public class ForgeHooks
|
||||
seedList.add(new SeedEntry(new ItemStack(Item.seeds), 10));
|
||||
initTools();
|
||||
System.out.printf("MinecraftForge v%s Initialized\n", ForgeVersion.getVersion());
|
||||
ModLoader.getLogger().info(String.format("MinecraftForge v%s Initialized", ForgeVersion.getVersion()));
|
||||
FMLLog.info("MinecraftForge v%s Initialized", ForgeVersion.getVersion());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user