本文整理汇总了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());
}
示例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));
}
示例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());
}
示例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());
}
示例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());
}
示例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");
}
示例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() );
}
示例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;
}
}
示例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));
}
示例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");
}
示例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));
}
}
示例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!");
}
}
示例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);
}
}
示例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);
}
示例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();
}