當前位置: 首頁>>代碼示例>>Java>>正文


Java ClientRegistry類代碼示例

本文整理匯總了Java中net.minecraftforge.fml.client.registry.ClientRegistry的典型用法代碼示例。如果您正苦於以下問題:Java ClientRegistry類的具體用法?Java ClientRegistry怎麽用?Java ClientRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ClientRegistry類屬於net.minecraftforge.fml.client.registry包,在下文中一共展示了ClientRegistry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupModels

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@SubscribeEvent
   public static void setupModels(ModelRegistryEvent event) {
	
	registerBlockModel(lodestone_ore);
	registerBlockModel(celestial_stone);
	registerBlockModel(rift);
	registerBlockModel(pipe);
	registerBlockModel(stability_projector);
	
	registerBlockModel(test_tank);
	registerBlockModel(creative_tank);
	
	((ItemMaterial) material).registerModels();
	registerItemModel(seeing_stone);
	registerItemModel(tuning_fork);
	
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRift.class, new TileEntityRiftRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new TileEntityPipeRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStabilityProjector.class, new TileEntityStabilityProjectorRenderer());
}
 
開發者ID:the-realest-stu,項目名稱:Etheric,代碼行數:21,代碼來源:RegistryManager.java

示例2: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void init()
{
    ClientRegistry.registerKeyBinding(keyOpenToolMenu =
            new KeyBinding("key.toolbelt.open", Keyboard.KEY_R, "key.toolbelt.category"));
    //keyOpenToolMenu.

    ClientRegistry.registerKeyBinding(keyCycleToolMenuL =
            new KeyBinding("key.toolbelt.cycle.left", 0, "key.toolbelt.category"));

    ClientRegistry.registerKeyBinding(keyCycleToolMenuR =
            new KeyBinding("key.toolbelt.cycle.right", 0, "key.toolbelt.category"));

    Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();

    RenderPlayer render = skinMap.get("default");
    render.addLayer(new LayerToolBelt(render));

    render = skinMap.get("slim");
    render.addLayer(new LayerToolBelt(render));
}
 
開發者ID:gigaherz,項目名稱:ToolBelt,代碼行數:22,代碼來源:ClientProxy.java

示例3: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent e) {
	super.init(e);
	{
		Sphere sphere = new Sphere();
		sphere.setDrawStyle(GLU.GLU_FILL);
		sphere.setNormals(GLU.GLU_SMOOTH);
		sphere.setOrientation(GLU.GLU_OUTSIDE);

		defierSphereIdOutside = GL11.glGenLists(1);
		GL11.glNewList(defierSphereIdOutside, GL11.GL_COMPILE);
		sphere.draw(0.5F, 30, 30);
		GL11.glEndList();

		sphere.setOrientation(GLU.GLU_INSIDE);
		defierSphereIdInside = GL11.glGenLists(1);
		GL11.glNewList(defierSphereIdInside, GL11.GL_COMPILE);
		sphere.draw(0.5F, 30, 30);
		GL11.glEndList();
	}
	ClientRegistry.bindTileEntitySpecialRenderer(DefierTileEntity.class, new DefierTESR());
	ClientRegistry.bindTileEntitySpecialRenderer(EnergyProviderTileEntity.class, new EnergyProviderTESR());
}
 
開發者ID:tiffit,項目名稱:Defier,代碼行數:24,代碼來源:ClientProxy.java

