当前位置: 首页>>代码示例>>Java>>正文


Java Side类代码示例

本文整理汇总了Java中net.minecraftforge.fml.relauncher.Side的典型用法代码示例。如果您正苦于以下问题:Java Side类的具体用法?Java Side怎么用?Java Side使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Side类属于net.minecraftforge.fml.relauncher包,在下文中一共展示了Side类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doRenderLayer

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@Override
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    if (!Arrays.asList(contributors.uuid).contains(entitylivingbaseIn.getUniqueID().toString())) return;
    if (!entitylivingbaseIn.isWearing(EnumPlayerModelParts.CAPE)) return;
    GlStateManager.pushMatrix();
    GlStateManager.enableBlend();
    GlStateManager.disableCull();
    RenderHelper.disableStandardItemLighting();
    if (Minecraft.isAmbientOcclusionEnabled()) {
        GlStateManager.shadeModel(GL11.GL_SMOOTH);
    } else {
        GlStateManager.shadeModel(GL11.GL_FLAT);
    }
    GlStateManager.translate(0, -0.015f, 0);
    if (!entitylivingbaseIn.inventory.armorInventory.get(3).isEmpty()) GlStateManager.translate(0, -0.02f, 0);
    if (entitylivingbaseIn.isSneaking()) GlStateManager.translate(0, 0.27, 0);
    GlStateManager.rotate(90, 0, 1, 0);
    GlStateManager.rotate(180, 1, 0, 0);
    GlStateManager.rotate(netHeadYaw, 0, -1, 0);
    GlStateManager.rotate(headPitch, 0, 0, -1);

    Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    Calendar calendar = Calendar.getInstance();
    if (calendar.get(Calendar.MONTH) == Calendar.OCTOBER) {
        spookyScarySkeletons();
    } else if (calendar.get(Calendar.MONTH) == Calendar.DECEMBER) {
        itsSnowyHere();
    } else {
        Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(ClientProxy.ears_baked, 0.5f, 255, 255, 255);
    }
    RenderHelper.enableStandardItemLighting();
    GlStateManager.depthMask(true);
    GlStateManager.popMatrix();
}
 
开发者ID:Buuz135,项目名称:Industrial-Foregoing,代码行数:36,代码来源:ContributorsCatEarsRender.java

示例2: randomDisplayTick

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
{
    for (int i = 0; i < 3; ++i)
    {
        int j = rand.nextInt(2) * 2 - 1;
        int k = rand.nextInt(2) * 2 - 1;
        double d0 = (double)pos.getX() + 0.5D + 0.25D * (double)j;
        double d1 = (double)((float)pos.getY() + rand.nextFloat());
        double d2 = (double)pos.getZ() + 0.5D + 0.25D * (double)k;
        double d3 = (double)(rand.nextFloat() * (float)j);
        double d4 = ((double)rand.nextFloat() - 0.5D) * 0.125D;
        double d5 = (double)(rand.nextFloat() * (float)k);
        worldIn.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5, new int[0]);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:BlockEnderChest.java

示例3: init

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    CapabilityExtendedHealthSystem.register();

    int i = 0;
    NETWORKING = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
    NETWORKING.registerMessage(MessageReceiveDamage.Handler.class, MessageReceiveDamage.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyHealingItem.Handler.class, MessageApplyHealingItem.class, ++i , Side.SERVER);
    NETWORKING.registerMessage(MessageReceiveConfiguration.Handler.class, MessageReceiveConfiguration.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyAbsorption.Handler.class, MessageApplyAbsorption.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageAddHealth.Handler.class, MessageAddHealth.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessagePlayHurtSound.Handler.class, MessagePlayHurtSound.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageClientUpdate.Handler.class, MessageClientUpdate.class, ++i, Side.SERVER);
    NETWORKING.registerMessage(MessageResync.Handler.class, MessageResync.class, ++i, Side.CLIENT);
    MessageReceiveConfiguration.validate();

    if (Loader.isModLoaded("morpheus")) {
        enableMorpheusCompat = true;
        logger.info("Morpheus present - enabling compatibility module");
        MorpheusHelper.register();
    }

    RegistryManager.registerDefaults();
    checkEarlyExit();
}
 
开发者ID:ichttt,项目名称:FirstAid,代码行数:26,代码来源:FirstAid.java

示例4: handleStatusUpdate

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void handleStatusUpdate(byte id)
{
    if (id == 12)
    {
        this.spawnParticles(EnumParticleTypes.HEART);
    }
    else if (id == 13)
    {
        this.spawnParticles(EnumParticleTypes.VILLAGER_ANGRY);
    }
    else if (id == 14)
    {
        this.spawnParticles(EnumParticleTypes.VILLAGER_HAPPY);
    }
    else
    {
        super.handleStatusUpdate(id);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:EntityVillager.java

示例5: randomDisplayTick

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
{
	double d0 = (double)pos.getX() + 0.5D;
	double d1 = (double)pos.getY() + 0.75D;
	double d2 = (double)pos.getZ() + 0.5D;
	double d3 = 0.22D;
	double d4 = 0.27D;

	if(worldIn.getTileEntity(pos) instanceof TileEntitySmelter)
	{
		if(((TileEntitySmelter)worldIn.getTileEntity(pos)).isCooking() && !((TileEntitySmelter)worldIn.getTileEntity(pos)).getInventory().getStackInSlot(0).isEmpty())
		{
			for(int i = 0; i < 25; i++)
			{
				worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+(RANDOM.nextDouble()/5 - 0.1), d1, d2+(RANDOM.nextDouble()/5 - 0.1), 0.0D, 0.0D, 0.0D, new int[0]);
				worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+(RANDOM.nextDouble()/5 - 0.1), d1, d2+(RANDOM.nextDouble()/5 - 0.1), 0.0D, 0.02D, 0.0D, new int[0]);

				worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0+(RANDOM.nextDouble()/5 - 0.1), d1, d2+(RANDOM.nextDouble()/5 - 0.1), 0.0D, 0.0D, 0.0D, new int[0]);
			}
			worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+(RANDOM.nextDouble()/5 - 0.1), d1, d2+(RANDOM.nextDouble()/5 - 0.1), 0.0D, 0.05D, 0.0D, new int[0]);
		}
	}
}
 
开发者ID:ArtixAllMighty,项目名称:ExSartagine,代码行数:25,代码来源:BlockSmelter.java

示例6: getModelClipNode

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
/**
 * Retrieves the clip from the model.
 */
