mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 07:35:11 +00:00
GeckoLib Addon is now an OPTIONAL Supported Addon [WIP]
This commit is contained in:
1 parent
5678029e30
commit
3c225f74db
20 files changed
+167
-476
No files matched your search
@@ -1,14 +1,13 @@
|
||||
package noppes.npcs;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.*;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.network.FMLEventChannel;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import foxz.command.CommandNoppes;
|
||||
import kamkeel.addon.GeckoAddonSupport;
|
||||
import kamkeel.command.CommandKamkeel;
|
||||
import kamkeel.developer.Developer;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -33,9 +32,10 @@ import noppes.npcs.entity.old.*;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.9-beta4")
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.9-beta5")
|
||||
public class CustomNpcs {
|
||||
|
||||
@SidedProxy(clientSide = "noppes.npcs.client.ClientProxy", serverSide = "noppes.npcs.CommonProxy")
|
||||
@@ -156,7 +156,6 @@ public class CustomNpcs {
|
||||
registerNpc(EntityNPCEnderman.class, "npcEnderman");
|
||||
registerNpc(EntityNPCGolem.class, "npcGolem");
|
||||
registerNpc(EntityCustomNpc.class, "CustomNpc");
|
||||
registerCustomModel(EntityCustomModel.class, "CustomModel");
|
||||
|
||||
registerNewEntity(EntityChairMount.class, "CustomNpcChairMount", 64, 10, false);
|
||||
registerNewEntity(EntityProjectile.class, "throwableitem", 64, 3, true);
|
||||
@@ -188,6 +187,14 @@ public class CustomNpcs {
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLPostInitializationEvent ev) {
|
||||
if(Loader.isModLoaded("customnpcsgecko")){
|
||||
System.out.println("Enabling CNPC+ Gecko Addon");
|
||||
GeckoAddonSupport.supportEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void setAboutToStart(FMLServerAboutToStartEvent event) {
|
||||
ChunkController.Instance.clear();
|
||||
@@ -255,16 +262,10 @@ public class CustomNpcs {
|
||||
EntityList.stringToClassMapping.put(name, cl);
|
||||
}
|
||||
|
||||
private void registerCustomModel(Class<? extends Entity> cl, String name) {
|
||||
EntityRegistry.registerModEntity(cl, name, NewEntityStartId++, this, 64, 10, false);
|
||||
EntityList.stringToClassMapping.put(name, cl);
|
||||
}
|
||||
|
||||
private void registerNewEntity(Class<? extends Entity> cl, String name, int range, int update, boolean velocity) {
|
||||
EntityRegistry.registerModEntity(cl, name, NewEntityStartId++, this, range, update, velocity);
|
||||
}
|
||||
|
||||
|
||||
public static File getWorldSaveDirectory() {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
File saves = new File(".");
|
||||
|
||||
Reference in new issue
Block a user