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


Java PlayerAdvancements类代码示例

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


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

示例1: removeListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener listener) {
    CustomTrigger.Listeners tameanimaltrigger$listeners = this.listeners.get(playerAdvancementsIn);

    if (tameanimaltrigger$listeners != null) {
        tameanimaltrigger$listeners.remove(listener);

        if (tameanimaltrigger$listeners.isEmpty()) {
            this.listeners.remove(playerAdvancementsIn);
        }
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:13,代码来源:CustomTrigger.java

示例2: getAdvancements

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public PlayerAdvancements getAdvancements() {
	if(m_realPlayer != null) {
		syncToRealPlayer();
		return syncPublicFieldsFromRealAndReturn(m_realPlayer.getAdvancements());
	} else {
		return super.getAdvancements();
	}
}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:10,代码来源:EntityPlayerMPProxy.java

示例3: removeListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener<CriteriaSkeletonStatusUpdate.Instance> listener) {
	CriteriaSkeletonStatusUpdate.Listeners milkDrinkListeners = this.listeners.get(playerAdvancementsIn);

	if (milkDrinkListeners != null) {
		milkDrinkListeners.remove(listener);

		if (milkDrinkListeners.isEmpty()) {
			this.listeners.remove(playerAdvancementsIn);
		}
	}
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:13,代码来源:CriteriaSkeletonStatusUpdate.java

示例4: addListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void addListener(@Nonnull PlayerAdvancements playerAdvancementsIn, @Nonnull Listener<Instance> listener) {
    Listeners listeners = this.listeners.get(playerAdvancementsIn);

    if(listeners == null) {
        listeners = new Listeners(playerAdvancementsIn);
        this.listeners.put(playerAdvancementsIn, listeners);
    }

    listeners.add(listener);
}
 
开发者ID:CenturionFox,项目名称:wolfarmor,代码行数:12,代码来源:EquipWolfArmorTrigger.java

示例5: removeListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeListener(@Nonnull PlayerAdvancements playerAdvancementsIn, @Nonnull Listener<Instance> listener) {
    Listeners listeners = this.listeners.get(playerAdvancementsIn);

    if(listeners != null) {
        listeners.remove(listener);

        if(listeners.isEmpty()) {
            this.listeners.remove(playerAdvancementsIn);
        }
    }
}
 
开发者ID:CenturionFox,项目名称:wolfarmor,代码行数:13,代码来源:EquipWolfArmorTrigger.java

示例6: addListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void addListener(@Nonnull PlayerAdvancements playerAdvancementsIn, @Nonnull ICriterionTrigger.Listener<BonfireLitTrigger.Instance> listener) {
    BonfireLitTrigger.Listeners listeners = this.listeners.get(playerAdvancementsIn);
    if (listeners == null) {
        listeners = new BonfireLitTrigger.Listeners(playerAdvancementsIn);
        this.listeners.put(playerAdvancementsIn, listeners);
    }
    listeners.add(listener);
}
 
开发者ID:Wehavecookies56,项目名称:Bonfires,代码行数:10,代码来源:BonfireLitTrigger.java

示例7: removeListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeListener(@Nonnull PlayerAdvancements playerAdvancementsIn, @Nonnull ICriterionTrigger.Listener<BonfireLitTrigger.Instance> listener) {
    BonfireLitTrigger.Listeners listeners = this.listeners.get(playerAdvancementsIn);

    if (listeners != null) {
        listeners.remove(listener);
        if (listeners.isEmpty()) {
            this.listeners.remove(playerAdvancementsIn);
        }
    }
}
 
开发者ID:Wehavecookies56,项目名称:Bonfires,代码行数:12,代码来源:BonfireLitTrigger.java

示例8: trigger

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
public void trigger(EntityPlayerMP player, int depth) {
	final PlayerAdvancements advancements = player.getAdvancements();
	listeners.get(advancements).stream()
			.filter((listener) -> listener.getCriterionInstance().test(depth))
			.collect(Collectors.toList()) // force evaluation
			.forEach((listener) -> listener.grantCriterion(advancements));
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:8,代码来源:TriggerDevNullStack.java

示例9: addListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void addListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener listener) {
    CustomTrigger.Listeners l = this.listeners.computeIfAbsent(playerAdvancementsIn, Listeners::new);
    l.add(listener);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:CustomTrigger.java

示例10: removeAllListeners

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeAllListeners(PlayerAdvancements playerAdvancementsIn) {
    this.listeners.remove(playerAdvancementsIn);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:CustomTrigger.java

示例11: addListener

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void addListener(PlayerAdvancements playerAdvancementsIn, ICriterionTrigger.Listener<CriteriaSkeletonStatusUpdate.Instance> listener) {
	CriteriaSkeletonStatusUpdate.Listeners milkDrinkListeners = this.listeners.computeIfAbsent(playerAdvancementsIn, Listeners::new);

	milkDrinkListeners.add(listener);
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:7,代码来源:CriteriaSkeletonStatusUpdate.java

示例12: removeAllListeners

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeAllListeners(PlayerAdvancements playerAdvancementsIn) {
	this.listeners.remove(playerAdvancementsIn);
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:5,代码来源:CriteriaSkeletonStatusUpdate.java

示例13: Listeners

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
public Listeners(PlayerAdvancements playerAdvancementsIn) {
	this.playerAdvancements = playerAdvancementsIn;
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:4,代码来源:CriteriaSkeletonStatusUpdate.java

示例14: removeAllListeners

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
@Override
public void removeAllListeners(@Nonnull PlayerAdvancements playerAdvancementsIn) {
    this.listeners.remove(playerAdvancementsIn);
}
 
开发者ID:CenturionFox,项目名称:wolfarmor,代码行数:5,代码来源:EquipWolfArmorTrigger.java

示例15: Listeners

import net.minecraft.advancements.PlayerAdvancements; //导入依赖的package包/类
Listeners(PlayerAdvancements playerAdvancements) {
    this.playerAdvancements = playerAdvancements;
}
 
开发者ID:Wehavecookies56,项目名称:Bonfires,代码行数:4,代码来源:BonfireLitTrigger.java


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