示例4: preInit

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void preInit() {
	super.preInit();
	ClientRegistry.bindTileEntitySpecialRenderer(TileTube.class, new TubeItemRenderer());

	// Register textures
	TextureRegistry.registerTexture(ModelTube.TUBE_TEX);
	TextureRegistry.registerTexture(ModelTube.TUBE_TEX_COL);

	// Register block models
	ModelRegistry.registerBlockModel(blockTube, new ModelTube());

	// Register item models
	ModelRegistry.registerItemResourceLoc(blockDisplacer, new ResourceLocation("simpletubes:block_displacer"), 0);
	ModelRegistry.registerItemModel(blockTube, new ModelTube.TubeItemModel());

	ModelRegistry.registerItemResourceLoc(itemPaintbrush, new ResourceLocation("simpletubes:item_paintbrush"), 0);
	for (int i = 0; i < 16; i++)
		ModelRegistry.registerItemResourceLoc(itemPaintbrush, new ResourceLocation("simpletubes:item_paintbrush_" + EnumDyeColor.byMetadata(i).getUnlocalizedName()), i + 1);

	ModelRegistry.registerItemResourceLoc(itemUpgrade, new ResourceLocation("simpletubes:item_upgrade_filter"), 0);

	MinecraftForge.EVENT_BUS.register(new TextureRegistry());
	MinecraftForge.EVENT_BUS.register(new ModelRegistry());
}
 
開發者ID:oMilkyy,項目名稱:SimpleTubes,代碼行數:26,代碼來源:ClientProxy.java

示例5: registerModels

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
public void registerModels()
{
    ItemModels.register();
    //BlockModels.register();

    ModelLoader.setCustomStateMapper(ModBlocks.thorns,new StateMap.Builder().ignore(BlockThorns.FACING).build());
    ModelLoader.setCustomStateMapper(ModBlocks.brine, new BrineStateMapper());
    ModelLoader.setCustomStateMapper(ModBlocks.aqueductWater, new StateMapperBase() {
        @Override
        protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
            return aqueductWaterLocation;
        }
    });

    RenderingRegistry.registerEntityRenderingHandler(EntityGreatarrow.class, RenderGreatarrow.GREATARROW_RENDER);
    RenderingRegistry.registerEntityRenderingHandler(EntityYa.class, RenderYa.YA_RENDER);
    RenderingRegistry.registerEntityRenderingHandler(EntitySpirit.class, manager -> new RenderSpirit(manager));
    RenderingRegistry.registerEntityRenderingHandler(EntityAncestryBottle.class, manager -> new RenderSnowball<>(manager,ModItems.ancestryBottle,Minecraft.getMinecraft().getRenderItem()));
    RenderingRegistry.registerEntityRenderingHandler(EntityArtifactFrame.class, RenderArtifactFrame.ARTIFACEFRAME_RENDER);
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchDragon.class, new RenderAlchDragon());
}
 
開發者ID:DaedalusGame,項目名稱:BetterWithAddons,代碼行數:22,代碼來源:ClientProxy.java

示例6: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event) {
	MinecraftForge.EVENT_BUS.register(new GuiHandler());
	MinecraftForge.EVENT_BUS.register(new KeybindHandler());
	MinecraftForge.EVENT_BUS.register(new ChatHandler());
	MinecraftForge.EVENT_BUS.register(new CommandHandler());
	MinecraftForge.EVENT_BUS.register(new JoinHandler());

	chatBinding = new KeyBinding("Chat", Keyboard.KEY_C, "RewiMod");
	helpBinding = new KeyBinding("Help", Keyboard.KEY_H, "RewiMod");

	ClientRegistry.registerKeyBinding(chatBinding);
	ClientRegistry.registerKeyBinding(helpBinding);

	NetworkRegistry.INSTANCE.newChannel("RewiMod", new PacketHandler());

	this.mutedPlayers.getMuted().add("l_uuca"); // <-------------------- :D

	//TODO: GUI for adding own words
	badWords.add("hrsn");
	badWords.add("schlampe");
	badWords.add("hure");
	badWords.add("arsch");
	badWords.add("fuck");
}
 
開發者ID:CreepPlaysDE,項目名稱:RewiMod,代碼行數:26,代碼來源:RewiMod.java

示例7: preInit

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void preInit( FMLPreInitializationEvent e ){
    super.preInit( e );

    LogHelper.info( "Trying to load CustomAchievements Translation Resource Pack");
    try {
        List packs = (List) ObfuscationReflectionHelper.getPrivateValue( Minecraft.class, Minecraft.getMinecraft(), new String[]{"field_110449_ao"} ); //defaultResourcePacks
        packs.add( new AchievementResourcePack() );
        ObfuscationReflectionHelper.setPrivateValue( Minecraft.class, Minecraft.getMinecraft(), packs, new String[]{"field_110449_ao"} );
    } catch( Exception exception ){
        LogHelper.error( "Loading CustomAchievements Translation Resource Pack failed.");
        exception.printStackTrace();
    }

    ModBlocks.loadTextures();
    ClientRegistry.bindTileEntitySpecialRenderer( TileEntityTrophy.class, new RenderTrophy() );
}
 
開發者ID:davqvist,項目名稱:CustomAchievements,代碼行數:18,代碼來源:ClientProxy.java

示例8: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
public static void init() {
	SELECTIONBOX_KEY = new KeyBinding("cfg.keybind.SelectionBox", Keyboard.KEY_B, SECTION_NAME);
	ClientRegistry.registerKeyBinding(SELECTIONBOX_KEY);

	VOLUME_KEY = new KeyBinding("cfg.keybind.Volume", Keyboard.KEY_V, SECTION_NAME);
	ClientRegistry.registerKeyBinding(VOLUME_KEY);

	if (Permissions.instance().allowLightLevelHUD()) {
		LIGHTLEVEL_KEY = new KeyBinding("cfg.keybind.LightLevel", Keyboard.KEY_L, SECTION_NAME);
		ClientRegistry.registerKeyBinding(LIGHTLEVEL_KEY);
	} else {
		LIGHTLEVEL_KEY = null;
	}

	if (Permissions.instance().allowChunkBorderHUD()) {
		CHUNKBORDER_KEY = new KeyBinding("cfg.keybind.ChunkBorders", Keyboard.KEY_F9, SECTION_NAME);
		ClientRegistry.registerKeyBinding(CHUNKBORDER_KEY);
	} else {
		CHUNKBORDER_KEY = null;
	}
}
 
開發者ID:OreCruncher,項目名稱:DynamicSurroundings,代碼行數:22,代碼來源:KeyHandler.java

示例9: registerKeyBindings

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void registerKeyBindings() {
	if (CoreInit.isCCLoaded && Config.enableAdventureItems) {
		ClientRegistry.registerKeyBinding(Keys.UP = new KeyBinding(Configs.keyPrefix + "up", Keyboard.KEY_UP, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.DOWN = new KeyBinding(Configs.keyPrefix + "down", Keyboard.KEY_DOWN, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.LEFT = new KeyBinding(Configs.keyPrefix + "left", Keyboard.KEY_LEFT, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.RIGHT = new KeyBinding(Configs.keyPrefix + "right", Keyboard.KEY_RIGHT, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.ENTER = new KeyBinding(Configs.keyPrefix + "enter", 28, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.BACK = new KeyBinding(Configs.keyPrefix + "back", 14, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.INTERACT = new KeyBinding(Configs.keyPrefix + "interact", Keyboard.KEY_X, Configs.keyCatergory));
		ClientRegistry.registerKeyBinding(Keys.MENU = new KeyBinding(Configs.keyPrefix + "menu", Keyboard.KEY_Y, Configs.keyCatergory));
	}
	ClientRegistry.registerKeyBinding(Keys.CONFIG = new KeyBinding(Configs.keyPrefix + "config", Keyboard.KEY_C, Configs.keyCatergory));
	ClientRegistry.registerKeyBinding(Keys.PROFILE = new KeyBinding(Configs.keyPrefix + "profile", Keyboard.KEY_NUMPAD9, Configs.keyCatergory));
	ClientRegistry.registerKeyBinding(Keys.SHOW_TETXURE_MAP = new KeyBinding(Configs.keyPrefix + "showtexturemap", Keyboard.KEY_NUMPAD8, Configs.keyCatergory));
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:17,代碼來源:ClientProxy.java

示例10: preInit

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void preInit()
{
    OBJLoader.INSTANCE.addDomain(Enderthing.MODID);

    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderKeyChest.class, new RenderEnderKeyChest());

    registerBlockModelAsItem(Enderthing.enderKeyChest, 0, "facing=north,inventory=true,private=false");
    registerBlockModelAsItem(Enderthing.enderKeyChest, 8, "facing=north,inventory=true,private=true");
    registerItemModel(Enderthing.enderKey, 0, "ender_key");
    registerItemModel(Enderthing.enderKey, 1, "ender_key_private");
    registerItemModel(Enderthing.enderLock, 0, "ender_lock");
    registerItemModel(Enderthing.enderLock, 1, "ender_lock_private");
    registerItemModel(Enderthing.enderPack, 0, "ender_pack");
    registerItemModel(Enderthing.enderPack, 1, "ender_pack_private");
    registerItemModel(Enderthing.enderCard, 0, "ender_card");
}
 
開發者ID:gigaherz,項目名稱:Enderthing,代碼行數:18,代碼來源:ClientProxy.java

示例11: load

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
public static void load() {
    scrollModifier = new KeyBinding(getDescription("scrollModifier"), Keyboard.KEY_LMENU, CATEGORY_GENERAL);
    showDefaultHotbar = new KeyBinding(getDescription("showDefaultHotbar"), Keyboard.KEY_GRAVE, CATEGORY_GENERAL);
    nextHotbar = new KeyBinding(getDescription("nextHotbar"), Keyboard.KEY_X, CATEGORY_GENERAL);
    previousHotbar = new KeyBinding(getDescription("previousHotbar"), Keyboard.KEY_C, CATEGORY_GENERAL);
    ClientRegistry.registerKeyBinding(scrollModifier);
    ClientRegistry.registerKeyBinding(showDefaultHotbar);
    ClientRegistry.registerKeyBinding(nextHotbar);
    ClientRegistry.registerKeyBinding(previousHotbar);

    hotbarKeys = new ArrayList<>();
    for (int slot = HotbarLogic.VANILLA_HOTBAR_SIZE + 1; slot <= InventoryPlayer.getHotbarSize(); slot++) {
        hotbarKeys.add(new KeyBinding(
                getDescription("hotbarkey." + slot),
                Keyboard.KEY_NONE, CATEGORY_HOTBAR_KEYS));
        ClientRegistry.registerKeyBinding(hotbarKeys.get(hotbarKeys.size() - 1));
    }
}
 
開發者ID:rolandoislas,項目名稱:multi-hotbar,代碼行數:19,代碼來源:KeyBindings.java

示例12: registerKeyBind

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Override
public void registerKeyBind() {
    ClientRegistry.registerKeyBinding(makeCopyKey);
    ClientRegistry.registerKeyBinding(hideAll);

    if (!Loader.isModLoaded(JEIButtons.MOD_MOREOVERLAYS) && !Loader.isModLoaded(JEIButtons.MOD_DYN_SOURROUND) && ConfigHandler.registerUtilKeybinds) {
        mobOverlay = new KeyBinding(Localization.KEY_MOBOVERLAY, KeyConflictContext.IN_GAME, Keyboard.KEY_F7, Localization.KEY_CATEGORY);
        chunkOverlay = new KeyBinding(Localization.KEY_CHUNKOVERLAY, KeyConflictContext.IN_GAME, Keyboard.KEY_F4, Localization.KEY_CATEGORY);

        ClientRegistry.registerKeyBinding(chunkOverlay);
        ClientRegistry.registerKeyBinding(mobOverlay);
    } else {
        JEIButtons.enableOverlays = false;
        JEIButtons.logInfo("MoreOverlays is loaded. Disabling Lightlevel and Chunk Overlay!");
    }
}
 
開發者ID:univrsal,項目名稱:JustEnoughButtons,代碼行數:17,代碼來源:ClientProxy.java

示例13: registerTileRenderer

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@SuppressWarnings("unchecked")
private void registerTileRenderer(ICustomRenderedBlockWithTile<? extends TileEntityBase> customRenderedBlock) {
    ITileRenderingHandler renderer = customRenderedBlock.getRenderer();
    if (renderer != null) {
        BlockWithTileRenderer instance = new BlockWithTileRenderer(renderer);
        ModelResourceLocation blockModel = customRenderedBlock.getBlockModelResourceLocation();
        //static rendering
        if (renderer.hasStaticRendering()) {
            renderers.put(blockModel, instance);
        }
        //dynamic rendering
        TileEntity tile = renderer.getTileEntity();
        if (renderer.hasDynamicRendering() && tile != null) {
            ClientRegistry.bindTileEntitySpecialRenderer(tile.getClass(), new TesrWrapper<>(instance));
        }
        //inventory rendering
        registerInventoryRendering(renderer, blockModel, instance);
        blocks.add(customRenderedBlock);
    }
}
 
開發者ID:InfinityRaider,項目名稱:InfinityLib,代碼行數:21,代碼來源:BlockRendererRegistry.java

示例14: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
public static void init()
{
	reload = new KeyBinding("key.arkcraft.reload", Keyboard.KEY_R, ARKCraft.instance().name());
	ClientRegistry.registerKeyBinding(reload);

	playerPooping = new KeyBinding("key.arkcraft.playerPooping", Keyboard.KEY_Z, ARKCraft.instance().name());
	ClientRegistry.registerKeyBinding(playerPooping);

	playerCrafting = new KeyBinding("key.arkcraft.playerCrafting", Keyboard.KEY_I, ARKCraft.instance().name());
	ClientRegistry.registerKeyBinding(playerCrafting);

	attachment = new KeyBinding("key.attachment", Keyboard.KEY_M, ARKCraft.instance().name());
	ClientRegistry.registerKeyBinding(attachment);

	arkmode = new KeyBinding("key.harvestOverlay", Keyboard.KEY_P, ARKCraft.instance().name());
	ClientRegistry.registerKeyBinding(arkmode);

	ClientEventHandler h = new ClientEventHandler();
	MinecraftForge.EVENT_BUS.register(h);
}
 
開發者ID:BubbleTrouble14,項目名稱:ARKCraft,代碼行數:21,代碼來源:ClientEventHandler.java

示例15: init

import net.minecraftforge.fml.client.registry.ClientRegistry; //導入依賴的package包/類
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    KeyBinding selectOption = new KeyBinding("key.wigctrl.selectoption", Keyboard.KEY_LMENU, "key.wigctrl.category");
    ClientRegistry.registerKeyBinding(selectOption);

    ToolPage terraform = new ToolPage(Keyboard.KEY_V, "wigpage.terraform.name", new Color3f(0.2f, 1.0f, 0.2f));
    Pages.add(terraform);

    terraform.addTool(new Tool("test", new ResourceLocation("wig:test"), null, null));

    MinecraftForge.EVENT_BUS.register(new BarSelectInputHandler());
    MinecraftForge.EVENT_BUS.register(new PageRenderHandler());
    MinecraftForge.EVENT_BUS.register(new SingleBarInputHandler());
    MinecraftForge.EVENT_BUS.register(new ToolNameRenderHandler());
    MinecraftForge.EVENT_BUS.register(new SingleToolInputHandler());

    proxy.initTexAtlas();
}
 
開發者ID:CannibalVox,項目名稱:wig,代碼行數:20,代碼來源:WigMod.java


注:本文中的net.minecraftforge.fml.client.registry.ClientRegistry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。