Some books missing on loot table
Jason21tod opened this issue ยท 1 comments
I think i foun a error on https://github.com/Yesssssman/epicfightmod/blob/1.20.1/src/main/java/yesman/epicfight/data/loot/SkillBookLootModifier.java
basically, there's some skillbooks missing on loot creator class ( Like meteor slam ).
`
/**
* Skill List
* Passive
* epicfight:berserker
* epicfight:stamina_pillager
* epicfight:swordmaster
* epicfight:technician
* epicfight:hypervitality
* epicfight:forbidden_strength
* epicfight:death_harvest
* epicfight:endurance
* epicfight:emergency_escape
*
* Guard
* epicfight:guard
* epicfight:impact_guard
* epicfight:parrying
*
* Dodge
* epicfight:roll
* epicfight:step
*
* Mover
* epicfight:demolishing_leap
*/
public static void createSkillLootTable(Set<ResourceLocation> skillNames) {
Map<EntityType<?>, LootTable.Builder> builders = Maps.newHashMap();
SkillLootTableRegistryEvent lootTableRegistryEvent = new SkillLootTableRegistryEvent(builders);
int modifier = ConfigManager.SKILL_BOOK_MOB_DROP_CHANCE_MODIFIER.get();
int dropChance = 100 + modifier;
int antiDropChance = 100 - modifier;
float dropChanceModifier = (antiDropChance == 0) ? Float.MAX_VALUE : dropChance / (float)antiDropChance;
lootTableRegistryEvent.put(EntityType.ZOMBIE, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:berserker",
1.0F, "epicfight:stamina_pillager",
1.0F, "epicfight:roll",
1.0F, "epicfight:step",
1.0F, "epicfight:guard",
0.5F, "epicfight:endurance"
)))
));
lootTableRegistryEvent.put(EntityType.HUSK, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:berserker",
1.0F, "epicfight:stamina_pillager",
1.0F, "epicfight:roll",
1.0F, "epicfight:step",
1.0F, "epicfight:guard",
0.5F, "epicfight:endurance"
)))
));
lootTableRegistryEvent.put(EntityType.DROWNED, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:berserker",
1.0F, "epicfight:stamina_pillager",
1.0F, "epicfight:roll",
1.0F, "epicfight:step",
1.0F, "epicfight:guard",
0.5F, "epicfight:endurance"
)))
));
lootTableRegistryEvent.put(EntityType.SKELETON, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:swordmaster",
1.0F, "epicfight:technician",
1.0F, "epicfight:roll",
1.0F, "epicfight:step",
1.0F, "epicfight:guard",
0.5F, "epicfight:emergency_escape"
)))));
lootTableRegistryEvent.put(EntityType.STRAY, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:swordmaster",
1.0F, "epicfight:technician",
1.0F, "epicfight:roll",
1.0F, "epicfight:step",
1.0F, "epicfight:guard",
0.5F, "epicfight:emergency_escape"
)))));
lootTableRegistryEvent.put(EntityType.SPIDER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:roll",
"epicfight:step",
"epicfight:guard"
)))));
lootTableRegistryEvent.put(EntityType.CAVE_SPIDER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:roll",
"epicfight:step",
"epicfight:guard"
)))
));
lootTableRegistryEvent.put(EntityType.CREEPER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:hypervitality",
"epicfight:impact_guard"
)))
));
lootTableRegistryEvent.put(EntityType.ENDERMAN, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:hypervitality",
"epicfight:forbidden_strength",
"epicfight:endurance",
"epicfight:emergency_escape",
"epicfight:parrying",
"epicfight:impact_guard"
)))
));
lootTableRegistryEvent.put(EntityType.VINDICATOR, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:hypervitality",
"epicfight:berserker",
"epicfight:guard",
"epicfight:step",
"epicfight:roll"
)))
));
lootTableRegistryEvent.put(EntityType.PILLAGER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:hypervitality",
"epicfight:stamina_pillager",
"epicfight:guard",
"epicfight:step",
"epicfight:roll"
)))
));
lootTableRegistryEvent.put(EntityType.WITCH, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:forbidden_strength",
"epicfight:berserker"
)))
));
lootTableRegistryEvent.put(EntityType.EVOKER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:parrying",
"epicfight:impact_guard"
)))).withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.1F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:death_harvest",
"epicfight:emergency_escape"
)))
));
lootTableRegistryEvent.put(EntityType.PIGLIN, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:swordmaster",
"epicfight:stamina_pillager",
"epicfight:guard",
"epicfight:step",
"epicfight:roll"
)))
));
lootTableRegistryEvent.put(EntityType.PIGLIN_BRUTE, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:hypervitality",
"epicfight:parrying",
"epicfight:endurance",
"epicfight:impact_guard"
)))
));
lootTableRegistryEvent.put(EntityType.ZOMBIFIED_PIGLIN, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:berserker",
"epicfight:stamina_pillager",
"epicfight:guard",
"epicfight:step",
"epicfight:roll"
)))
));
lootTableRegistryEvent.put(EntityType.WITHER_SKELETON, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(LootItemRandomChanceCondition.randomChance(0.025F * dropChanceModifier))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
1.0F, "epicfight:swordmaster",
1.0F, "epicfight:stamina_pillager",
1.0F, "epicfight:guard",
1.0F, "epicfight:step",
1.0F, "epicfight:roll",
0.75F, "epicfight:death_harvest"
)))
));
lootTableRegistryEvent.put(EntityType.WITHER, LootTable.lootTable().withPool(
LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F))
.add(LootItem.lootTableItem(EpicFightItems.SKILLBOOK.get()).apply(SetSkillFunction.builder(
"epicfight:death_harvest"
)))
));`