• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LootEntryTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onLootTableLoad

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
@SubscribeEvent
public void onLootTableLoad(LootTableLoadEvent event) {
    if (ConfigHandler.general.enableDungeonLoot) {
        String prefix = "minecraft:chests/";
        String name = event.getName().toString();
        if (name.startsWith(prefix)) {
            String file = name.substring(name.indexOf(prefix) + prefix.length());
            switch (file) {
                case "abandoned_mineshaft":
                case "desert_pyramid":
                case "jungle_temple":
                case "simple_dungeon":
                case "spawn_bonus_chest":
                case "stronghold_corridor":
                case "village_blacksmith":
                    LootEntry entry = new LootEntryTable(RL("inject/simple_dungeon_loot"), 1, 0,  new LootCondition[0], "pneumaticcraft_inject_entry");
                    LootPool pool = new LootPool(new LootEntry[]{entry}, new LootCondition[0], new RandomValueRange(1), new RandomValueRange(0, 1), "pneumaticcraft_inject_pool");
                    event.getTable().addPool(pool);
                    break;
                default:
                    break;
            }
        }
    }
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:26,代码来源:EventHandlerPneumaticCraft.java


示例2: addPool

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
private static void addPool(LootTable table)
{
	LootEntry common = new LootEntryTable(new ResourceLocation("lootslashconquer:chests/common_chest"), 60, 1, new LootCondition[0], "common");
	LootEntry uncommon = new LootEntryTable(new ResourceLocation("lootslashconquer:chests/uncommon_chest"), 25, 1, new LootCondition[0], "uncommon");
	LootEntry rare = new LootEntryTable(new ResourceLocation("lootslashconquer:chests/rare_chest"), 10, 1, new LootCondition[0], "rare");
	LootEntry legendary = new LootEntryTable(new ResourceLocation("lootslashconquer:chests/legendary_chest"), 5, 1, new LootCondition[0], "legendary");
	LootEntry exotic = new LootEntryTable(new ResourceLocation("lootslashconquer:chests/exotic_chest"), 2, 1, new LootCondition[0], "exotic");

	LootPool pool = new LootPool(new LootEntry[] { common, uncommon, rare, legendary, exotic }, new LootCondition[0], new RandomValueRange(0, 1), new RandomValueRange(0), "loot");

	table.addPool(pool);
}
 
开发者ID:TheXFactor117,项目名称:Loot-Slash-Conquer,代码行数:13,代码来源:EventLoadLootTable.java


示例3: lootTableLoad

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
@SubscribeEvent
public void lootTableLoad(final LootTableLoadEvent event) {
	if (NemesisConfig.DISCOVERY_ENABLED && isLootTarget(event)) {

		// TODO improve roll settings

		String name = LOOT_TABLE.toString();
		LootEntry entry = new LootEntryTable(LOOT_TABLE, 1, 0, new LootCondition[0], name);

		RandomValueRange rolls = new RandomValueRange(0, 1);
		LootPool pool = new LootPool(new LootEntry[] { entry }, new LootCondition[0], rolls, rolls, name);
		event.getTable().addPool(pool);
	}
}
 
开发者ID:ToroCraft,项目名称:NemesisSystem,代码行数:15,代码来源:LootHandler.java


示例4: onLootTableLoad

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
@SubscribeEvent
public void onLootTableLoad(LootTableLoadEvent event) {
    String name = event.getName().toString();
    if (name.startsWith("minecraft:chests/simple_dungeon") || name.startsWith("minecraft:chests/desert_pyramid") || name.startsWith("minecraft:chests/jungle_temple")) {
        event.getTable().addPool(new LootPool(new LootEntry[] { new LootEntryTable(new ResourceLocation(Allomancy.MODID, "inject/lerasium"), 1, 0, new LootCondition[0], "allomancy_inject_entry") }, new LootCondition[0], new RandomValueRange(1),
                new RandomValueRange(0, 1), "allomancy_inject_pool"));
    }
}
 
开发者ID:legobmw99,项目名称:Allomancy,代码行数:9,代码来源:CommonEventHandler.java


示例5: getLootPool

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
public static LootPool getLootPool(ResourceLocation res){
	return new LootPool(new LootEntry[]{new LootEntryTable(res, 1, 0, new LootCondition[0], "combined")},
			new LootCondition[0], new RandomValueRange(1), new RandomValueRange(0), "combined");
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:5,代码来源:TF2EventsCommon.java


示例6: getEntry

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
private static LootEntryTable getEntry(String unique, String name, int quality, int weight) {
    return new LootEntryTable(new ResourceLocation(MOD_ID, name), weight, quality, new LootCondition[0], unique);
}
 
开发者ID:GirafiStudios,项目名称:Culinary-Cultivation,代码行数:4,代码来源:FishingLootEvent.java


示例7: loadEntry

import net.minecraft.world.storage.loot.LootEntryTable; //导入依赖的package包/类
private static LootEntry loadEntry(ResourceLocation injectionEntry) {
	return new LootEntryTable(injectionEntry, 1, 0, new LootCondition[0], "openmods_inject_entry");
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:4,代码来源:LootHandler.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SocializeException类代码示例发布时间:2022-05-23
下一篇:
Java ParserException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap