Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Level
- {
- public static final int MAX_LEVEL = 25;
- public static int getLevelExperienceRequirements( int level )
- {
- level -= 1;
- return ( UsefulPets.config.get( "general", "hardLevelReqs_Items", false ).getBoolean( false ) ) ? ( int )( level * 1.5f ) : ( level / 2 );
- }
- public static List< ItemStack > getLevelItemRequirements( int level )
- {
- List< ItemStack > list = new ArrayList< ItemStack >();
- level -= 1;
- if ( UsefulPets.config.get( "general", "hardLevelReqs_Items", false ).getBoolean( false ) )
- {
- int coal = level;
- int iron = ( level - 3 ) * 2;
- int redstone = ( level - 7 ) * 2;
- int gold = ( level - 12 ) * 2;
- int diamondCount = ( level - 16 ) * 3;
- list.add( new ItemStack( coal_block, coal ) );
- if ( level >= 4 )
- {
- list.add( new ItemStack( iron_ingot, iron ) );
- }
- if ( level >= 8 )
- {
- list.add( new ItemStack( redstone_block, redstone ) );
- }
- if ( level >= 13 )
- {
- list.add( new ItemStack( gold_ingot, gold ) );
- }
- if ( level >= 17 )
- {
- list.add( new ItemStack( diamond, diamondCount ) );
- }
- }
- else
- {
- if ( level <= 5 ) list.add( new ItemStack( coal_block ) );
- else if ( level <= 20 ) list.add( new ItemStack( iron_ingot, 5 ) );
- else if ( level <= 15 ) list.add( new ItemStack( redstone_block ) );
- else if ( level <= 20 ) list.add( new ItemStack( gold_ingot, 5 ) );
- else if ( level <= 25 ) list.add( new ItemStack( diamond ) );
- }
- return list;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement