本文整理汇总了Java中api.player.server.ServerPlayerAPI类的典型用法代码示例。如果您正苦于以下问题:Java ServerPlayerAPI类的具体用法?Java ServerPlayerAPI怎么用?Java ServerPlayerAPI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServerPlayerAPI类属于api.player.server包,在下文中一共展示了ServerPlayerAPI类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preInit
import api.player.server.ServerPlayerAPI; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
isPlanetsLoaded = Loader.isModLoaded(Constants.MOD_ID_PLANETS);
GCCoreUtil.nextID = 0;
MinecraftForge.EVENT_BUS.register(new EventHandlerGC());
handler = new GCPlayerHandler();
MinecraftForge.EVENT_BUS.register(handler);
FMLCommonHandler.instance().bus().register(handler);
GalacticraftCore.proxy.preInit(event);
ConnectionPacket.bus = NetworkRegistry.INSTANCE.newEventDrivenChannel(ConnectionPacket.CHANNEL);
ConnectionPacket.bus.register(new ConnectionPacket());
ConfigManagerCore.initialize(new File(event.getModConfigurationDirectory(), GalacticraftCore.CONFIG_FILE));
EnergyConfigHandler.setDefaultValues(new File(event.getModConfigurationDirectory(), GalacticraftCore.POWER_CONFIG_FILE));
ChunkLoadingCallback.loadConfig(new File(event.getModConfigurationDirectory(), GalacticraftCore.CHUNKLOADER_CONFIG_FILE));
this.registerOilandFuel();
if (Loader.isModLoaded("PlayerAPI"))
{
ServerPlayerAPI.register(Constants.MOD_ID_CORE, GCPlayerBaseMP.class);
}
GCBlocks.initBlocks();
GCItems.initItems();
//Allow canisters to be filled from other mods' tanks containing fuel / oil fluids
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidFuel, 1000), new ItemStack(GCItems.fuelCanister, 1, 1), new ItemStack(GCItems.oilCanister, 1, ItemCanisterGeneric.EMPTY)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidOil, 1000), new ItemStack(GCItems.oilCanister, 1, 1), new ItemStack(GCItems.oilCanister, 1, ItemCanisterGeneric.EMPTY)));
}
示例2: ServerPlayerBaseMagic
import api.player.server.ServerPlayerAPI; //导入依赖的package包/类
public ServerPlayerBaseMagic(ServerPlayerAPI playerapi)
{
super(playerapi);
this.armor = new Item[5];
this.dungeon_location = new double[3];
this.dungeon_location[0] = 0;
this.dungeon_location[1] = 64;
this.dungeon_location[2] = 0;
this.portal_cd = 0;
}
示例3: load
import api.player.server.ServerPlayerAPI; //导入依赖的package包/类
public void load()
{
BlockRegister.load();
ItemRegister.load();
CreativesTabsRegister.load();
CreativesTabsRegister.loadAll();
EntityRegister.load();
CraftRegister.load();
DimensionManager.registerProviderType(Main.DIM_ID, WorldProviderMagic.class, true);
DimensionManager.registerDimension(Main.DIM_ID, Main.DIM_ID);
for (Dungeon d : Main.DUNGEONS)
{
DimensionManager.registerProviderType(d.DIM_ID, WorldProviderDungeon.class, true);
DimensionManager.registerDimension(d.DIM_ID, d.DIM_ID);
}
GameRegistry.registerWorldGenerator(new WorldGenChestElficStaff(), 0);
GameRegistry.registerWorldGenerator(new WorldGenOrc(), 0);
GameRegistry.registerWorldGenerator(new WorldGenFloatingHouse(), 0);
GameRegistry.registerWorldGenerator(new WorldGenFloatingHouse2(), 0);
GameRegistry.registerWorldGenerator(new WorldGenFloatingDungeon(), 0);
GameRegistry.registerWorldGenerator(new WorldGenVillage(), 0);
ServerPlayerAPI.register("Magic Crusade", ServerPlayerBaseMagic.class);
for (int i = 0; i < 5; ++i)
VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());
this.register_event(new ServerEvent());
this.register_event(new JoueurEvent());
this.register_event(new LivingEntityEvent());
AchievementList.load();
}
示例4: GCPlayerBaseMP
import api.player.server.ServerPlayerAPI; //导入依赖的package包/类
public GCPlayerBaseMP(ServerPlayerAPI playerAPI)
{
super(playerAPI);
}