本文整理汇总了Java中mods.battlegear2.api.quiver.QuiverArrowRegistry.addArrowToRegistry方法的典型用法代码示例。如果您正苦于以下问题:Java QuiverArrowRegistry.addArrowToRegistry方法的具体用法?Java QuiverArrowRegistry.addArrowToRegistry怎么用?Java QuiverArrowRegistry.addArrowToRegistry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mods.battlegear2.api.quiver.QuiverArrowRegistry
的用法示例。
在下文中一共展示了QuiverArrowRegistry.addArrowToRegistry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assignArrows
import mods.battlegear2.api.quiver.QuiverArrowRegistry; //导入方法依赖的package包/类
private void assignArrows()
{
if(ArrowType.arrows.isEmpty())
{
return;
}
for(int a = 0; a < ArrowType.arrows.size(); a ++)
{
ArrowType arrow = ArrowType.arrows.get(a);
ArrowsMF.addArrow(new ItemStack(itemID, 1, arrow.meta));
CrossbowAmmo.addArrow(new ItemStack(itemID, 1, arrow.meta));
Arrows.addArrow(new ItemStack(itemID, 1, arrow.meta));
QuiverArrowRegistry.addArrowToRegistry(new ItemStack(itemID, 1, arrow.meta), null);
}
}
示例2: registerBG2
import mods.battlegear2.api.quiver.QuiverArrowRegistry; //导入方法依赖的package包/类
/**
* Registers {@link HeroBowFireHandler} and all arrows required for use with
* Battlegear2's quiver system
*/
@Method(modid="battlegear2")
public static void registerBG2() {
fireHandlers.add(new HeroBowFireHandler());
fireHandlers.add(new DefaultArrowFire());
QuiverArrowRegistry.addArrowFireHandler(new HeroBowFireHandler());
// registering as null prevents default fire handler from handling these arrows:
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowBomb, null);
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowBombFire, null);
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowBombWater, null);
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowFire, null);
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowIce, null);
QuiverArrowRegistry.addArrowToRegistry(ZSSItems.arrowLight, null);
}
示例3: preInit
import mods.battlegear2.api.quiver.QuiverArrowRegistry; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
logger = event.getModLog();
knightArmourMaterial = EnumHelper.addArmorMaterial("knights.armour", "battlegear2:knight", 25, new int[]{3, 5, 7, 3}, 15, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.5F);
ResourceLocation sound = new ResourceLocation(MODID, "shield");
shieldSound = GameRegistry.register(new SoundEvent(sound).setRegistryName(sound));
BattlegearConfig.getConfig(new Configuration(event.getSuggestedConfigurationFile()));
if((event.getSourceFile().getName().endsWith(".jar") || debug) && event.getSide().isClient()){
try {
Class.forName("mods.mud.ModUpdateDetector").getDeclaredMethod("registerMod", ModContainer.class, String.class, String.class).invoke(null,
FMLCommonHandler.instance().findContainerFor(this),
"https://raw.github.com/Mine-and-blade-admin/Battlegear2/master/battlegear_update.xml",
"https://raw.github.com/Mine-and-blade-admin/Battlegear2/master/changelog.md"
);
} catch (Throwable e) {
e.printStackTrace();
}
}
proxy.registerHandlers();
QuiverArrowRegistry.addArrowToRegistry(Items.ARROW, EntityTippedArrow.class);
QuiverArrowRegistry.addArrowToRegistry(Items.TIPPED_ARROW, EntityTippedArrow.class);
QuiverArrowRegistry.addArrowToRegistry(Items.SPECTRAL_ARROW, EntitySpectralArrow.class);
//Fetch early messages
IMCEvent imc = new IMCEvent();
imc.applyModContainer(FMLCommonHandler.instance().findContainerFor(MODID));
onMessage(imc);
}