@SideOnly(Side.CLIENT)
public static IClip getModelClipNode(ResourceLocation modelLocation, String clipName)
{
    IModel model = ModelLoaderRegistry.getModelOrMissing(modelLocation);
    if(model instanceof IAnimatedModel)
    {
        Optional<? extends IClip> clip = ((IAnimatedModel)model).getClip(clipName);
        if(clip.isPresent())
        {
            return new ModelClip(clip.get(), modelLocation, clipName);
        }
        FMLLog.getLogger().error("Unable to find clip " + clipName + " in the model " + modelLocation);
    }
    // FIXME: missing clip?
    return new ModelClip(IdentityClip.INSTANCE, modelLocation, clipName);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:Clips.java

示例7: paintBackground

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@Override
public void paintBackground(int x, int y) {
	for (int xi = 0; xi < slotsWide; xi++) {
		for (int yi = 0; yi < slotsHigh; yi++) {
			
			int lo = multiplyColor(color, 0.7f);
			int bg = GuiDrawing.colorAtOpacity(0x000000, 0.29f);
			int hi = multiplyColor(color, 1.7f);
			
			if (big) {
				GuiDrawing.drawBeveledPanel((xi * 18) + x - 4, (yi * 18) + y - 4, 24, 24,
						lo, bg, hi);
			} else {
				GuiDrawing.drawBeveledPanel((xi * 18) + x - 1, (yi * 18) + y - 1, 18, 18,
						lo, bg, hi);
			}
		}
	}
}
 
开发者ID:elytra,项目名称:Thermionics,代码行数:21,代码来源:WColoredSlot.java

示例8: update

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void update(EntityPlayer player, int rangeUpgrades) {
    if (coordTracker != null) {
        coordTracker.ticksExisted++;
    } else {
        coordTracker = ItemPneumaticArmor.getCoordTrackLocation(player.getItemStackFromSlot(EntityEquipmentSlot.HEAD));
        if (coordTracker != null) navigator = new RenderNavigator(coordTracker.world, coordTracker.pos);
    }
    if (noPathCooldown > 0) {
        noPathCooldown--;
    }
    if (navigator != null && pathEnabled && noPathCooldown == 0 && --pathCalculateCooldown <= 0) {
        navigator.updatePath();
        if (!navigator.tracedToDestination()) {
            noPathCooldown = 100; // wait 5 seconds before recalculating a path.
        }
        pathCalculateCooldown = pathUpdateSetting == 2 ? 1 : pathUpdateSetting == 1 ? 20 : 100;
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:21,代码来源:CoordTrackUpgradeHandler.java

示例9: handleModels

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void handleModels(ModelRegistryEvent event)
{
    for (Map.Entry<ItemStack, ModelResourceLocation> entry : LOCATIONS.entrySet())
    {
        ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
    }
}
 
开发者ID:oitsjustjose,项目名称:Geolosys,代码行数:10,代码来源:ClientRegistry.java

示例10: isInRangeToRenderDist

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
/**
 * Checks if the entity is in range to render.
 */
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
    double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D;

    if (Double.isNaN(d0))
    {
        d0 = 4.0D;
    }

    d0 = d0 * 64.0D;
    return distance < d0 * d0;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:EntityFireball.java

示例11: updateAnimation

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void updateAnimation() {
	
	World world = Minecraft.getMinecraft().theWorld;
	if (world != null) {
		long time = world.getWorldTime() % 24000L;
		this.frameCounter = (int)(time / 1500);
	}
	TextureUtil.uploadTextureMipmap((int[][])this.framesTextureData.get(this.frameCounter), this.width, this.height, this.originX, this.originY, false, false);
}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:12,代码来源:UCDyePlantStitch.java

示例12: construct

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void construct(FMLConstructionEvent event) {
    super.construct(event);
    getLoaderManager().invoke(event, LoaderState.CONSTRUCTING, Side.CLIENT);
}
 
开发者ID:LasmGratel,项目名称:FoodCraft-Reloaded,代码行数:6,代码来源:ClientProxy.java

示例13: initModels

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static void initModels()
{
	Item item = Item.getItemFromBlock(ModBlocks.liquid_butter);

	ModelBakery.registerItemVariants(item);
	ModelResourceLocation location = new ModelResourceLocation("btweagles:fluid", "liquid_butter");
	ModelLoader.setCustomMeshDefinition(item, stack -> location);
	ModelLoader.setCustomStateMapper(ModBlocks.liquid_butter, new StateMapperBase() {
		@Override
		protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
			return location;
		}
	});
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:16,代码来源:ModFluids.java

示例14: getSubItems

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
    if (isInCreativeTab(tab)) {
        for (int i = 0; i < COMPONENT_AMOUNT; i++) {
            subItems.add(new ItemStack(this, 1, i));
        }
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:10,代码来源:ItemNetworkComponents.java

示例15: getRenderBoundingBox

import net.minecraftforge.fml.relauncher.Side; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getRenderBoundingBox() {
    if (rangeLineRenderer == null || !rangeLineRenderer.isCurrentlyRendering()) return super.getRenderBoundingBox();
    int range = getSecurityRange();
    return new AxisAlignedBB(getPos().getX() - range, getPos().getY() - range, getPos().getZ() - range, getPos().getX() + 1 + range, getPos().getY() + 1 + range, getPos().getZ() + 1 + range);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:8,代码来源:TileEntitySecurityStation.java


注:本文中的net.minecraftforge.fml.relauncher.Side类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。